polars-bio

Perform genomic interval operations and bioinformatics file I/O on Polars DataFrames.

Updated May 24, 2026
One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill polars-bio-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polars-bio
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/polars-bio
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill polars-bio-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

polars-bio helps you efficiently perform genomic interval arithmetic and bioinformatics file I/O on large datasets without running out of memory.

Core Features & Use Cases

  • Genomic interval operations: compute overlaps, nearest neighbors, merges, coverage, complements, and subtract operations directly on Polars DataFrames/LazyFrames (e.g., BED-like interval workflows).
  • Streaming and scalable I/O: use scan_* functions for out-of-core processing and predicate/projection pushdown when supported.
  • Bioinformatics file support: read and write common formats including BED, VCF, BAM/CRAM, and GFF/GTF, with optional cloud storage paths.
  • SQL on genomic data: register files and query them with DataFusion SQL, returning results as a LazyFrame for further interval operations.

Quick Start

Install the library and run an overlap analysis between two BED-like interval tables using polars-bio on Polars DataFrames.

Frequently Asked Questions about polars-bio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform genomic interval operations like overlap and coverage on large BED files without running out of memory?

Genomic interval operations can be performed out-of-core on large BED files by using scan functions for streaming and LazyFrame-first execution to compute overlaps, coverage, and nearest neighbors without loading everything into memory.

Can I query and process VCF and BAM files using DataFusion SQL?

VCF and BAM files can be registered and queried using DataFusion SQL, returning results as a LazyFrame to enable further interval operations and seamless bioinformatics file I/O.

What is the best way to compute nearest intervals and subtract operations directly on Polars DataFrames?

Computing nearest intervals, merges, complements, and subtract operations is handled directly on Polars DataFrames and LazyFrames using a DataFrame-centric API, providing fast interval arithmetic for BED-like workflows.

Does polars-bio support streaming and predicate pushdown for cloud-native genomic reads?

Streaming and scalable I/O are supported for cloud-native genomic reads, utilizing out-of-core processing with predicate and projection pushdown when supported by the underlying bioinformatics file formats.

Are there limitations when handling coordinate-system operations for GFF and GTF file formats?

Coordinate-system handling is explicitly supported for genomic intervals, though format-specific readers and writers for GFF and GTF files may have limitations depending on the streaming predicates and cloud storage paths used.

Do I need Polars installed to use polars-bio for bioinformatics file I/O?

Polars is required as the core environment because polars-bio provides a Polars DataFrame-centric API, executing interval operations and bioinformatics file I/O directly on DataFrames and LazyFrames.