Class BlatResultParser

java.lang.Object
ubic.gemma.core.loader.util.parser.BasicLineParser<BlatResult>
ubic.gemma.core.loader.genome.BlatResultParser
All Implemented Interfaces:
LineParser<BlatResult>, Parser<BlatResult>

public class BlatResultParser extends BasicLineParser<BlatResult>
Loader to handle results generated by Jim Kent's Blat. The PSL file format is described at ucsc format faq and golden path blat spec. Blank lines are skipped as are valid PSL headers. Target sequences are assumed to be chromosomes. If a chromosome name (chr10 or chr10.fa) is detected, the name is stripped to be a chromosome number only (e.g. 10). Otherwise, the value is used as is. If the query name starts with "target:", this is removed. Results can be filtered by setting the scoreThreshold parameter.
Author:
pavlidis
  • Constructor Details

    • BlatResultParser

      public BlatResultParser()
  • Method Details

    • cleanUpQueryName

      public static String cleanUpQueryName(String queryName)
    • getNumSkipped

      public int getNumSkipped()
    • getResults

      public List<BlatResult> getResults()
      Specified by:
      getResults in interface Parser<BlatResult>
      Specified by:
      getResults in class BasicLineParser<BlatResult>
      Returns:
      the results of the parse.
    • addResult

      protected void addResult(BlatResult obj)
      Specified by:
      addResult in class BasicLineParser<BlatResult>
    • getSearchedDatabase

      public ExternalDatabase getSearchedDatabase()
      Returns:
      the searchedDatabase
    • setSearchedDatabase

      public void setSearchedDatabase(ExternalDatabase searchedDatabase)
      Parameters:
      searchedDatabase - the searchedDatabase to set
    • getTaxon

      public Taxon getTaxon()
      Returns:
      the taxon
    • setTaxon

      public void setTaxon(Taxon taxon)
      Parameters:
      taxon - the taxon to set
    • parseOneLine

      public BlatResult parseOneLine(String line)
      Description copied from interface: LineParser
      Handle the parsing of a single line from the input.
      Parameters:
      line - line to parse
      Returns:
      parsed object
    • setScoreThreshold

      public void setScoreThreshold(double score)
      Parameters:
      score - Define a threshold, below which results are ignored. By default all results are read in.