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 Pgenlib

To build from GitHub instead, 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_clib build_ext -i
python3 setup.py install

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.90.1.tar.gz (1.0 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.90.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (416.2 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (416.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (421.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

Pgenlib-0.90.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: Pgenlib-0.90.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for Pgenlib-0.90.1.tar.gz
Algorithm Hash digest
SHA256 069db673c1cc5baffcb9b20c2e6e26cc9fdaadd0095f55a188b41502d0511cb9
MD5 1a5dbf1fe4bdf44f04bfbce743ae5b85
BLAKE2b-256 7502d5151e065fd355fc365adf472017db0f25f199f5a550df1d4bb9808ba67d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72072417b51b9dc0189594c0b705968898b22e43f8a81e9e2a2e4ad19df9ba50
MD5 63ba4c8199bb4cffa47fbc098ce26120
BLAKE2b-256 c3c330647c9cbafe729c786891bb3c873535bf8d667fb6b218642ada95738517

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af42bb7fc0812a562e3c17218019650174d4bd3598f0a031b2604ea534c2e361
MD5 bfb2c5f6aff60fd100ec7bde322e0d8f
BLAKE2b-256 8244df286e42696ea0bf1f817e5a7a924f268ee25d4644c654f4b89f14375705

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f06160710bfbf69655bb30ba8231e1329d4903f0a71f5dcb52df9d04c2f94282
MD5 8af1e668e6fcd0cd736f490f51e5e5a4
BLAKE2b-256 e384c69234c8f522d7d67459ad1288fb516a39f588dcab297b29a619ee3f340b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 758b3927228029bb10758a28a8ded86a71844da973d6196b44913c4765cdf23d
MD5 17d2ec5bc6d71e6886904dc40f66380e
BLAKE2b-256 47c5b8acab2c2db8acbf153d4e1284236838d31c0f17df797f04f15686e5f15d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c5823a8f3bb558c2d60243eb19ca6220cc2d5c759fc50139e5c09b179353b68
MD5 c2379294e03d2af8531f32c415bc5726
BLAKE2b-256 0a24eb4944605bf1ad5142466d268aac02ca2c1e57242511578ae521c3427e77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 89d5baf59cb19f1f53ae1ec48fb33775e3bd84c0c4ed3d8582a6b45051f26e1a
MD5 48581536c348bec9ab5e933df515499a
BLAKE2b-256 b76ddb7f7f9acb0dd3c0a39055738727a047371595a3c79f13c29e77b633eb72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8283d5b6cb1196dc859f7c489b36d3cd2673174a19e507fa52a869ef25333127
MD5 876e4d94dff1258445146e5504e08b82
BLAKE2b-256 67f3b823df42f317a6bc4212095457d451a03c7dba99b55440d3ffeaf3ca4626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85fb2bd56d12a338ec3605149c3f0782b04c861588ad7e4afb41f3ff13f90c00
MD5 feed338c14bb8e8a56ffdc6723604ae5
BLAKE2b-256 f5163f9fce33a062ed8b6b35aa85517fd291e43636172d1e4a72dacb8538799e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.90.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72427c7e92993859be40e7ad326a5d86025d2218c0109ac3b3fa1620fd37bec2
MD5 ffe00e93b529815c21d604cdf97c6e52
BLAKE2b-256 00664764ab01efa2952b57457324007f5f821ac124a234bb1bd24ff0e6e80df6

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