TopGO: How to retrieve the gene list related to a GO ID ?
1
1
Entering edit mode
@jean-pierre-desvignes-3513
Last seen 10.2 years ago
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.
• 12k views
ADD COMMENT
4
Entering edit mode
Ricardo ▴ 50
@ricardo-3706
Last seen 10.2 years ago
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 > >
ADD COMMENT
0
Entering edit mode
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 --
ADD REPLY
0
Entering edit mode

This was helpful to me too, however, what exactly constitutes the sample here? I was able to get the annotated genes but not the significant ones. My set of genes for this are named vectors and tried using that, however, I get a list with 0 characters in it. Please help !

ADD REPLY

Login before adding your answer.

Traffic: 554 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6