Skip to main content

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 this with this.

Cython and NumPy must be installed.

python3 setup.py build_ext
[sudo] 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


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.81.2.tar.gz (385.2 kB view hashes)

Uploaded Source

Built Distribution

Pgenlib-0.81.2-cp37-cp37m-macosx_10_13_x86_64.whl (266.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.13+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page