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

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.91.0.tar.gz (1.3 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.91.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (436.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (437.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (444.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (450.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

Pgenlib-0.91.0-cp312-cp312-macosx_10_9_universal2.whl (874.1 kB view details)

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

Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

Pgenlib-0.91.0-cp311-cp311-macosx_10_9_universal2.whl (877.1 kB view details)

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

Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

Pgenlib-0.91.0-cp310-cp310-macosx_10_9_universal2.whl (875.6 kB view details)

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

Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

Pgenlib-0.91.0-cp39-cp39-macosx_10_9_universal2.whl (876.7 kB view details)

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

Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

Pgenlib-0.91.0-cp38-cp38-macosx_10_9_universal2.whl (879.2 kB view details)

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

Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: pgenlib-0.91.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pgenlib-0.91.0.tar.gz
Algorithm Hash digest
SHA256 32992274214d2e6735b721544abfd0ae0c76906c4193120f7091065b88f68dfa
MD5 1420cd3a9dc0d20f9ac29d1cfaa86707
BLAKE2b-256 6963b12198e1394dfd4c8e0c79c9500d146aa716f10677a02ff97c0ec38a3d4c

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c71b2e4cc90973975627ade60a2d57385341840471e708e0f3ec69b8b92c635
MD5 4639768a12cbece9bf32f331e29a148a
BLAKE2b-256 d5e407bc932deeb601238a5e9d22ac9e47bfabcc18c31c1cc2209499ba4c02f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa6febf7420b8d36560cfcd52bc2b128a62ad97d4ac428df050b11fe7cb35a09
MD5 27d6998e6be922e3211794f08ce89dd5
BLAKE2b-256 073f1b12de81800fc4519deb2b674d88437bcf771d834bc46b46484f20da75f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3245f4bceb8d7d0a26729091fa1cbc28e343d71224c1ad45ba5d1e2b37c45ea8
MD5 549fd158214c22e2798671b0fe866878
BLAKE2b-256 91a194436e193733c5e454aa287ce0eec1796f8aeea2816514c33d8ee255cc87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 53a02ede11262058055b3736c25352c94a1f107b64b21f40f47c30975638af38
MD5 33f7d7170326e935bcb5352d2496f432
BLAKE2b-256 75f41a791fdbfeeb8fe0563b44255ab9a644e087aac2aa581d2d04604f21cfdb

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a16650b5043ae37757b1b31bd9cd09a6e819e6b2cd9b89bd770ac39d6e6ecf9
MD5 ee22662c0209457ad6472955eb80000e
BLAKE2b-256 a7800692a986b987dfe0a95cce981bb6e0081d1da06f8982de24488d095d9559

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dd5649bc69726681c0fd2989a9594832b3684bf33e8df5ec0b61f6d6040209dd
MD5 74a9dd447a4acb1d50cadad20334afad
BLAKE2b-256 1be91b5181eb0235ca1df1dcf845db46e66054e92878b460551888dca56f8de0

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 287dd919bf7a1c3cdc934767b274b2fbeb8b01e6edf56f563b648e072d6107fc
MD5 b89adb1f2727a7a62e0f4f3af53c862b
BLAKE2b-256 66d7cfdc907bb91fb8c48ef8869552d0388e76bb76d0e57369a16fcfc45dba78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 adec110c8326cabfe6dce10cee1d13a8ac20790680ef14a037b3ee49065d81f8
MD5 ba1a21b26b59ad74225965d4b8abbfd3
BLAKE2b-256 e437f8b42c3ee944bca971bc86225a2a4ddfde1f3b869fcbf07903b659d3a758

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5fa6cd143745d252f13c078595d7f00efc1ce35d5bf37f0be52593438b98abb3
MD5 1650e285446c30a05ffd1d32394bb938
BLAKE2b-256 4f0286e8ecd717ceeda2d0e2a0d94a8fac2ab23ffcbd83c9bb92e822b9f2e8a9

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 21199ebfb0901ae0addf4f067c60f3c961ca24b3442f26c9ed112e7b18d1c79a
MD5 3c40d4f77cb3f85bf9b6d7fe51bf16ec
BLAKE2b-256 84b80396f4be53140ebeee7df1dfd5967877e17f8c3fdb3cb221908c0c124dc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f37461bd647635dad78b79ff0c5407e5b226fbbd7461f5014e990f7bc8fd2c3
MD5 d55dee05e2dd719c835ddd49cac1b7b9
BLAKE2b-256 607bb272afe0d5aeed4c8138c2a3a92b60fe91fb2975576b468fcd317d973fce

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2f4c821468d94c09c3cb5980b47e557fa206a90117291ca22dcb5013ffbc3651
MD5 f2b1cb77467ec4c4dd2ea0f959a28d1c
BLAKE2b-256 13e7934486717ff8d7577a597d5b3dbb4a67eecd06317554e66daac5214086be

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 61c7004e75731e27a7666952a323f8b811ee836b44ac4647320ec013b6e277bb
MD5 841703296f739aafea6a1f51916fad0a
BLAKE2b-256 1762e05fb92938a87c42fb766b02975f2ea940346cd6f8b83e20e6b263832904

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a31c04775da32a25550f5cb034134a8fe34124d80a0d0a5a8e58625d4d6fad9a
MD5 9f47a9802939ea75804abb9c92b0b910
BLAKE2b-256 46029adc7272a6550c7bcff24bac5bd2a8f38889ba79567c7f82ac191535b912

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8e593e986ab77e6ad52b4a19fb9f96b9639ccf569cb5ae57685716e37c3d3f21
MD5 c817837e2c0202bf75266766b4f04460
BLAKE2b-256 9b164c75c8fe1b154d4b56b890e7298753f76105cfd65e1efcd0e6f0a1679906

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1f6f913ba2eb0c029704723da00045fe9e22f3ce5f0acc8ff038938a5f88aba6
MD5 32eb776ae79959fa36b230f63bb5bb3e
BLAKE2b-256 195e75397e1e9c8343934b45ee65f1817b4eb89fb88d81c1609956a9253d9204

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbdd6a569dd735d79556dbbdf10fce4b5632bf931613b72857a1a02824769594
MD5 0a16bf0e64050129ad91028303ccc827
BLAKE2b-256 6b2fb8b7b77e3e94c781b3348f065f9670978ae986836980d5babe87becc1113

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ba95923f0f24a877dff892bd085046ab7efdda5dd74c704176f8ec7e4952bc2
MD5 e4d29ed34e8b81b458afba69f9848f3b
BLAKE2b-256 ba895c61813a24b3d9908fa7871d129e5ed1d2ffd211fa0483f144908c15e2bc

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d42c7298fe6c3556b21e17d6f4d5f21fa2a0002cc640e526961c9fb63dd703fd
MD5 358624ce36bb4c9dd9669734090fb464
BLAKE2b-256 83295220058e325a7a6d2c2e8683f12f4e11116bf7b812c5a45859694e61b533

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94809c6f379ce95139c74919a4984d131f17dd27ff1e908272694272fded1a11
MD5 b529981d2d6158a6e7654261d59ea05e
BLAKE2b-256 9d212b7b3a6c80df6e26bfff57819b76c8c815ca80a23b804bf11c215f398a67

See more details on using hashes here.

File details

Details for the file Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 eba44c04edabb63080b98309e3f25fe3eb7e699e62836a9c086e37f9486d691f
MD5 7406feed7293bdfab2e7f1778b910caf
BLAKE2b-256 eda7cab4239dacb05c4284d93b82ec4da5a6e3e5367fc13be30320254c1035dd

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