Class NcbiGeneHistoryParser
- java.lang.Object
-
- ubic.gemma.core.loader.util.parser.BasicLineMapParser<String,NcbiGeneHistory>
-
- ubic.gemma.core.loader.genome.gene.ncbi.NcbiGeneHistoryParser
-
- All Implemented Interfaces:
LineParser<NcbiGeneHistory>
,Parser<NcbiGeneHistory>
public class NcbiGeneHistoryParser extends BasicLineMapParser<String,NcbiGeneHistory>
Parse the NCBI "gene_history" file. File format : tax_id, GeneID,Discontinued_GeneID, Discontinued_Symbol, Discontinue_Date; (tab is used as a separator, pound sign - start of a comment) File is obtained from ftp.ncbi.nih.gov.gene/DATA See ncbi readme There are two kinds of lines. Lines with a "-" for the GeneID (the majority) seems to be used when the record was withdrawn (Field is defined as "the current unique identified for a gene"). Lines with a symbol means it was replaced, so far as I can tell.- Author:
- paul
-
-
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 NcbiGeneHistoryParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(String key)
String
discontinuedIdForSymbol(String geneSymbol, Integer taxonId)
NcbiGeneHistory
get(String key)
protected String
getKey(NcbiGeneHistory newItem)
Collection<String>
getKeySet()
Collection<NcbiGeneHistory>
getResults()
NcbiGeneHistory
parseOneLine(String line)
Handle the parsing of a single line from the input.protected void
put(String key, NcbiGeneHistory value)
-
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,NcbiGeneHistory>
-
get
public NcbiGeneHistory get(String key)
- Specified by:
get
in classBasicLineMapParser<String,NcbiGeneHistory>
-
getKeySet
public Collection<String> getKeySet()
- Specified by:
getKeySet
in classBasicLineMapParser<String,NcbiGeneHistory>
-
getResults
public Collection<NcbiGeneHistory> getResults()
- Specified by:
getResults
in interfaceParser<NcbiGeneHistory>
- Specified by:
getResults
in classBasicLineMapParser<String,NcbiGeneHistory>
- Returns:
- the results of the parse.
-
parseOneLine
public NcbiGeneHistory parseOneLine(String line)
Description copied from interface:LineParser
Handle the parsing of a single line from the input.- Specified by:
parseOneLine
in interfaceLineParser<NcbiGeneHistory>
- Specified by:
parseOneLine
in classBasicLineMapParser<String,NcbiGeneHistory>
- Parameters:
line
- line to parse- Returns:
- parsed object
-
getKey
protected String getKey(NcbiGeneHistory newItem)
- Specified by:
getKey
in classBasicLineMapParser<String,NcbiGeneHistory>
-
put
protected void put(String key, NcbiGeneHistory value)
- Specified by:
put
in classBasicLineMapParser<String,NcbiGeneHistory>
-
-