extracting topGO gene ids from result object
1
0
Entering edit mode
Paul Rigor ▴ 110
@paul-rigor-4400
Last seen 10.2 years ago
Hello, So I'm working on extracting IDs from a topGO result object. I have a list of terms ranked by p values (using classic fisher test). However, does the result object contain indices to the original list of gene ids per go term? The documentation was a bit unclear. Using the printGenes function and specifying the top ranked GO terms, I'd like to only pull the genes from my gene list, not from the entire GO annotation table, which seems to be the default behavior for this function. Thanks, Paul [[alternative HTML version deleted]]
Annotation GO topGO Annotation GO topGO • 4.1k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States
Hi Paul, On 12/17/10 13:41, Paul Rigor wrote: > Hello, > > So I'm working on extracting IDs from a topGO result object. I have a > list of terms ranked by p values (using classic fisher test). However, > does the result object > contain indices to the original list of gene ids per go term? The > documentation was a bit unclear. > > Using the printGenes function and specifying the top ranked GO terms, > I'd like to only pull the genes from my gene list, not from the entire > GO annotation table, which seems to be the default behavior for this > function. > Using the example from the topGO vignette, sampleGOdata <- new("topGOdata", description = "Simple session", ontology = "BP", allGenes = geneList, geneSel = topDiffGenes, nodeSize = 10, annot = annFUN.db, affyLib = affyLib) resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic = "fisher") Create a map of geneIDs to GO terms, ann.genes <- genesInTerm(sampleGOdata) str(ann.genes) Select a few GO terms from the Fisher analysis (you could sort these first or ...), fisher.go <- names(score(resultFisher))[1:5] fisher.ann.genes <- genesInTerm(sampleGOdata, whichGO=fisher.go) fisher.ann.genes The fisher.ann.genes list give you the gene ID / GO term mapping subset on the GO terms from the Fisher analysis. You can also use printGenes on this subset of GO terms, ft <- printGenes(sampleGOdata, whichTerms=fisher.go, chip="hgu95av2.db") Valerie > Thanks, > Paul > > [[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 >
ADD COMMENT
0
Entering edit mode
Thank you, this works quite well. I wish topGO had a prettier way of printing out the results similar to GOstats, though. Cheers, Paul On Sun, Dec 19, 2010 at 2:59 PM, Valerie Obenchain <vobencha@fhcrc.org>wrote: > Hi Paul, > > > On 12/17/10 13:41, Paul Rigor wrote: > >> Hello, >> >> So I'm working on extracting IDs from a topGO result object. I have a >> list of terms ranked by p values (using classic fisher test). However, >> does the result object >> contain indices to the original list of gene ids per go term? The >> documentation was a bit unclear. >> >> Using the printGenes function and specifying the top ranked GO terms, >> I'd like to only pull the genes from my gene list, not from the entire >> GO annotation table, which seems to be the default behavior for this >> function. >> >> > Using the example from the topGO vignette, > > sampleGOdata <- new("topGOdata", description = "Simple session", > ontology = "BP", > allGenes = geneList, geneSel = topDiffGenes, nodeSize = 10, annot = > annFUN.db, > affyLib = affyLib) > > resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic = > "fisher") > > > Create a map of geneIDs to GO terms, > > ann.genes <- genesInTerm(sampleGOdata) > str(ann.genes) > > Select a few GO terms from the Fisher analysis (you could sort these first > or ...), > > fisher.go <- names(score(resultFisher))[1:5] > fisher.ann.genes <- genesInTerm(sampleGOdata, whichGO=fisher.go) > fisher.ann.genes > > The fisher.ann.genes list give you the gene ID / GO term mapping subset on > the GO terms from the Fisher analysis. You can also use printGenes on this > subset of GO terms, > > ft <- printGenes(sampleGOdata, whichTerms=fisher.go, chip="hgu95av2.db") > > > > Valerie > > Thanks, >> Paul >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> > > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi gang, I was wondering if there's anyway to obtain the adjacency list of matrix of the induced go graphs, eg, the graphs generated by the printGraph function? Thanks, Paul On Wed, Dec 22, 2010 at 3:21 AM, Paul Rigor <pryce@ucla.edu> wrote: > Thank you, this works quite well. I wish topGO had a prettier way of > printing out the results similar to GOstats, though. > > Cheers, > Paul > > > On Sun, Dec 19, 2010 at 2:59 PM, Valerie Obenchain <vobencha@fhcrc.org>wrote: > >> Hi Paul, >> >> >> On 12/17/10 13:41, Paul Rigor wrote: >> >>> Hello, >>> >>> So I'm working on extracting IDs from a topGO result object. I have a >>> list of terms ranked by p values (using classic fisher test). However, >>> does the result object >>> contain indices to the original list of gene ids per go term? The >>> documentation was a bit unclear. >>> >>> Using the printGenes function and specifying the top ranked GO terms, >>> I'd like to only pull the genes from my gene list, not from the entire >>> GO annotation table, which seems to be the default behavior for this >>> function. >>> >>> >> Using the example from the topGO vignette, >> >> sampleGOdata <- new("topGOdata", description = "Simple session", >> ontology = "BP", >> allGenes = geneList, geneSel = topDiffGenes, nodeSize = 10, annot >> = annFUN.db, >> affyLib = affyLib) >> >> resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic >> = "fisher") >> >> >> Create a map of geneIDs to GO terms, >> >> ann.genes <- genesInTerm(sampleGOdata) >> str(ann.genes) >> >> Select a few GO terms from the Fisher analysis (you could sort these first >> or ...), >> >> fisher.go <- names(score(resultFisher))[1:5] >> fisher.ann.genes <- genesInTerm(sampleGOdata, whichGO=fisher.go) >> fisher.ann.genes >> >> The fisher.ann.genes list give you the gene ID / GO term mapping subset >> on the GO terms from the Fisher analysis. You can also use printGenes on >> this subset of GO terms, >> >> ft <- printGenes(sampleGOdata, whichTerms=fisher.go, >> chip="hgu95av2.db") >> >> >> >> Valerie >> >> Thanks, >>> Paul >>> >>> [[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >>> >> >> > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 606 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