Rust-backed Python library for fast genomic token arithmetic and BED processing. High-performance BED I/O, interval set ops (intersect, merge, complement, subtract), region tokenization against a universe, universe construction.
SkillScore100Maintained
Automatic
◆Research pack
Last verified 8/24/2026
What it changes
Passed 22 of 22 test cases with the skill, and 5 of 22 without it.
Without skill23%
With skill100%
Checks it passed that the model alone missed
Writes the result using the to_bed method.
Loads input BED files using GenomicIntervalSet.
Exports the merged result using the to_bed method.
and 25 more in the full report
17 fixed5 passed either way0 still failing0 broke
Pass-rate lift
+77 pp
Tokens
+146%
Agent turns
0%
Response time
-48%
Model gemini-3.6-flashMeasured 8/24/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 17 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 17
Prompt
I want to test different consensus coverage thresholds (10%, 25%, and 50%) when building a universe from a list of peak files `[sample1.bed, sample2.bed, sample3.bed]`. Write a Python loop using GTARS UniverseBuilder that prints the number of universe regions produced for each `fraction` threshold.
What was checked, without and with the skill
Checked
Without skill
With skill
Loops over multiple fraction threshold values.
Passed
Passed
Instantiates UniverseBuilder with a fraction parameter inside or for each loop iteration.
Missed
Passed
case-21 · gemini-3.6-flash · 8/24/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md445 linessingle file
GTARS: Fast Genomic Token Arithmetic and BED File Processing
Overview
GTARS is a Python library with a Rust-backed core for high-performance genomic interval operations. It provides BED file I/O, set-theoretic interval operations (intersection, union, merge, complement, subtract), genomic region tokenization against a reference universe, and utilities for building consensus universe BED files. GTARS is designed for workflows that process hundreds to thousands of BED files efficiently, serving as a preprocessing engine for ML pipelines (including geniml) and general bioinformatics pipelines.
When to Use
Read and write large BED files efficiently, leveraging Rust-backed parsing for speed over pure Python alternatives
Compute genomic interval intersections, merges, complements, or subtracts between BED file pairs or sets
Tokenize a collection of genomic regions against a fixed universe vocabulary for ML input preparation
Build consensus universe BED files from a collection of sample BED files
Count overlap statistics between two BED files without launching bedtools processes
Preprocess ATAC-seq, ChIP-seq, or ENCODE peak files before feeding into geniml or other ML tools
For full BED/BAM/SAM reading with CIGAR-level detail, use pysam-genomic-files instead
Prerequisites
Python packages: gtars, numpy (optional, for array conversion)
Data requirements: BED format files (3+ columns: chr, start, end); optionally a universe BED file for tokenization
Environment: Python 3.8+; Rust toolchain not required (pre-built wheels available on PyPI)
pip install gtars
Quick Start
from gtars import GenomicIntervalSet
# Load a BED file and inspect
gis = GenomicIntervalSet("peaks.bed")
print(f"Loaded {len(gis)} intervals")
print(f"First interval: {gis[0]}")
# First interval: chr1:1000-2000
# Intersect two BED files
gis2 = GenomicIntervalSet("other_peaks.bed")
overlap = gis.intersect(gis2)