Package ubic.gemma.core.loader.genome
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
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.util.parser.BasicLineParser
log
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.LineParser
MIN_PARSED_LINES_FOR_UPDATE, PARSE_ALERT_TIME_FREQUENCY_MS
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.Parser
PARSE_ALERT_FREQUENCY
-
-
Constructor Summary
Constructors Constructor Description BlatResultParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addResult(BlatResult obj)
static String
cleanUpQueryName(String queryName)
int
getNumSkipped()
Collection<BlatResult>
getResults()
ExternalDatabase
getSearchedDatabase()
Taxon
getTaxon()
BlatResult
parseOneLine(String line)
Handle the parsing of a single line from the input.void
setScoreThreshold(double score)
void
setSearchedDatabase(ExternalDatabase searchedDatabase)
void
setTaxon(Taxon taxon)
-
Methods inherited from class ubic.gemma.core.loader.util.parser.BasicLineParser
parse, parse, parse
-
-
-
-
Method Detail
-
getNumSkipped
public int getNumSkipped()
-
getResults
public Collection<BlatResult> getResults()
- Specified by:
getResults
in interfaceParser<BlatResult>
- Specified by:
getResults
in classBasicLineParser<BlatResult>
- Returns:
- the results of the parse.
-
addResult
protected void addResult(BlatResult obj)
- Specified by:
addResult
in classBasicLineParser<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.
-
-