Skip to main content

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)

Source distribution for plink-bed-reader 1.0.2
File Size Uploaded Provenance Actions
plink_bed_reader-1.0.2.tar.gz 5.7 kB With provenance Details for plink_bed_reader-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plink-bed-reader 1.0.2
File Interpreter ABI Platform Actions
plink_bed_reader-1.0.2-py3-none-any.whl Python 3 none any Details for plink_bed_reader-1.0.2-py3-none-any.whl

Total release size: 11.4 kB

Security for plink-bed-reader 1.0.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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