Skip to main content

Blazing fast genomic operations on large Python dataframes

Project description

polars-bio - Next-gen Python DataFrame operations for genomics!

PyPI - Version GitHub License PyPI - Downloads GitHub commit activity

CI Docs

polars-bio logo

polars-bio is a Python library for genomics built on top of polars, Apache Arrow and Apache DataFusion. It provides a DataFrame API for genomics data and is designed to be blazing fast, memory efficient and easy to use.

🎉 Join us at ECCB 2026 in Geneva!

We'll be presenting polars-bio at ECCB 2026 — the 25th European Conference on Computational Biology, 31 August – 4 September 2026, Geneva, Switzerland. Come and say hi!

Join us at ECCB 2026 in Geneva

Key Features

Performance

polars-bio is optimized for both genomic interval operations and reading genomic file formats. See the full performance results.

Genomic interval operations — speedups vs. other Python libraries:

Benchmark summary

Genomic file format readers — single-threaded throughput vs. other Python readers (full benchmark):

FASTQ readers

BAM readers (with tags)

VCF readers (with INFO)

Multi-threaded scalability of file-format reading (wall time & peak memory):

File-format thread scaling

For developers: See benchmarks/README_BENCHMARKS.md for information about running performance benchmarks via GitHub Actions.

Citing

If you use polars-bio in your work, please cite:

@article{10.1093/bioinformatics/btaf640,
    author = {Wiewiórka, Marek and Khamutou, Pavel and Zbysiński, Marek and Gambin, Tomasz},
    title = {polars-bio—fast, scalable and out-of-core operations on large genomic interval datasets},
    journal = {Bioinformatics},
    pages = {btaf640},
    year = {2025},
    month = {12},
    abstract = {Genomic studies very often rely on computationally intensive analyses of relationships between features, which are typically represented as intervals along a one-dimensional coordinate system (such as positions on a chromosome). In this context, the Python programming language is extensively used for manipulating and analyzing data stored in a tabular form of rows and columns, called a DataFrame. Pandas is the most widely used Python DataFrame package and has been criticized for inefficiencies and scalability issues, which its modern alternative—Polars—aims to address with a native backend written in the Rust programming language.polars-bio is a Python library that enables fast, parallel and out-of-core operations on large genomic interval datasets. Its main components are implemented in Rust, using the Apache DataFusion query engine and Apache Arrow for efficient data representation. It is compatible with Polars and Pandas DataFrame formats. In a real-world comparison (107 vs. 1.2×106 intervals), our library runs overlap queries 6.5x, nearest queries 15.5x, count\_overlaps queries 38x, and coverage queries 15x faster than Bioframe. On equally-sized synthetic sets (107 vs. 107), the corresponding speedups are 1.6x, 5.5x, 6x, and 6x. In streaming mode, on real and synthetic interval pairs, our implementation uses 90x and 15x less memory for overlap, 4.5x and 6.5x less for nearest, 60x and 12x less for count\_overlaps, and 34x and 7x less for coverage than Bioframe. Multi-threaded benchmarks show good scalability characteristics. To the best of our knowledge, polars-bio is the most efficient single-node library for genomic interval DataFrames in Python.polars-bio is an open-source Python package distributed under the Apache License available for major platforms, including Linux, macOS, and Windows in the PyPI registry. The online documentation is https://biodatageeks.org/polars-bio/ and the source code is available on GitHub: https://github.com/biodatageeks/polars-bio and Zenodo: https://doi.org/10.5281/zenodo.16374290. Supplementary Materials are available at Bioinformatics online.},
    issn = {1367-4811},
    doi = {10.1093/bioinformatics/btaf640},
    url = {https://doi.org/10.1093/bioinformatics/btaf640},
    eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btaf640/65667510/btaf640.pdf},
}

Read the documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polars_bio-0.33.0.tar.gz (47.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

polars_bio-0.33.0-cp310-abi3-win_amd64.whl (76.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

polars_bio-0.33.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

polars_bio-0.33.0-cp310-abi3-macosx_11_0_arm64.whl (78.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

polars_bio-0.33.0-cp310-abi3-macosx_10_12_x86_64.whl (81.2 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file polars_bio-0.33.0.tar.gz.

File metadata

  • Download URL: polars_bio-0.33.0.tar.gz
  • Upload date:
  • Size: 47.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for polars_bio-0.33.0.tar.gz
Algorithm Hash digest
SHA256 39f0dcd55660d20f37c464ac889cf8977d0eea4b9b433c135aa6244afab213b9
MD5 52ef237d250d1a11dbd280748f00f010
BLAKE2b-256 73ec79e07e4db932a0c6acf7dfc8d2e4559dcd43cf5452f6194f358b9e9858d5

See more details on using hashes here.

File details

Details for the file polars_bio-0.33.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for polars_bio-0.33.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 40a0dea0114455e566dc0b27e66d839f8ed9941bc92047002d308c33e03ade46
MD5 656c55e70de4d13bd9688b9a4a0de646
BLAKE2b-256 59aff22e44be73c5357698e45321286d46a033e12e32108648892ba7777cc688

See more details on using hashes here.

File details

Details for the file polars_bio-0.33.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polars_bio-0.33.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4f451fc0177cddc66b1f56196a8a4faa243a8f3fe95e42df466450f86ebaa60
MD5 094f16729de2f17a5a347f71c6f17063
BLAKE2b-256 1fabf16ed40774abadf78734b711c44401a6f250cffb995ec6ea5e622bd0c61a

See more details on using hashes here.

File details

Details for the file polars_bio-0.33.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_bio-0.33.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f169a05bf598096162d5691c210c75296f16176898ec079a866a07f6cbf8d76
MD5 5b6356d716bd8085b293492a8886ead3
BLAKE2b-256 1efe7cf60c29d2cbec67e702106b02d8851038746872a111c867a9512256903c

See more details on using hashes here.

File details

Details for the file polars_bio-0.33.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polars_bio-0.33.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ba1483c7d2def57ea1842539d6da8e127b3e0c2912f117ec8635b1ca906d8dac
MD5 b195d79e35369da83518d447679db67c
BLAKE2b-256 5bd981f536d524204dc66d0a57cd3aa607b3e138746d290647f16bff64037962

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page