High-performance genomic data processing using Polars. Handles large VCF, FASTA, and BED files with streaming operations.

Install

mkdir -p .claude/skills/polars-bio && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11261" && unzip -o skill.zip -d .claude/skills/polars-bio && rm skill.zip

Installs to .claude/skills/polars-bio

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

A high-performance skill for processing genomic data (VCF, FASTA, BED) using polars-bio. Features streaming VCF processing, interval joins, FASTA analysis, and variant annotation.
179 charsno explicit “when” trigger
Advanced

Key capabilities

  • Processes genomic data (VCF, FASTA, BED)
  • Performs streaming VCF processing
  • Executes interval joins
  • Calculates sequence metrics
  • Annotates VCF variants

How it works

The tool use Polars' lazy evaluation and streaming engine to process large genomic datasets efficiently.

Inputs & outputs

You give it
Genomic data file
You get back
Processed genomic data

When to use polars-bio

  • Filter VCF variants using Polars expressions
  • Perform interval overlap joins for genomic regions
  • Calculate sequence metrics from FASTA files
  • Annotate VCF variants with external databases

About this skill

Polars-Bio Skill

Overview

This skill leverages polars-bio and polars to provide a robust toolkit for large-scale genomic data analysis. It is designed to handle datasets larger than memory using Polars' streaming engine and lazy evaluation.

Capabilities

1. VCF Processing

  • Lazy Loading: Use pb.scan_vcf() to define execution plans without loading data into memory immediately.
  • Streaming Conversion: Efficiently convert VCFs to Parquet (sink_parquet) for faster downstream queries.
  • Filtering & Cleaning: Parse INFO fields and filter variants using Polars expressions.

2. Genomic Interval Operations

  • Overlap Joins: High-performance interval joins (finding variants within genomic regions like Cytobands or Genes) using pb.overlap().

3. Sequence Analysis

  • FASTA Processing: Lazy reading of FASTA files (pb.scan_fasta) to calculate sequence metrics (e.g., GC content, sequence length).

4. Variant Annotation

  • Database Integration: Annotate VCF variants with external datasets (e.g., gnomAD, dbSNP) using efficient point-joins on chrom, start, ref, alt.

Quick Start

Basic VCF Loading & Interval Join

import polars as pl
import polars_bio as pb

# 1. Lazy Load VCF
vcf_lf = pb.scan_vcf("data/clinvar.vcf.gz")

# 2. Load Regions (e.g., BED file)
regions_lf = pl.scan_csv("data/regions.bed", separator="\t", has_header=False, 
                         new_columns=["chrom", "start", "end", "name"])

# 3. Perform Interval Overlap
# Finds variants in VCF that overlap with regions
joined_lf = pb.overlap(vcf_lf, regions_lf)

# 4. Execute (Streaming)
result = joined_lf.collect(streaming=True)
print(result)

Convert VCF to Parquet

# Efficiently convert large VCF to Parquet without high memory usage
pb.scan_vcf("input.vcf").sink_parquet("output.parquet")

FASTA GC Content Analysis

lf = pb.scan_fasta("genome.fa")
lf = lf.with_columns(
    pl.col("sequence").str.count_matches("G|C").alias("gc_count"),
    pl.col("sequence").str.len_chars().alias("len")
)
print(lf.select(pl.col("gc_count").sum() / pl.col("len").sum()).collect())

Benchmarks

The skill includes a benchmark comparing Eager vs. Streaming execution. Streaming mode has been shown to reduce memory usage by ~33% on standard workloads. See ANALYSIS_REPORT.md for details.

Dependencies

  • polars
  • polars-bio
  • pyarrow (for Parquet)

When not to use it

  • Small-scale data analysis
  • Non-genomic data processing

Prerequisites

polarspolars-biopyarrow

Limitations

  • Requires Polars-compatible data formats
  • Streaming mode is essential for large datasets

How it compares

It provides a high-performance, memory-efficient alternative to traditional genomic data processing tools.

Compared to similar skills

polars-bio side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
polars-bio (this skill)05moNo flagsAdvanced
quant-analyst1032moNo flagsAdvanced
umap-learn62moReviewIntermediate
embedding-strategies82moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by diegosouzapw

View all by diegosouzapw

helm-chart-scaffolding-v2

diegosouzapw

Helm Chart Scaffolding workflow skill. Use this skill when the user needs Comprehensive guidance for creating, organizing, and managing Helm charts for packaging and deploying Kubernetes applications and the operator should preserve the upstream workflow, copied support files, and provenance before

00

cc-skill-coding-standards-v2

diegosouzapw

Coding Standards & Best Practices workflow skill. Use this skill when the user needs Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development and the operator should preserve the upstream workflow, copied support files, and provenance before

00

worktree-setup

diegosouzapw

Automatically invoked after `git worktree add` to create data/shared symlink and data/local directory. Required before starting work in any new worktree.

00

parsehub-automation

diegosouzapw

Automate Parsehub tasks via Rube MCP (Composio). Always search tools first for current schemas.

00

signalwire-agents-sdk

diegosouzapw

Expert assistance for building SignalWire AI Agents in Python. Automatically activates when working with AgentBase, SWAIG functions, skills, SWML, voice configuration, DataMap, or any signalwire_agents code. Provides patterns, best practices, and complete working examples.

00

agent-sales-engineer

diegosouzapw

Expert sales engineer specializing in technical pre-sales, solution architecture, and proof of concepts. Masters technical demonstrations, competitive positioning, and translating complex technology into business value for prospects and customers.

00

You might also like

quant-analyst

zenobi-us

Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.

103355

umap-learn

K-Dense-AI

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

6100

embedding-strategies

wshobson

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

890

building-automl-pipelines

jeremylongshore

Build automated machine learning pipelines, including feature engineering, model selection, and performance evaluation.

688

model-compare

rawwerks

Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.

783

matchms

davila7

Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.

674

Search skills

Search the agent skills registry