[BioC] TopGO: How to retrieve the gene list related to a GO ID ?

Jean-Pierre Desvignes Jean-Pierre.Desvignes at igf.cnrs.fr
Mon Sep 28 18:38:44 CEST 2009


Hi Ricardo,

I have not thought of that. it's simple.

Thank you very much !

Jean-Pierre

Ricardo a écrit :
> Hi Jean-Pierre,
>
> I assume you were using TopGO from the message header,
> so you can do the following:
>
> # sample are your candidate genes and allgenes all other genes
> # you included in your analysis
>
> universe = factor(as.integer(allgenes %in% sample))
> names(universe) = allgenes
>
> # you created an GOdata object for TopGO
> # "GO" would be your annotation Gene2GOid list
>
> GOdata = new('topGOdata',ontology="BP",allGenes=universe,  
> annot=annFUN.gene2GO,gene2GO=GO)
>
> # retrieve genes2GO list from the "expanded" annotation in GOdata
>
> allGO = genesInTerm(GOdata)
>
> #allGO["GO:0000109"]
> #$`GO:0000109`
> #[1] "ENSG00000012061" "ENSG00000104472" "ENSG00000175595"
>
> SAM_ANOTATION = lapply(allGO,function(x) x[x %in% sample] )
>
> # Your significant genes for GO:0051427
> SAM_ANOTATION[["GO:0051427"]]
>
> Hope it was helpful.
> Best wishes,
> Ricardo
>
>
> Jean-Pierre Desvignes wrote:
>> Hello,
>>
>> I would known if it was possible to retrieve the genes related to a 
>> GO term ?
>>
>> If yes, how to do that ?
>>
>> GO.ID  Term  Level  Annotated  "Significant"  Expected  classicFisher
>>
>> GO:0051427  hormone receptor binding  5  16  17  "2"  0.12  0.00583
>>
>> For example, what are the 2 Significant genes here ?
>>
>>
>>
>> Thanks a lot.
>>
>> _______________________________________________
>> 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
>>
>>   
>
>


-- 
Jean-Pierre Desvignes

Ingénieur d'étude.
Plateforme Montpellier GenomiX
Institut de Génomique Fonctionnelle
141 rue de la Cardonille
34094 Montpellier cedex 05
-FRANCE-
Tél: 04.67.14.29.32



-- 
Passerelle antivirus IGF
--



More information about the Bioconductor mailing list