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.
Metadata
Release files for pgenlib 0.83.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.83.0.tar.gz | 522.2 kB | Details |
Built distributions (wheels)
Total release size: 11.0 MB
Release files / Pgenlib-0.83.0.tar.gz
| Download URL | Pgenlib-0.83.0.tar.gz |
|---|---|
| Size | 522.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5acf7d90680f515d6b09622615ee932f37e82f93551656046fa1071a02bd04f6
|
|
BLAKE2b-256 checksum How to use checksums |
b5f46cd16a7f543438c5910cec68bd5d49d231152753f3f53f4dda1322305522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / Pgenlib-0.83.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 254.7 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
a64c4c90503ee5cdd9ca418e41e16b955222d4b7767221279424cfacd65e67f1
|
|
BLAKE2b-256 checksum How to use checksums |
b6d76cf098fd410209d749e41610daeb12b440ea603a45f787a49474461c6043
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 255.5 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
2fdc3e323aef279a905e575ab29c067716e29a4f72b81d36a8379ee6e6c7eef1
|
|
BLAKE2b-256 checksum How to use checksums |
5bbaba9401daf559588f84aa8ff82b55ce1aac6339a69028a3b14748af74539f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 258.5 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
02cb4daca876fc4a1cf8fffa3a965f157748f77331815fa685107054b6772ead
|
|
BLAKE2b-256 checksum How to use checksums |
b7a8832b27db6e563e46c40e59714a0adf09959d67d964feb5ef84b51f89a0b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3e01abc0c71830208d1bb837d8d11a094a8f53b9dde74fa9048847c0f5d186c6
|
|
BLAKE2b-256 checksum How to use checksums |
3b2229e510423558b22e98374496ef7c8b178c5f4d47f6e9c1fe4999c6ee8761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
450211a441032b248e69b08f071134da48a80e48a51a802677d69e2e477b6841
|
|
BLAKE2b-256 checksum How to use checksums |
5473924728769d9bd1e738190588c1ac1c2fc53d65641565c013ac1d79fe8403
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp310-cp310-macosx_13_0_arm64.whl
| Download URL | Pgenlib-0.83.0-cp310-cp310-macosx_13_0_arm64.whl |
|---|---|
| Size | 239.0 kB |
| Tags | CPython 3.10 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bd600b812eb79d43fb1afee3509e0e67f05fe23f351e8269dc1427b7c33ad934
|
|
BLAKE2b-256 checksum How to use checksums |
950a86ce9fc2291a83b63817ac43b8f2924af9c02746b4f20c44142ce9f8a4ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / Pgenlib-0.83.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
66c25887138edc0edc7df63da4e5db193ff23cb67035594d45677a72eb0a8cf2
|
|
BLAKE2b-256 checksum How to use checksums |
c11400aaf84a05ae9b25f51af36f285614e42c557860051fe16ef0860b03b3c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
050a88e54db20fadaee340c83fc65d291aa36a0e1bb14e7b3a95267ec2b4fe40
|
|
BLAKE2b-256 checksum How to use checksums |
024edf2808d3f87f77419e0abb68544f0f220c261a7eed6433c7150eff1fec49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fb73ee7ff99110c29e598e1f11d272774ba9d141f097c441e3418ae1c10ed46a
|
|
BLAKE2b-256 checksum How to use checksums |
88642df132fbea4b3aad80aab161c90e9f24e5d494917605b1f01f522950d07e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Pgenlib-0.83.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.83.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3142f1e79a6b86e4f357d0cc5141b2efc7e9285fc539eb8d9672251c57036601
|
|
BLAKE2b-256 checksum How to use checksums |
7ca95987776baf730f0f8e8b44b7c358f8b2b44cb24f9fa938b9f6dcb8724f69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|