Accurate detection of metagenomic strain-level associations using average nucleotide identity with StrainSpy
Year: 2026
Type: preprint
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 .
Language: English
Topic: Gut microbiota and health
Subfield: Molecular Biology
Domain: Life Sciences
Open Access status: green
OpenAlex ID: W7204949852
