Skip to main content

Genotype IO tools for Python

Project description

genoio

genoio reads VCF/BCF, PLINK1, PLINK2, and BGEN genotype sources into Python matrices. The public API is Python; the file readers are Rust. This pairing keeps the interface simple while moving parsing and matrix construction into compiled, efficient code.

It is built for downstream genetics tools that need stable matrix contracts: samples on rows, variants on columns, and metadata aligned to returned matrices, blocks, or regions.

Install

To install the most recent release:

pip install genoio

Or the latest:

pip install git+https://github.com/mancusolab/genoio.git

Documentation

For complete documentation and examples, see the documentation site.

Quick Example

import genoio

ds = genoio.pfile("data/chr22_hg38")
samples = ds.samples()
y = load_phenotype_vector(samples["iid"])
C = load_covariates(samples["iid"])

for X, variants in ds.iter_blocks(10_000, return_variants=True):
    # X has shape (samples, variants_in_this_block).
    # `y` and `C` must be aligned to the rows described by `samples`.
    association_scan(X, y, C, variants=variants)

Use read(...) for one matrix, iter_blocks(...) for streaming scans, and iter_regions(...) for interval-based workflows.

License

MIT. See LICENSE.


Notes

genoio was developed by members of the Mancuso Lab with assistance from Codex, following the practices described in the scientific-software-playbook and coding-skills repositories.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genoio-0.2.0.tar.gz (166.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

genoio-0.2.0-cp314-cp314-manylinux_2_34_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

genoio-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

genoio-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

genoio-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

genoio-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

genoio-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

genoio-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

genoio-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file genoio-0.2.0.tar.gz.

File metadata

  • Download URL: genoio-0.2.0.tar.gz
  • Upload date:
  • Size: 166.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genoio-0.2.0.tar.gz
Algorithm Hash digest
SHA256 15e6c3d29a5732413aa9a63962d8f1b42674821b96345e44f808af178049094b
MD5 25c69caf18d73ba8b1e9603ccf31c66a
BLAKE2b-256 98da4bbee5defa4bafa6044961513bf92eb1948e86568811e3398e2ccab5a81b

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0.tar.gz:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2ff20ce41686e5a6053d25f27b2ecc30346acd7bb588dbedcbf301ced2cb4277
MD5 eba98719f9f0d8c56de85403b01b9717
BLAKE2b-256 435fde78877d4bb95e8a2ce330a746f4a26d1722d45048a1feafd6d037034b6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp314-cp314-manylinux_2_34_x86_64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14e913176597f78571ca5cee0fe18c3adfb82b29d998a09ff7e396169d96e01c
MD5 14d3629b264c9d8dfcd3f3081adbbaf3
BLAKE2b-256 79d72063555f05b7bb4732a08190124e81762276ad0bc596fd9bc992c3c1fb92

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 67ac25fa3d4c7cfe5908055a4744ea3a4a77b14281a9aa20c7dfa96535e0a061
MD5 d109d201c1ca333a772c3592b3d93306
BLAKE2b-256 9aa67adf07dd63f14ced22b68ba12ffb9ea5507090a59ab5b7a44367a0072acd

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a16fb2145439d57db722d31fb8458a54afab713ace137e1ba392dc0885344879
MD5 fa36175b19e47b06ae208248e32a2c01
BLAKE2b-256 c71bed39baef5b779428c57569ee99fcf5c9fcfd4cca5b2afc1a8a675692a86d

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 18b67d10e0ddba2d72d5d18f3ae52403f6ed655ced2c842ca2677113b44c9a5d
MD5 d26851641f93561c65debeb29bec94dd
BLAKE2b-256 0a6ff6020e7f7b0232fbe3d16476c73c4445952aadf7cd497c05c5e279b8db5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5f52b9172f2f806ff40f5817f69bf9b2fe9d22cd82728cc72bb5decf96511e4
MD5 0904a7d6926309425ce2f10d2108b945
BLAKE2b-256 1cec82767e76360efe36be6b32ee89369f773b9747c8652a571cf093dd2ffe0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 31b1dcaf2e10b8efeb6391dbd15d718f261d4cb31e20ec59dca980510600024e
MD5 e1b8a7f38b087d4fe303b53ba52b5576
BLAKE2b-256 6fdab06524db88fd7d6f47808c457f72caae3050053025ecfa43aed3d6a3acd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genoio-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84b318d006988db1943c23672083ca2e0ad192b2daf38c798fb05aa8dbf0a33a
MD5 cc273772a20476960e0a810a4f34080e
BLAKE2b-256 36a842ff4595eaa778a0b4bceff14115abacdb7f0b84672f87ff67331a15de52

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on mancusolab/genoio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page