Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

polars-bio

Skill by K-Dense-AI

Performs genomic interval operations such as overlap, nearest, merge, coverage and subtraction on Polars DataFrames. It is for bioinformatics users who need coordinate-aware joins and file I/O for formats such as BED, VCF, BAM and FASTQ.

  • Score 94
  • 58k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install polars-bio

Built from the published package, never by AI.

git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/polars-bio ~/.claude/skills/polars-bio

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install polars-bio in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

polars-bio is an agent skill for genomic interval arithmetic and bioinformatics file I/O through Polars and DataFusion. It targets polars-bio 0.36.0 and covers overlap, count, coverage, nearest, merge, cluster, complement and subtract operations. It also covers lazy scans and reads for formats including BED, VCF, BCF, BAM, CRAM, GFF, GTF, FASTA and FASTQ, plus SQL queries and read-depth calculation with pb.depth.

The skill sets out a coordinate contract, with a default of 1-based closed intervals and an option for 0-based half-open output. It warns about 0.36.0 behaviors, such as unimplemented on_cols and Int16 depth overflow. It is for bioinformatics developers who work with coordinate-aware genomic data and want to move from bioframe or use Polars for this work.

Written from the project's SKILL.md and checked against it.

What it can do

  • Interval overlap and countsFinds intersecting interval pairs, per-query hit counts and overlap records.
  • Nearest and coverageFinds nearest target intervals and computes covered bases from target intersections.
  • Merge, cluster and complementCombines overlapping regions, labels clusters and finds uncovered gaps within genome bounds.
  • Subtract intervalsRemoves target-covered pieces and returns the remaining coordinate fragments.
  • Format readers and writersReads and writes BED, VCF, BCF, BAM, CRAM, GFF, GTF, FASTA and FASTQ data.
  • Lazy scansUses scan_* functions for lazy plans and read_* functions for eager reads.
  • SQL queriesRegisters genomic data and runs SQL through pb.sql, which returns a LazyFrame.
  • Read depthComputes read depth from BAM or CRAM with pb.depth, as run-length blocks or per-base output.
  • Coordinate checksValidates coordinate metadata and raises errors on mismatched or missing coordinate systems.
  • bioframe migration guidanceLists semantic differences to check when porting bioframe code to polars-bio.

What you need

  • Python 3.11 to 3.14
  • polars-bio 0.36.0
  • Polars 1.44.2 (tested on Python 3.13)
  • Network access and provider credentials for remote data only
  • Local FASTA and .fai file for external-reference CRAM

Try asking

  • Use polars-bio to find which peaks overlap variants in peaks.bed and cohort.vcf.gz
  • Compute per-query overlap counts and covered bases for two interval tables
  • Merge overlapping regions in my BED file and keep the n_intervals column

Good to know

  • Not a drop-in replacement for bioframe; threshold and boundary conventions differ.
  • on_cols is exposed but not implemented in 0.36.0 and raises AssertionError when set.
  • Depth is emitted as Int16, so 32,768 reads over one base wrap to negative values.
  • Authenticated S3, GCS and Azure access was not tested; only a small public HTTPS BED scan was run.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/polars-bio/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: Read Write Edit Bash

  • SKILL.md13 KB
  • references/bioframe_migration.md5 KB
  • references/configuration.md4 KB
  • references/file_io.md11 KB
  • references/interval_operations.md7 KB
Show all 7 files
  • references/pileup_operations.md6 KB
  • references/sql_processing.md6 KB

Alternatives to polars-bio

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

polars-bio: common questions

Does polars-bio use 0-based or 1-based coordinates?

The default is 1-based closed coordinates, including converted BED reads. Setting use_zero_based=True on genomic readers gives 0-based half-open output.

Can polars-bio compute read depth?

Yes, pb.depth reads BAM or CRAM and returns run-length blocks, or per-base positions with per_base=True. It has no base-quality threshold or fragment-count option.

Is polars-bio a replacement for bioframe?

No. The source says polars-bio is not a drop-in replacement for bioframe and recommends checking semantics such as boundary conventions when migrating.

How do I install polars-bio?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is polars-bio free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is polars-bio safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to polars-bio?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

polars-bio Install

Add to stack

Loading.