-
Notifications
You must be signed in to change notification settings - Fork 188
Installation
A recent major update to the igraph package, version 0.6+, is not backward compatible and causes certain versions of phyloseq to fail to install properly. Although this only actually effects a small minority of functions in phyloseq, it causes the vignettes to fail to build, which in-turn causes package installation to stop with an error.
THIS BUG IS FIXED in the latest incremental release of phyloseq on GitHub (see the "Mildly Harder Way" below), as well as the devel branch of phyloseq on Bioconductor. A fix for the release version of phyloseq on Bioconductor has been submitted.
The tar.gz
"tarball" of the latest package build can be downloaded by clicking this phyloseq tarball link. Both zipball and tarball versions of the repository are also linked from the phyloseq front page.
Note: The file name will have the form joey711-phyloseq-*.tar.gz
The latest stable release of phyloseq on Bioconductor and the latest development release of phyloseq on Bioconductor can be found at these respective links, as well as some interesting phyloseq use data in the form of the number of downloads of the respective versions each month from Bioconductor.
Note: The file name will have the form phyloseq_1.*.tar.gz
(Assumes you have already downloaded the version of phyloseq that you want to install.)
(Formerly the "Mildly Harder Way")
There are currently a large number of features and fixes available in the latest development version of phyloseq from GitHub. This is a "live" incrementally updated version of the package that we use to save, share, and collaboratively develop the package. For unstable code there are no guarantees. However, we try very hard not to push any changes to the "master" branch (the one that you see by default) that do not meet the same standards as the Bioconductor repository itself. Typically, changes that have not been fully tested will be pushed to a secondary branch or fork, and then merged into "master" only after they have passed the full suite of checks. Thus, in the vast majority of cases you should be able to install from the GitHub and get the latest fixes and functionality that will eventually make its way into the Bioconductor release version.
(1) Install the Bioconductor dependencies
Install the Bioconductor dependencies (genefilter is optional), using the following command(s) from within R
:
source("http://bioconductor.org/biocLite.R")
biocLite("multtest")
biocLite("genefilter")
From a (BASH) command line, unpack and install (assuming you downloaded the package to the ~/Downloads
directory:
cd ~/Downloads
tar -xvf joey711-phyloseq-a46255f.tar.gz
R CMD install joey711-phyloseq-a46255f
Windows Users must first install the Rtools application in order to build anything from source. Rtools
- Make sure you have Rtools installed.
- From within an R session, enter:
install.packages("C:/Temp/joey711-phyloseq-*.tar.gz", repos=NULL, type="source")
Where C:/Temp/
represents the full directory path to where you have saved the joey711-phyloseq-*.tar.gz
file containing phyloseq.
Command-line (dos) installation (only try if previous fails):
- Make sure the R and Rtools paths are added in the environment variable.
- Open a dos command prompt and enter the following
R CMD INSTALL joey711-phyloseq-*.tar.gz`.
Here are the official instructions from CRAN for installing R packages on Windows.
For more detailed troubleshooting or system setup for Windows see Appendix D The Windows toolset published by CRAN.
Bioconductor release (formerly: "Easy Way")
The official stable version of phyloseq is available from Bioconductor. (Note: the Bioconductor release schedule mirrors the R release schedule, and so you may need to update your version of R to the latest version).
Note that this version changes only every six months according to Bioconductor's careful development schedule. The most recently-added features in phyloseq will be missing in this version.
source("http://bioconductor.org/biocLite.R")
biocLite("phyloseq")
The previous options for installation are recommended
The development branch of phyloseq on Bioconductor is updated less often than the GitHub branch, and might be a good option if you want to use recently developed features in phyloseq but are having problems installing directly from GitHub, or have some other reason to need slower-moving code.
Use the following code to download and install the BioC devel branch. Note that the current version number might be different than the one shown here. Check that it matches the latest version number shown on the devel page for phyloseq on Bioconductor.
There are also official instructions for using development versions of Bioconductor packages, and these will apply to phyloseq as well as any other package in the BioC-devel repository. However, using their tool, especially the useDevel()
command, appears to force you to use development versions of all your Bioconductor packages. There are more complicated ways around this requirement described on their page, but the following code will allow you to install the BioC-devel version of phyloseq withou the need to "level-up" all your other BioC packages (but don't forget to adjust the phyloseq version number in the URL.)
source("http://bioconductor.org/biocLite.R")
biocLite("multtest")
biocLite("genefilter")
tfname <- tempfile()
download.file("http://bioconductor.org/packages/devel/bioc/src/contrib/phyloseq_1.1.18.tar.gz", tfname)
install.packages(tfname, repos=NULL, type="source")
Presently this only works reliably on Mac OS X, but development updates to the devtools package already fix this and allow it to work on Windows (and presumably Linux distros). When fixed for all platforms, this will be the preferred option for installing directly from GitHub.
This approach also does not require that you download anything as a prior step.
This installation approach simply uses the install_github
command in the devtools package.
Make sure you have devtools installed
install.packages("devtools")
Load the devtools package, then build and install phyloseq using the install_github
command.
library("devtools")
install_github("phyloseq", "joey711")
If you want to make modifications to phyloseq on your own fork, and then install from your modified repository, just change the "joey711"
argument to your GitHub username (and if you named the repository something other than "phyloseq"
, change that too).
CRAN dependencies
All the previous installation instructions automagically install any missing dependencies that are in the CRAN repository. If they work, you can ignore this section.
However, if you want to install them ahead of time, or re-install them, the following section contains the code to install them directly:
Install the CRAN dependencies (doParallel is optional):
install.packages("ape")
install.packages("doParallel")
install.packages("foreach")
install.packages("ggplot2")
install.packages("igraph")
install.packages("igraph0")
install.packages("picante")
install.packages("vegan")
install.packages("RJSONIO")
install.packages("plyr")