Rust bindings for AGC (Assembled Genomes Compressor).
This crate provides safe Rust bindings to the AGC C++ library, allowing you to read compressed genome collections from Rust programs.
- Read access to AGC archives
- List samples and contigs
- Fetch sequence regions
- Thread-safe operations
use agc_rs::AGCFile;
let mut agc = AGCFile::new();
agc.open("genomes.agc", true)?;
// List all samples
let samples = agc.list_samples();
// Get a sequence region
let sequence = agc.get_contig_sequence("sample1", "chr1", 100, 200)?;This crate includes vendored AGC source code and will build it automatically. Just run:
cargo buildThe build process will:
- Use the vendored AGC source in the
agc/directory - Build the AGC library if not already built
- Link against the built library
To update the vendored AGC source code from upstream:
./vendor-agc.shThis will download the latest AGC v3.2.1 release and all its dependencies.
If you have AGC installed elsewhere, you can:
- Use a system-wide installation (if installed to
/usr/local) - Set the
AGC_DIRenvironment variable:export AGC_DIR=/path/to/agc cargo build
- C++20 compatible compiler
- CMake
- zstd library
MIT License (same as AGC)