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

To build from GitHub, clone the repository:

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

Then install Cython and NumPy:

pip3 install "cython>=0.29.21" "numpy>=1.19.0"

and then build and install the package

python3 setup.py build_ext
python3 setup.py install
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.83.0.tar.gz (522.2 kB view details)

Uploaded Source

Built Distributions

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

Pgenlib-0.83.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (254.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (255.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (258.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp310-cp310-macosx_13_0_arm64.whl (239.0 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

Pgenlib-0.83.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

Pgenlib-0.83.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

File details

Details for the file Pgenlib-0.83.0.tar.gz.

File metadata

  • Download URL: Pgenlib-0.83.0.tar.gz
  • Upload date:
  • Size: 522.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for Pgenlib-0.83.0.tar.gz
Algorithm Hash digest
SHA256 5acf7d90680f515d6b09622615ee932f37e82f93551656046fa1071a02bd04f6
MD5 46912c724bb46c6a1f627cca7d265f50
BLAKE2b-256 b5f46cd16a7f543438c5910cec68bd5d49d231152753f3f53f4dda1322305522

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a64c4c90503ee5cdd9ca418e41e16b955222d4b7767221279424cfacd65e67f1
MD5 dd1d21f7799447f9a151562b8181a72d
BLAKE2b-256 b6d76cf098fd410209d749e41610daeb12b440ea603a45f787a49474461c6043

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2fdc3e323aef279a905e575ab29c067716e29a4f72b81d36a8379ee6e6c7eef1
MD5 cd491f278aad825f50d51603dfa45d40
BLAKE2b-256 5bbaba9401daf559588f84aa8ff82b55ce1aac6339a69028a3b14748af74539f

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02cb4daca876fc4a1cf8fffa3a965f157748f77331815fa685107054b6772ead
MD5 a462b9aef062f33541de3e55305632fe
BLAKE2b-256 b7a8832b27db6e563e46c40e59714a0adf09959d67d964feb5ef84b51f89a0b9

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e01abc0c71830208d1bb837d8d11a094a8f53b9dde74fa9048847c0f5d186c6
MD5 2fd789ca7eabddcc8c40155a123e0531
BLAKE2b-256 3b2229e510423558b22e98374496ef7c8b178c5f4d47f6e9c1fe4999c6ee8761

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 450211a441032b248e69b08f071134da48a80e48a51a802677d69e2e477b6841
MD5 25c612909df3cf36a4105134e1385dae
BLAKE2b-256 5473924728769d9bd1e738190588c1ac1c2fc53d65641565c013ac1d79fe8403

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 bd600b812eb79d43fb1afee3509e0e67f05fe23f351e8269dc1427b7c33ad934
MD5 cf461394a28b971daa6c6b5705273d8a
BLAKE2b-256 950a86ce9fc2291a83b63817ac43b8f2924af9c02746b4f20c44142ce9f8a4ce

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66c25887138edc0edc7df63da4e5db193ff23cb67035594d45677a72eb0a8cf2
MD5 e5f193fe1e87ca58bca90bd36727508f
BLAKE2b-256 c11400aaf84a05ae9b25f51af36f285614e42c557860051fe16ef0860b03b3c6

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 050a88e54db20fadaee340c83fc65d291aa36a0e1bb14e7b3a95267ec2b4fe40
MD5 6e85010dd3868f5974581de6a1019cd0
BLAKE2b-256 024edf2808d3f87f77419e0abb68544f0f220c261a7eed6433c7150eff1fec49

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fb73ee7ff99110c29e598e1f11d272774ba9d141f097c441e3418ae1c10ed46a
MD5 9d3df45626c36c68e3fe7dcbb2a36e3b
BLAKE2b-256 88642df132fbea4b3aad80aab161c90e9f24e5d494917605b1f01f522950d07e

See more details on using hashes here.

File details

Details for the file Pgenlib-0.83.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.83.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3142f1e79a6b86e4f357d0cc5141b2efc7e9285fc539eb8d9672251c57036601
MD5 4533d3beb4eda9bab0cd115eb2e1cbaf
BLAKE2b-256 7ca95987776baf730f0f8e8b44b7c358f8b2b44cb24f9fa938b9f6dcb8724f69

See more details on using hashes here.

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