bioRxivBioinformaticsPreprint
snputils: A High-Performance Python Library for Genetic Variation and Population Structure
David BonetiD, M CaraiD, Míriam BarrabésiD, Riccardo SmeriglioiD, Devang Agrawal, Khaled Aounallah, Margarita GeletaiD, Albert Dominguez MantesiD, Christophe Thomassin, Cole ShanksiD, Edward C. HuangiD, Marc Franquesa Monés, Aina Luis, Joan Saurina, Maria Perera, Cayetana López, Benet Oriol SàbatiD, Jordi AbanteiD, Sonia Moreno–GrauiD, Daniel Mas MontserratiD, Alexander G. IoannidisiD
Abstract
The increasing size and resolution of genomic and population genetic datasets offer unprecedented opportunities to study population structure and uncover the genetic basis of complex traits and diseases. The collection of existing analytical tools, however, is characterized by format incompatibilities, limited functionality, and computational inefficiencies, forcing researchers to construct fragile pipelines that chain together fragmented command-line utilities and ad hoc scripts. These are difficult to maintain, scale, and reproduce. To address such limitations, we present snputils, a Python library that unifies high-performance I/O, transformation, and analysis of genotype, ancestry, and phenotypic information within a single framework suitable for biobank-scale research. The library provides efficient tools for essential operations, including querying, cleaning, merging, and statistical analysis. In addition, it offers classical population genetic statistics with optional ancestry-specific masking. An identity-by-descent module supports reading of 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, and advanced visualization capabilities. With support for the most commonly used file formats, snputils integrates smoothly with existing tools and clinical databases. 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. Benchmarking demonstrates a significant reduction in genotype data loading speed compared to existing Python libraries. The open-source library is available at https://github.com/AI-sandbox/snputils, with full documentation and tutorials at snputils.org.
- assay: whole-genome sequencing
- assay: GWAS summary statistics
- research focus: variant calling
- research focus: database / resource
- research focus: benchmarking
- research focus: software / tool
- approach: statistical model
- approach: experimental assay
- Citations
- 4
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- GenoTools: An Open-Source Python Package for Efficient Genotype Data Quality Control and Analysis
Dan Vitale, Mathew J. Koretsky, … Mike A. Nalls·G3 Genes Genomes GeneticsPeer-reviewed·Nov 20, 2024
- tidypopgen: Tidy Population Genetics in R
Evelyn J. Carter, Eirlys E. Tysall, … Andrea Manica·Methods in Ecology and EvolutionPeer-reviewed·Dec 8, 2025
- Genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization
Cyprien A. Rivier, Santiago Clocchiatti‐Tuozzo, … Julián Acosta·Bioinformatics AdvancesPeer-reviewed·Dec 19, 2024
- PopGenPlayground: a population genomics analysis pipeline
Walter Wolfsberger, Khrystyna Shchubelka, … Tarás K. Oleksyk·bioRxiv·Feb 27, 2024
- genomalicious: serving up a smorgasbord of R functions for performing and teaching population genomic analyses
Joshua A. Thia·bioRxiv·Apr 22, 2024
- SambaR: an R package for fast, easy and reproducible population-genetic analyses of biallelic SNP datasets
Menno de Jong, Joost F. de Jong, … Axel Janke·Molecular Ecology ResourcesPeer-reviewed·Jan 27, 2021