ππΌββοΈ Quick start
polars-bio is available on PyPI and can be installed with pip:
There are binary versions for Linux (x86_64), MacOS (x86_64 and arm64) and Windows (x86_64). In case of other platforms (or errors indicating incompatibilites between Python's ABI), it is fairly easy to build polars-bio from source with poetry and maturin:git clone https://github.com/biodatageeks/polars-bio.git
cd polars-bio
poetry env use 3.12
poetry update
RUSTFLAGS="-Ctarget-cpu=native" maturin build --release -m Cargo.toml
Compiling polars_bio v0.10.3 (/Users/mwiewior/research/git/polars-bio)
Finished `release` profile [optimized] target(s) in 1m 25s
π¦ Built wheel for abi3 Python β₯ 3.8 to /Users/mwiewior/research/git/polars-bio/target/wheels/polars_bio-0.10.3-cp38-abi3-macosx_11_0_arm64.whl
pip install /Users/mwiewior/research/git/polars-bio/target/wheels/polars_bio-0.10.3-cp38-abi3-macosx_11_0_arm64.whl
Tip
Required dependencies:
import polars_bio as pb
pb.read_vcf("gs://gcp-public-data--gnomad/release/4.1/genome_sv/gnomad.v4.1.sv.sites.vcf.gz", compression_type="bgz").limit(3).collect()
shape: (3, 8)
βββββββββ¬ββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββ¬ββββββ¬ββββββββ¬ββββββββ¬ββββββββββββββββββββββ
β chrom β start β end β id β ref β alt β qual β filter β
β --- β --- β --- β --- β --- β --- β --- β --- β
β str β u32 β u32 β str β str β str β f64 β str β
βββββββββͺββββββββͺβββββββββͺβββββββββββββββββββββββββββββββββͺββββββͺββββββββͺββββββββͺββββββββββββββββββββββ‘
β chr1 β 10000 β 295666 β gnomAD-SV_v3_DUP_chr1_01c2781c β N β <DUP> β 134.0 β HIGH_NCR β
β chr1 β 10434 β 10434 β gnomAD-SV_v3_BND_chr1_1a45f73a β N β <BND> β 260.0 β HIGH_NCR;UNRESOLVED β
β chr1 β 10440 β 10440 β gnomAD-SV_v3_BND_chr1_3fa36917 β N β <BND> β 198.0 β HIGH_NCR;UNRESOLVED β
βββββββββ΄ββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββ΄ββββββ΄ββββββββ΄ββββββββ΄ββββββββββββββββββββββ
If you see the above output, you have successfully installed polars-bio and can start using it. Please refer to the Tutorial and API documentation for more details on how to use the library.