Class NCBIGene2GOAssociationParser
- java.lang.Object
-
- ubic.gemma.core.loader.util.parser.BasicLineParser<Gene2GOAssociation>
-
- ubic.gemma.core.loader.association.NCBIGene2GOAssociationParser
-
- All Implemented Interfaces:
LineParser<Gene2GOAssociation>
,Parser<Gene2GOAssociation>
,QueuingParser<Gene2GOAssociation>
public class NCBIGene2GOAssociationParser extends BasicLineParser<Gene2GOAssociation> implements QueuingParser<Gene2GOAssociation>
This parses GO annotations from NCBI. See readme.tax_id: the unique identifier provided by NCBI Taxonomy for the species or strain/isolate GeneID: the unique identifier for a gene --note: for genomes previously available from LocusLink, the identifiers are equivalent GO ID: the GO ID, formatted as GO:0000000 Evidence: the evidence code in the gene_association file Qualifier: a qualifier for the relationship between the gene and the GO term GO term: the term indicated by the GO ID PubMed: pipe-delimited set of PubMed uids reported as evidence for the association Category: the GO category (Function, Process, or Component)
- Author:
- keshav, 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 NCBIGene2GOAssociationParser(Collection<Taxon> taxa)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addResult(Gene2GOAssociation obj)
int
getCount()
Collection<Gene2GOAssociation>
getResults()
Gene2GOAssociation
mapFromGene2GO(String line)
Note that "-" means a missing value, which in practice only occurs in the "qualifier" and "pubmed" columns.void
parse(InputStream inputStream, BlockingQueue<Gene2GOAssociation> aqueue)
Parse an input stream, storing the results in the passed queue (which can be used by a consumer)Gene2GOAssociation
parseOneLine(String line)
Handle the parsing of a single line from the input.-
Methods inherited from class ubic.gemma.core.loader.util.parser.BasicLineParser
parse, parse, parse
-
-
-
-
Constructor Detail
-
NCBIGene2GOAssociationParser
public NCBIGene2GOAssociationParser(Collection<Taxon> taxa)
- Parameters:
taxa
- to consider (usually we pass in all)
-
-
Method Detail
-
getCount
public int getCount()
-
getResults
public Collection<Gene2GOAssociation> getResults()
- Specified by:
getResults
in interfaceParser<Gene2GOAssociation>
- Specified by:
getResults
in classBasicLineParser<Gene2GOAssociation>
- Returns:
- the results of the parse.
-
addResult
protected void addResult(Gene2GOAssociation obj)
- Specified by:
addResult
in classBasicLineParser<Gene2GOAssociation>
-
mapFromGene2GO
public Gene2GOAssociation mapFromGene2GO(String line)
Note that "-" means a missing value, which in practice only occurs in the "qualifier" and "pubmed" columns.- Parameters:
line
- line- Returns:
- Object
-
parse
public void parse(InputStream inputStream, BlockingQueue<Gene2GOAssociation> aqueue) 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<Gene2GOAssociation>
- Parameters:
inputStream
- input streamaqueue
- queue- Throws:
IOException
- IO problems
-
parseOneLine
public Gene2GOAssociation parseOneLine(String line)
Description copied from interface:LineParser
Handle the parsing of a single line from the input.- Specified by:
parseOneLine
in interfaceLineParser<Gene2GOAssociation>
- Parameters:
line
- line to parse- Returns:
- parsed object
-
-