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.
Metadata
Release files for pgenlib 0.90.2
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.90.2.tar.gz | 1.4 MB | Details |
Built distributions (wheels)
Total release size: 19.3 MB
Release files / Pgenlib-0.90.2.tar.gz
| Download URL | Pgenlib-0.90.2.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09825be43ffb25bc68b6e243b98989a5bc35a8aa22cd749fd9f602d778dd6bd0
|
|
BLAKE2b-256 checksum How to use checksums |
734b9ac483cc61a7915bf2337431881019345e61ad25a93c9d3e299dd819ece7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / Pgenlib-0.90.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 435.8 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
e9a37c7a424f3157de7f45578f3cdf374a5a140e9afb6c7d233d1dfcdcecbfed
|
|
BLAKE2b-256 checksum How to use checksums |
8dfb778474f5bf817493b7045c6b1683f35e93a86920c7c6f3f33465f09a874e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 440.7 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
dd597f6b636475e9e8c43fda45b5e7b623e76eebf8ac7fa85e2d037f5aed43fe
|
|
BLAKE2b-256 checksum How to use checksums |
87bd4fa502ecdd6b567344b45d95a23646200aa29f37aca0aa1ec1964d63c266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 445.6 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
81651d8e1e64c2169e560f7cb6409161cf4c31d24a0c3fd3f49cb7dae51ccc67
|
|
BLAKE2b-256 checksum How to use checksums |
898a0923185576ae4c3e2fd78f3f409f0ad88c64386f0d5805343d56dc9915a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-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 |
683b879ab760fc07a5772519b97c8135fc8929fd609803727220051784159243
|
|
BLAKE2b-256 checksum How to use checksums |
146969b3665864ef6393949d8cdf702e4d8404ae316c6d549f73eb83e6e7577b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-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 |
96c3597570d72b1cab1d6114cb4e68b979dc09cf43e66164b89e68ff56dc09c2
|
|
BLAKE2b-256 checksum How to use checksums |
0c80d561e55243fd241b2a62e6a53c4ce417fbd45262eb88deddd4ca0919d59b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-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 |
33acb019041131df384f5a2e4748e206ba6dc0419d2b487252183b1576ff8ad3
|
|
BLAKE2b-256 checksum How to use checksums |
dd434ba76d0de21abf47f3f01ddd48d0c75fb69b7c341af63ce0501c81eeee11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-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 |
7b4b694ad89b64ce8d85f615d9a88f9b6f08086a44badf41fabf0799ea43d07a
|
|
BLAKE2b-256 checksum How to use checksums |
a833d2a53933f482f12f67c6b0b3a4cc23db48452c10ed66f5508c69a4ea256f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-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 |
c0ce76e36c39f1290ff128c6737633187369f62e50b4b778b25b2c3795c10638
|
|
BLAKE2b-256 checksum How to use checksums |
e7ed79bb17524d472dc9538acca2c02c7048a74134606b22b35b22274b572acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|
Release files / Pgenlib-0.90.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
16208477f273f1184dee217bd24c25c83d44946b4485148f0d7bf71ad2ed83a9
|
|
BLAKE2b-256 checksum How to use checksums |
20847a2c2509d2f998d92884c4dd68b2003eafe11cafa45728cdbbb2c19ef89e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.2
|