Efficient and scalable Python implementation of ANCOM-BC and ANCOM-BC2 for omics differential abundance testing
Zijun Wu, Huang Lin, James T. Morton, Qiyun Zhu
Arizona State University · University of Maryland, College Park
Key points
From the paper's conclusion- We demonstrated that our Python implementations generated test results matching the original R code, while achieving 380- and 147-fold faster runtimes and 97.4% and 96.2% lower memory consumption on the largest tested dataset, respectively.
Abstract
SUMMARY: Analysis of Compositions of Microbiomes with Bias Correction (ANCOM-BC) and its successor ANCOM-BC2 are critical algorithms for differential abundance analysis. Designed for handling compositional data, they feature the ability to estimate the unknown sampling fractions and correct the bias induced by their differences. While the original R package implementing the two methods is robust for standard dataset sizes, the increasing magnitude of modern multi-omics studies presents computational challenges, often resulting in a runtime bottleneck for high-dimensional data. Here, we present native Python implementations of both ANCOM-BC and ANCOM-BC2 in the scikit-bio package, significantly accelerating the workflow and enabling their application to large-scale datasets. By leveraging vectorization with NumPy and numerical optimization in SciPy, we enhanced the efficiency of both methods without compromising their statistical accuracy. The benchmarking results revealed a dramatic increase in performance in both simulated and real datasets. We demonstrated that our Python implementations generated test results matching the original R code, while achieving 380- and 147-fold faster runtimes and 97.4% and 96.2% lower memory consumption on the largest tested dataset, respectively. The Python implementations allow for the analysis of datasets that are significantly larger than previously possible, and enable applications to alternative omics data types and complex statistical models that vary greatly by the number of samples, features, and covariates. AVAILABILITY AND IMPLEMENTATION: https://github.com/scikit-bio/scikit-bio. SUPPLEMENTARY INFORMATION: N/A.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A multidimensional benchmark of confounder-aware differential abundance strategies for single- and multi-cohort microbiome studiesbioRxiv · 2026
- Proportionality-based association metrics in count compositional data.NAR genomics and bioinformatics · 2026
- CoMeDA: an integrated platform for compositional analysis of metabarcoding data with batch correctionBMC Bioinformatics · 2026
- Mathematical Foundations of Beta Diversity: Why Common Metrics Fail in Microbiome AnalysisJournal of Statistical Theory and Applications · 2026
- Rarefaction is better than robust Aitchison PCA and other compositional data analysis methods at controlling for uneven sequencing effortmSystems · 2026
- SimpleMicrobiome: An integrated web-based platform for streamlined microbiome data analysis and visualization.Journal of microbiology (Seoul, Korea) · 2026