Metagenomics Fundamentals

Lesson 2 of 13 · 11 min

Amplicon (16S rRNA) vs Shotgun Metagenomics

Both workflows start from the same extracted community DNA, then diverge immediately. Amplicon sequencing amplifies one marker gene before sequencing, while shotgun sequencing fragments and reads everything. Cost is the first fork: 16S runs are cheap and multiplex hundreds of samples per lane, whereas shotgun typically costs five to ten times more per sample for equivalent depth. Choose amplicon when you need a cheap, robust census of who is present across many samples, and choose shotgun when you need functional potential (what the community can do), species- or strain-level identity, or the genomes of uncultured microbes.

The 16S rRNA Gene

The bacterial and archaeal 16S rRNA gene is about 1500 bases long and contains nine hypervariable regions, V1 through V9, separated by highly conserved stretches. Universal PCR primers anchor in those conserved flanks so a single primer pair amplifies the same window across most taxa. The 515F/806R pair targets the V4 region and yields a roughly 253 bp fragment once primers are trimmed, while 341F/805R spans V3 to V4 for a fragment of about 460 bp.

bash
# Remove EMP V4 primers (515F / 806R) from paired reads before denoising
cutadapt \
  -g GTGYCAGCMGCCGCGGTAA \
  -G GGACTACNVGGGTWTCTAAT \
  --discard-untrimmed \
  -o trimmed_R1.fastq.gz -p trimmed_R2.fastq.gz \
  reads_R1.fastq.gz reads_R2.fastq.gz
This is cutadapt 4.6 with Python 3.11.8

=== Summary ===

Total read pairs processed:            120,000
  Read 1 with adapter:                 116,880 (97.4%)
  Read 2 with adapter:                 115,320 (96.1%)
Pairs discarded as untrimmed:            5,700 (4.8%)
Pairs written (passing filters):       114,300 (95.2%)

After primer removal you denoise the reads, typically with DADA2, to produce amplicon sequence variants, or ASVs, which are exact single-nucleotide-resolved sequences; older pipelines instead cluster reads into OTUs at 97 percent identity. Either way the taxonomic resolution of a short 16S window usually stops at genus and only sometimes reaches species. Function is never measured here, only predicted from the ASV table by tools like PICRUSt2 that map marker sequences to reference genomes.

Warning: 16S abundances are relative and biased, not absolute counts. Genomes carry anywhere from 1 to more than 15 copies of the rRNA operon, so high-copy taxa look inflated, and primer mismatches under- or over-amplify particular lineages. Interpret proportions with this in mind, or correct copy number using a database like rrnDB.

Whole-Genome Shotgun

Shotgun sequencing randomly fragments all DNA in the sample and sequences it untargeted, so reads come from bacteria, archaea, viruses, and fungi as well as any host. Those reads feed assembly with MEGAHIT or metaSPAdes, binning into metagenome-assembled genomes, marker-based taxonomic profiling with MetaPhlAn or k-mer profiling with Kraken2, and direct functional profiling with HUMAnN. This gives species-to-strain resolution and a measured gene catalog rather than an inferred one. The catch is host DNA: tissue or swab samples are often more than 90 percent host, so you deplete host reads before profiling.

bash
# Deplete human reads; keep only concordantly UNaligned (microbial) pairs
bowtie2 -p 8 -x GRCh38 \
  -1 sample_R1.fastq.gz -2 sample_R2.fastq.gz \
  --un-conc-gz sample_clean_R%.fastq.gz \
  -S /dev/null
500000 reads; of these:
  500000 (100.00%) were paired; of these:
    440000 (88.00%) aligned concordantly 0 times
    52000 (10.40%) aligned concordantly exactly 1 time
    8000 (1.60%) aligned concordantly >1 times
12.00% overall alignment rate

# 12% of reads were human; sample_clean_R1/R2.fastq.gz hold the 88% microbial pairs

Try it yourself: You have 96 stool samples and a fixed budget, and the goal is simply to compare community composition across diet groups. Sketch the case for spending it all on 16S V4 versus spending it on shallow shotgun for half as many samples. State which single factor, cost, host contamination, functional readout, or strain resolution, decides it for you, and why.