Read and write the PLINK BED format, simply and efficiently.
Features:
- Fast multi-threaded Rust engine.
- Supports all Python indexing methods. Slice data by individuals (samples) and/or SNPs (variants).
- Used by PySnpTools, FaST-LMM, and PyStatGen.
- Supports PLINK 1.9.
Install
pip install bed-reader
Usage
Read genomic data from a .bed file.
>>>
>>>
>>>
>>> =
>>> =
>>> =
>>>
>>> del
Read every second individual and SNPs (variants) from 20 to 30.
>>> =
>>> =
>>> =
>>>
>>> del
List the first 5 individual (sample) ids, the first 5 SNP (variant) ids, and every unique chromosome. Then, read every value in chromosome 5.
>>>
...
...
...
... =
...