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
To build this library you will first need to 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, 3, 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))
Project details
Release history Release notifications | RSS feed
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.82.1.tar.gz
(489.1 kB
view hashes)
Built Distributions
Close
Hashes for Pgenlib-0.82.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5918b0e7875c427c703a909d24de5c4ed6a58b5800329baeb97e13f528af2a85 |
|
MD5 | b11a6e7de9f4f7223f4f0a752216d692 |
|
BLAKE2b-256 | 548e3a2eef4571d6d2c8604a3810c3e092c9e145839934dde6c91ecf4be63be8 |
Close
Hashes for Pgenlib-0.82.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8121a202e083fc8e25c30e6a562ea73b7223cb5097b96fd5f616cc15562b251c |
|
MD5 | c04c464d0c70b2f610e428f3db9f24e3 |
|
BLAKE2b-256 | fc242e6994141f63fd6c129b0bd0bbc9ef8df91e98b171a5ae0a5aeb7a01532c |
Close
Hashes for Pgenlib-0.82.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56a2fa603283af1dff63fb9c0f0a84dadd8effe6542554c0b834c8510f0cfcdb |
|
MD5 | 1d5b7454fd27e5f01b69c71079f3eed3 |
|
BLAKE2b-256 | b5328dbf9cb1a3a3a6950deab99e0515a753273396ef1770b5d2491e1f8eaba9 |
Close
Hashes for Pgenlib-0.82.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce74e1c3bac60edd1ea69fcb850b02ef0329705b06bed4dd063a036047c693f |
|
MD5 | d34297fbedbf0de77103504f9b8c4549 |
|
BLAKE2b-256 | 30d1166d130225f03033df8ca688ef54dca200fb3de3419f0edc914afd21a3a7 |
Close
Hashes for Pgenlib-0.82.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33c34e438d4084ce11ec58fbd206b1a0d84100006cb7eefa79cffb5d7a545a0b |
|
MD5 | 51765080ca370792cd7b9f10742c36c7 |
|
BLAKE2b-256 | 2b911d7b72b61c624763fc29c3e54df394bc611080a3dc2176af2332257e8fac |
Close
Hashes for Pgenlib-0.82.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5a61fdc5254ca042c5fdc56d7262e125b8e440966aebc0ebd9d2d35f01204f1 |
|
MD5 | fcaa91785fa9af1db75c4e3b9d492168 |
|
BLAKE2b-256 | 2920876e704d95b3ca26e7a554532385d52f2133cd99d2f132a29fb16062cb4d |
Close
Hashes for Pgenlib-0.82.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa3af36cd957c2f5c03b8b79b47897f81be1df9e713358e0b686253b1dd7e623 |
|
MD5 | 511a1ec8da0fbec0d880800c46670abd |
|
BLAKE2b-256 | 9a6579600073fc41faaa2b008b1bedf9233125aeaad404a973e563810268a626 |
Close
Hashes for Pgenlib-0.82.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e3521ff401c0c9c2fe022ca38f81ac7d4f1e0fe7f9b5a8fa0e65be46048eb3d |
|
MD5 | 34e55e8440a37cb6c94ed3cce8623caf |
|
BLAKE2b-256 | a174ade2137ac2eee449bfa959f5808cc6d1bdc6cec4cd9b4fabcd416246a889 |
Close
Hashes for Pgenlib-0.82.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94349d4f446148378e76f1d50a939ec6f84bfde9a722c394ddbb84b1b5adab94 |
|
MD5 | b0d72a66e5bb5b0e11bb8cb2d08fb306 |
|
BLAKE2b-256 | bed585dc2412def8644cccfafe6722e7d1c5411c9725366156eef4aec843ba95 |