Skip to content
joey711 edited this page Aug 1, 2012 · 38 revisions

Important Update, 24 June 2012

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.

Installation Instructions

Easy Way (Bioconductor release)

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). See if the following works without an error. If not, skip to the "Mildly Harder Way" below.

source("http://bioconductor.org/biocLite.R")
biocLite("phyloseq")

Manual download from Bioconductor:

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.

Mildly Harder Way: GitHub Incremental Development Branches

There are currently a large number of features and fixes available in the latest development version of phyloseq from GitHub. This is an "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.

To install phyloseq from GitHub, use the following command(s) from within R to perform the installation:

(1) install the Bioconductor dependencies

Install the Bioconductor dependencies (genefilter is optional):

source("http://bioconductor.org/biocLite.R")
biocLite("multtest")
biocLite("genefilter")

(2) build/install package from GitHub repository

Install phyloseq using GitHub as an alternative repository with 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")

Windows Users must first install Rtools:

Windows users will likely need the Rtools package installed in order to build anything from source. Rtools

Your own fork:

For installing your own fork of phyloseq from your own repository, just change the "joey711" argument to your GitHub username (and if you named the repository something other than "phyloseq", change that too.

The Bioconductor devel branch

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")

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")
Clone this wiki locally