Zubair Khalid

Virologist/Molecular Biologist | Veterinarian | Bioinformatician

Conventional & Molecular Virology • Vaccine Development • Computational Biology

Dr. Zubair Khalid is a veterinarian and virologist specializing in conventional and molecular virology, vaccine development, and computational biology. Dedicated to advancing animal health through innovative research and multi-omics approaches.

Dr. Zubair Khalid - Veterinarian, Virologist, and Vaccine Development Researcher specializing in Computational Biology, Multi-omics, Animal Health, and Infectious Disease Research

Blog · Guides · Published 2026-07-12

Metagenomic Sequencing Workflow: From Sample Plan to Taxonomic Profile

Metagenomic sequencing is the process of sequencing DNA directly from environmental or clinical samples to profile all microorganisms present without the need for culture. This guide is for researchers designing or executing a shotgun metagenomics project from sample collection through taxonomic and functional interpretation. It emphasizes practical decisions, quality controls, and common pitfalls that can obscure biological meaning.

At a Glance

Stage Key Steps Common Pitfalls
Study design Define question, choose shotgun vs. amplicon, select depth Underestimating required reads or replicates
Sample collection & extraction Use sterile protocols, include negative controls Contamination from lab reagents or kits
Library preparation & sequencing Mechanical shearing, adapter ligation, quantitation Overamplification and index hopping
Read preprocessing Adapter trimming, quality filtering, host read removal Aggressive filtering that removes true microbial reads
Taxonomic classification Align to reference database or use k-mer methods Low sensitivity for novel organisms
Functional profiling Map to gene catalog or use pathway databases Overinterpreting incomplete annotations
Validation Compare with qPCR, culturing, or independent samples Ignoring false positives from cross-contamination

Decision Criteria

Begin by clarifying your biological question. Shotgun metagenomics captures both taxonomic composition and functional potential at the cost of higher sequencing depth. Amplicon approaches (16S rRNA, ITS) are cheaper and deeper but limited to phylogenetic markers and cannot directly measure gene functions.

Key decisions include:

  • Depth of sequencing: For shotgun metagenomics, 5,10 million reads per sample may suffice for community profiling, but 50 million or more are often needed for rare species or functional analysis. Resources from the Galaxy Training Network recommend pilot libraries to estimate saturation.
  • Controls: Field blanks, extraction blanks, and a positive mock community are essential. Without them, environmental contaminants from reagents can be mistaken for true taxa, as highlighted by discussions of microbial mirages [11].
  • Host depletion: For clinical samples, nucleosome targeted host DNA depletion can greatly increase sensitivity for pathogen detection [8]. Decide whether to use enzymatic, chemical, or physical depletion prior to extraction.
  • Replicates: Biological replicates allow statistical testing, technical replicates assess reproducibility. Three to five biological replicates per condition are typical.

Practical Workflow

1. Sample Plan and Collection

Define your sampling site, time points, and metadata. Collect samples into sterile, DNA free containers. Snap freeze or use appropriate preservatives (e.g., RNAlater for RNA). Document every step. Include a minimum of two negative controls per batch: collection blanks (open container at the site) and extraction blanks (molecular grade water carried through all steps).

2. Contamination Controls

Contamination is the most insidious problem in metagenomics. Reagent kits (especially for low biomass samples) contain trace bacterial DNA. To manage this:

  • Process negative controls alongside samples.
  • Sequence them at equal depth to assess the background.
  • Filter out OTUs or ASVs present in controls above a threshold (e.g., 1% of their abundance in any sample).

A detailed review of contamination management is available through the NCBI Bookshelf under the chapter on metagenomic best practices.

3. DNA Extraction and Library Preparation

Use a method that maximizes lysis of diverse cell types. Mechanical bead beating improves recovery of gram positive bacteria and fungi. For each sample, measure DNA yield and purity. Avoid overloading the shearing step.

For library preparation, use indexed adapters and consider unique dual indices to mitigate index hopping. Sequence on a platform that suits your budget and read length requirements (e.g., Illumina short reads for high accuracy, PacBio or Nanopore for long reads that improve assembly).

4. Read Preprocessing

Starting from raw FASTQ files, perform:

  • Trimming: Remove adapter sequences and low quality bases. Tools like Trimmomatic or fastp are commonly used.
  • Quality filtering: Discard reads with average Phred score below 20 or with many Ns.
  • Host read removal: Align reads against the host genome (e.g., human, mouse, plant) using a fast aligner such as bowtie2. Discard mapped reads. The remaining reads are the metagenomic fraction.

Document all filtering parameters. Overly aggressive trimming can discard true microbial reads, especially from GC poor genomes.

5. Taxonomic Classification

There are two main approaches: reference based alignment and k-mer based classification.

  • Alignment based: Map reads to a curated reference database (e.g., NCBI RefSeq, GTDB). This gives high specificity for known taxa but misses novel organisms. Tools include Kraken2 and MetaPhlan.
  • K-mer based: Decompose reads into short k-mers and match them to a database of k-mers from known genomes. Kraken2 is a popular choice for speed.

The EMBL-EBI Training offers free courses on taxonomic profiling. For validation of amplicon sequence variants, phylogenetic authentication can prevent false positives from sequencing errors [9].

After classification, generate a count table (species per sample) and normalize by library size using relative abundance, cumulative sum scaling, or rarefaction with caution. Rarefaction discards data but may be needed for certain statistical tests.

6. Functional Profiling

To infer gene families and pathways, map reads to a reference gene catalog (e.g., UniRef, KEGG, eggNOG). Tools like HUMAnN (HMP Unified Metabolic Analysis Network) align reads first to pangenomes, then to species specific pangenomes, and finally to a universal database. Outputs include gene family abundance and pathway coverage.

Functional inference is only as reliable as the database. Many environmental microbes lack representatives, leading to high proportions of unannotated reads. Computational strategies for uncovering novel biocatalysts from persistent pollutants often require custom databases and careful validation [10].

A suite of open source tools for this analysis is maintained by the Bioconductor project, which provides R packages like phyloseq and microbiome for downstream statistics and visualization.

7. Validation

No bioinformatic result should be taken at face value. Validate key findings using orthogonal methods:

  • Quantitative PCR for a subset of taxa.
  • Culturing if possible.
  • Independent replication with a different sequencing run or primer set.

For metatranscriptomic mapping (RNA from the same community), the nf-core/magmap pipeline maps reads to large genome collections and can corroborate taxonomic profiles [6].

Common Mistakes

  1. Skipping blanks and negative controls , leads to reporting reagent contaminants as real species.
  2. Insufficient sequencing depth , rare organisms go undetected and alpha diversity is underestimated.
  3. Ignoring within sample variability , technical replicates can show high variation, average them before analysis.
  4. Overinterpreting low abundance features , many spurious taxa appear at very low relative abundance, filter with a minimum threshold.
  5. Using a single database , databases have geographic and phylogenetic biases. Combine results from multiple classifiers when possible.

Limits and Uncertainty

Metagenomic profiling is inherently incomplete. No database covers all microbial diversity. Rare taxa are often missed. The method cannot distinguish live from dead cells unless you add propidium monoazide treatment. Functional inference is correlative, not mechanistic. Abundance changes in a pathway do not prove activity.

As noted in the literature, microbiome metrics may obscure ecological meaning if statistical assumptions are violated or if compositional data are treated as absolute [11]. Always interpret results in the context of study design and controls.

Frequently Asked Questions

Q: How many reads per sample do I need for shotgun metagenomics? A: It depends on your goal. For genus level profiling, 5 million reads per sample may suffice. For species level detection of rare organisms or for functional profiling, 20,50 million reads are typical. Conduct a saturation analysis by subsampling your pilot data.

Q: What controls are absolutely necessary? A: At minimum, include an extraction blank (process water through all steps) and a sequencing negative control (library from clean water). For low biomass studies, also include a field blank. A positive mock community with known taxa helps assess accuracy.

Q: Can I use amplicon sequencing instead of shotgun? A: Yes, but you will only get a phylogenetic marker (e.g., 16S, ITS). Amplicon is cheaper and deeper, but it does not give functional information and has primer biases. Choose shotgun if you need functional data or to detect viruses, eukaryotes, or novel organisms.

Q: How do I handle host contamination in my reads? A: Align all reads to the host genome (e.g., human, cow) using a fast aligner like bowtie2 or bwa. Remove mapped reads. Keep the unmapped reads. For clinical samples, you can also deplete host DNA before extraction using methods such as nucleosome targeting [8].

References and Further Reading

Related Articles