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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
int
getCount()
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)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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ubic.gemma.core.loader.util.parser.Parser
getUniqueResult
-
Constructor Details
-
NCBIGene2GOAssociationParser
- Parameters:
taxa
- to consider (usually we pass in all)
-
-
Method Details
-
getCount
public int getCount() -
getResults
- Specified by:
getResults
in interfaceParser<Gene2GOAssociation>
- Specified by:
getResults
in classBasicLineParser<Gene2GOAssociation>
- Returns:
- the results of the parse.
-
addResult
- Specified by:
addResult
in classBasicLineParser<Gene2GOAssociation>
-
mapFromGene2GO
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
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
-