1
0
Source

High-performance toolkit for genomic interval analysis in Rust with Python bindings. Use when working with genomic regions, BED files, coverage tracks, overlap detection, tokenization for ML models, or fragment analysis in computational genomics and machine learning applications.

Install

mkdir -p .claude/skills/gtars && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3734" && unzip -o skill.zip -d .claude/skills/gtars && rm skill.zip

Installs to .claude/skills/gtars

About this skill

Gtars: Genomic Tools and Algorithms in Rust

Overview

Gtars is a high-performance Rust toolkit for manipulating, analyzing, and processing genomic interval data. It provides specialized tools for overlap detection, coverage analysis, tokenization for machine learning, and reference sequence management.

Use this skill when working with:

  • Genomic interval files (BED format)
  • Overlap detection between genomic regions
  • Coverage track generation (WIG, BigWig)
  • Genomic ML preprocessing and tokenization
  • Fragment analysis in single-cell genomics
  • Reference sequence retrieval and validation

Installation

Python Installation

Install gtars Python bindings:

uv uv pip install gtars

CLI Installation

Install command-line tools (requires Rust/Cargo):

# Install with all features
cargo install gtars-cli --features "uniwig overlaprs igd bbcache scoring fragsplit"

# Or install specific features only
cargo install gtars-cli --features "uniwig overlaprs"

Rust Library

Add to Cargo.toml for Rust projects:

[dependencies]
gtars = { version = "0.1", features = ["tokenizers", "overlaprs"] }

Core Capabilities

Gtars is organized into specialized modules, each focused on specific genomic analysis tasks:

1. Overlap Detection and IGD Indexing

Efficiently detect overlaps between genomic intervals using the Integrated Genome Database (IGD) data structure.

When to use:

  • Finding overlapping regulatory elements
  • Variant annotation
  • Comparing ChIP-seq peaks
  • Identifying shared genomic features

Quick example:

import gtars

# Build IGD index and query overlaps
igd = gtars.igd.build_index("regions.bed")
overlaps = igd.query("chr1", 1000, 2000)

See references/overlap.md for comprehensive overlap detection documentation.

2. Coverage Track Generation

Generate coverage tracks from sequencing data with the uniwig module.

When to use:

  • ATAC-seq accessibility profiles
  • ChIP-seq coverage visualization
  • RNA-seq read coverage
  • Differential coverage analysis

Quick example:

# Generate BigWig coverage track
gtars uniwig generate --input fragments.bed --output coverage.bw --format bigwig

See references/coverage.md for detailed coverage analysis workflows.

3. Genomic Tokenization

Convert genomic regions into discrete tokens for machine learning applications, particularly for deep learning models on genomic data.

When to use:

  • Preprocessing for genomic ML models
  • Integration with geniml library
  • Creating position encodings
  • Training transformer models on genomic sequences

Quick example:

from gtars.tokenizers import TreeTokenizer

tokenizer = TreeTokenizer.from_bed_file("training_regions.bed")
token = tokenizer.tokenize("chr1", 1000, 2000)

See references/tokenizers.md for tokenization documentation.

4. Reference Sequence Management

Handle reference genome sequences and compute digests following the GA4GH refget protocol.

When to use:

  • Validating reference genome integrity
  • Extracting specific genomic sequences
  • Computing sequence digests
  • Cross-reference comparisons

Quick example:

# Load reference and extract sequences
store = gtars.RefgetStore.from_fasta("hg38.fa")
sequence = store.get_subsequence("chr1", 1000, 2000)

See references/refget.md for reference sequence operations.

5. Fragment Processing

Split and analyze fragment files, particularly useful for single-cell genomics data.

When to use:

  • Processing single-cell ATAC-seq data
  • Splitting fragments by cell barcodes
  • Cluster-based fragment analysis
  • Fragment quality control

Quick example:

# Split fragments by clusters
gtars fragsplit cluster-split --input fragments.tsv --clusters clusters.txt --output-dir ./by_cluster/

See references/cli.md for fragment processing commands.

6. Fragment Scoring

Score fragment overlaps against reference datasets.

When to use:

  • Evaluating fragment enrichment
  • Comparing experimental data to references
  • Quality metrics computation
  • Batch scoring across samples

Quick example:

# Score fragments against reference
gtars scoring score --fragments fragments.bed --reference reference.bed --output scores.txt

Common Workflows

Workflow 1: Peak Overlap Analysis

Identify overlapping genomic features:

import gtars

# Load two region sets
peaks = gtars.RegionSet.from_bed("chip_peaks.bed")
promoters = gtars.RegionSet.from_bed("promoters.bed")

# Find overlaps
overlapping_peaks = peaks.filter_overlapping(promoters)

# Export results
overlapping_peaks.to_bed("peaks_in_promoters.bed")

Workflow 2: Coverage Track Pipeline

Generate coverage tracks for visualization:

# Step 1: Generate coverage
gtars uniwig generate --input atac_fragments.bed --output coverage.wig --resolution 10

# Step 2: Convert to BigWig for genome browsers
gtars uniwig generate --input atac_fragments.bed --output coverage.bw --format bigwig

Workflow 3: ML Preprocessing

Prepare genomic data for machine learning:

from gtars.tokenizers import TreeTokenizer
import gtars

# Step 1: Load training regions
regions = gtars.RegionSet.from_bed("training_peaks.bed")

# Step 2: Create tokenizer
tokenizer = TreeTokenizer.from_bed_file("training_peaks.bed")

# Step 3: Tokenize regions
tokens = [tokenizer.tokenize(r.chromosome, r.start, r.end) for r in regions]

# Step 4: Use tokens in ML pipeline
# (integrate with geniml or custom models)

Python vs CLI Usage

Use Python API when:

  • Integrating with analysis pipelines
  • Need programmatic control
  • Working with NumPy/Pandas
  • Building custom workflows

Use CLI when:

  • Quick one-off analyses
  • Shell scripting
  • Batch processing files
  • Prototyping workflows

Reference Documentation

Comprehensive module documentation:

  • references/python-api.md - Complete Python API reference with RegionSet operations, NumPy integration, and data export
  • references/overlap.md - IGD indexing, overlap detection, and set operations
  • references/coverage.md - Coverage track generation with uniwig
  • references/tokenizers.md - Genomic tokenization for ML applications
  • references/refget.md - Reference sequence management and digests
  • references/cli.md - Command-line interface complete reference

Integration with geniml

Gtars serves as the foundation for the geniml Python package, providing core genomic interval operations for machine learning workflows. When working on geniml-related tasks, use gtars for data preprocessing and tokenization.

Performance Characteristics

  • Native Rust performance: Fast execution with low memory overhead
  • Parallel processing: Multi-threaded operations for large datasets
  • Memory efficiency: Streaming and memory-mapped file support
  • Zero-copy operations: NumPy integration with minimal data copying

Data Formats

Gtars works with standard genomic formats:

  • BED: Genomic intervals (3-column or extended)
  • WIG/BigWig: Coverage tracks
  • FASTA: Reference sequences
  • Fragment TSV: Single-cell fragment files with barcodes

Error Handling and Debugging

Enable verbose logging for troubleshooting:

import gtars

# Enable debug logging
gtars.set_log_level("DEBUG")
# CLI verbose mode
gtars --verbose <command>

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

293144

markitdown

K-Dense-AI

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.

13741

scientific-writing

K-Dense-AI

Write scientific manuscripts. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), abstracts, for research papers and journal submissions.

13426

reportlab

K-Dense-AI

"PDF generation toolkit. Create invoices, reports, certificates, forms, charts, tables, barcodes, QR codes, Canvas/Platypus APIs, for professional document automation."

968

matplotlib

K-Dense-AI

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

947

drugbank-database

K-Dense-AI

Access and analyze comprehensive drug information from the DrugBank database including drug properties, interactions, targets, pathways, chemical structures, and pharmacology data. This skill should be used when working with pharmaceutical data, drug discovery research, pharmacology studies, drug-drug interaction analysis, target identification, chemical similarity searches, ADMET predictions, or any task requiring detailed drug and drug target information from DrugBank.

945

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.