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.0.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.0-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.0-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.0-cp314-cp314-macosx_10_15_universal2.whl (1.0 MB view details)

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

pgenlib-0.94.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

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

File hashes

Hashes for pgenlib-0.94.0.tar.gz
Algorithm Hash digest
SHA256 21d475e126c5dd1daadc1fe8bffa3e463ae4b57851983babe7056e73408ca354
MD5 b049e3afbec00f34b5c60ec00903b4d8
BLAKE2b-256 4d5745e771b6bd46344a45e8faf8f7c66b6a4ab5c60afff4006addc20bdf5c5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0.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.0-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.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7879d7216be213002e67b868d996f2c7b03ec5d714e04842763f46089979a573
MD5 140b76a9a2570cbca8cbcc31539c79cb
BLAKE2b-256 ede1da7127805268a6795865c8c36936ac6de4fe1066d117fd816294bbbd8b34

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bca72f74a1458ee8aefea2eccfe82c8f9dbfaf11af0a98f800d7aa12949ef206
MD5 247d13587253ad4444152baac8e565f8
BLAKE2b-256 35c26061c5360327ee2fd12e4ffa83eb21354db75cf1ffc3a39c00a78152c651

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp314-cp314-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 f280b2db0089214190f337261f777729a023e6a661f4fcca11408b7950a0db82
MD5 9ea303c55a36c9db5bc2c93a5015a97a
BLAKE2b-256 c5c6896c4893fec1239f48ac7ec76584795160fd04f92b472781fb83ce20e8c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-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.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fa03dbe9763b150156a62567333b9344ae167bfd6297b6437fbb5fd576811a0
MD5 1d111322a315c6f7b821b987d24958d6
BLAKE2b-256 6b08b99147d2f01a5ccedd9d20b43e781e3c77c56eefd84c7927650964f3e020

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 52546d54bbe2c25f9da2c4c17f724bb449bd83e3a893fcbc52663fc724afcf17
MD5 c81834f00cf58f0fd74f3078e67ea5bf
BLAKE2b-256 68ff395cd1451962d6bcf36cd5b5759f4172fbe4600d1c234590c468fb9b395e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b62b0ae7caad3efb6bcf6649c1ef91d7c9e133e4a167616f674e8801170e67db
MD5 79dacc49350ad5a3ba40fe2baae200ac
BLAKE2b-256 6ad5d1d7b40a8623b22225a8d3b49fc1f2521d7401a23fb59c0d787bb9608ec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a451d0491f437cf54a6d3d77b5322dbae5e25b818e76cb8e97e78db1df6c92fe
MD5 a86cc06c7b83e9a7c52ec13169df59e4
BLAKE2b-256 ccb4111ae6d102845c2fdbf75b8c9dc5ad38c0cdc4a59c4384511054b3864266

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3a56fce561409aa87a86c3ef5bd95ebcdcb068c4c9941d5bd381451925c2ed33
MD5 8bd1430843ed649788b6f52db0a39fb3
BLAKE2b-256 736f932a145248127ffdec8aea2591a9a12bce228cb7538f83529b74aabfce63

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 86d7a15ac325aecd26f5cfd4cdd5426a5180b414b1e9dd4be31d090fa104f4e2
MD5 88ca8abae49ed6682729be734161a55f
BLAKE2b-256 2f979214bd9b860e680a281232e218d10b718a7280b593f4ab56240a558dc975

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-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.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7b2d758ea405f3c3b6e520a36ae5e6edb63e8267f42f25bf0dc5c3e58bfbf1f
MD5 a3b76d1dd902b2ac707d38c306ca152a
BLAKE2b-256 c6842a0980d2c9f554fdc4a2c27f012de42a21737ac6c67cfacabf3c2a043f71

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5b5b68bd4ac7edd23d63be761bba61425bee4a0b349a2299ac4beb64aa52f130
MD5 38dcedbcbd1080696dee49cd92a00ff8
BLAKE2b-256 b90e0797952ab069794b936692e050fccacc026665fd493d947ee89aa1acc88e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9bd0e381dead0a4077c66d351cbbadf48ef2d43c1d450ca09b007db8da5eeb78
MD5 eabe79ab68f6e0fa069f1805fc389bb3
BLAKE2b-256 e8b37b0845952f65ecd3f02e8573ece4dd17c97ca27604cd28302c0467293e83

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-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.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a9c26fc0de6282c82d95697b08b9f5fba2473b048952d810c9d01e094058861
MD5 68c58f8845742bbed65f37ea447a37ba
BLAKE2b-256 d8b210b296fc0e1c3a7c058a39e424a66f7ae32cd9d414bb0433b8f28a4c0d38

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aa1c6d692a2e8b1c5c88ec3ea66f41653475279d78518bb98d601f93a01b953f
MD5 bd26b8027f86ad8992de3e8d0913b17e
BLAKE2b-256 fff0262ac01df340c912ec2a16dcb1cbb71aa9e27ece3808e693b3ba15fd79ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pgenlib-0.94.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ffaf1e9b8baa05da40213e12b950d4e612097d8fa81a921f2a2a797880b5f871
MD5 85affc26074c92a7f361e6ca19740688
BLAKE2b-256 f1262c4e3e57055d5c3460b353caa899a6af5b6e44b81425433b765529d72990

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgenlib-0.94.0-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