snputils: A High-Performance Python Library for Genetic Variation and Population Structure.
David Bonet, Marçal Comajoan Cara, Míriam Barrabés, Riccardo Smeriglio, Margarita Geleta, Albert Dominguez Mantes, Christophe Thomassin, Devang Agrawal,
Department of Biomedical Data Science, Stanford University, Stanford, CA, USA. · Politecnico di Torino, Turin, Italy.
Key points
From the paper's conclusion- We present snputils, an open-source Python library for high-performance processing and analysis of genotype, ancestry, phenotype, and identity-by-descent data within a single framework suitable for biobank-scale research. snputils provides unified data containers and efficient routines for genotype quality control, filtering, merging, and computing classical population-genetic statistics, with opt
Abstract
Large-scale genomic and population-genetic datasets offer unprecedented opportunities to study population structure and uncover the genetic basis of complex traits and diseases. Existing analytical tools, however, are characterized by format incompatibilities, limited functionality, and computational inefficiencies, forcing researchers to construct pipelines chaining together fragmented command-line utilities and ad hoc scripts. These are difficult to maintain, scale, and reproduce. We present snputils, an open-source Python library for high-performance processing and analysis of genotype, ancestry, phenotype, and identity-by-descent data within a single framework suitable for biobank-scale research. snputils provides unified data containers and efficient routines for genotype quality control, filtering, merging, and computing classical population-genetic statistics, with optional ancestry-specific masking. An identity-by-descent module supports reading multiple formats, filtering, and ancestry-restricted segment trimming for relatedness and demographic inference. snputils also incorporates ancestry masking and multi-array functionalities for dimensionality reduction methods, as well as efficient implementations of admixture simulation, admixture mapping, genome-wide association testing, and advanced visualization capabilities. With support for the most commonly used file formats, snputils natively supports human and non-human diploid datasets represented in standard formats. At the same time, its modular and optimized design reduces technical overhead, facilitating reproducible workflows that accelerate discoveries in population genetics, genomic research, and precision medicine. Benchmarks show faster I/O and concordant PCA, allele-frequency statistics, and admixture mapping results relative to established reference tools, with substantial runtime reductions. snputils is available at https://github.com/AI-sandbox/snputils, with documentation and tutorials at docs.snputils.org.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- fastDiversity: an R package for population genetic diversity analysis of multi-species SNP datasetsThe Journal of Open Source Software · 2026
- A SNP panel for coanalysis of capture and shotgun ancient DNA data.Genome research · 2026
- Systematic inference of biological relatedness across the global ancient DNA recordbioRxiv · 2026
- Novel Pipeline for Large-Scale Comparative Population GeneticsbioRxiv · 2026
- VariantFlow: a selective-execution engine for efficient population genomic computation on large variant datasetsbioRxiv · 2026
- A Recipe for a Good π. How to Properly Estimate Population Genetics Summary Statistics and Why we Should Systematically Report Them.Genome biology and evolution · 2026