gtars
정보
Gtars는 게놈 구간 분석을 위한 고성능 Rust 도구 키트로 Python 바인딩을 제공합니다. 중복 탐지, 커버리지 트랙 생성, ML 모델용 토큰화 등 특화된 기능을 갖추고 있습니다. BED 파일 작업, 계산 게놈학, 또는 머신러닝용 게놈 데이터 전처리 시 사용하세요.
빠른 설치
Claude Code
추천npx skills add K-Dense-AI/claude-scientific-skills -a claude-code/plugin add https://github.com/K-Dense-AI/claude-scientific-skillsgit clone https://github.com/K-Dense-AI/claude-scientific-skills.git ~/.claude/skills/gtarsClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
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 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 exportreferences/overlap.md- IGD indexing, overlap detection, and set operationsreferences/coverage.md- Coverage track generation with uniwigreferences/tokenizers.md- Genomic tokenization for ML applicationsreferences/refget.md- Reference sequence management and digestsreferences/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>
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
