| Crates.io | digest-rs |
| lib.rs | digest-rs |
| version | 0.1.0 |
| created_at | 2025-05-27 22:06:59.956237+00 |
| updated_at | 2025-05-27 22:06:59.956237+00 |
| description | Rust bindings for the digest library |
| homepage | |
| repository | https://github.com/VeryAmazed/digest |
| max_upload_size | |
| id | 1691923 |
| size | 33,779 |
Rust bindings for the digest C++ library, providing efficient kmer minimizer and syncmer digestion for DNA sequences.
digest library must be available at $DIGEST_DIR (see build.rs) or installed via conda.Add to your Cargo.toml:
[dependencies]
digest-rs = "0.1.0"
use digest_rs::{window_minimizer_rs, modimizer_rs, syncmer_rs};
let sequence = "ACGTACGT";
let k = 4;
let window = 2;
let mod_val = 3;
// Window minimizer
let minimizers = window_minimizer_rs(sequence, k, window)?;
// Modimizer
let modimizers = modimizer_rs(sequence, k, mod_val)?;
// Syncmer
let syncmers = syncmer_rs(sequence, k, window)?;
Each function returns a Result<Vec<u32>, DigestError> with the minimizer positions.
This crate uses a build.rs script to compile the C++ bindings and link against the C++ digest library.
Make sure the C++ library and its dependencies are built and available at the expected paths.
MIT