Skip to main content

PyStatsGenomic

Genomics and computational-biology statistical computing for Python.

Status: 0.1.0 — first module shipped. Hardy–Weinberg equilibrium is available now; more statistical-genetics methods are on the roadmap below.

PyStatsGenomic is part of the open-core PyStatistics family:

Package Layer
pystatistics Fundamental, general statistics
pystatsbio Biotech / pharma statistics
pystatsclinical Clinical-trial / clinical-research statistics
pystatsgenomic Genomics / computational-biology statistics
pystatsfinance Financial / quantitative statistics
pystatsinsurance Actuarial / insurance statistics

Like its siblings, it builds on pystatistics for the general statistical layer and adds methods specific to genomics.

What's available now (0.1.0)

Hardy–Weinberg equilibrium for a biallelic locus, via the exact test (Wigginton, Cui & Abecasis 2005, the default) or the Pearson chi-square test:

from pystatsgenomic import hwe

result = hwe.hardy_weinberg(n_AA=298, n_Aa=489, n_aa=213)
print(result.summary())

# Allele frequencies on their own:
freqs = hwe.allele_frequencies(n_AA=298, n_Aa=489, n_aa=213)

hardy_weinberg reports allele frequencies, expected genotype counts, the chi-square statistic, and the p-value (1 df — HWE estimates an allele frequency). It fails loud on negative/non-integer counts and an empty sample.

Roadmap (candidates, not commitments)

  • Linkage disequilibrium (D, D′, r²) and genotyping QC metrics.
  • Single-locus association and GWAS-scan orchestration (with genomic control).
  • Population-genetics summaries: Fst, nucleotide diversity, Tajima's D.

Installation

pip install pystatsgenomic

License

MIT © Hai-Shuo. Part of the SGCX open-core ecosystem.

Metadata

Release files for pystatsgenomic 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pystatsgenomic 0.1.1
File Size Uploaded Provenance
pystatsgenomic-0.1.1.tar.gz 15.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pystatsgenomic 0.1.1
File Interpreter ABI Platform
pystatsgenomic-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / pystatsgenomic-0.1.1.tar.gz

Download URL pystatsgenomic-0.1.1.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
66d670287f8f5eea6413ea7216ffd35fd5670daae3d82193cbcf7a77de50ca73
BLAKE2b-256 checksum
How to use checksums
8092efaca0b8ac3937692f03760837e026718dc6103df897328f6f64bd727d45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Release files / pystatsgenomic-0.1.1-py3-none-any.whl

Download URL pystatsgenomic-0.1.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b05c7c5af226fb193bb6c98022aaccbb113b5ef428d132d3ae69e071a72f6ba3
BLAKE2b-256 checksum
How to use checksums
9061b98eb189059cedb159c61590cfe7f5e98887063d4ce636ba3035aa6a42e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Security for pystatsgenomic 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pystatsgenomic-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page