Comments (7)
R CMD check phyloseq
- checking whether package ‘phyloseq’ can be installed ... WARNING
Found the following significant warnings:
Warning: replacing previous import ‘plot’ when loading ‘phylobase’
Warning: replacing previous import ‘summary’ when loading ‘phylobase’
See ‘/Users/pjm2/github_packages/phyloseq.Rcheck/00install.out’ for details.
from phyloseq.
Here are some links related to this issue:
http://r.789695.n4.nabble.com/S4-Generics-and-NAMESPACE-justified-warning-td925030.html
http://r.789695.n4.nabble.com/multiple-defines-of-diag-td3877953.html
More general links about namespace:
http://www.stat.uiowa.edu/~luke/R/namespaces/morenames.html
http://stackoverflow.com/questions/4371181/namespaces-in-r-packages
https://stat.ethz.ch/pipermail/r-devel/2011-August/061744.html
https://github.com/hadley/devtools/wiki/namespaces
from phyloseq.
It appears that phylobase trivially defines plot() and summary() as S4 generics, then extends them. It works fine for their package, and may also for phyloseq, except that there is a warning during package-build that
Warning: replacing previous import ‘plot’ when loading ‘phylobase’
Warning: replacing previous import ‘summary’ when loading ‘phylobase’
It may be that this is fine on its own, but it is colliding with one of the other package dependencies. ggplot2 is a good suspect, as it has no namespace, but might very well fiddle with plot and summary. Well, except it isn't heavy on S4 methods... Hmm. well, in any case, an obvious fix is to modify the way that phylobase is imported, such that everything but the offending generics "summary" and "plot" are imported.
The plan: Modify phyloseq to be explicit in phylobase import, using importFrom, etc.
(0) Update your own plot-method.r code so that it does not depend on the phylobase plot generic, but rather defines its own.
(1) (Static) Parse the phylobase namespace file, and create a list of functions, methods, and classes that are imported.
(2) (Static) Make a dummy roxygen header that lists all of the import tags necessary to fully import phylobase, less the "plot" and "summery" generics.
(3) (Dynamic) Every time you re-compile the documentation with roxygen, the specific-import commands for phylobase should be re-added to the namespace as if it was just a generic import (less the two problem-causing generics).
Robust?
This should be partially robust to changes by phylobase, because you are only depending on things that exist in the exported space of the package now. In the future, you will need to check that new phyloseq functionality does not depend on new phylobase functionality that was not available during Step 1. If so, Step 1 can be re-run, or the new stuff can be added manually, depending on complexity.
from phyloseq.
As a preliminary test, phylobase will be listed as a dependency for testpkg, to see if it causes the same error. If so, the fix can be applied to testpkg, to see if that also fixes the problem...
from phyloseq.
This preliminary test did not cause any warnings. Having phylobase as an imported package does not cause a warning ALONE. I infer that the phyloseq warning is coming from a collision between two different package dependencies defining "summary" and "plot" as objects S4 generics.
Not sure off the top of my head which package it is. Among the imported packages, the new (ver 2.0) package is a prime suspect. However, the proposed solution remains the same.
from phyloseq.
HOLD THE PHONE!
I apologize to all those other CRAN packages I disparaged with my suspicion. The conflict is actually between phylobase and the Bioconductor package "multtest".
Since I only need 2 functions from multtest, and NONE of its plot or summary related methods, I should be able to do a specific import of the 2 things I need from multtest, in the hopes that that alleviates the conflict.
Testing this hypothesis on testpkg is about to commence...
from phyloseq.
This worked. A specific import of just the mt.maxT() and mt.minP() functions resolves the conflict on both testpkg and phyloseq. The phyloseq package now passes R CMD check phyloseq
without Warnings.
This issue is closed until further conflicts arrise between depended packages.
from phyloseq.
Related Issues (20)
- phyloseq x metagMisc phyloseq_coverage_raref: Error "OTU abundance data must have non-zero dimensions"
- reorganization of x-axis for heat plot, using factors as x-axis
- . HOT 1
- Reverse the color of legend in phyloseq tree plot
- Showing top 5 genus in ordination plot legend HOT 3
- Phyloseq taxa don't match error, but TRUE when asked if values match? HOT 4
- merging two phyloseq objects is duplicating phyloseq objects
- Facet Taxa axis in Phyloseq heatmap
- Error in eval(call("force", as.symbol(paste0("..", x)))) HOT 3
- Very High Log2FoldChanges HOT 2
- How to decrease x axis size of rarefaction curve HOT 1
- Difference in relative abundance between MicrobiomeDB and r phyloseq
- MicroViz error Error in (function (cond) : error in evaluating the argument 'object' in selecting a method for function 'otu_table': Can't find column `OTU_ID` in `.data`. HOT 1
- Creating a relative abundance bar plot by body site
- Failure to merge files into a phyloseq object after renaming taxa, and sequences HOT 2
- Is it possible to transform sample counts by value stored in sample data? HOT 1
- `merge_phyloseq` fails if sample data contains only one column HOT 2
- Run the Wilcoxon test for each of the taxa ranks
- Missing reads creating phyloseq object after dada2 pipeline HOT 1
- Extremely wide variation of alpha diversity estimates among different studies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phyloseq.