[BioC] GO.db: how to get GO Term

Martin Morgan mtmorgan at fhcrc.org
Tue Jun 23 02:54:10 CEST 2009


Gordon K Smyth wrote:
> What is the recommended way to find the GO term that corresponds to a 
> given GO accession number?  I can do this:
> 
>   > library(GO.db)
>   > Term(as.list(GOTERM["GO:0000166"])[[1]])
>   [1] "nucleotide binding"

Not sure about 'recommended', but these

   Term(GOTERM[["GO:0000166"]])
   eapply(GOTERM[gids], Term)

seem a bit better

Martin

> 
> But this seems a bit inelegant, using as.list() and list subsetting as 
> an intermediaries both inside and outside of S4 generic functions.  And 
> it needs more work to generalise to multiple accession numbers.  Is 
> there something more direct?
> 
> Thanks a lot
> Gordon
> 
> -----------------------------------------------
> Associate Professor Gordon K Smyth,
> NHMRC Senior Research Fellow,
> Bioinformatics Division, Walter and Eliza Hall Institute of Medical 
> Research, 1G Royal Parade, Parkville, Vic 3052, Australia.
> smyth at wehi.edu.au
> http://www.wehi.edu.au/bioinformatics
> http://www.statsci.org/smyth
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: 
> http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list