Skip to content

Add longer k-mers with VarLenKmer and derive macro for KmerSize - #49

Draft
evolp wants to merge 9 commits into
masterfrom
dev
Draft

Add longer k-mers with VarLenKmer and derive macro for KmerSize#49
evolp wants to merge 9 commits into
masterfrom
dev

Conversation

@evolp

@evolp evolp commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Longer k-mers

  • new struct VarLenKmer, with all methods required for k-mer functionality are implemented
    • underlying stucture is similar to a DnaString
    • contains an array of generic length, filles with a generic integer
    • this way, k-mers can be implemented as a type with as little unused bits as possible
// this will contain a `[u32, 5]` and know that it should contain 80 bases
type Kmer80 = VarLenKmer<u32, 5, K80>;
  • new derive macro for the KmerSize trait, eliminating having to, very repetitively, implement the Kmersize::K() method for each possible value for k.

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.

1 participant