This skill turns demultiplexed marker-gene FASTQ (16S rRNA, ITS) into an ASV (amplicon sequence variant) feature table plus representative sequences, using DADA2's per-run error model. An ASV is a model-inferred exact sequence conditioned on one sequencing run - not a clustered OTU and not an organism. The decisions that matter (which are invisible in a recipe) are: remove primers before truncating, learn the error model separately per run, choose truncation lengths within the merge-overlap budget, and never fix-truncate variable-length ITS. The output feeds taxonomy assignment, diversity, and differential abundance; the compositional statistics of the resulting table are shared with shotgun metagenomics.
conda install -c bioconda cutadapt itsxpress
install.packages('BiocManager')
BiocManager::install(c('dada2', 'decontam'))
The QIIME2 path (qiime dada2 denoise-paired, qiime deblur denoise-16S) installs as its own conda env (qiime2-amplicon-<release>); see qiime2-workflow.
Conceptual prerequisites: - Input is DEMULTIPLEXED paired-end (or single-end) FASTQ, one file set per sample. - The forward and reverse PCR primer sequences are known (needed for cutadapt). - The amplicon region and its approximate length are known (V4 ~253 bp, V3-V4 ~460 bp, ITS variable) - this sets the truncation budget. - The error model is learned PER sequencing run; a multi-run study processes each run separately before merging tables. - For low-biomass samples (skin, biopsy, BAL, sterile-site swabs), sequence negative controls (extraction blanks, no-template PCR) and a positive mock community so contaminants can be identified with decontam.
Tell your AI agent what you want to do: - "Remove primers from my paired-end 16S reads, then run DADA2 to get an ASV table" - "I have V3-V4 reads on 2x250 and my merge rate is near zero - help" - "Process two MiSeq runs correctly with a per-run error model and merge the tables" - "Process my fungal ITS amplicons into ASVs" - "These are low-biomass skin swabs with extraction blanks - remove reagent contaminants with decontam"
"I have demultiplexed paired-end 16S V4 reads. Remove the primers with cutadapt, learn the error model per run, denoise, merge pairs, and remove chimeras to give me an ASV table and a read-tracking summary."
"My amplicon is V3-V4 (~460 bp) on 2x250 reads. What truncLen should I use, and how do I keep enough overlap to merge while controlling quality?"
"My samples came off three sequencing runs. Show me how to learn the error model on each run separately and combine the sequence tables before chimera removal."
"I have fungal ITS2 amplicons of variable length. Trim the spacer and infer ASVs without fixed truncation."
"These are NovaSeq reads with binned quality scores. Check whether the DADA2 error model is fit correctly and fix it if not."
"These are low-biomass biopsy samples sequenced with extraction-blank and no-template-PCR negative controls. After building the ASV table, run decontam to flag and remove reagent/kit contaminants, and report how many ASVs and reads were removed."
--discard-untrimmed) before any quality step.plotErrors (enforcing monotonicity on binned-quality data).