Install binaries from Bioconductor

Binary installation is available through the Bioconductor package repository. Binary installation of the current release version (1.16) requires R 4.0.0 and Bioconductor version 3.11:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("dada2", version = "3.11")

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

If the above installed an early version of dada2 (e.g. 1.10 or 1.14) you can get the current dada2 release by updating to Bioconductor 3.11. This may require updating to R 4.0.0 as well.


Install from source

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

0. Install using devtools

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

install.packages("devtools")
library("devtools")
devtools::install_github("benjjneb/dada2", ref="v1.16") # change the ref argument to get other versions

If that worked you’re done (see step 4)! If it failed on missing dependencies, goto step 3. If devtools isn’t an option, you can also install directly from the source (goto step 1).

1. Download

2. Install manually from source

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

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.16.0'

3. Troubleshoot Dependencies

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.

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

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("ShortRead", version = "3.11") 
# Or you can use earlier versions of Biocondcutor, e.g. if you have a pre-3.6 version of R
BiocManager::install("additional_missing_package_1", version = "3.11") 
# ... 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")

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)
Documentation License: CC-BY 4.0