---
title: Metagenomics FAQ
description: >-
  Frequently asked questions about metagenomics and microbiome analysis tools on
  the platform.
tags:
  - metagenomics
  - faq
---

These answers cover the method and interpretation choices in [metagenomics](/docs/metagenomics) analysis — Kraken2 versus MetaPhlAn, sequencing-depth normalization, sample sizes for differential abundance, reading classification rates and Shannon diversity, paired-sample designs, relative versus absolute abundance, and handling zero-inflated abundance tables.

## Metagenomics FAQ

## When should I use Kraken2 versus MetaPhlAn?

Kraken2 is faster and classifies a higher proportion of reads, making it ideal for broad taxonomic surveys and large datasets. However, it can have higher false-positive rates at the species level. MetaPhlAn uses clade-specific marker genes for higher precision at the species level, making it the better choice when accurate species-level abundance estimates are critical (e.g., clinical microbiome studies). For most exploratory analyses, start with Kraken2; for publication-quality species profiles, use MetaPhlAn.

## Does diversity analysis correct for uneven sequencing depth?

`microbiome_diversity` doesn't take a rarefaction parameter — it computes Shannon, Simpson, Chao1, and observed-species counts directly from the abundance profiles you provide. If your samples have very different sequencing depths (&gt;5x difference), normalize or subsample the underlying FASTQ before profiling, since the diversity tool itself doesn't do this for you.

## How many samples do I need for differential abundance analysis?

Statistical power depends on effect size, within-group variability, and the method used (`ancombc`, `aldex2`, or `maaslin2` — all designed for compositional microbiome data). As a general guideline, fewer than 5 samples per group severely limits power for any of them; 10+ per group is a reasonable target for detecting moderate effects (log2 fold change &gt; 2), and 20-30 per group for subtle effects.

## What does a low classification rate mean?

A low `classification_rate` (&lt; 50% of reads classified) can indicate several things:

- **Environmental samples**: Soil, ocean, and other environmental metagenomes often contain many uncharacterized organisms not in reference databases. Classification rates of 20-50% are normal
- **Host contamination**: If sequencing a microbial community from a host (e.g., human skin), many reads may be host DNA. Consider host read removal before classification
- **Database mismatch**: Using the whole-genome `standard` database for 16S amplicon data will misclassify most reads — switch to `silva` or `greengenes`
- **Quality issues**: Very short reads or low-quality bases reduce classification confidence. Check read quality with FastQC first

## How do I interpret Shannon diversity differences?

The Shannon index (H') combines richness (number of species) and evenness (how equally abundant they are). Typical values for different sample types:

| Sample Type | Typical Shannon H' |
|-------------|-------------------|
| Healthy human gut | 3.0 - 4.5 |
| Diseased human gut | 2.0 - 3.5 |
| Soil | 4.0 - 6.0 |
| Ocean water | 3.0 - 5.0 |
| Oral cavity | 2.5 - 4.0 |

A difference of 0.5-1.0 in Shannon index between groups is generally considered biologically meaningful. Always report alongside other metrics (Simpson, observed species) for a complete picture.

## Can I analyze paired samples (e.g., before/after treatment)?

`microbiome_differential` takes a single `contrast` string over your metadata's condition column — it doesn't expose a paired-design or covariate option. Encode the comparison you want as the contrast (e.g. `"post_vs_pre"`) and describe your study design to Ivy if you need help framing it.

## What is the difference between relative and absolute abundance?

Relative abundance shows the proportion of each taxon within a sample (sums to 1.0). It tells you the community composition but not the total microbial load. Two samples can have identical relative abundances but vastly different total cell counts. Absolute abundance requires spike-in controls or quantitative PCR calibration, which aren't part of this pipeline — `TaxonHit.abundance` and the differential tools' abundance fields are all relative.

## How do the differential methods handle sparse (zero-heavy) abundance data?

Microbiome abundance tables are typically sparse (many zeros). `ancombc` (the default) and `aldex2` are both designed for compositional data and handle structural and sampling zeros differently from a plain t-test; `maaslin2` applies its own normalization and zero-handling. If one method returns implausible results on a sparse table, try one of the other two.

## Read next
