polars-bio

Perform genomic interval arithmetic on Polars DataFrames with SQL integration.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/JosephWoodall/noosphere --skill polars-bio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polars-bio
Source: https://github.com/JosephWoodall/noosphere/tree/main/.agent/skills/polars-bio
Command: npx skills add https://github.com/JosephWoodall/noosphere --skill polars-bio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

polars-bio provides a high-performance toolkit for genomic interval arithmetic and bioinformatics file I/O on Polars DataFrames, enabling fast overlap, nearest, merge, coverage, and related analyses with streaming and cloud-native capabilities to scale to large datasets.

Core Features & Use Cases

  • Genomic interval operations: overlap, nearest, merge, cluster, coverage, complement, and subtract for BED/VCF/BAM/GFF data.
  • Bioinformatics file I/O: read and write BED, VCF, BAM, CRAM, GFF/GTF, FASTA, and FASTQ with cloud storage and streaming support.
  • SQL data processing: register files as SQL tables and query them with DataFusion SQL to combine with Polars pipelines.
  • Pileup/depth: compute per-base or block depth from BAM/CRAM files with pb.depth.
  • API styles: functional pb.* operations and method-chaining via LazyFrame.pb for fluent pipelines.
  • Streaming/out-of-core: scan_* functions enable out-of-core processing for datasets larger than memory.
  • Cross-cloud I/O: direct cloud URIs for S3/GCS/Azure read/write.

Quick Start

Overlap two interval datasets with pb.overlap and collect the results.

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 overlap operations on large BED or VCF files?

Genomic interval overlap on BED and VCF files is performed using the pb.overlap function, which leverages Polars DataFrames and DataFusion to deliver fast, scalable arithmetic on large datasets.

Can I process bioinformatics files directly from cloud storage like S3 or GCS?

Yes, you can read and write bioinformatics files directly from S3, GCS, and Azure using cross-cloud I/O support, enabling cloud-native bioinformatics workflows without local downloads.

What is the best way to run genomic interval analytics when datasets are larger than memory?

For datasets larger than memory, genomic interval analytics can be run using out-of-core processing with scan_* functions, enabling streaming computation to scale to large bioinformatics datasets efficiently.

Does this toolkit support SQL queries for combining genomic data with Polars pipelines?

Yes, it supports SQL data processing by registering bioinformatics files as SQL tables and querying them with DataFusion SQL, allowing you to combine genomic intervals with Polars pipelines.

How do I compute per-base depth or pileup from BAM and CRAM files?

Per-base or block depth from BAM and CRAM files is computed using the pb.depth function, delivering fast pileup analytics directly within the Polars DataFrame environment.

What genomic interval operations are available besides overlap for BED, BAM, and GFF data?

Besides overlap, available genomic interval operations include nearest, merge, cluster, coverage, complement, and subtract, providing comprehensive interval arithmetic for BED, BAM, and GFF data.