GOstats and KEGG
4
0
Entering edit mode
@morten-mattingsdal-1907
Last seen 9.6 years ago
Hello everyone, Ill be brief: I find the updated version of GOstats very useful (version 2.0.2), and I look forward to present the results for the experimentalists. But I also want to do a similar testing with KEGG pathways, where KEGG pathways in my sig. DE list are compared against the "universe" of KEGG pahways on my array. hyperGTest only works with GO terms (as it should), but would it be possible to expand it to include KEGG pathways ? If not, what libraries do people use to test for overrepresented pathways in a toplist ? regards, morten
Pathways GO GOstats Pathways GO GOstats • 2.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
Hi Morten, Morten Mattingsdal wrote: > Hello everyone, > > Ill be brief: > I find the updated version of GOstats very useful (version 2.0.2), and I > look forward to present the results for the experimentalists. But I also > want to do a similar testing with KEGG pathways, where KEGG pathways in > my sig. DE list are compared against the "universe" of KEGG pahways on > my array. > > hyperGTest only works with GO terms (as it should), but would it be > possible to expand it to include KEGG pathways ? If not, what libraries > do people use to test for overrepresented pathways in a toplist ? You are mistaken. hyperGTest() works with any of three input objects; GOHyperGParams, KEGGHyperGParams, and PFAMHyperGParams. You instantiate a KEGGHyperGParams object the same way as for a GOHyperGParams object (only with KEGG ids), and then feed it to hyperGTest(). The help pages for these objects are in the Category package, which may be why you missed them. Best, Jim > > regards, > morten > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
Hi Jim, Aha... I just replaced GOHyperGParams with KEGGHyperGParams as you told me, and then it worked. >all_entrez=lookUp(universe,"hgu133plus2","ENTREZID") >my_entrez=lookUp(probe,"hgu133plus2","ENTREZID") >hgCutoff <- 0.01 >params <- new("KEGGHyperGParams", geneIds = my_entrez, universeGeneIds = all_entrez, annotation = "hgu133plus2", pvalueCutoff= hgCutoff, testDirection = "over") >over_kegg<- hyperGTest(params) Gene to KEGG Category Test for over Representation Test Result 100 KEGG ids tested (3 have p < 0.01) Selected gene set size: 99 Gene universe size: 2137 Annotation package: hgu133plus2 But when I try to write a html report I get the error, >htmlReport(over_kegg, file = "KEGG.html") Error in function (classes, fdef, mtable) : unable to find an inherited method for function "htmlReport", for signature "HyperGResult" any hints how to display the results ? (since Im quite lost by now) with: R version 2.4.0 GOstats 2.0.2 annotate: 1.12.0 greatly appreciate any help morten James W. MacDonald wrote: > Hi Morten, > > Morten Mattingsdal wrote: >> Hello everyone, >> >> Ill be brief: >> I find the updated version of GOstats very useful (version 2.0.2), >> and I look forward to present the results for the experimentalists. >> But I also want to do a similar testing with KEGG pathways, where >> KEGG pathways in my sig. DE list are compared against the "universe" >> of KEGG pahways on my array. >> >> hyperGTest only works with GO terms (as it should), but would it be >> possible to expand it to include KEGG pathways ? If not, what >> libraries do people use to test for overrepresented pathways in a >> toplist ? > > You are mistaken. hyperGTest() works with any of three input objects; > GOHyperGParams, KEGGHyperGParams, and PFAMHyperGParams. You > instantiate a KEGGHyperGParams object the same way as for a > GOHyperGParams object (only with KEGG ids), and then feed it to > hyperGTest(). > > The help pages for these objects are in the Category package, which > may be why you missed them. > > Best, > > Jim > >
ADD REPLY
0
Entering edit mode
Hi Morten, Well, I didn't say you could summarize your results, just that you could do the hyperGTest ;-D. The problem here is that htmlReport() calls summary(), which requires that 'over_kegg' be a GOHyperGResult object. Unfortunately you don't have one of those. I assume extending htmlReport() is on Seth's long TODO list, but for now it only does GO stuff. However, I don't think it would be that difficult for you to extend it yourself (or at least extend summary() so it will ouput a data.frame that you can then output using write.table()). You will need to make a copy of summary() and modify it to work with your HyperGResult object. You can get summary by typing showMethods("summary", includeDefs = TRUE) at an R prompt, and then copy/paste into your favorite editor. Then rename the function so it doesn't mask anything, and hack away until it will output something useful. You should note that some of the functions in there (getWantedGOIDs() is a good example) are sealed in GOstats' name space, so you will have to append a GOstats::: on the front of that function so your function will be able to find it. For example, wanted <- getWantedGOIDs(object, pvalue, categorySize) needs to be changed to wanted <- GOstats:::getWantedGOIDs(object, pvalue, categorySize) HTH, Jim Morten Mattingsdal wrote: > Hi Jim, > Aha... I just replaced GOHyperGParams with KEGGHyperGParams as you told > me, and then it worked. > > >all_entrez=lookUp(universe,"hgu133plus2","ENTREZID") > >my_entrez=lookUp(probe,"hgu133plus2","ENTREZID") > >hgCutoff <- 0.01 > >params <- new("KEGGHyperGParams", geneIds = my_entrez, universeGeneIds > = all_entrez, annotation = "hgu133plus2", pvalueCutoff= hgCutoff, > testDirection = "over") > >over_kegg<- hyperGTest(params) > Gene to KEGG Category Test for over Representation Test Result > 100 KEGG ids tested (3 have p < 0.01) > Selected gene set size: 99 > Gene universe size: 2137 > Annotation package: hgu133plus2 > > But when I try to write a html report I get the error, > > >htmlReport(over_kegg, file = "KEGG.html") > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function "htmlReport", > for signature "HyperGResult" > > any hints how to display the results ? (since Im quite lost by now) > > with: > R version 2.4.0 > GOstats 2.0.2 > annotate: 1.12.0 > > greatly appreciate any help > morten > > > > James W. MacDonald wrote: > >>Hi Morten, >> >>Morten Mattingsdal wrote: >> >>>Hello everyone, >>> >>>Ill be brief: >>>I find the updated version of GOstats very useful (version 2.0.2), >>>and I look forward to present the results for the experimentalists. >>>But I also want to do a similar testing with KEGG pathways, where >>>KEGG pathways in my sig. DE list are compared against the "universe" >>>of KEGG pahways on my array. >>> >>>hyperGTest only works with GO terms (as it should), but would it be >>>possible to expand it to include KEGG pathways ? If not, what >>>libraries do people use to test for overrepresented pathways in a >>>toplist ? >> >>You are mistaken. hyperGTest() works with any of three input objects; >>GOHyperGParams, KEGGHyperGParams, and PFAMHyperGParams. You >>instantiate a KEGGHyperGParams object the same way as for a >>GOHyperGParams object (only with KEGG ids), and then feed it to >>hyperGTest(). >> >>The help pages for these objects are in the Category package, which >>may be why you missed them. >> >>Best, >> >>Jim >> >> > > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD REPLY
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
Hi all, "James W. MacDonald" <jmacdon at="" med.umich.edu=""> writes: > Well, I didn't say you could summarize your results, just that you could > do the hyperGTest ;-D. > > The problem here is that htmlReport() calls summary(), which requires > that 'over_kegg' be a GOHyperGResult object. Unfortunately you don't > have one of those. > > I assume extending htmlReport() is on Seth's long TODO list, but for now > it only does GO stuff. However, I don't think it would be that difficult > for you to extend it yourself (or at least extend summary() so it will > ouput a data.frame that you can then output using write.table()). Yes, this is on my TODO list and given that there is interest, it will move closer to the top ;-) Stay tuned. + seth
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
Hi Morten and other Category/GOstats users, Morten Mattingsdal <mortenm at="" inbox.com=""> writes: > But when I try to write a html report I get the error, > > >htmlReport(over_kegg, file = "KEGG.html") > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function "htmlReport", > for signature "HyperGResult" > > any hints how to display the results ? (since Im quite lost by now) I've added code to the devel version of the Category and GOstats packages to support summary() and htmlReport() on the results of hyperGTest when applied to KEGG, PFAM, and GO categories. The updates will be availabe in the devel BioC repository tomorrow. I'm considering patching the release with this code since it makes the results much easier to display (I guess I can argue it is a bug of omission). I realized that I should have also pointed out how you can extract some of the details from the result of a hyperGTest test with the current versions. Suppose you have created a parameter instance 'params' and done: ans <- hyperGTest(params) Then you might try the following: pvalues(ans)[1:10] oddsRatios(ans)[1:10] expectedCounts(ans)[1:10] geneCounts(ans)[1:10] ## Number of selected "genes" found in cateogry universeCounts(ans)[1:10] ## Number of "genes" in each tested category categoryIds <- names(pvalues(ans)) Best, + seth
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
Hi again, Seth Falcon <sfalcon at="" fhcrc.org=""> writes: > I've added code to the devel version of the Category and GOstats > packages to support summary() and htmlReport() on the results of > hyperGTest when applied to KEGG, PFAM, and GO categories. > > The updates will be availabe in the devel BioC repository tomorrow. > I'm considering patching the release with this code since it makes the > results much easier to display (I guess I can argue it is a bug of > omission). I have updated the release. If you update Category and GOstats using biocLite, you will now be able to call summary() and htmlReport() on the hyperGTest results. Best Wishes, + seth
ADD COMMENT

Login before adding your answer.

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