[BioC] retrieve the level for a GO category

Martin Morgan mtmorgan at fhcrc.org
Wed Nov 23 08:29:49 CET 2011


On 11/22/2011 02:33 PM, Biase, Fernando Henrique wrote:
> Hi everyone,
>
> Is there a way to retrieve the level for a GO category in R?
>
> As of now I am retrieving terms by using the following code:
>
>> BP_terms<- stack(lapply(mget(GO_BP_Cats_5_more_genes$category,
>> GOTERM, ifnotfound=NA), Term))
>
> Now I wanted go get the level (3,4,5...,9).
>
> I looked into the "annotate" package and the " .db" (I am using
> org.Bt.eg.db) usage but could not find it.
>
> Any hint would be very much appreciated.

Hi,

Maybe using the CHILDREN (immediate descendants) or OFFSPRING maps ? For 
instance

 > toTable(GOBPCHILDREN["GO:0071842"])
         go_id      go_id RelationshipType
1  GO:0006323 GO:0071842             is_a
2  GO:0006996 GO:0071842             is_a
3  GO:0007028 GO:0071842             is_a
4  GO:0030030 GO:0071842             is_a
5  GO:0034621 GO:0071842             is_a
6  GO:0034994 GO:0071842             is_a
7  GO:0035845 GO:0071842             is_a
8  GO:0043062 GO:0071842             is_a
9  GO:0043580 GO:0071842             is_a
10 GO:0071844 GO:0071842             is_a
11 GO:0071845 GO:0071842             is_a
12 GO:0071956 GO:0071842             is_a
13 GO:0072553 GO:0071842             is_a
14 GO:0097061 GO:0071842             is_a

or

 > length(mappedLkeys(GOBPOFFSPRING["GO:0071842"]))
[1] 1683

The 'Lkeys' could be retrieved recursively, or to find out more 
information about the terms

 > toTable(GOTERM[mappedLkeys(GOBPCHILDREN["GO:0071842"])])

If you want to do something more than enumerate the children, perhaps 
the graph package would be appropriate.

Hope that helps,

Martin
>
> Thanks in advance, Fernando
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________ Bioconductor mailing
> list Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the
> archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor


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

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioconductor mailing list