Search
Question: goTools package, ontoCompare error
0
gravatar for Craig Johnson
8.8 years ago by
Craig Johnson20 wrote:
Dear list, If someone could please help me figure out what I am missing I would be very grateful. My error can be recreated using the package data set and example and only occurs when using custom end nodes. The code and session info follow. Thanks, Craig > library("goTools", verbose=FALSE) > library("GO.db") > data(probeID) > subset=c(L1=list(affylist[[1]][1:5]),L2=list(affylist[[2]][1:5])) > MFendnode <- CustomEndNodeList("GO:0003674", rank=2) rank= 1 rank= 2 > res <- ontoCompare(subset, probeType="hgu133a", endnode=MFendnode, goType="MF") Starting ontoCompare... Loading required package: org.Hs.eg.db Error in function (classes, fdef, mtable) : unable to find an inherited method for function "Ontology", for signature "NULL" > traceback() 7: stop("unable to find an inherited method for function \"", fdef at generic, "\", for signature ", cnames) 6: function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) return(methods[[1L]]) else if (length(methods) == 0L) { cnames <- paste("\"", sapply(classes, as.character), "\"", sep = "", collapse = ", ") stop("unable to find an inherited method for function \"", fdef at generic, "\", for signature ", cnames) } else stop("Internal error in finding inherited methods; didn't return a unique method") }(list("NULL"), function (object) standardGeneric("Ontology"), <environment>) 5: FUN(X[[1L]], ...) 4: lapply(X, FUN, ...) 3: sapply(FullGOenv[index], Ontology) 2: getOntology(endnode, goType, FullGOenv) 1: ontoCompare(subset, probeType = "hgu133a", endnode = MFendnode, goType = "MF") > sessionInfo() R version 2.10.0 (2009-10-26) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices datasets tools utils methods [8] base other attached packages: [1] hgu133a.db_2.3.5 org.Hs.eg.db_2.3.6 goTools_1.20.0 [4] GO.db_2.3.5 RSQLite_0.7-3 DBI_0.2-4 [7] AnnotationDbi_1.8.0 genefilter_1.28.0 Biobase_2.6.0 [10] limma_3.2.1 loaded via a namespace (and not attached): [1] annotate_1.24.0 splines_2.10.0 survival_2.35-7 xtable_1.5-5 Craig Johnson Biostatistician, UM Microarray Core 7410 CCGC 1500 E. Medical Center Dr. Ann Arbor, MI 48109-0946 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENTlink modified 8.8 years ago by James W. MacDonald47k • written 8.8 years ago by Craig Johnson20
0
gravatar for James W. MacDonald
8.8 years ago by
United States
James W. MacDonald47k wrote:
Hi Craig, Craig Johnson wrote: > Dear list, > > If someone could please help me figure out what I am missing I would > be very grateful. My error can be recreated using the package data > set and example and only occurs when using custom end nodes. The code > and session info follow. > > Thanks, Craig > >> library("goTools", verbose=FALSE) library("GO.db") data(probeID) >> subset=c(L1=list(affylist[[1]][1:5]),L2=list(affylist[[2]][1:5])) >> MFendnode <- CustomEndNodeList("GO:0003674", rank=2) > rank= 1 rank= 2 >> res <- ontoCompare(subset, probeType="hgu133a", endnode=MFendnode, >> goType="MF") > Starting ontoCompare... Loading required package: org.Hs.eg.db Error > in function (classes, fdef, mtable) : unable to find an inherited > method for function "Ontology", for signature "NULL" The problem arises in this line of the ontoCompare() function: if (missing(endnode)) endnode <- EndNodeList() else endnode <- unique(c("GO:0003673", "GO:0003674", "GO:0005575", "GO:0008150", endnode)) Since you are passing an endnode to ontoCompare(), you get these other GO IDs tacked on the front of your endnode. Howeva, > get("GO:0003673", GOTERM) Error in .checkKeys(value, Lkeys(x), x at ifnotfound) : value for "GO:0003673" not found This is because this term is the 'root' term (e.g., the only children of this term are molecular function, cellular component, and biological process) this term is now obsolete, being replaced by the GO term 'all': > get("GO:0003674", GOTERM) GOID: GO:0003674 Term: molecular_function Ontology: MF Definition: Elemental activities, such as catalysis or binding, describing the actions of a gene product at the molecular level. A given gene product may exhibit one or more molecular functions. Synonym: molecular function Synonym: molecular function unknown Synonym: GO:0005554 Secondary: GO:0005554 > get("GO:0003674", GOMFANCESTOR) [1] "all" Note that goTools doesn't use a namespace (tsk, tsk), so you can just copy the ontoCompare function to the editor of your choice (or use fix(ontoCompare), same difference), remove the offending GO term and paste into your workspace. This will mask the function in the package and it will then work correctly. This is an impermanent fix. When I do so, I get this: res <- ontoCompare(subset, probeType="hgu133a", endnode=MFendnode, goType="MF") Starting ontoCompare... > > res [,1] [,2] hydrolase activity 0.0 0.2 protein binding 0.4 0.4 nucleic acid binding 0.2 0.0 enzyme activator activity 0.0 0.2 GTPase regulator activity 0.0 0.2 NotFound 0.4 0.4 -OR- You can download the source package, fix the function in goTools/R/goTools.R, then build and install the package. This is permanent until you re-install the package from BioC. -OR- You can email the maintainer Agnes Paquet <paquetagnes at="" yahoo.com=""> and ask her to fix it. Since she hasn't responded to your original request for help, I have to assume she doesn't closely follow the BioC listserv traffic, so a direct appeal is probably more likely to get a result. Best, Jim > > >> traceback() > 7: stop("unable to find an inherited method for function \"", > fdef at generic, "\", for signature ", cnames) 6: function (classes, > fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, > mtable) if (length(methods) == 1L) return(methods[[1L]]) else if > (length(methods) == 0L) { cnames <- paste("\"", sapply(classes, > as.character), "\"", sep = "", collapse = ", ") stop("unable to find > an inherited method for function \"", fdef at generic, "\", for > signature ", cnames) } else stop("Internal error in finding inherited > methods; didn't return a unique method") }(list("NULL"), function > (object) standardGeneric("Ontology"), <environment>) 5: FUN(X[[1L]], > ...) 4: lapply(X, FUN, ...) 3: sapply(FullGOenv[index], Ontology) 2: > getOntology(endnode, goType, FullGOenv) 1: ontoCompare(subset, > probeType = "hgu133a", endnode = MFendnode, goType = "MF") > > > >> sessionInfo() > R version 2.10.0 (2009-10-26) i386-pc-mingw32 > > locale: [1] LC_COLLATE=English_United States.1252 [2] > LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United > States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 > > > attached base packages: [1] stats graphics grDevices datasets > tools utils methods [8] base > > other attached packages: [1] hgu133a.db_2.3.5 org.Hs.eg.db_2.3.6 > goTools_1.20.0 [4] GO.db_2.3.5 RSQLite_0.7-3 DBI_0.2-4 > [7] AnnotationDbi_1.8.0 genefilter_1.28.0 Biobase_2.6.0 [10] > limma_3.2.1 > > loaded via a namespace (and not attached): [1] annotate_1.24.0 > splines_2.10.0 survival_2.35-7 xtable_1.5-5 > > > Craig Johnson Biostatistician, UM Microarray Core 7410 CCGC 1500 E. > Medical Center Dr. Ann Arbor, MI 48109-0946 > > > ********************************************************** Electronic > Mail is not secure, may not be read every day, and should not be used > for urgent or sensitive issues > > _______________________________________________ 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 Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD COMMENTlink written 8.8 years ago by James W. MacDonald47k
0
gravatar for James W. MacDonald
8.8 years ago by
United States
James W. MacDonald47k wrote:
Hi Craig, Craig Johnson wrote: > Dear list, > > If someone could please help me figure out what I am missing I would > be very grateful. My error can be recreated using the package data > set and example and only occurs when using custom end nodes. The code > and session info follow. > > Thanks, Craig > >> library("goTools", verbose=FALSE) library("GO.db") data(probeID) >> subset=c(L1=list(affylist[[1]][1:5]),L2=list(affylist[[2]][1:5])) >> MFendnode <- CustomEndNodeList("GO:0003674", rank=2) > rank= 1 rank= 2 >> res <- ontoCompare(subset, probeType="hgu133a", endnode=MFendnode, >> goType="MF") > Starting ontoCompare... Loading required package: org.Hs.eg.db Error > in function (classes, fdef, mtable) : unable to find an inherited > method for function "Ontology", for signature "NULL" The problem arises in this line of the ontoCompare() function: if (missing(endnode)) endnode <- EndNodeList() else endnode <- unique(c("GO:0003673", "GO:0003674", "GO:0005575", "GO:0008150", endnode)) Since you are passing an endnode to ontoCompare(), you get these other GO IDs tacked on the front of your endnode. Howeva, > get("GO:0003673", GOTERM) Error in .checkKeys(value, Lkeys(x), x at ifnotfound) : value for "GO:0003673" not found This is because this term is the 'root' term (e.g., the only children of this term are molecular function, cellular component, and biological process) this term is now obsolete, being replaced by the GO term 'all': > get("GO:0003674", GOTERM) GOID: GO:0003674 Term: molecular_function Ontology: MF Definition: Elemental activities, such as catalysis or binding, describing the actions of a gene product at the molecular level. A given gene product may exhibit one or more molecular functions. Synonym: molecular function Synonym: molecular function unknown Synonym: GO:0005554 Secondary: GO:0005554 > get("GO:0003674", GOMFANCESTOR) [1] "all" Note that goTools doesn't use a namespace (tsk, tsk), so you can just copy the ontoCompare function to the editor of your choice (or use fix(ontoCompare), same difference), remove the offending GO term and paste into your workspace. This will mask the function in the package and it will then work correctly. This is an impermanent fix. When I do so, I get this: res <- ontoCompare(subset, probeType="hgu133a", endnode=MFendnode, goType="MF") Starting ontoCompare... > > res [,1] [,2] hydrolase activity 0.0 0.2 protein binding 0.4 0.4 nucleic acid binding 0.2 0.0 enzyme activator activity 0.0 0.2 GTPase regulator activity 0.0 0.2 NotFound 0.4 0.4 -OR- You can download the source package, fix the function in goTools/R/goTools.R, then build and install the package. This is permanent until you re-install the package from BioC. -OR- You can email the maintainer Agnes Paquet <paquetagnes at="" yahoo.com=""> and ask her to fix it. Since she hasn't responded to your original request for help, I have to assume she doesn't closely follow the BioC listserv traffic, so a direct appeal is probably more likely to get a result. Best, Jim > > >> traceback() > 7: stop("unable to find an inherited method for function \"", > fdef at generic, "\", for signature ", cnames) 6: function (classes, > fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, > mtable) if (length(methods) == 1L) return(methods[[1L]]) else if > (length(methods) == 0L) { cnames <- paste("\"", sapply(classes, > as.character), "\"", sep = "", collapse = ", ") stop("unable to find > an inherited method for function \"", fdef at generic, "\", for > signature ", cnames) } else stop("Internal error in finding inherited > methods; didn't return a unique method") }(list("NULL"), function > (object) standardGeneric("Ontology"), <environment>) 5: FUN(X[[1L]], > ...) 4: lapply(X, FUN, ...) 3: sapply(FullGOenv[index], Ontology) 2: > getOntology(endnode, goType, FullGOenv) 1: ontoCompare(subset, > probeType = "hgu133a", endnode = MFendnode, goType = "MF") > > > >> sessionInfo() > R version 2.10.0 (2009-10-26) i386-pc-mingw32 > > locale: [1] LC_COLLATE=English_United States.1252 [2] > LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United > States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 > > > attached base packages: [1] stats graphics grDevices datasets > tools utils methods [8] base > > other attached packages: [1] hgu133a.db_2.3.5 org.Hs.eg.db_2.3.6 > goTools_1.20.0 [4] GO.db_2.3.5 RSQLite_0.7-3 DBI_0.2-4 > [7] AnnotationDbi_1.8.0 genefilter_1.28.0 Biobase_2.6.0 [10] > limma_3.2.1 > > loaded via a namespace (and not attached): [1] annotate_1.24.0 > splines_2.10.0 survival_2.35-7 xtable_1.5-5 > > > Craig Johnson Biostatistician, UM Microarray Core 7410 CCGC 1500 E. > Medical Center Dr. Ann Arbor, MI 48109-0946 > > > ********************************************************** Electronic > Mail is not secure, may not be read every day, and should not be used > for urgent or sensitive issues > > _______________________________________________ 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 Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD COMMENTlink written 8.8 years ago by James W. MacDonald47k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 281 users visited in the last hour