cummeRbund masks featureNames and samples from Biobase
2
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.6 years ago
Hi, I observed that featureNames()<- from cummeRbund masks its homonym from Biobase and can create errors . Code and error: --------------------------------------- library(Biobase) library(cummeRbund) example('ExpressionSet') Error in function (classes, fdef, mtable) : unable to find an inherited method for function ???featureNames??? for signature ???"ExpressionSet"??? --------------------------------------- Of course, this can be avoided by calling Biobase::featureNames(), or not loading both packages at the same time or in a different order. I am not entirely familiar with the details of S4 classes, but couldn't cummeRbund methods be defined in a way to at least not interfere with the actual "base" package of project? Perhaps there is a bug in the signature definition? Or has this something to do with my installation. Thanks for your time. Fran??ois Lefebvre -- output of sessionInfo(): R version 2.15.2 (2012-10-26) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 [4] GenomicRanges_1.10.6 IRanges_1.16.4 fastcluster_1.1.7 [7] reshape2_1.2.2 ggplot2_0.9.3 RSQLite_0.11.2 [10] DBI_0.2-5 Biobase_2.18.0 BiocGenerics_0.4.0 loaded via a namespace (and not attached): [1] AnnotationDbi_1.20.3 biomaRt_2.14.0 Biostrings_2.26.2 [4] biovizBase_1.6.2 bitops_1.0-4.2 BSgenome_1.26.1 [7] cluster_1.14.3 colorspace_1.2-0 dichromat_1.2-4 [10] digest_0.6.0 GenomicFeatures_1.10.1 gtable_0.1.2 [13] Hmisc_3.10-1 labeling_0.1 lattice_0.20-13 [16] MASS_7.3-23 munsell_0.4 parallel_2.15.2 [19] plyr_1.8 proto_0.3-10 RColorBrewer_1.0-5 [22] RCurl_1.95-3 Rsamtools_1.10.2 scales_0.2.3 [25] stats4_2.15.2 stringr_0.6.2 tools_2.15.2 [28] XML_3.95-0.1 zlibbioc_1.4.0 -- Sent via the guest posting facility at bioconductor.org.
Biobase cummeRbund Biobase cummeRbund • 1.1k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 2 days ago
United States
On 01/17/2013 08:43 PM, Francois Lefebvre [guest] wrote: > > Hi, I observed that featureNames()<- from cummeRbund masks its homonym from Biobase and can create errors . > > Code and error: > --------------------------------------- > library(Biobase) > library(cummeRbund) > example('ExpressionSet') > > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function ???featureNames??? for signature ???"ExpressionSet"??? > --------------------------------------- > > Of course, this can be avoided by calling Biobase::featureNames(), or not loading both packages at the same time or in a different order. > > I am not entirely familiar with the details of S4 classes, but couldn't cummeRbund methods be defined in a way to at least not interfere with the actual "base" package of project? Perhaps there is a bug in the signature definition? Yes, the cummeRbund maintainer (cc'd) should add Biobase to the Imports: field of their DESCRIPTION file, add importFrom(Biobase, featureNames) to the NAMESPACE file, and remove the setGeneric("featureNames" <...>) from R/AllGenerics.R. The documentation also needs to be updated, removing \alias{featureNames} from man/featureNames.Rd. Perhaps there are other generics that are being re-used. I would recommend doing this in the 'devel' branch, rather than back- porting to the release branch. Maybe the author did this to avoid a dependency on Biobase, but it seems like avoiding the dependency creates problems; hence my advice is to make these changes (or to change the accessor name). Hope that helps, Martin > Or has this something to do with my installation. > > Thanks for your time. > > Fran??ois Lefebvre > > > -- output of sessionInfo(): > > R version 2.15.2 (2012-10-26) > Platform: i386-apple-darwin9.8.0/i386 (32-bit) > > locale: > [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > [8] base > > other attached packages: > [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 > [4] GenomicRanges_1.10.6 IRanges_1.16.4 fastcluster_1.1.7 > [7] reshape2_1.2.2 ggplot2_0.9.3 RSQLite_0.11.2 > [10] DBI_0.2-5 Biobase_2.18.0 BiocGenerics_0.4.0 > > loaded via a namespace (and not attached): > [1] AnnotationDbi_1.20.3 biomaRt_2.14.0 Biostrings_2.26.2 > [4] biovizBase_1.6.2 bitops_1.0-4.2 BSgenome_1.26.1 > [7] cluster_1.14.3 colorspace_1.2-0 dichromat_1.2-4 > [10] digest_0.6.0 GenomicFeatures_1.10.1 gtable_0.1.2 > [13] Hmisc_3.10-1 labeling_0.1 lattice_0.20-13 > [16] MASS_7.3-23 munsell_0.4 parallel_2.15.2 > [19] plyr_1.8 proto_0.3-10 RColorBrewer_1.0-5 > [22] RCurl_1.95-3 Rsamtools_1.10.2 scales_0.2.3 > [25] stats4_2.15.2 stringr_0.6.2 tools_2.15.2 > [28] XML_3.95-0.1 zlibbioc_1.4.0 > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > 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 > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 2 days ago
United States
On 01/18/2013 08:38 AM, Loyal A. Goff wrote: > Thank you for identifying this situation, and for the suggested fixes. I will fix this in the devel version for the next release. > > I think this was simply a matter of me not realizing this generic definition already existed in Biobase. My bad? > > Is there a specific mechanism (other than simply searching BiocGenerics, and presumably Biobase as well) to determine if a generic already exists somewhere in BioC to avoid such collisions in the future? I don't think there's an easy way to find out what generics exist, other than doing a search of the bioc repository source code. I think this site has http://search.bioconductor.jp/ in the past been useful, though appears to be broken today. I was amused by the cambR (Cambridge, UK, user group logo http://www.cambr.org.uk/ where Laurent Gatto created the word cloud by scanning the bioc source tree (https://github.com/lgatto/CambRlogo). setGeneric is almost the same size as setMethod, and both are apparently used heavily in Bioc package source code. On the one hand this is great, emphasizing the use of S4, but somehow you'd expect there to be more code re-use, a higher ratio of 'doing things' to defining generics and methods, and greater re-use of generics in general. Martin > > Thanks again, > Loyal > > > On Jan 18, 2013, at 12:02 AM, Martin Morgan <mtmorgan at="" fhcrc.org=""> wrote: > >> On 01/17/2013 08:43 PM, Francois Lefebvre [guest] wrote: >>> >>> Hi, I observed that featureNames()<- from cummeRbund masks its homonym from Biobase and can create errors . >>> >>> Code and error: >>> --------------------------------------- >>> library(Biobase) >>> library(cummeRbund) >>> example('ExpressionSet') >>> >>> Error in function (classes, fdef, mtable) : >>> unable to find an inherited method for function ???featureNames??? for signature ???"ExpressionSet"??? >>> --------------------------------------- >>> >>> Of course, this can be avoided by calling Biobase::featureNames(), or not loading both packages at the same time or in a different order. >>> >>> I am not entirely familiar with the details of S4 classes, but couldn't cummeRbund methods be defined in a way to at least not interfere with the actual "base" package of project? Perhaps there is a bug in the signature definition? >> >> Yes, the cummeRbund maintainer (cc'd) should add Biobase to the Imports: field of their DESCRIPTION file, add importFrom(Biobase, featureNames) to the NAMESPACE file, and remove the setGeneric("featureNames" <...>) from R/AllGenerics.R. The documentation also needs to be updated, removing \alias{featureNames} from man/featureNames.Rd. Perhaps there are other generics that are being re-used. >> >> I would recommend doing this in the 'devel' branch, rather than back-porting to the release branch. >> >> Maybe the author did this to avoid a dependency on Biobase, but it seems like avoiding the dependency creates problems; hence my advice is to make these changes (or to change the accessor name). >> >> Hope that helps, >> >> Martin >> >>> Or has this something to do with my installation. >>> >>> Thanks for your time. >>> >>> Fran??ois Lefebvre >>> >>> >>> -- output of sessionInfo(): >>> >>> R version 2.15.2 (2012-10-26) >>> Platform: i386-apple-darwin9.8.0/i386 (32-bit) >>> >>> locale: >>> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 >>> >>> attached base packages: >>> [1] grid stats graphics grDevices utils datasets methods >>> [8] base >>> >>> other attached packages: >>> [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 >>> [4] GenomicRanges_1.10.6 IRanges_1.16.4 fastcluster_1.1.7 >>> [7] reshape2_1.2.2 ggplot2_0.9.3 RSQLite_0.11.2 >>> [10] DBI_0.2-5 Biobase_2.18.0 BiocGenerics_0.4.0 >>> >>> loaded via a namespace (and not attached): >>> [1] AnnotationDbi_1.20.3 biomaRt_2.14.0 Biostrings_2.26.2 >>> [4] biovizBase_1.6.2 bitops_1.0-4.2 BSgenome_1.26.1 >>> [7] cluster_1.14.3 colorspace_1.2-0 dichromat_1.2-4 >>> [10] digest_0.6.0 GenomicFeatures_1.10.1 gtable_0.1.2 >>> [13] Hmisc_3.10-1 labeling_0.1 lattice_0.20-13 >>> [16] MASS_7.3-23 munsell_0.4 parallel_2.15.2 >>> [19] plyr_1.8 proto_0.3-10 RColorBrewer_1.0-5 >>> [22] RCurl_1.95-3 Rsamtools_1.10.2 scales_0.2.3 >>> [25] stats4_2.15.2 stringr_0.6.2 tools_2.15.2 >>> [28] XML_3.95-0.1 zlibbioc_1.4.0 >>> >>> -- >>> Sent via the guest posting facility at bioconductor.org. >>> >>> _______________________________________________ >>> 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 >>> >> >> >> -- >> Computational Biology / Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. >> PO Box 19024 Seattle, WA 98109 >> >> Location: Arnold Building M1 B861 >> Phone: (206) 667-2793 > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

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