Skip to content

Honor k-mer alphabet traits in lookup and streaming - #101

Closed
adamant-pwn wants to merge 11 commits into
jermp:masterfrom
ratschlab:upstream/protein-lookup
Closed

adamant-pwn wants to merge 11 commits into
jermp:masterfrom
ratschlab:upstream/protein-lookup

Conversation

@adamant-pwn

Copy link
Copy Markdown
Contributor

Lookup and streaming do not consistently honor kmer_t::has_reverse_complement and bits_per_char. Streaming uses two-bit offsets and rolls a reverse-complement state even when that operation is defined as the identity.

Use the declared traits for rolling state, iterator offsets, and minimizer tie-breaking. For types without a reverse complement, check only the forward representation and report forward orientation. Share tie-breaking between direct lookup and the incremental iterator, and update the generic checker to expect the same orientation.

Our use case is protein queries through the existing aa_uint_kmer_t: forward-only lookup of MKW currently fails after indexing MKWVTFISRLDPQEAHNYCG with k=3 and m=1.

@jermp jermp mentioned this pull request Nov 27, 2026
@jermp

jermp commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Closing this in favour of #109.

@jermp jermp closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants