[BioC] TopGO: How to retrieve the gene list related to a GO ID ?
Ricardo
ricardo.de.matos.simoes at univie.ac.at
Mon Sep 28 16:28:19 CEST 2009
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
>
>
More information about the Bioconductor
mailing list