What is Rarefaction?
Rarefaction describes how the number of features that are detected in a sequenced sample, whether distinct taxa, genes, or other units, changes as sequencing depth (i.e the number of sample reads) increases. A microbial community can comprise of hundreds to thousands of taxa (in complex environments), present at different abundances. If we extend the description of microbial profiles to functional genes, virulence factors or antimicrobial-resistance genes, the full feature space might extend well beyond thousands of features. In metagenomics, detecting a microbial species or genes encoding for an enzyme or AMR, regardless of the sequencing technology, requires enough reads originating from the corresponding genomic fragment in the sequenced sample. The probability of recovering enough reads to make a confident call on the presence of a feature depends mainly on two factors:- Feature abundance in the community: Read counts scale with the relative amount of the corresponding DNA in the sequenced library, which depends on the abundance of the organism, its genome size and target copy number, and on how the sample was processed before sequencing.
- Sequencing depth ( i.e the total number of reads ): deeper sequencing samples more DNA fragments from the library and increases the chance of recovering enough reads from low-abundance taxa and genes. The depth required depends on the study goals: broad community profiling can be feasible at lower depth, whereas detecting rare taxa, AMR genes, differentiating between closely related strains requires deeper sequencing.
- Whether, and to what extent, diversity estimates depend on sequencing depth
- How many samples would be retained at a chosen minimum read depth
- Whether differences between groups in downstream analyses may be driven by unequal sequencing depth rather than biological variation
Why would I do rarefaction?
Separating biology from sequencing depth
Two groups—for example, antibiotic-treated mice and untreated controls—can appear to differ in alpha diversity (diversity within a single sample) simply because one group was sequenced to a greater depth than the other. If the biological factor of interest (treatment) and the technical factor (sequencing depth) happen to push richness in the same direction, their effects are confounded: you cannot tell how much of the observed difference is biological versus technical without first correcting for depth.
Was my sequencing depth enough?
A rarefaction curve that is still rising at your maximum sequencing depth means the sampling has not reached saturation: additional reads would likely reveal more taxa, or genes that remain undetected. This is a sign that your current depth may be insufficient to fully characterize the community, particularly for rare or low-abundance members. The depth at which a rarefaction curve begins to plateau is a practical, data-driven target for how much sequencing effort is needed to adequately characterize a given sample type. This is especially useful when planning for larger studies: rarefaction curves from a pilot dataset can help you estimate the sequencing depth required per sample before scaling up, balancing the cost of additional sequencing against the marginal gain in detected diversity.How does it work?
The input to rarefaction is the feature table that describes the taxonomic or functional composition of your samples: the taxa or genes detected in each sample, given as read counts.1
Start from the microbial profile
The input to rarefaction analysis is the Cohort Data Table built when the Analysis Project was created The Data Table describes each sample by the features detected in it and their abundances.
2
Subsample to increasing read depths
Reads are randomly subsampled without replacement to simulate sequencing of the same sample at series of increasing depths. At low sequencing depths, only the most abundant features tend to be observed; rare features appear only as the depth increases.
3
Count what is detected
At each sequencing depth step, count how many features are observed at the chosen taxonomic rank, for example ASVs, genera, or species and compute an Alpha diversity metric.
4
Build the rarefaction curve
Plot Alpha diversity metrics against sequencing depth to generate a rarefaction curve. A curve that flattens means most detectable features have been captured at that rank; a curve that keeps rising means deeper sequencing would still reveal additional taxa.