PLINK BED reader
Lightweight and memory efficient reader for PLINK BED files. It supports both SNP-major and individual-major formats. Written in Python 3. Check the available documentation for more information.
Table of contents
Getting started
Installation
plink-bed-reader is available on PyPI and can be installed using pip:
pip install plink-bed-reader
Usage
# Import the package
from plink_bed_reader import PLINKBEDReader, BEDMode
# Load the PLINK BED file (we include the mode for sanity check, but it is optional)
bed = PLINKBEDReader('./input_test_data/test.bed', mode=BEDMode.SNP_MAJOR)
# Print the number of SNPs and samples
print('Number of SNPs:', bed.snp_count)
print('Number of samples:', bed.sample_count)
# Print the first SNP
first_snp = bed[0]
print('First SNP:', first_snp, first_snp.dtype)
# Print the first 3 SNPs
print('First 3 SNPs:', bed[:3])
Dependencies
The dependencies are covered by their own respective licenses as follows:
Metadata
Release files for plink-bed-reader 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plink_bed_reader-1.0.2.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plink_bed_reader-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / plink_bed_reader-1.0.2.tar.gz
| Download URL | plink_bed_reader-1.0.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bae9bf999d4467129570d2821bd135aaa13c2424ec567f935736314cb2b3b392
|
|
BLAKE2b-256 checksum How to use checksums |
a27a02c3672dc4d315823427ee24eb3424bc6d3f6e73ca301b0e581370ab1267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 21, 2025.
Transparency logRelease files / plink_bed_reader-1.0.2-py3-none-any.whl
| Download URL | plink_bed_reader-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0661b7d6b232d129eaa61bd58ea4316b6dae22bd9c5fd88fde5af5f93e381b7
|
|
BLAKE2b-256 checksum How to use checksums |
0fcd3aaf3ddede9cd03d76d189f3cce9563e8c15212a376a98f97e50a359e7bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 21, 2025.
Transparency log