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

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

From a local checkout:

pip install .

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.1.0.tar.gz (122.4 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.1.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.1.0-cp314-cp314-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

genoio-0.1.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.1.0-cp313-cp313-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

genoio-0.1.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.1.0-cp312-cp312-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

genoio-0.1.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.1.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.1.0.tar.gz.

File metadata

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

File hashes

Hashes for genoio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c36fd6d13dfdc82c15774cab6b1f86377debf88837e34ffc3bcbaa267f5efaa9
MD5 aa78b2da3a648f40f64a65dcde2d8780
BLAKE2b-256 110d36aad93971e9502fc98888ea28c4075c461e4252f4fa220a2243fa2fd9d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4cbed8e96f20035da09dafc14ad79937006842ae8800069a6c3eff75e23cbfd2
MD5 6a363d9e503e4a603d1026a3306069f6
BLAKE2b-256 6ed3e2fa1297e7a880aac14f1c06065875f1205d46db722017438d28a1e6f295

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5bca588621e305601fa5654606422101cd43e0cd99932ded00b3ee1ef2ddd18
MD5 c2ba196e02154a542c70d4db3a0f2026
BLAKE2b-256 c1248c87035c1917b17ce066a62d98c86209ea1afeab1a33184067e10632a214

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2d8783e615e5fcb538b2ac13c20e0800ff242d35ec75f293d3d29b35cfb90168
MD5 1cfb4dc6e12bc6b79600a6132e2dd9c4
BLAKE2b-256 1275d25583a4148f13467ea18807211e74d8c9ddd35879c7183f31d981a735c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 762f56ec03d6b4212b3596d647178c3c51f9dfb0cbcade3eb5b5f01e369733a3
MD5 2b7f611e3f69effbfe93341eacda604c
BLAKE2b-256 7adefcd040422d1abcba95849052af365ca5bc747a6286dd7469ba3c3cb5ebbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0957369e863bb95b08f1b4eb0d65e25adff74451dd299090daa8429cb8b524aa
MD5 1190e7af3f8aebd2634341695d1773bd
BLAKE2b-256 803d038c9253a77baf9e9f11d5b51070e68418ee29905dc0a78d5aa5d3e7bb01

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51c3203a73b7ac6504399bb64fd97dedc49f172d30e2445cb738ae83d00d446f
MD5 2e87cff9f93181f62de922d1876dc97b
BLAKE2b-256 449cfbc007373ec9524d926c9e629070eb38b7282864cb915d78316a9e8fa9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f9e5bbdc77ef48b73c228a6676f6d192a068e4394de8c3058365dc7f6aea6e81
MD5 fdc16c277053020cb65fe3e7b8d09f3c
BLAKE2b-256 6578829cea96938a0a9621aabe44176d2fd0a425a9457b3fab55afdc979c8cde

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genoio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed7976661f0961f68882fb207bc315b19953b113c4a6dc06d073a1e7971d2e81
MD5 65d2da614c9c5bc1df25861b2aeee184
BLAKE2b-256 c8c507c40fff98857f80403f23f13cceb6768fc3e1e3c431a6519200244c0996

See more details on using hashes here.

Provenance

The following attestation bundles were made for genoio-0.1.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