Expand description
CD-HIT-compatible k-mer indexing (“CD-HIT-NG”) in modern Rust (edition 2024).
New in 0.2:
- O(1) rolling reverse-complement for canonicalization
- Optional postings compression (delta+varint)
- Optional PLR sampling for sub-log locate
- Fast ASCII→2-bit mapping (LUT) + optional AVX2 path behind
simd_x86 - Property tests via
proptest
Public API remains stable. The Range<u64> returned by KmerIndex::locate
is opaque and must be passed unmodified to KmerIndex::postings.
See README for on-disk format v2.
Re-exports§
pub use encode::canonical;pub use encode::encode_kmer;pub use encode::revcomp;
Modules§
- encode
- K-mer encoding: 2-bit mapping, rolling reverse complement, canonicalization.
Structs§
- Build
Config - Build-time configuration.
- Kmer
Index - K-mer index: query-time API for both owned and mmap-backed layouts.
- Kmer
Index Writer - Writer that serializes an in-memory
KmerIndexto a.kdxfile. - Posting
- Posting entry:
(read_id, pos). - Range
- A (half-open) range bounded inclusively below and exclusively above
(
start..end). - Reader
Options
Enums§
- Compression
- Locate
Strategy - Locate acceleration strategy.
Functions§
- build_
kmer_ index_ async - build_
kmer_ index_ sync - Build a k-mer index synchronously using rayon.