Skip to main content

Crate kira_cdh_compat_kmer_indexer

Crate kira_cdh_compat_kmer_indexer 

Source
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§

BuildConfig
Build-time configuration.
KmerIndex
K-mer index: query-time API for both owned and mmap-backed layouts.
KmerIndexWriter
Writer that serializes an in-memory KmerIndex to a .kdx file.
Posting
Posting entry: (read_id, pos).
Range
A (half-open) range bounded inclusively below and exclusively above (start..end).
ReaderOptions

Enums§

Compression
LocateStrategy
Locate acceleration strategy.

Functions§

build_kmer_index_async
build_kmer_index_sync
Build a k-mer index synchronously using rayon.