Skip to content

crates.io

Introduction

gtars is a high-performance toolkit for genomic tools and algorithms in Rust. Built with Rust for speed and reliability, gtars provides core utilities for machine learning on genomic intervals for the geniml Python package. It also provides lots of utility as a standalone library for alternative downstream use cases.

Installation

Rust Library

Gtars uses a feature-flag system to allow you to include only the modules you need. Add to your Cargo.toml:

[dependencies]
# Install specific features
gtars = { version = "0.5", features = ["overlaprs", "tokenizers"] }

# Or install from GitHub
gtars = { git = "https://github.com/databio/gtars", features = ["overlaprs", "tokenizers"] }

Modules:

  • core - Core functionality and data structures
  • tokenizers - Genomic region tokenizers
  • io - I/O utilities
  • refget - Reference sequence access
  • overlaprs - Overlap operations
  • uniwig - Coverage computation
  • igd - Interval search
  • bbcache - BED file caching
  • scoring - Fragment scoring
  • fragsplit - Fragment splitting

Example combinations:

# For machine learning tasks
gtars = { version = "0.5", features = ["tokenizers", "core"] }

# For genomic analysis
gtars = { version = "0.5", features = ["overlaprs", "uniwig", "scoring"] }

# For data access
gtars = { version = "0.5", features = ["refget", "bbcache", "io"] }

Python Package

pip install gtars

See further documentation under Python bindings.

Command-Line Interface

Install from source:

git clone https://github.com/databio/gtars
cd gtars
cargo install --path gtars-cli

Or download precompiled binaries from the releases page.

Development

Run tests with cargo test from the workspace root. Please see CONTRIBUTING.md for development guidelines.

Module organization

gtars is organized into modules. The modules section gives an overview of each module.