Class NcbiGeneInfoParser
- java.lang.Object
-
- ubic.gemma.core.loader.util.parser.BasicLineMapParser<String,NCBIGeneInfo>
-
- ubic.gemma.core.loader.genome.gene.ncbi.NcbiGeneInfoParser
-
- All Implemented Interfaces:
LineParser<NCBIGeneInfo>
,Parser<NCBIGeneInfo>
,QueuingParser<String>
public class NcbiGeneInfoParser extends BasicLineMapParser<String,NCBIGeneInfo> implements QueuingParser<String>
Class to parse the gene_info file from NCBI Gene. See readme for details of the format.- Author:
- pavlidis
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.util.parser.BasicLineMapParser
COMMENT_MARK, 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 NcbiGeneInfoParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(String key)
NCBIGeneInfo
get(String key)
String
getKey(NCBIGeneInfo newItem)
Collection<String>
getKeySet()
Collection<NCBIGeneInfo>
getResults()
void
parse(InputStream inputStream, BlockingQueue<String> queue)
Parse an input stream, storing the results in the passed queue (which can be used by a consumer)NCBIGeneInfo
parseOneLine(String line)
Handle the parsing of a single line from the input.protected void
put(String key, NCBIGeneInfo value)
void
setFilter(boolean filter)
void
setSupportedTaxa(Collection<Integer> ncbiTaxonIds)
-
Methods inherited from class ubic.gemma.core.loader.util.parser.BasicLineMapParser
parse, parse, parse
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(String key)
- Specified by:
containsKey
in classBasicLineMapParser<String,NCBIGeneInfo>
-
get
public NCBIGeneInfo get(String key)
- Specified by:
get
in classBasicLineMapParser<String,NCBIGeneInfo>
-
getKeySet
public Collection<String> getKeySet()
- Specified by:
getKeySet
in classBasicLineMapParser<String,NCBIGeneInfo>
-
getResults
public Collection<NCBIGeneInfo> getResults()
- Specified by:
getResults
in interfaceParser<NCBIGeneInfo>
- Specified by:
getResults
in classBasicLineMapParser<String,NCBIGeneInfo>
- Returns:
- the results of the parse.
-
parseOneLine
public NCBIGeneInfo parseOneLine(String line)
Description copied from interface:LineParser
Handle the parsing of a single line from the input.- Specified by:
parseOneLine
in interfaceLineParser<NCBIGeneInfo>
- Specified by:
parseOneLine
in classBasicLineMapParser<String,NCBIGeneInfo>
- Parameters:
line
- line to parse- Returns:
- parsed object
-
getKey
public String getKey(NCBIGeneInfo newItem)
- Specified by:
getKey
in classBasicLineMapParser<String,NCBIGeneInfo>
-
put
protected void put(String key, NCBIGeneInfo value)
- Specified by:
put
in classBasicLineMapParser<String,NCBIGeneInfo>
-
parse
public void parse(InputStream inputStream, BlockingQueue<String> queue) throws IOException
Description copied from interface:QueuingParser
Parse an input stream, storing the results in the passed queue (which can be used by a consumer)- Specified by:
parse
in interfaceQueuingParser<String>
- Parameters:
inputStream
- input streamqueue
- queue- Throws:
IOException
- IO problems
-
setFilter
public void setFilter(boolean filter)
-
setSupportedTaxa
public void setSupportedTaxa(Collection<Integer> ncbiTaxonIds)
- Parameters:
ncbiTaxonIds
- Taxon IDs (NCBI, not Gemma ids) e.g. 9606 for H. sapiens
-
-