Runs high-performance genomic interval analysis with gtars (databio): BED overlaps, Jaccard, coverage, IGD indexing, uniwig tracks, region tokenization for ML, single-cell pseudobulking, and GA4GH refget digests.
Ships in alterlab-domain-specific. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Gtars (from databio, the lab behind geniml) is a high-performance Rust toolkit for manipulating, analyzing, and processing genomic interval data. Its primary purpose is to be the performance-critical backend for geniml, a Python library for machine learning on genomic intervals. It provides overlap/set operations, IGD overlap indexing, coverage (uniwig) tracks, region tokenization for ML, single-cell fragment pseudobulking, and GA4GH refget sequence-collection management.
Use this skill when working with:
| Scenario | Use Instead |
|---|---|
| Training region / single-cell embeddings (Region2Vec, scEmbed, BEDspace) | alterlab-geniml |
| Per-read BAM/CRAM/VCF access (CIGAR, MAPQ, pileups) | alterlab-pysam |
| Normalized bigWig coverage from BAM, TSS heatmaps/profiles | alterlab-deeptools |
| Geographic (non-genomic) spatial joins and overlaps | alterlab-geopandas |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-geniml) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Version note: examples are verified against the
gtarsPython package 0.10.0 (PyPI, 2026-09; first written for 0.8 — the calls below are unchanged). The Python API is exposed through submodules —gtars.models,gtars.tokenizers,gtars.refget,gtars.utils, plus the newergtars.genomic_distributions,gtars.lola,gtars.vrs— NOT as flat top-level functions. There is nogtars.igdorgtars.uniwigPython submodule; IGD building and uniwig track generation are CLI-only.
uv pip install gtars # or: uv add gtars
Import surface (verified, 0.10.0):
from gtars.models import RegionSet, Region, RegionSetList
from gtars.tokenizers import Tokenizer, tokenize_fragment_file
from gtars import refget # RefgetStore, digest_fasta, sha512t24u_digest, ...
from gtars import utils # read/write .gtok token files
The CLI ships as the gtars-cli crate (binary name gtars) and is installed with Cargo. Most subcommands are behind feature flags:
# All commonly used commands
cargo install gtars-cli --features "uniwig overlaprs igd bbcache scoring fragsplit genomicdist"
# Or a subset
cargo install gtars-cli --features "uniwig igd"
Available CLI subcommands: igd, overlaprs, uniwig, bbcache, pb (fragment pseudobulking), scoring, genomicdist, ranges, consensus, prep. Flag sets differ per subcommand and evolve across versions — always confirm with gtars <command> --help.
Gtars is organized into specialized modules, each focused on specific genomic analysis tasks:
Detect overlaps and compute set operations / similarity between region sets with RegionSet (Python), or index a large interval database with IGD (CLI).
When to use:
Quick example (Python):
from gtars.models import RegionSet
peaks = RegionSet("chip_peaks.bed")
promoters = RegionSet("promoters.bed")
# Regions in peaks that overlap a promoter (the real method is subset_by_overlaps)
in_promoters = peaks.subset_by_overlaps(promoters)
in_promoters.to_bed("peaks_in_promoters.bed")
print(peaks.count_overlaps(promoters)) # per-region overlap counts
print(peaks.jaccard(promoters)) # similarity score
For querying a large reference database many times, build an IGD index once via the CLI (gtars igd create ...) and search it (gtars igd search ...). See references/overlap.md.
Generate coverage / accumulation tracks from a BED or BAM file with the uniwig CLI subcommand.
When to use:
Quick example (CLI):
# uniwig reads a sorted BED/BAM and writes accumulation tracks.
# Flags differ by version; confirm with `gtars uniwig --help`.
gtars uniwig --file fragments.bed --filetype bed \
--fileheader coverage --outputtype bw
See references/coverage.md for verified flags and RegionSet.coverage() for an in-memory alternative.
Convert genomic regions into discrete tokens for ML (the preprocessing layer geniml builds on).
When to use:
Quick example (Python):
from gtars.tokenizers import Tokenizer
from gtars.models import Region
tokenizer = Tokenizer.from_bed("universe.bed") # vocab = the universe BED
tokens = tokenizer.tokenize([Region("chr1", 1000, 2000, None)]) # -> ['chr1:1000-2000']
ids = tokenizer.convert_tokens_to_ids(tokens) # -> [<int>]
See references/tokenizers.md. Note: the class is Tokenizer (there is no TreeTokenizer).
Compute GA4GH refget digests and manage/retrieve reference sequences.
When to use:
Quick example (Python):
from gtars import refget
# Digest a FASTA into a GA4GH SequenceCollection (no sequence data loaded)
collection = refget.digest_fasta("hg38.fa")
# Or a one-off sequence digest
d = refget.sha512t24u_digest("ACGTACGT") # 32-char base64url GA4GH sha512t24u digest
See references/refget.md for RefgetStore (load, store, and get_substring).
Split a single-cell fragment file into pseudobulks based on a cluster/cell-group mapping.
When to use:
Quick example (CLI):
# The fragsplit feature exposes the `pb` (pseudobulk) subcommand.
gtars pb --fragments fragments.bed.gz --mapping cluster_mapping.tsv
The Python side also offers gtars.tokenizers.tokenize_fragment_file(...) for tokenizing fragments directly. See references/cli.md.
Score region/fragment files against reference datasets with the scoring CLI subcommand.
When to use:
gtars scoring --help # confirm subcommands and flags for your installed version
Identify peaks overlapping promoters (Python):
from gtars.models import RegionSet
peaks = RegionSet("chip_peaks.bed")
promoters = RegionSet("promoters.bed")
overlapping_peaks = peaks.subset_by_overlaps(promoters)
overlapping_peaks.to_bed("peaks_in_promoters.bed")
# Iterate results (regions expose .chr/.start/.end)
for r in overlapping_peaks:
print(r.chr, r.start, r.end)
Index a large reference database once, then search it many times:
# Build the IGD database from a directory or list of BED files
gtars igd create --help # confirm the exact input/output flags for your version
# Search the database with query regions
gtars igd search --help
Prepare genomic regions for an ML model:
from gtars.tokenizers import Tokenizer
from gtars.models import RegionSet
# Step 1: Build a tokenizer from the universe BED (defines the vocabulary)
tokenizer = Tokenizer.from_bed("universe.bed")
# Step 2: Tokenize a region set (tokenize accepts a RegionSet or a list of Region)
regions = RegionSet("training_peaks.bed")
tokens = tokenizer.tokenize(regions) # list of 'chr:start-end' strings
ids = tokenizer.convert_tokens_to_ids(tokens) # integer IDs for the model
# Step 3: feed `ids` to geniml or a custom model (see alterlab-geniml for training)
Use Python API when:
Use CLI when:
references/python-api.md — RegionSet / Region operations, set ops, overlaps, exportreferences/overlap.md — overlap detection and IGD indexingreferences/coverage.md — uniwig coverage tracksreferences/tokenizers.md — region tokenization for MLreferences/refget.md — refget digests and RefgetStorereferences/cli.md — CLI subcommand overviewgtars is the Rust performance backend for geniml (databio's ML-on-genomic-intervals library). Use gtars for the heavy interval ops and tokenization; use geniml (skill alterlab-geniml) for embedding/model training built on top of those tokens.
.bed.gz), with a separate cluster-mapping file for pbThis package's surface differs between releases and the Python and CLI APIs are NOT mirror images. Before relying on an unfamiliar method or flag, confirm against the installed version:
uv run python -c "from gtars import models, tokenizers, refget; print(dir(models), dir(tokenizers), dir(refget))"
gtars <command> --help
Part of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
genomic-intervals, bed-files, bioinformatics, rust-toolkit, genomic-ml
18 skills in this plugin
/alterlab-adaptyvPrepares and validates Adaptyv Bio Foundry protein-testing submissions with no account — optimizes and pre-screens sequences locally (NetSolP/SoluProt heuristics, SolubleMPNN, ESM), assembles the experiment payload, and validates it offline against the Foundry's own type/method/sequence rules so it is ready and correct before it costs anything. Submitting to the Foundry, browsing the target catalog, tracking status and retrieving results run through the Foundry API with the user's own ADAPTYV_API_KEY (experiments cost money and take weeks). Use when designing proteins for wet-lab validation (binding/affinity, expression, thermostability, fluorescence), preparing or validating a Foundry submission, pre-screening sequences, or tracking an Adaptyv experiment. Triggers on "Adaptyv", "Foundry API", "cloud lab", "biolayer interferometry / BLI", "wet-lab validation". Part of the AlterLab Academic Skills suite./alterlab-aeonRuns time series machine learning with the aeon library — classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search via scikit-learn compatible APIs. Use when working with temporal data, sequential patterns, or time-indexed observations (univariate or multivariate) that need specialized algorithms beyond standard ML approaches. Part of the AlterLab Academic Skills suite./alterlab-astropyProcesses astronomy and astrophysics data with the Astropy Python library — celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, and world coordinate systems (WCS). Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or general astronomical data analysis. Part of the AlterLab Academic Skills suite./alterlab-cirqBuilds, simulates, and runs quantum circuits with Cirq, Google Quantum AI's framework for NISQ hardware, noise-aware low-level circuit design, and noise characterization. Use when targeting Google Quantum AI processors or their Quantum Virtual Machine models (Willow, Sycamore-class Rainbow/Weber), IonQ/AQT/Pasqal via Cirq plugins, designing noise-aware NISQ circuits, or running characterization experiments (randomized benchmarking, XEB). For IBM Quantum hardware and Qiskit Runtime prefer alterlab-qiskit; for gradient-trained quantum ML and hybrid quantum-classical models prefer alterlab-pennylane; for open-system Lindblad/master-equation dynamics prefer alterlab-qutip. Part of the AlterLab Academic Skills suite./alterlab-digital-humanitiesApplies computational methods to humanities research — text mining and NLP (LDA/BERTopic topic modeling, sentiment, named entity recognition with spaCy/NLTK), corpus linguistics (concordance, collocation, keyness), digital archives (Dublin Core, TEI XML), GIS for history, network analysis, stylometry and authorship attribution, OCR (Tesseract, Kraken, Transkribus), and data visualization (Gephi, Palladio). Use when distant-reading a literary corpus, mapping historical events or trade networks, attributing disputed authorship, digitizing historical documents, or building digital scholarly editions. Part of the AlterLab Academic Skills suite./alterlab-fluidsimRuns computational fluid dynamics simulations with the FluidSim Python framework using pseudospectral FFT methods, with HPC support and output analysis. Use when simulating Navier-Stokes equations (2D/3D), shallow water equations, or stratified flows, or when analyzing turbulence, vortex dynamics, or geophysical flows. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
/alterlab-domain-specific:alterlab-gtarsfrom alterlab-domain-specific
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-domain-specificOther plugins' skills for the same job