[BioC] GOstats and KEGG

James W. MacDonald jmacdon at med.umich.edu
Thu Nov 2 17:47:59 CET 2006


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.



More information about the Bioconductor mailing list