problem with GOHyperGParams in package Category
1
0
Entering edit mode
Mark W Kimpel ▴ 830
@mark-w-kimpel-2027
Last seen 10.2 years ago
Tonight I set about to generalize a function I had written to do GO analysis using the package GOstats, and to do this by switching to package Category. I wanted to add KEGG testing to the GO testing I have been doing. All I did to my code was to add a conditional such that if the category was KEGG a KEGGHyperGParams object would be created, else if it was BP, MF, or CC a GOHyperGParams object would be created. Then the object params would be tested. I did not change my GOHyperGParams generating code and, curiously, the KEGG option works beautifully. However, whenever I use a GO category I get a strange error message (see below for this and sessionInfo. I seem to remember something odd like this happening when some objects with the same name collided, but I'm not sure how that could be happening. Output is below, help is appreciated. Mark ###################### #my code: CatToTest is either "KEGG", "BP, "MF, or "CC". if (CatToTest == "KEGG"){ params <- new("KEGGHyperGParams", geneIds = selectedEntrezIds, universeGeneIds = entrez.universe.vec, annotation = annotationPckg, pvalueCutoff = hgCutoff, testDirection = testDirection) } else { params <- new("GOHyperGParams", geneIds = selectedEntrezIds, universeGeneIds = entrez.universe.vec, annotation = annotationPckg, ontology = CatToTest, pvalueCutoff = hgCutoff, conditional = TRUE, testDirection = testDirection) } test.obj<-hyperGTest(params) ###################################### # error out GO.out <- Cat.anal.func(CatToTest = Cats[i], Error in getClass(Class, where = topenv(parent.frame())) : c("\"GOHyperGResult\" is not a defined class", "\"BPHyperGResult\" is not a defined class") Enter a frame number, or 0 to exit 1: Cat.anal.func(CatToTest = Cats[i], input.df = pcmt1.cor.nodes, annotationPc 2: CatHyperMaxCats.func(CatToTest, optimizedParam) 3: hyperGTest(params) 4: .valueClassTest(standardGeneric("hyperGTest"), "HyperGResultBase", "hyperGT 5: is(object, Cl) 6: .class1(object) 7: .class1(object) 8: .hyperGTestInternal(p) 9: new(className, pvalues = stats$p[ord], oddsRatios = stats$odds[ord], expect 10: getClass(Class, where = topenv(parent.frame())) ############################################################ #sessionInfo() R version 2.6.1 (2007-11-26) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US .UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US. UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8 ;LC_IDENTIFICATION=C attached base packages: [1] tcltk splines tools stats graphics grDevices datasets [8] utils methods base other attached packages: [1] GO.db_2.0.2 rat2302_2.0.1 qvalue_1.12.0 [4] Category_2.4.0 genefilter_1.16.0 survival_2.34 [7] annotate_1.16.1 xtable_1.5-2 AnnotationDbi_1.0.6 [10] RSQLite_0.6-8 DBI_0.2-4 graph_1.16.1 [13] Biobase_1.16.3 loaded via a namespace (and not attached): [1] cluster_1.11.10 RBGL_1.14.0 -- Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, & Mobile & VoiceMail (317) 204-4202 Home (no voice mail please) mwkimpel<at>gmail<dot>com
Annotation GO GOstats Category Annotation GO GOstats Category • 2.4k views
ADD COMMENT
0
Entering edit mode
Tony Chiang ▴ 570
@tony-chiang-1769
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080306/ 430506d5/attachment.pl
ADD COMMENT
0
Entering edit mode
Robert and Tony, Deja vu all over again. I don't remember asking this before, but wouldn't surprise me. Need to increase my dose of Aricept I guess. That or stop drinking with my rats. Yes, loading GOstats works and solved my problem. Would it not make sense for Category to recommend GOstats on installation and, during a session to load it if and when required and issue a specific warning if it were not found? Mark Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, & Mobile & VoiceMail (317) 204-4202 Home (no voice mail please) mwkimpel<at>gmail<dot>com ****************************************************************** Tony Chiang wrote: > Hi Mark, > > Paul Shannon asked the very same question a while back I think. The > Category package will work to do the testing for KEGG, but you will also > have to load the GOstats package for the testing in GO. Trying also > loading this package and see if you problem is solved or still persists. > Either way, let me know. > > Cheers, > --Tony > > On Thu, Mar 6, 2008 at 5:41 AM, Mark W Kimpel <mwkimpel at="" gmail.com=""> <mailto:mwkimpel at="" gmail.com="">> wrote: > > Tonight I set about to generalize a function I had written to do GO > analysis using the package GOstats, and to do this by switching to > package Category. I wanted to add KEGG testing to the GO testing I have > been doing. All I did to my code was to add a conditional such that if > the category was KEGG a KEGGHyperGParams object would be created, else > if it was BP, MF, or CC a GOHyperGParams object would be created. Then > the object params would be tested. I did not change my GOHyperGParams > generating code and, curiously, the KEGG option works beautifully. > However, whenever I use a GO category I get a strange error message (see > below for this and sessionInfo. I seem to remember something odd like > this happening when some objects with the same name collided, but I'm > not sure how that could be happening. > > Output is below, help is appreciated. > > Mark > > ###################### > #my code: CatToTest is either "KEGG", "BP, "MF, or "CC". > > if (CatToTest == "KEGG"){ > params <- new("KEGGHyperGParams", geneIds = selectedEntrezIds, > universeGeneIds = entrez.universe.vec, > annotation = annotationPckg, > pvalueCutoff = hgCutoff, testDirection = testDirection) > } else { > params <- new("GOHyperGParams", geneIds = selectedEntrezIds, > universeGeneIds = entrez.universe.vec, > annotation = annotationPckg, > ontology = CatToTest, pvalueCutoff = hgCutoff, > conditional = TRUE, testDirection = testDirection) > } > > test.obj<-hyperGTest(params) > ###################################### > # error out > GO.out <- Cat.anal.func(CatToTest = Cats[i], > Error in getClass(Class, where = topenv(parent.frame())) : > c("\"GOHyperGResult\" is not a defined class", "\"BPHyperGResult\" is > not a defined class") > > Enter a frame number, or 0 to exit > > 1: Cat.anal.func(CatToTest = Cats[i], input.df = pcmt1.cor.nodes, > annotationPc > 2: CatHyperMaxCats.func(CatToTest, optimizedParam) > 3: hyperGTest(params) > 4: .valueClassTest(standardGeneric("hyperGTest"), "HyperGResultBase", > "hyperGT > 5: is(object, Cl) > 6: .class1(object) > 7: .class1(object) > 8: .hyperGTestInternal(p) > 9: new(className, pvalues = stats$p[ord], oddsRatios = > stats$odds[ord], expect > 10: getClass(Class, where = topenv(parent.frame())) > ############################################################ > #sessionInfo() > R version 2.6.1 (2007-11-26) > x86_64-unknown-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE =en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER= en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US .UTF-8;LC_IDENTIFICATION=C > > attached base packages: > [1] tcltk splines tools stats graphics grDevices > datasets > [8] utils methods base > > other attached packages: > [1] GO.db_2.0.2 rat2302_2.0.1 qvalue_1.12.0 > [4] Category_2.4.0 genefilter_1.16.0 survival_2.34 > [7] annotate_1.16.1 xtable_1.5-2 AnnotationDbi_1.0.6 > [10] RSQLite_0.6-8 DBI_0.2-4 graph_1.16.1 > [13] Biobase_1.16.3 > > loaded via a namespace (and not attached): > [1] cluster_1.11.10 RBGL_1.14.0 > > > > -- > > Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry > Indiana University School of Medicine > > 15032 Hunter Court, Westfield, IN 46074 > > (317) 490-5129 Work, & Mobile & VoiceMail > (317) 204-4202 Home (no voice mail please) > > mwkimpel<at>gmail<dot>com > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch <mailto: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 REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080306/ 4dc4efcf/attachment.pl
ADD REPLY
0
Entering edit mode
On Thu, Mar 6, 2008 at 7:32 AM, Tony Chiang <tchiang at="" fhcrc.org=""> wrote: > As far as I know, GOstats depends on Category, so that the user can > create the GOHyperGParams class and then use the other functions and > methods in GOstats to carry out the rest of the analysis. In the > past, there has been some hiccups when there is bilateral > dependencies, but maybe this has been resolved. Yes, GOstats depends on Category (one way to verify is by inspecting the DESCRIPTION files). Circular dependencies (the Depends field) don't work. I believe it is possible to have cycles in the Suggests field. Whether or not having Category suggest GOstats would improve matters I'm less certain. > I can see your point in that you can perform the categorical > analysis for KEGG or pFAM using Category alone, but need to load > GOstats for the GO analysis. It is a minor confusing issue I agree, > but I am sure that Robert and Seth had a good reason to structure > the packages as they are. It is more confusing than I would like, but there was some thought given to the current organization. At the time it made sense to remove the common code for Hypergeometric testing from GOstats since there is nothing GO-specific about that code. Category seemed the most natural landing place and was already a dependency of GOstats. The intention was to be able to perform GO analyses just using Category. GOstats adds the ability to perform the conditional analysis. Anyhow, I share your frustration at the organization. I think the end result is somewhat more difficult for end users than I would like. However, I don't have a better solution at present. + seth -- Seth Falcon | seth at userprimary.net | http://userprimary.net/user/
ADD REPLY
0
Entering edit mode
Seth, As I see it, Category is the general tool, and GOstats is like a plug-in. I believe the goal is for other plug-ins to work such as KEGG and others that may arise. Category, in a sense, becomes a wrapper for these other packages so that the end-user only has to deal with one API (I like that very much). Because in R packages are not loaded until they are needed, why not have each plug-in package have a file that says "I am a Category plug-in" and each time Category loads it scans the library for compatable plug-ins. A Category method such as "enabledPlugins(Category)" would tell the user what "Categories" are available. Perhaps there is a better R-centric way of doing this, but the goal would be to allow better communication between objects, both those currently in use and those available. A plug-in package would only be loaded when its sub-class was invoked. Not a quick fix, I understand! Mark Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, & Mobile & VoiceMail (317) 204-4202 Home (no voice mail please) mwkimpel<at>gmail<dot>com ****************************************************************** Seth Falcon wrote: > On Thu, Mar 6, 2008 at 7:32 AM, Tony Chiang <tchiang at="" fhcrc.org=""> wrote: >> As far as I know, GOstats depends on Category, so that the user can >> create the GOHyperGParams class and then use the other functions and >> methods in GOstats to carry out the rest of the analysis. In the >> past, there has been some hiccups when there is bilateral >> dependencies, but maybe this has been resolved. > > Yes, GOstats depends on Category (one way to verify is by inspecting > the DESCRIPTION files). > > Circular dependencies (the Depends field) don't work. I believe it is > possible to have cycles in the Suggests field. Whether or not having > Category suggest GOstats would improve matters I'm less certain. > >> I can see your point in that you can perform the categorical >> analysis for KEGG or pFAM using Category alone, but need to load >> GOstats for the GO analysis. It is a minor confusing issue I agree, >> but I am sure that Robert and Seth had a good reason to structure >> the packages as they are. > > It is more confusing than I would like, but there was some thought > given to the current organization. At the time it made sense to > remove the common code for Hypergeometric testing from GOstats since > there is nothing GO-specific about that code. Category seemed the > most natural landing place and was already a dependency of GOstats. > > The intention was to be able to perform GO analyses just using > Category. GOstats adds the ability to perform the conditional > analysis. > > Anyhow, I share your frustration at the organization. I think the end > result is somewhat more difficult for end users than I would like. > However, I don't have a better solution at present. > > + seth > > -- > Seth Falcon | seth at userprimary.net | http://userprimary.net/user/ >
ADD REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080306/ 2ed85ad3/attachment.pl
ADD REPLY

Login before adding your answer.

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