Accurate detection of metagenomic strain-level associations using average nucleotide identity with StrainSpy
- 1University of Melbourne
Abstract
Genetic variation among microbial strains of the same species can profoundly influence their phenotypes, ecological functions, and impacts on human health. Traditionally, the relative abundance of a species has been used to identify associations between the microbiome and disease. However, this approach overlooks intra-species genetic variation and is susceptible to spurious correlations arising from the compositional nature of abundance data and microbial load. Fast, k-mer-based algorithms can now accurately estimate strain-level Average Nucleotide Identity (ANI) in metagenomes. Despite its value as an orthogonal metric for strain-level analysis, existing ANI association methods are limited to case-control designs and rely on arbitrary identity thresholds. To address this, we developed StrainSpy, a statistical algorithm that jointly captures strain variations and replacement across longitudinal and multi-cohort studies without predefined thresholds. In simulations, StrainSpy achieved >98% sensitivity versus 79% for comparable approaches at similar specificity. Analysis of a longitudinal antibiotic study in 12 healthy adults revealed novel strain-level associations across multiple species, including reduced strain-level diversity despite persistence of the species, and showed that a previously reported association with E. coli was driven by reduced microbial load. Across 3,414 metagenomes from 17 colorectal cancer cohorts, StrainSpy identified novel strain-level associations in E. coli accompanied by enrichment of adhesin genes in addition to recovering well established associations. Importantly, machine learning models built on StrainSpy-selected features matched the predictive accuracy of abundance-based approaches, whilst avoiding the confounding effects of microbial load. StrainSpy is available as an R package at github.com/gtonkinhill/strainspy.
Related
- Lossless compression of protein databases for efficient and accurate metagenomic sequence classification with Centrifuger
- Metagenomic parasite detection trap: prevention with an Excel filter sheet based on CIGAR values
- Expanding the Repertoire of Associations Between Antibiotic Resistance Genes and Putative Mobile Genetic Element Carriers Using Metagenomic Long Reads
- Putative Cyclospora cayetanensis detection in wastewater metagenomic datasets
- Application of metagenomic sequencing to improve sessile serrated lesion detection using the faecal immunochemical test
BibTeX
@misc{mallawaarachchi2026accurate,
title = {{Accurate detection of metagenomic strain-level associations using average nucleotide identity with StrainSpy}},
author = {S. Mallawaarachchi and K. Tandon and N. Rajan and V. R. Marcelino and S. Sandhu and S. Bedoui and D. J. Ingle and A. Gunjur and G. Tonkin-Hill},
howpublished = {bioRxiv},
year = {2026},
month = aug,
doi = {10.64898/2026.08.30.748153},
url = {https://www.biorxiv.org/content/10.64898/2026.08.30.748153v1},
note = {CC BY},
}
RIS
TY - UNPB
TI - Accurate detection of metagenomic strain-level associations using average nucleotide identity with StrainSpy
AU - S. Mallawaarachchi
AU - K. Tandon
AU - N. Rajan
AU - V. R. Marcelino
AU - S. Sandhu
AU - S. Bedoui
AU - D. J. Ingle
AU - A. Gunjur
AU - G. Tonkin-Hill
PY - 2026
DA - 2026/08/30
PB - bioRxiv
DO - 10.64898/2026.08.30.748153
UR - https://www.biorxiv.org/content/10.64898/2026.08.30.748153v1
AB - Genetic variation among microbial strains of the same species can profoundly influence their phenotypes, ecological functions, and impacts on human health. Traditionally, the relative abundance of a species has been used to identify associations between the microbiome and disease. However, this approach overlooks intra-species genetic variation and is susceptible to spurious correlations arising from the compositional nature of abundance data and microbial load. Fast, k-mer-based algorithms can now accurately estimate strain-level Average Nucleotide Identity (ANI) in metagenomes. Despite its value as an orthogonal metric for strain-level analysis, existing ANI association methods are limited to case-control designs and rely on arbitrary identity thresholds. To address this, we developed StrainSpy, a statistical algorithm that jointly captures strain variations and replacement across longitudinal and multi-cohort studies without predefined thresholds. In simulations, StrainSpy achieved >98% sensitivity versus 79% for comparable approaches at similar specificity. Analysis of a longitudinal antibiotic study in 12 healthy adults revealed novel strain-level associations across multiple species, including reduced strain-level diversity despite persistence of the species, and showed that a previously reported association with E. coli was driven by reduced microbial load. Across 3,414 metagenomes from 17 colorectal cancer cohorts, StrainSpy identified novel strain-level associations in E. coli accompanied by enrichment of adhesin genes in addition to recovering well established associations. Importantly, machine learning models built on StrainSpy-selected features matched the predictive accuracy of abundance-based approaches, whilst avoiding the confounding effects of microbial load. StrainSpy is available as an R package at github.com/gtonkinhill/strainspy.
ER -