dada2
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.40.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: Rcpp
- Imports: Biostrings, ggplot2, reshape2, ShortRead, RcppParallel, IRanges, XVector, BiocGenerics
- System requirements: GNU make
- Install:
BiocManager::install("dada2")
When to Use
- Resolving exact Amplicon Sequence Variants (ASVs) from high-throughput amplicon sequencing data using the
dada algorithm.
- Filtering and trimming raw paired-end or single-end FASTQ files using
filterAndTrim.
- Modeling and learning sequencing error rates directly from the data using
learnErrors.
- Removing chimeric sequences from merged sequence tables using
removeBimeraDenovo.
When NOT to Use
- For shotgun metagenomic sequencing data (use MetaPhlAn or HUMAnN instead).
- For clustering sequences based on a fixed 97% identity threshold (use vsearch or UCLUST instead).
- For downstream ecological statistics and visualization of ASV tables (use
phyloseq instead).
Data Requirements
- Input Format: Demultiplexed FASTQ files (unzipped or gzipped). One file per sample for single-end, or two files per sample for paired-end.
- Quality Scores: Raw reads must contain quality scores.
- Primers: Sequences must have non-biological bases (like PCR primers) removed prior to ASV inference.
Key Parameters
truncLen: Truncate reads after this many bases. Reads shorter than this are discarded. Crucial for removing low-quality tails.
maxEE: After truncation, reads with higher than this number of expected errors are discarded (e.g., maxEE=2).
trimLeft: The number of nucleotides to remove from the start of each read (useful for removing primers).
maxN: Maximum number of ambiguous nucleotides allowed. DADA2 requires maxN=0.
multithread: If TRUE, enables parallel processing to speed up computation.
err: The error model generated by learnErrors, passed into the dada function.
Best Practices
- Inspect the quality profiles of forward and reverse reads using
plotQualityProfile before setting truncLen parameters.
- Learn error rates using
learnErrors on at least a subset of your data to ensure accurate sample inference.
- Maintain a suitable overlap (>20nts) between forward and reverse reads after trimming to ensure
mergePairs succeeds.
- Perform chimera removal using
removeBimeraDenovo on the combined sequence table created by makeSequenceTable.
Common Pitfalls
- Failing to merge paired reads: Truncating reverse reads too aggressively can prevent them from overlapping with forward reads, causing
mergePairs to fail. Fix this by ensuring truncLen leaves enough sequence for a >20nt overlap.
- Leaving primers in the sequences: Non-biological nucleotides distort the error model. Fix this by using
trimLeft in filterAndTrim or an external tool to remove primers.
- Reads dropped due to Ns: DADA2 cannot process sequences with ambiguous bases. Fix this by ensuring
maxN=0 is set in filterAndTrim.
Alternatives
- phyloseq: Used for downstream analysis, visualization, and integration of the ASV tables produced by DADA2.
- vsearch: An alternative for traditional OTU clustering based on sequence identity thresholds.
- deblur: An alternative sub-operational taxonomic unit (sOTU) algorithm that uses a static error model.
Citations
- Callahan BJ, McMurdie PJ, Rosen MJ, Han AW, Johnson AJ, Holmes SP. (2016). "DADA2: High-resolution sample inference from amplicon data." Nature Methods, 13(7), 581-583.
- Callahan BJ, McMurdie PJ, Holmes SP. (2017). "Exact sequence variants should replace operational taxonomic units in marker-gene data analysis." ISME Journal, 11(12), 2639-2643.
References
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use dada2. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.
▶ Open dada2 on BioMate →
1---2name: bioconductor-dada23description: The dada2 package infers exact amplicon sequence variants (ASVs) from high-throughput amplicon sequencing data, replacing the coarser and less accurate OTU clustering approach. The dada2 pipeline takes as input demultiplexed fastq files, an4---56# dada278## Dependencies & Environment910> Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.1112- **Version:** 1.40.0 · **Bioconductor:** 3.23 · **R:** ≥ 4.613- **Depends:** Rcpp14- **Imports:** Biostrings, ggplot2, reshape2, ShortRead, RcppParallel, IRanges, XVector, BiocGenerics15- **System requirements:** GNU make16- **Install:** `BiocManager::install("dada2")`1718## When to Use19- Resolving exact Amplicon Sequence Variants (ASVs) from high-throughput amplicon sequencing data using the `dada` algorithm.20- Filtering and trimming raw paired-end or single-end FASTQ files using `filterAndTrim`.21- Modeling and learning sequencing error rates directly from the data using `learnErrors`.22- Removing chimeric sequences from merged sequence tables using `removeBimeraDenovo`.2324## When NOT to Use25- For shotgun metagenomic sequencing data (use MetaPhlAn or HUMAnN instead).26- For clustering sequences based on a fixed 97% identity threshold (use vsearch or UCLUST instead).27- For downstream ecological statistics and visualization of ASV tables (use `phyloseq` instead).2829## Data Requirements30- **Input Format**: Demultiplexed FASTQ files (unzipped or gzipped). One file per sample for single-end, or two files per sample for paired-end.31- **Quality Scores**: Raw reads must contain quality scores.32- **Primers**: Sequences must have non-biological bases (like PCR primers) removed prior to ASV inference.3334## Key Parameters35- **`truncLen`**: Truncate reads after this many bases. Reads shorter than this are discarded. Crucial for removing low-quality tails.36- **`maxEE`**: After truncation, reads with higher than this number of expected errors are discarded (e.g., `maxEE=2`).37- **`trimLeft`**: The number of nucleotides to remove from the start of each read (useful for removing primers).38- **`maxN`**: Maximum number of ambiguous nucleotides allowed. DADA2 requires `maxN=0`.39- **`multithread`**: If TRUE, enables parallel processing to speed up computation.40- **`err`**: The error model generated by `learnErrors`, passed into the `dada` function.4142## Best Practices43- Inspect the quality profiles of forward and reverse reads using `plotQualityProfile` before setting `truncLen` parameters.44- Learn error rates using `learnErrors` on at least a subset of your data to ensure accurate sample inference.45- Maintain a suitable overlap (>20nts) between forward and reverse reads after trimming to ensure `mergePairs` succeeds.46- Perform chimera removal using `removeBimeraDenovo` on the combined sequence table created by `makeSequenceTable`.4748## Common Pitfalls49- **Failing to merge paired reads**: Truncating reverse reads too aggressively can prevent them from overlapping with forward reads, causing `mergePairs` to fail. Fix this by ensuring `truncLen` leaves enough sequence for a >20nt overlap.50- **Leaving primers in the sequences**: Non-biological nucleotides distort the error model. Fix this by using `trimLeft` in `filterAndTrim` or an external tool to remove primers.51- **Reads dropped due to Ns**: DADA2 cannot process sequences with ambiguous bases. Fix this by ensuring `maxN=0` is set in `filterAndTrim`.5253## Alternatives54- **phyloseq**: Used for downstream analysis, visualization, and integration of the ASV tables produced by DADA2.55- **vsearch**: An alternative for traditional OTU clustering based on sequence identity thresholds.56- **deblur**: An alternative sub-operational taxonomic unit (sOTU) algorithm that uses a static error model.5758## Citations59- Callahan BJ, McMurdie PJ, Rosen MJ, Han AW, Johnson AJ, Holmes SP. (2016). "DADA2: High-resolution sample inference from amplicon data." *Nature Methods*, 13(7), 581-583.60- Callahan BJ, McMurdie PJ, Holmes SP. (2017). "Exact sequence variants should replace operational taxonomic units in marker-gene data analysis." *ISME Journal*, 11(12), 2639-2643.6162## References63- Homepage: https://bioconductor.org/packages/dada264- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/dada2/inst/doc/dada2-intro.html6566<!-- biomate-cta -->67---6869## Run this on BioMate7071This skill is the **knowledge layer** — when, why, and how to use `dada2`. To **run this analysis on your own data** with managed compute, automated QC, and reproducible outputs, use **[BioMate](https://www.biomate.ai?ref=kb&pkg=dada2)** — free to start.7273▶ **[Open `dada2` on BioMate →](https://www.biomate.ai?ref=kb&pkg=dada2)**