Skip to main content

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))

Metadata

Release files for pgenlib 0.81.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pgenlib 0.81.3
File Size Uploaded
Pgenlib-0.81.3.tar.gz 386.4 kB Details

Release files / Pgenlib-0.81.3.tar.gz

Download URL Pgenlib-0.81.3.tar.gz
Size 386.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7ab19e6b5c8befdfdf417834986c625abe6fcb86eb6d88190706271b93c465f
BLAKE2b-256 checksum
How to use checksums
380974ec09b0c9ddde6a3562898507b99b47adde5350248f2899b59edcc082b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

0.92.0

8 release files

0.82.0

1 release file

This release

0.81.3 This release

1 release file

0.81.2

2 release files

0.81.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page