seq-hash
A SIMD-accelerated library for iterating over k-mer hashes of DNA sequences, building on
packed_seq.
Building block for simd-minimizers.
Paper:
Please cite the
simd-minimizers paper, for which this
crate was developed:
- SimdMinimizers: Computing Random Minimizers, fast.
Ragnar Groot Koerkamp, Igor Martayan. SEA 2025 https://doi.org/10.4230/LIPIcs.SEA.2025.20
Requirements
This library requires AVX2 or NEON instruction sets, which, on x64, requires
either target-cpu=native or target-cpu=x86-64-v3.
See this README for details and this
blog for background.
The same restrictions apply when using seq-hash in a larger project.
RUSTFLAGS="-C target-cpu=native"
Usage example
Full documentation can be found on docs.rs.
use ;
use ;
let seq = b"ACGGCAGCGCATATGTAGT";
let packed_seq = from_ascii;
let k = 3;
// Default `NtHasher` is canonical.
let hasher = new;
// Consider a 'context' of a single kmer.
let hashes: = hasher.hash_kmers_simd.collect;
assert_eq!