Lightweight and memory efficient reader for PLINK BED files. It supports both SNP-major and individual-major formats. Written in pure Python.
Project description
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:
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 plink_bed_reader-1.0.2.tar.gz.
File metadata
- Download URL: plink_bed_reader-1.0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae9bf999d4467129570d2821bd135aaa13c2424ec567f935736314cb2b3b392
|
|
| MD5 |
8143f04f9ee260493718cf024f2667a4
|
|
| BLAKE2b-256 |
a27a02c3672dc4d315823427ee24eb3424bc6d3f6e73ca301b0e581370ab1267
|
Provenance
The following attestation bundles were made for plink_bed_reader-1.0.2.tar.gz:
Publisher:
main.yml on Computational-Genomics-BSC/plink-bed-reader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plink_bed_reader-1.0.2.tar.gz -
Subject digest:
bae9bf999d4467129570d2821bd135aaa13c2424ec567f935736314cb2b3b392 - Sigstore transparency entry: 173282996
- Sigstore integration time:
-
Permalink:
Computational-Genomics-BSC/plink-bed-reader@4f45444d87979bb6b4e87f8a9c25fcf933b74c58 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Computational-Genomics-BSC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@4f45444d87979bb6b4e87f8a9c25fcf933b74c58 -
Trigger Event:
push
-
Statement type:
File details
Details for the file plink_bed_reader-1.0.2-py3-none-any.whl.
File metadata
- Download URL: plink_bed_reader-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0661b7d6b232d129eaa61bd58ea4316b6dae22bd9c5fd88fde5af5f93e381b7
|
|
| MD5 |
d88478d7a0df6eb729e1e63162d24834
|
|
| BLAKE2b-256 |
0fcd3aaf3ddede9cd03d76d189f3cce9563e8c15212a376a98f97e50a359e7bf
|
Provenance
The following attestation bundles were made for plink_bed_reader-1.0.2-py3-none-any.whl:
Publisher:
main.yml on Computational-Genomics-BSC/plink-bed-reader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plink_bed_reader-1.0.2-py3-none-any.whl -
Subject digest:
c0661b7d6b232d129eaa61bd58ea4316b6dae22bd9c5fd88fde5af5f93e381b7 - Sigstore transparency entry: 173282997
- Sigstore integration time:
-
Permalink:
Computational-Genomics-BSC/plink-bed-reader@4f45444d87979bb6b4e87f8a9c25fcf933b74c58 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Computational-Genomics-BSC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@4f45444d87979bb6b4e87f8a9c25fcf933b74c58 -
Trigger Event:
push
-
Statement type: