polars-bio

Execute genomic interval operations on Polars DataFrames and LazyFrames.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gabrielvuksani/wotann --skill polars-bio-gabrielvuksani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polars-bio
Source: https://github.com/gabrielvuksani/wotann/tree/main/skills/scientific/polars-bio
Command: npx skills add https://github.com/gabrielvuksani/wotann --skill polars-bio-gabrielvuksani

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves slow, memory-heavy genomic interval computations by providing high-performance overlap, nearest, merge, coverage, complement, and subtract operations directly on Polars DataFrames.

Core Features & Use Cases

  • Genomic interval arithmetic on Polars with output as LazyFrames by default, covering overlap, nearest, count overlaps, merge, cluster, coverage, complement, and subtract for BED-style coordinates.
  • Bioinformatics file I/O for common genomics formats (BED, VCF, BAM/CRAM, GFF/GTF, FASTA/FASTQ, SAM, Hi-C pairs) with eager reads and streaming scans for large files.
  • DataFusion SQL integration to register files/data as SQL tables and query them with standard SQL before running interval operations, plus pileup depth calculation from BAM/CRAM.

Quick Start

Use the polars-bio skill to compute streaming overlaps between two BED files named 'regions.bed' and 'genes.bed' and return the result as a Polars DataFrame.

Frequently Asked Questions about polars-bio

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

FAQPage Schema
How do I compute genomic interval overlaps on large BED files using Polars?

Genomic interval overlaps on BED files are computed directly on Polars DataFrames by returning LazyFrames for scalable, memory-efficient streaming execution before materializing with .collect().

What is the best way to run nearest, merge, and coverage operations for genomics in Python?

Nearest, merge, coverage, complement, and subtract operations are executed as high-performance genomic interval arithmetic on Polars DataFrames using DataFusion-backed interval logic.

Can I query VCF and BAM files with SQL before performing interval operations?

You can register bioinformatics files like VCF and BAM as SQL tables using DataFusion SQL integration, query them with standard SQL, and subsequently run interval operations on the results.

Does this approach support streaming scans for large bioinformatics file formats?

Streaming scans are supported for large bioinformatics file formats including BED, VCF, BAM/CRAM, GFF/GTF, FASTA/FASTQ, SAM, and Hi-C pairs to handle memory-heavy genomic datasets efficiently.

How do I calculate pileup depth from CRAM files in a Polars pipeline?

Pileup depth is calculated directly from BAM and CRAM files within the Polars pipeline, integrating bioinformatics file I/O with genomic interval analytics for downstream processing.

Do I need to handle coordinate system metadata when running interval operations on GFF files?

Correct coordinate-system handling is managed via metadata during DataFusion-backed interval arithmetic, ensuring accurate overlap and coverage results across BED and GFF formats.