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.
Metadata
Release files for pgenlib 0.91.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgenlib-0.91.0.tar.gz | 1.3 MB | Details |
Built distributions (wheels)
Total release size: 40.2 MB
Release files / pgenlib-0.91.0.tar.gz
| Download URL | pgenlib-0.91.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32992274214d2e6735b721544abfd0ae0c76906c4193120f7091065b88f68dfa
|
|
BLAKE2b-256 checksum How to use checksums |
6963b12198e1394dfd4c8e0c79c9500d146aa716f10677a02ff97c0ec38a3d4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 436.7 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
1c71b2e4cc90973975627ade60a2d57385341840471e708e0f3ec69b8b92c635
|
|
BLAKE2b-256 checksum How to use checksums |
d5e407bc932deeb601238a5e9d22ac9e47bfabcc18c31c1cc2209499ba4c02f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 437.0 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
aa6febf7420b8d36560cfcd52bc2b128a62ad97d4ac428df050b11fe7cb35a09
|
|
BLAKE2b-256 checksum How to use checksums |
073f1b12de81800fc4519deb2b674d88437bcf771d834bc46b46484f20da75f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 444.7 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
3245f4bceb8d7d0a26729091fa1cbc28e343d71224c1ad45ba5d1e2b37c45ea8
|
|
BLAKE2b-256 checksum How to use checksums |
91a194436e193733c5e454aa287ce0eec1796f8aeea2816514c33d8ee255cc87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 450.0 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
53a02ede11262058055b3736c25352c94a1f107b64b21f40f47c30975638af38
|
|
BLAKE2b-256 checksum How to use checksums |
75f41a791fdbfeeb8fe0563b44255ab9a644e087aac2aa581d2d04604f21cfdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a16650b5043ae37757b1b31bd9cd09a6e819e6b2cd9b89bd770ac39d6e6ecf9
|
|
BLAKE2b-256 checksum How to use checksums |
a7800692a986b987dfe0a95cce981bb6e0081d1da06f8982de24488d095d9559
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
dd5649bc69726681c0fd2989a9594832b3684bf33e8df5ec0b61f6d6040209dd
|
|
BLAKE2b-256 checksum How to use checksums |
1be91b5181eb0235ca1df1dcf845db46e66054e92878b460551888dca56f8de0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp312-cp312-macosx_10_9_universal2.whl
| Download URL | Pgenlib-0.91.0-cp312-cp312-macosx_10_9_universal2.whl |
|---|---|
| Size | 874.1 kB |
| Tags | CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
287dd919bf7a1c3cdc934767b274b2fbeb8b01e6edf56f563b648e072d6107fc
|
|
BLAKE2b-256 checksum How to use checksums |
66d7cfdc907bb91fb8c48ef8869552d0388e76bb76d0e57369a16fcfc45dba78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
adec110c8326cabfe6dce10cee1d13a8ac20790680ef14a037b3ee49065d81f8
|
|
BLAKE2b-256 checksum How to use checksums |
e437f8b42c3ee944bca971bc86225a2a4ddfde1f3b869fcbf07903b659d3a758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
5fa6cd143745d252f13c078595d7f00efc1ce35d5bf37f0be52593438b98abb3
|
|
BLAKE2b-256 checksum How to use checksums |
4f0286e8ecd717ceeda2d0e2a0d94a8fac2ab23ffcbd83c9bb92e822b9f2e8a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | Pgenlib-0.91.0-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 877.1 kB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
21199ebfb0901ae0addf4f067c60f3c961ca24b3442f26c9ed112e7b18d1c79a
|
|
BLAKE2b-256 checksum How to use checksums |
84b80396f4be53140ebeee7df1dfd5967877e17f8c3fdb3cb221908c0c124dc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5f37461bd647635dad78b79ff0c5407e5b226fbbd7461f5014e990f7bc8fd2c3
|
|
BLAKE2b-256 checksum How to use checksums |
607bb272afe0d5aeed4c8138c2a3a92b60fe91fb2975576b468fcd317d973fce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f4c821468d94c09c3cb5980b47e557fa206a90117291ca22dcb5013ffbc3651
|
|
BLAKE2b-256 checksum How to use checksums |
13e7934486717ff8d7577a597d5b3dbb4a67eecd06317554e66daac5214086be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | Pgenlib-0.91.0-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 875.6 kB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
61c7004e75731e27a7666952a323f8b811ee836b44ac4647320ec013b6e277bb
|
|
BLAKE2b-256 checksum How to use checksums |
1762e05fb92938a87c42fb766b02975f2ea940346cd6f8b83e20e6b263832904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a31c04775da32a25550f5cb034134a8fe34124d80a0d0a5a8e58625d4d6fad9a
|
|
BLAKE2b-256 checksum How to use checksums |
46029adc7272a6550c7bcff24bac5bd2a8f38889ba79567c7f82ac191535b912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
8e593e986ab77e6ad52b4a19fb9f96b9639ccf569cb5ae57685716e37c3d3f21
|
|
BLAKE2b-256 checksum How to use checksums |
9b164c75c8fe1b154d4b56b890e7298753f76105cfd65e1efcd0e6f0a1679906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp39-cp39-macosx_10_9_universal2.whl
| Download URL | Pgenlib-0.91.0-cp39-cp39-macosx_10_9_universal2.whl |
|---|---|
| Size | 876.7 kB |
| Tags | CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
1f6f913ba2eb0c029704723da00045fe9e22f3ce5f0acc8ff038938a5f88aba6
|
|
BLAKE2b-256 checksum How to use checksums |
195e75397e1e9c8343934b45ee65f1817b4eb89fb88d81c1609956a9253d9204
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bbdd6a569dd735d79556dbbdf10fce4b5632bf931613b72857a1a02824769594
|
|
BLAKE2b-256 checksum How to use checksums |
6b2fb8b7b77e3e94c781b3348f065f9670978ae986836980d5babe87becc1113
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
7ba95923f0f24a877dff892bd085046ab7efdda5dd74c704176f8ec7e4952bc2
|
|
BLAKE2b-256 checksum How to use checksums |
ba895c61813a24b3d9908fa7871d129e5ed1d2ffd211fa0483f144908c15e2bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp38-cp38-macosx_10_9_universal2.whl
| Download URL | Pgenlib-0.91.0-cp38-cp38-macosx_10_9_universal2.whl |
|---|---|
| Size | 879.2 kB |
| Tags | CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
d42c7298fe6c3556b21e17d6f4d5f21fa2a0002cc640e526961c9fb63dd703fd
|
|
BLAKE2b-256 checksum How to use checksums |
83295220058e325a7a6d2c2e8683f12f4e11116bf7b812c5a45859694e61b533
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
94809c6f379ce95139c74919a4984d131f17dd27ff1e908272694272fded1a11
|
|
BLAKE2b-256 checksum How to use checksums |
9d212b7b3a6c80df6e26bfff57819b76c8c815ca80a23b804bf11c215f398a67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | Pgenlib-0.91.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
eba44c04edabb63080b98309e3f25fe3eb7e699e62836a9c086e37f9486d691f
|
|
BLAKE2b-256 checksum How to use checksums |
eda7cab4239dacb05c4284d93b82ec4da5a6e3e5367fc13be30320254c1035dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|