Crate strobemers_rs

Source

Structs§

MinStrobes
Iterator for generating MinStrobes of order 2 or 3 from a DNA/RNA sequence.
RandStrobes
Iterator for generating RandStrobes of order 2 or 3 from a DNA/RNA sequence.

Enums§

StrobeError
Error variants for strobemer generation and related operations.

Constants§

ASCII_SIZE
COMPL_BASES
Complement base lookup table. Maps ASCII nucleotide characters to their complementary DNA base: A ↔ T, C ↔ G. Any other character defaults to N.
DEFAULT_PRIME_NUMBER
SEQ_NT4_TABLE
2-bit encoding table for nucleotide sequences. Maps ASCII characters to: A=0, C=1, G=2, T/U=3, any other character=4 (invalid).

Traits§

KmerHasher

Functions§

complement
Returns the complementary DNA/RNA base for the given ASCII byte.
compute_hashes
Generates k-mer hash values from the given sequence seq, using exactly one hash per k-mer.
compute_min_hashes
For a sliding window of width w over the given slice of hash values, computes the index and value of the minimum hash in each window. Runs in O(N) time by maintaining a monotonic (increasing) queue of candidates.
nt4
Encodes a nucleotide ASCII byte into its 2-bit code (0‒3), or 4 for invalid.
roundup64
Rounds up the given value x to the next power of two.

Type Aliases§

Result
Common Result type for all library operations, using StrobeError for errors.