Class LiricalTemplate

java.lang.Object
org.monarchinitiative.lirical.io.output.LiricalTemplate
Direct Known Subclasses:
HtmlTemplate, TsvTemplate

public abstract class LiricalTemplate extends Object
This is the superclass for TsvTemplate and HtmlTemplate, and provides common methods for setting up the data prior to output as either tab-separated values (TSV) or HTML.
Author:
Peter Robinson
  • Field Details

    • templateData

      protected final Map<String,Object> templateData
      Map of data that will be used for the FreeMark template.
    • cfg

      protected final freemarker.template.Configuration cfg
      FreeMarker configuration object.
    • EMPTY_STRING

      protected static final String EMPTY_STRING
      See Also:
    • outputPath

      protected Path outputPath
    • topDiagnosisMap

      protected Map<String,String> topDiagnosisMap
      This map contains the names of the top differential diagnoses that we will show as a list at the top of the page together with anchors to navigate to the detailed analysis.
    • topDiagnosisAnchors

      protected List<String> topDiagnosisAnchors
      Anchors that are used in the HTML output to navigate to the top differential diagnoses.
    • geneById

      protected final Map<org.monarchinitiative.phenol.ontology.data.TermId,Gene2Genotype> geneById
  • Constructor Details

  • Method Details

    • outputFormatString

      protected abstract String outputFormatString()
    • shortName

      protected String shortName(String name)
      Some of our name strings contain multiple synonyms. This function removes all but the first.
    • createOutputFile

      protected static Path createOutputFile(Path outdir, String prefix, String format)
    • mkdirIfNotExist

      protected static void mkdirIfNotExist(Path dir)
    • toVisualizableVariant

      protected Function<LiricalVariant,VisualizableVariant> toVisualizableVariant()