Accurate estimation of intraspecific microbial gene content variation in metagenomic data with MIDAS v3 and StrainPGC

Byron J. Smith, Chunyu Zhao, Veronika Dubinkina, Xiaofan Jin, Liron Zahavi, Saar Shoer, Jacqueline Moltzau Anderson, Eran Segal, Katherine S. Pollard

Abstract

Metagenomics has greatly expanded our understanding of the human gut microbiome by revealing a vast diversity of bacterial species within and across individuals. Even within a single species, different strains can have highly divergent gene content, affecting traits such as antibiotic resistance, metabolism, and virulence. Methods that harness metagenomic data to resolve strain-level differences in functional potential are crucial for understanding the causes and consequences of this intraspecific diversity. The enormous size of pangenome references, strain mixing within samples, and inconsistent sequencing depth present challenges for existing tools that analyze samples one at a time. To address this gap, we updated the MIDAS pangenome profiler, now released as version 3, and developed StrainPGC, an approach to strain-specific gene content estimation that combines strain tracking and correlations across multiple samples. We validate our integrated analysis using a complex synthetic community of strains from the human gut and find that StrainPGC outperforms existing approaches. Analyzing a large, publicly available metagenome collection from inflammatory bowel disease patients and healthy controls, we catalog the functional repertoires of thousands of strains across hundreds of species, capturing extensive diversity missing from reference databases. Finally, we apply StrainPGC to metagenomes from a clinical trial of fecal microbiota transplantation for the treatment of ulcerative colitis. We identify two Escherichia coli strains from two different donors that are both frequently transmitted to patients, but have notable differences in functional potential. StrainPGC and MIDAS v3 together enable precise, intraspecific pangenomic investigations using large collections of metagenomic data without microbial isolation or de novo assembly.

Introduction

While metagenomics has revolutionized our understanding of the human gut, most analyses stop at the species level. However, two "strains" of the same species (like E. coli) can be as different as a harmless commensal and a deadly pathogen. These differences lie in their gene content variation. Existing tools for pangenome profiling face significant hurdles, including incomplete references, cross-mapping between species, low sequencing depth for rare strains, and the complexity of strain mixing within single samples.

The StrainPGC Framework

To address these challenges, we introduced a two-part solution: MIDAS v3 and StrainPGC. MIDAS v3 is an overhaul of the Microbiome Genome Diversity Automated Software, featuring a better-curated pangenome database and a more robust alignment pipeline to reduce cross-species "leakage."

StrainPGC (Pangenome Gene Content) is the core algorithmic innovation. Instead of analyzing one sample at a time, StrainPGC identifies "strain-pure" samples where one strain dominates across a large dataset. It then employs a multi-sample correlation approach: if a gene’s sequencing depth across many samples tracks perfectly with the overall species' depth, that gene is assigned to that specific strain. This acts as a powerful filter, distinguishing true strain-specific genes from noise or cross-mapping artifacts.

Figure 1: Overview of challenges in pangenome profiling and the StrainPGC workflow.

Performance and Validation

The tools were validated using a synthetic community of 117 bacterial isolates, providing a "ground truth" for accuracy. In these benchmarks, StrainPGC achieved a median precision of 0.96 and a recall of 0.88, significantly outperforming existing state-of-the-art tools like PanPhlAn and StrainPanDA. Its primary advantage lies in its superior ability to recall genes without sacrificing precision, even in complex mixtures.

Figure 3: Validation of StrainPGC performance against existing methods showing precision, recall, and F1 scores.

Insights from Real-World Metagenomes

Applying StrainPGC to the Human Microbiome Project 2 (HMP2) dataset—comprising 1,338 samples—we cataloged the functional repertoires of 3,511 inferred strains across 443 species. Notably, 68% of these strains were significantly different (>5% genomic dissimilarity) from any existing reference genome, highlighting the vast amount of uncatalogued microbial diversity.

The tool also identified "co-occurrence clusters"—groups of genes that travel together, often representing functional units like metabolic operons or mobile genetic elements (plasmids). In a clinical trial of Fecal Microbiota Transplantation (FMT) for ulcerative colitis, StrainPGC revealed that while different donors provided E. coli strains that both successfully colonized patients, their functional potentials differed significantly. One donor's strain carried antibiotic resistance and virulence systems (T6SS), while the other's did not, suggesting that donor screening should move toward strain-level functional profiling.

Conclusion and Future Directions

StrainPGC and MIDAS v3 enable precise, intraspecific pangenomic investigations using large metagenomic datasets without the need for microbial isolation or de novo assembly. While the method is assembly-free and thus cannot determine gene order (synteny), it provides a powerful means to identify specific microbial genes associated with human diseases or to optimize therapeutic interventions like FMT. Future work will focus on reducing computational intensity and expanding the ability to identify entirely "de novo" genes.

Summary updated

BibTeX
@inproceedings{smith2025accurate,
  author = {Byron J. Smith and Chunyu Zhao and Veronika Dubinkina and Xiaofan Jin and Liron Zahavi and Saar Shoer and Jacqueline Moltzau Anderson and Eran Segal and Katherine S. Pollard},
  title = {{Accurate estimation of intraspecific microbial gene content variation in metagenomic data with MIDAS v3 and StrainPGC}},
  booktitle = {Genome},
  year = {2025},
  doi = {10.1101/gr.279543.124},
}
Figure