Fork of pandas-plink with NumPy >=2.0 support and modern Python/GPU-stack compatibility
Project description
pandas-plink-ng
[!IMPORTANT] This repository is a maintained fork of pandas-plink by Danilo Horta and contributors.
All credit for the original implementation belongs to the upstream authors.
This fork is maintained by Kynon J M Benjamin for compatibility with modern Python and GPU-based genomics workflows.
Upstream project: https://github.com/limix/pandas-plink
Current fork: https://github.com/KrotosBenjamin/pandas-plink-ng
What’s different?
- Relaxed NumPy dependency → now supports NumPy ≥ 2.0.
- No other functional changes to core code or API behavior.
Overview
pandas-plink-ng provides Pythonic access to PLINK binary genotype files (.bed/.bim/.fam)
and related matrices (e.g., GCTA .rel files).
It uses lazy loading to minimize memory usage, reading genotypes only when accessed.
Notable historical changes prior to this fork are tracked in the
upstream CHANGELOG.
Installation
Install from PyPI:
pip install pandas-plink-ng
This fork ensures compatibility with the latest RAPIDS, CuPy, and localQTL GPU environments using NumPy 2.x.
If you prefer the original, CPU-focused package:
pip install pandas-plink
Usage
Usage remains identical to the upstream API:
from pandas_plink import read_plink1_bin
G = read_plink1_bin("chr11.bed", "chr11.bim", "chr11.fam", verbose=False)
print(G)
Output (example):
<xarray.DataArray 'genotype' (sample: 14, variant: 779)>
dask.array<shape=(14, 779), dtype=float64, chunksize=(14, 779)>
Coordinates:
* sample (sample) object 'B001' 'B002' ... 'B014'
* variant (variant) object '11_316849996' ... '11_345698259'
a0 (variant) <U1 ...
a1 (variant) <U1 ...
You can also read realized relationship matrices:
from pandas_plink import read_rel
K = read_rel("plink2.rel.bin")
print(K)
For full API details, refer to the original pandas-plink documentation.
Attribution
Original Author: Danilo Horta Upstream License: MIT Maintainer of this fork: Kynon J M Benjamin
License
This project remains under the MIT License. All original copyright notices are retained.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandas_plink_ng-2.3.2.post1.tar.gz.
File metadata
- Download URL: pandas_plink_ng-2.3.2.post1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.10.9 Linux/4.18.0-553.22.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a87333dfd58563d923435bbc0fbfe832409f3a70d24328887b51d7c24b10cb22
|
|
| MD5 |
f8766660d2549d81a4b91aa6bd9ebb61
|
|
| BLAKE2b-256 |
49d571a93d9b6c091535905a6ad60a4728039df89658089e671a0e6cb615618b
|
File details
Details for the file pandas_plink_ng-2.3.2.post1-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pandas_plink_ng-2.3.2.post1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 29.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.10.9 Linux/4.18.0-553.22.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0a06157779cc8b25a709f20803897dec583b3c5228ed3e500397b3396a78bc3
|
|
| MD5 |
d7331154c97973ea5c68269994045793
|
|
| BLAKE2b-256 |
8b99a0ea881a2adf4b50b42bdf074938e04c3265e66ee972354993fb96e6fb83
|