genesets (Python)
Python bindings for genesets-rs. The compute runs in Rust and releases the GIL.
import genesets
result = genesets.mgsa(
annotations=[("BRCA1", "GO:0006281"), ...], # (gene, term), propagated to ancestors
study=["BRCA1", "RAD51", ...],
background=None, # default: every annotated gene
closure=[("GO:0006281", "GO:0006974"), ...], # optional (child, ancestor) pairs
)
for term in result["terms"][:10]:
print(term["id"], term["posterior"], term["overlap"], term["term_size"])
mgsa is Bayesian model-based gene set analysis, as in Ontologizer and
wtfgenes. Each term gets a posterior probability of being active, so ancestors
of an enriched term are explained away instead of being reported alongside it.
Keyword options match the genesets-rs mgsa CLI (samples_per_term,
burn_per_term, the *_prob/*_count priors, move rates, and seed).
Install
Until wheels are on PyPI, install from git. Building from source needs a Rust toolchain:
uv add "genesets @ git+https://github.com/monarch-initiative/genesets#subdirectory=python/genesets-py"
Develop
cd python/genesets-py
uv run --with maturin --with pytest maturin develop --release
uv run --with pytest pytest tests
Release
Publish a GitHub release whose tag is the version, such as v0.2.0 (or
v0.2.0-rc.1 for a pre-release, which PyPI lists as 0.2.0rc1). The
Python wheels workflow builds wheels for Linux, macOS and Windows plus an
sdist, sets the package version from the tag, and uploads to PyPI through
trusted publishing in the pypi environment. No version bump is committed
first; the version in Cargo.toml here only matters for local builds.
Metadata
Release files for genesets 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| genesets-0.1.1.tar.gz | 56.8 kB | With provenance | Details for genesets-0.1.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| genesets-0.1.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for genesets-0.1.1-cp310-abi3-win_amd64.whl |
| genesets-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for genesets-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| genesets-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for genesets-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| genesets-0.1.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for genesets-0.1.1-cp310-abi3-macosx_11_0_arm64.whl |
| genesets-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for genesets-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.7 MB
Release files / genesets-0.1.1.tar.gz
| Download URL | genesets-0.1.1.tar.gz |
|---|---|
| Size | 56.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93ea6d8b54c9995a05c6ae4cf500734f0cff9146a68e637ca1f27fa758f71ec3
|
|
BLAKE2b-256 checksum How to use checksums |
c5ed3f976e6999e9bad786bffbe2305868b26467cf2fbe35b87c2ba0b0591e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / genesets-0.1.1-cp310-abi3-win_amd64.whl
| Download URL | genesets-0.1.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 190.0 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a587296ca8493e83db25e26cb0c60951073565de5b95d762820b26f5aa63fd65
|
|
BLAKE2b-256 checksum How to use checksums |
5d416badd6a787dc08bd6079a3f79ff2830da9d863faa4cdd76632ca74be9662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / genesets-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | genesets-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 504.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf377be41bdaf7ffa36e1bb24b912f9517fa7ea33cb7a3e83f4e1d8b66e2af56
|
|
BLAKE2b-256 checksum How to use checksums |
959a275b13d220c80b26aaf29cdfcd51b7790e3b8be7b0e080db1fde780ca366
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / genesets-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | genesets-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 328.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6f008bd841a3e0abc84f4761867b82f82f3bf525a562dd010ef33c33048934d8
|
|
BLAKE2b-256 checksum How to use checksums |
e48e7f214de8f2e6e7ff7b2daadc7a7df923173931b6a373e6ea709aa7e995fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / genesets-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | genesets-0.1.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 290.6 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8aadfd5e5176fc8d20e4d49c27be50b432894a02ad2dfa12e3cb40e538edcfa
|
|
BLAKE2b-256 checksum How to use checksums |
194a2f7fc88ff2a0750acc88a72ab3045975589913f52ddd3a0e535e9069bd48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / genesets-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | genesets-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 296.3 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c494ee715b0e7758d8556798648f3670eaaa522a3acaf42bb0d4b52e0fa9d37
|
|
BLAKE2b-256 checksum How to use checksums |
f46efd662858a0094a9ca94558f7e448985bc151044add9ee5a6b0a8bece93e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logSecurity for genesets 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 6 files in this release have been uploaded with provenance metadata.
Attestation for genesets-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 Oct 19, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.