Install binaries from Bioconductor

Binary installation is available through the Bioconductor package repository. Binary installation of the current version of the dada2 package (1.6) requires R 3.4.2 and Bioconductor version 3.6:

## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("dada2")

Allow installation of any additional packages requested. You are ready to start using dada2!

If the above installed an early version of dada2 (1.2 or 1.4) you can get the current dada2 release by updating your Bioconductor installation to version 3.6: biocLite("BiocUpgrade") then biocLite(). This may require updating R as well.


Install from source

Source installation is available for R 3.2 or later, and the latest and greatest features will be available first through source installs of the development branch.

0. Download

1. Install External Dependencies

The following instructions assume that you have installed R and have installed Xcode (Mac) or Rtools (Windows); as well as Bioconductor.

For Bioconductor, start a fresh R session, and enter the following.

source("http://bioconductor.org/biocLite.R")
biocLite(suppressUpdates = FALSE)
biocLite("ShortRead", suppressUpdates = FALSE)

2. Install using devtools

The easiest method is to use the devtools package to install from github:

biocLite("devtools")
library("devtools")
devtools::install_github("benjjneb/dada2")

If that worked you’re done (see step 4)! If it failed on missing dependencies, goto step 2.

2a. Install manually from source

Alternatively, you can install from the source by hand. First download the zipped package and unzip it (or expand the tarball).

Start a fresh R session, and enter the following.

install.packages("path/to/dada2",
                 repos = NULL,
                 type = "source",
                 dependencies = c("Depends", "Suggests","Imports"))

For example, if the dada2 source code directory was in ~/github/dada2, then the following would work.

install.packages("~/github/dada2",
                 repos = NULL,
                 type = "source",
                 dependencies = c("Depends", "Suggests","Imports"))

Check Package Version

packageVersion("dada2")
## [1] '1.6.0'

3. Troubleshoot Dependencies (Optional)

At this point, there may be complaints about missing dependencies. To install missing dependencies on either CRAN or Bioconductor, start a fresh R session, and enter the following.

source("http://bioconductor.org/biocLite.R")
biocLite("missing_package_1")
biocLite("missing_package_2")
# ... and so on

4. Re-attempt dada2 Installation

Install again, after dependencies have been installed.

Devtools method:

library("devtools")
devtools::install_github("benjjneb/dada2")

Manual install from source method:

install.packages("path/to/dada2",
                 repos = NULL,
                 type = "source",
                 dependencies = c("Depends", "Suggests","Imports"))

You should now be done, if installation was successful. If not, do not panic, and post a message to the issue tracker.

5. Load Package, Explore Function Documentation

library("dada2")
## Warning: package 'Rcpp' was built under R version 3.4.2

Now that the package is loaded, you can explore the documentation using the R help system.

help(package="dada2")
?derepFastq
?dada

You are ready to use dada2!


Maintained by Benjamin Callahan (benjamin DOT j DOT callahan AT gmail DOT com)