Installation¶
Requirements¶
Python 3.9 or newer (3.9–3.14 supported)
pip with a recent setuptools build backend
Core dependencies (NumPy, pandas, scikit-learn, Polars, matplotlib, Pgenlib, bgen, and others) are installed automatically with the package. See pyproject.toml for the full list.
PyPI install¶
Install the latest release from PyPI:
pip install snputils
This installs the library, the snputils command-line tool, read support for VCF, BCF, BGEN, PLINK BED/PGEN, MSP, FLARE, ADMIXTURE, phenotype, and IBD formats, plus the corresponding writers where implemented.
Optional extras¶
Install feature-specific dependencies with pip extras:
Extra |
Command |
Purpose |
|---|---|---|
|
|
GPU-accelerated PCA ( |
|
|
Build this documentation locally |
|
|
Run or edit tutorial notebooks |
|
|
pytest and coverage tooling |
Extras can be combined: pip install "snputils[torch,docs]".
Format-specific notes¶
Build documentation locally¶
From a clone of the repository:
python -m venv .venv
source .venv/bin/activate
pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html
Open docs/_build/html/index.html in a browser. The same build runs in CI when documentation is published to docs.snputils.org.
Getting help¶
Documentation: docs.snputils.org
Source code: github.com/AI-sandbox/snputils
Issues and feature requests: GitHub Issues