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_clib build_ext -i
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.90.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.90.0.tar.gz | 1.1 MB | Details |
Built distributions (wheels)
Total release size: 18.1 MB
Release files / Pgenlib-0.90.0.tar.gz
| Download URL | Pgenlib-0.90.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c39dcd824e6cb5445915b64345b63aafe69b4a01ae39118799e8c4182481031d
|
|
BLAKE2b-256 checksum How to use checksums |
dc263150424408411a6f326db5b2f61a5accf900dfe3d287f4452e73d62b0b01
|
| 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.90.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 414.9 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
adc48ab98cb70e9c303cb7764d0cc7d416acac9de0d164b756514797ad64a2e6
|
|
BLAKE2b-256 checksum How to use checksums |
4560dd584321eedc419f7b1aee92fc15110070714ca949ee012bf5dddffec6cf
|
| 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.90.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 415.9 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
2f279914c09a7721479efc775313af204490016266f2b25fff5d09e6c5900b4f
|
|
BLAKE2b-256 checksum How to use checksums |
05cc185166c604f18f1d60291fd0d407d6c02b26e712af8e39bfaabfe9be57ce
|
| 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.90.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 421.0 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
1e63d5f3b7fc91cbf3f9f70afc866525e040e253144990d1411323c11a903b19
|
|
BLAKE2b-256 checksum How to use checksums |
f3b001e1c04e3fe156252d1ebb82f362da5642a128d72c5a67c481b26986d450
|
| 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.90.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bb2c64c50511141161674d5b568e054f0e012b3bd2d8f21c829aa3f34f11c6c0
|
|
BLAKE2b-256 checksum How to use checksums |
95af14f03aa5e6568810347aef280eb57b82a5a45e03f33c9653d56685a5157c
|
| 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.90.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d124da3e8ab9ad66a0248e664502fb110c87acece1ea5826844da8361415c6ac
|
|
BLAKE2b-256 checksum How to use checksums |
4345b23b200529cc05e27de60c6623e3c272f3babacd46ba7ca04f8ba8cee212
|
| 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.90.0-cp310-cp310-macosx_13_0_arm64.whl
| Download URL | Pgenlib-0.90.0-cp310-cp310-macosx_13_0_arm64.whl |
|---|---|
| Size | 383.0 kB |
| Tags | CPython 3.10 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
de846a2c389cadb6c098603f736c44f8f6d7c6356a54bd4855004c7a8ed7a288
|
|
BLAKE2b-256 checksum How to use checksums |
16245e5f3f751fc014e67c567073089e5ff22887c890ddcb33b2eee234b2ff66
|
| 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.90.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
89f22566a61bca2e12acab41a389ab353c4853fa55994704d81d112a1d4782da
|
|
BLAKE2b-256 checksum How to use checksums |
da25eef614e9ea13964aed3aa93211d44fc0a53591fe59901def7f0842c26259
|
| 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.90.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
165c46b7c3c6dea1533f80baac3354e38abe6c897d8a56c27ff34fb5a2866734
|
|
BLAKE2b-256 checksum How to use checksums |
7f7503cbd46f9f1cb21c22745c4548f85b5e548b1e5a5cbb4d69064f111c3f77
|
| 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.90.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1e3088375ca0fe3c1d87d0d1cb43a3a950c78a7ef5fc5ea4f6ae18ed32756fa3
|
|
BLAKE2b-256 checksum How to use checksums |
4b623d03109e3a79b4981cde01c00f7d63b2f850599d3b4c06125e0561b0dbd7
|
| 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.90.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | Pgenlib-0.90.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
53c638d30126b4cfddda0968b9734748c66fb1b33c615bec68ae97dd4c618548
|
|
BLAKE2b-256 checksum How to use checksums |
59d67157c61da0ebb0d2f05ba178ef1c57e567054192e47153ea29952de377c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|