alterlab-gtars
Gtars: Genomic Tools and Algorithms in Rust
Overview
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:
- Genomic interval files (BED) — overlaps, jaccard, set ops, coverage
- IGD indexing for fast overlap queries over large interval databases
- Coverage / accumulation tracks via uniwig
- Genomic ML preprocessing and region tokenization
- Single-cell fragment files (split into pseudobulks by cluster)
- Reference sequence digests and retrieval (refget)
Version note: examples are verified against the
gtarsPython package v0.8 (PyPI). The Python API is exposed through submodules —gtars.models,gtars.tokenizers,gtars.refget,gtars.utils— NOT as flat top-level functions. There is nogtars.igdorgtars.uniwigPython submodule; IGD building and uniwig track generation are CLI-only.