Documentation

16S amplicon pipeline

Every step from raw reads to ASVs, taxonomy, diversity and functional prediction, with the settings the pipeline uses.

Updated

Overview

The amplicon pipeline profiles mixed bacterial and archaeal communities from 16S rRNA gene sequencing. You choose the region when you upload, and the pipeline uses the matching primers and truncation limits.

  1. Input checks
  2. Primer removal (Cutadapt)
  3. Quality-adaptive truncation
  4. Denoising into ASVs (DADA2)
  5. Taxonomy (SILVA)
  6. Phylogeny (MAFFT and FastTree)
  7. Diversity
  8. Functional prediction (PICRUSt2)
  9. Quality score

During the Founding Labs pilot every sample gets all of these steps.

Supported regions and primers

RegionForward primerReverse primerReads needed
V3-V4 (16S)341F
CCTACGGGNGGCWGCAG
805R
GACTACHVGGGTATCTAATCC
2×300 bp recommended; 2×250 bp only while read-end quality holds
V4 (16S)515F (Parada)
GTGYCAGCMGCCGCGGTAA
806R (Apprill)
GGACTACNVGGGTWTCTAAT
2×250 bp recommended
V1-V2 (16S)27F
AGAGTTTGATCMTGGCTCAG
338R
GCTGCCTCCCGTAGGAGT
2×250 or 2×300 bp
V1-V3 (16S)27F
AGAGTTTGATCMTGGCTCAG
534R
ATTACCGCGGCTGCTGGCAC
2×300 bp required

You can also enter your own primer sequences; IUPAC ambiguity codes are supported. Help choosing a region is in the guide V3-V4 vs V4 vs V1-V3.

1. Input checks

As files upload, each one is checked for FASTQ format: the gzip signature, the four-line record structure and matching sequence and quality lengths. FASTA files and empty files are rejected. Before the run starts, the pipeline checks the reads again:

2. Primer removal

Cutadapt 5.2 removes the forward primer from R1 and the reverse primer from R2. A few spacer bases before the primer are allowed. Reads that do not carry the primer are discarded, so off-target reads cannot turn into false ASVs.

SettingValue
Primer matchingIUPAC codes allowed, Cutadapt's default 10% error rate
Reads without the primerDiscarded
3′ quality trimmingQ20
Minimum length after trimming100 bp

3. Quality-adaptive truncation

Instead of fixed truncation lengths, the pipeline reads the quality profile of your run:

  1. It scans the first 10,000 reads of R1 and R2 and takes the median quality score at each position.
  2. Each read direction is truncated where that median first drops below Q25, but never shorter than 150 bp.
  3. The length is capped at the 10th-percentile read length, so about 90% of reads are long enough to keep, and never exceeds the region's maximum (below).
  4. For paired reads, it then checks that R1 and R2 will still overlap by at least 20 bp across the longest insert the region gives. If they cannot, the run stops with an explanation instead of losing most read pairs at the merging step.

After denoising, a study report warns on its first page when fewer than 85% of read pairs merged, when sequences pile up at the longest length the truncated reads can merge into, or when samples were dropped for low depth because their read pairs did not merge. Each of these means longer amplicons, and the taxa they belong to, were lost.

RegionR1 maximumR2 maximumAmplicon length used for the overlap check
V3-V4280 bp200 bp427 bp
V4240 bp160 bp253 bp
V1-V2260 bp200 bp273 bp
V1-V3280 bp280 bp520 bp (the longest V1-V3 insert)

4. Denoising into ASVs

DADA2 1.34.0, running in R 4.4.2, learns the error profile of your run and infers exact amplicon sequence variants (ASVs) instead of clustering reads into OTUs.

DADA2 stepSettings
filterAndTrimTruncation lengths from step 3, maxEE 2 per read, truncQ 2, maxN 0
learnErrorsError model learned from your own reads
dadaDenoising with the learned error model, no pooling
mergePairsDADA2 defaults
removeBimeraDenovoConsensus method

The report shows how many reads survive each stage, so you can see where reads were lost.

5. Taxonomy

TargetReferenceMethod
16SSILVA 138.2 (NR99)DADA2 naive Bayes classifier from kingdom to genus, then exact-match species assignment where the sequence matches a single species

The classifier assigns a rank only when its bootstrap confidence is at least 50, the DADA2 default. Below that, the rank is left unclassified. Unclassified genera and species are common, especially in environmental samples. They mean the reference has no confident match for that sequence, not that the analysis failed.

6. Phylogeny

MAFFT 7.525 aligns the ASV sequences and FastTree 2.2.0 builds an approximate maximum-likelihood tree under the GTR model. The tree is used for Faith's phylogenetic diversity, appears in the report and is included in the data package as a Newick file. It needs at least 3 ASVs.

7. Diversity

Per sample

MetricWhat it measures
Observed ASVsNumber of distinct ASVs in the sample
Shannon (H′)Richness and evenness combined
Simpson (1 − D)Probability that two reads come from different ASVs; less sensitive to rare taxa
Chao1Estimated total richness, from singletons and doubletons
Faith's PDTotal tree branch length spanned by the sample's ASVs (16S only)
Good's coverageShare of reads that are not singletons

DADA2 removes most singletons, so Chao1 is usually close to the observed count and Good's coverage close to 100%. Treat them as descriptive, not as proof that sequencing depth was sufficient. The rarefaction curve shows that better: a curve that levels off means more sequencing would add few new ASVs.

The report places Shannon on a reference scale (below 2 low, 2 to 3 moderate, above 3 high) taken from human gut studies. Typical values differ widely between environments, so compare a sample with others of the same type.

Projects

In a project, all samples are denoised together, with one shared error model and one ASV table. For diversity comparisons, every sample is rarefied to the depth of the shallowest sample, but never below 1,000 reads; samples with fewer reads are left out of those comparisons.

Group comparisons need at least 3 samples in each group.

8. Functional prediction

PICRUSt2 2.5.3 places the ASVs into a reference phylogeny and predicts the gene content of the community. The report shows the 20 most abundant predicted MetaCyc pathways and the top enzyme (EC) numbers.

Predicted, not measured. PICRUSt2 estimates functional potential from related reference genomes. It does not measure gene expression or metabolic activity, so confirm key findings with shotgun metagenomics or metabolomics.

9. Quality score

Every result gets a score from 0 to 100, based on these checks. Read count, primer trimming, ASV count and read merging count double.

CheckFails belowWarning belowFull score from
Raw read count5005,00010,000
Reads with primers found20%60%80%
ASV count52050
Read pairs merged (paired-end)50%70%85%
Reads surviving all filters10%30%50%
Shannon diversity0.51.52.5
Reads in the final ASV table1,0005,00010,000
Chimeric readsPasses below 10%, warning from 10%, fails from 30%

The verdict is excellent when every check passes, good with one warning, fair with two or more warnings and poor when any check fails.