Skip to main content

Python wrapper for pgenlib's basic reader and writer.

Project description

This provides a basic Python API for pgenlib; see python_api.txt for details.

Build instructions

PyPI:

pip install 'pip>=20.3'
pip install Pgenlib

GitHub:

pip install 'pip>=20.3'
pip install -e 'git+https://github.com/chrchang/plink-ng.git#egg=Pgenlib&subdirectory=2.0/Python'

Or install from a cloned copy:

# clone repo
git clone https://github.com/chrchang/plink-ng
# go to python folder
cd plink-ng/2.0/Python
# install the package
pip install -e .

You can test the package with pytest.

Example usage:
#write a 2 sample file
import numpy as np
import pgenlib as pg

with pg.PgenWriter("test.pgen".encode("utf-8"), 2, variant_ct=3, nonref_flags=False) as writer:
	writer.append_alleles(np.array([0,1,1,1],dtype=np.int32))
	writer.append_alleles(np.array([0,1,0,0],dtype=np.int32))
	writer.append_alleles(np.array([0,0,0,0],dtype=np.int32))

See tests/test_pgenlib.py for more sophisticated examples.

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

pgenlib-0.94.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

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

pgenlib-0.94.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pgenlib-0.94.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pgenlib-0.94.1-cp314-cp314-macosx_10_15_universal2.whl (1.1 MB view details)

Uploaded CPython 3.14macOS 10.15+ universal2 (ARM64, x86-64)

pgenlib-0.94.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pgenlib-0.94.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pgenlib-0.94.1-cp313-cp313-macosx_10_13_universal2.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

pgenlib-0.94.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pgenlib-0.94.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pgenlib-0.94.1-cp312-cp312-macosx_10_13_universal2.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

pgenlib-0.94.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pgenlib-0.94.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pgenlib-0.94.1-cp311-cp311-macosx_10_9_universal2.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

pgenlib-0.94.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pgenlib-0.94.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pgenlib-0.94.1-cp310-cp310-macosx_10_9_universal2.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file pgenlib-0.94.1.tar.gz.

File metadata

  • Download URL: pgenlib-0.94.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pgenlib-0.94.1.tar.gz
Algorithm Hash digest
SHA256 08521cdf6db793a15832e50ccb53b2cdc92b31fdf5f0051fa40c349fa74a1565
MD5 222c15a6f91e1d5c26f4619646638cb7
BLAKE2b-256 52094ca034a3b436d8db5a3d6a946efdd8febb5972525af42cafd46b5a659b8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1.tar.gz:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7151660ac4a3a5762c2338463196d31f15070ebb14399337b4b4ed2822e2c607
MD5 48771837e994757da9123eb08033bd87
BLAKE2b-256 c6d9c8148ba172089a18acbfdcbc7d4f92cf9e6f1b4711b672d89efb9f61ff5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aedbfee6142e80b9b394ec01989084dacc82cc725b3826f059d7eeca8fb99ee0
MD5 a177e2bbcbfc43dc06cfca40ae75b7d5
BLAKE2b-256 00f5f2da2b4a2bb3b3c0e5290c1f4ec0ddc2cbaacbe1a5794fcd189d6149925d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp314-cp314-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 3cd87d1c092f6027c0d4535120bca7a906a0d94a25591018d55e7addf4d2dc1e
MD5 6dbec61a399e8586cd953fc740b6c973
BLAKE2b-256 bccc9d985c313e9c96848ed7d3b64f4d6cc9602a1e00fd0551980392ed8b5421

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp314-cp314-macosx_10_15_universal2.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 691e1d16c9120933f99f570e60c6bffe71af0b656b18db36dec5ee2ee7a2df99
MD5 d832640cbf84435b9d7cce4004b6efa5
BLAKE2b-256 b18e6482c7e9194750fda19d79ef1ebd89c94733cc782512cef86b5adac99fe8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ebbf5dba03a735b8c946e2f37058dc1e4b07aaad48732d8de8bc060ee55f3720
MD5 1456ec61d7a857781d569351e01ea5e7
BLAKE2b-256 b8c1e664ab29543cf48b9c2ff395cf899c6007e6b429929c53c24aa286d606a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 52c53f9f832f29dc6bb0c5bb3f575e9752bea4280eb5a0ab5bf4ce954ca73c04
MD5 948cbfe2dd575b4e442042aeb918c04d
BLAKE2b-256 5d82425c3d4582bd8457295210a947c556b576b161ed8a8e979d3c8a48d2714f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp313-cp313-macosx_10_13_universal2.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fe8e5745c75709da4a23694fd5a283e8631481fe359d8cff435450ec8c5f5ce0
MD5 48a92b066f87d76a80f8b7acbb39ae96
BLAKE2b-256 515e1f0b93fb8668ca19b35c8c4156ca4d1508fac1119f5ec53466a0e52445b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 86ca33bb55690b0a903217111f75059225857fbcfe846115c2f6833b8092975f
MD5 f14be4f98f19c7623397b6339d95c5e3
BLAKE2b-256 95b47d67bd7810f6ae1e3c7e474f059aa0649cfcb79a96b55a5c9a8ffeb541f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 61c3e22ab3e76daad402be17e1d6de5cc2c55cb904ef807b08aabf976fbbbf92
MD5 1c253871eb94fff920dd970d5f58d7a1
BLAKE2b-256 235b08a5ad4f0e3c06fdcd21f51d07a1beb242e4bac39a9fe63ea67a57539fdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp312-cp312-macosx_10_13_universal2.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4db4b73e2095720b2148f455777a144434e9200d4d48d9c8957c3fbeec1abde5
MD5 917e582d3ee13e5a30174fbc5a3238f1
BLAKE2b-256 6a9c161c73f249fca56a2601ee0fa13cfa919ade8fcac43a638f147b6e3f81c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 95712255747624f38b9c9089611b709782d3d926b085c6fbadb6250a873859b5
MD5 c7a6d7f3eb714f732cad1418ac64181f
BLAKE2b-256 f8f019e8d6ef69e9aee5ddae93fdb691d744cf886a3fc273a77da1706b36b92a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f183955e01b20ac7b5d5c2adffd66db626a1ebeb07dafb6bcd7dd88ef0cb182e
MD5 805e440d3a6ee6bd830328b28525a83f
BLAKE2b-256 a6b7bce2478af84656d26a24ef84a2961f9377450078edf932c01a3219e587a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp311-cp311-macosx_10_9_universal2.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c267d592095c2363a3fb01e128740dea1b42e9a4a3a86bb0ab346ac7dda773b
MD5 badcdbbeb05d329c4870b8077d546b1c
BLAKE2b-256 1f21f308e6f8b84f56cb441b7795f40080cb68a89f6430ea6f8f9e25daf83788

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d2039e3b6ffbe47a2dbf435a1a1b519df84040659b12af1f16e6a454d5ad137d
MD5 3a79af6228a4c1f1021d342785f3e300
BLAKE2b-256 a9ff37bf0cabe357d3a1f05199f5c48eb6308d81867016d651ed3a39b03aa772

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yaml on chrchang/plink-ng

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

File details

Details for the file pgenlib-0.94.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f6242c3afe0238d7180b6926e927c0626b3bded16c58af15732d829d6bd850c4
MD5 664902aa052aae91a2ffda5a2f2aadce
BLAKE2b-256 237cdf4a47340a003ab1aa57d1f8d44ba5eb7c91d42de8fd51a3322e33931642

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.1-cp310-cp310-macosx_10_9_universal2.whl:

Publisher: release.yaml on chrchang/plink-ng

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