Skip to content

Conversation

@donovan-h-parks
Copy link

Fixes bug with reverse complement of sequence not being normalized during identification of canonical kmers. This impacts both fixed and scaled sketches, and results in incorrect containment and Jaccard values.

let rc = seq.reverse_complement();
for (_, kmer, is_rev_complement) in
seq.normalize(false).canonical_kmers(self.kmer_length, &rc)
let norm_seq = seq.normalize(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in practice this trait is not well thought. The process function should take a &Sequence since we do not need anything from the &SequenceRecord and normalizing it here implicitly would allocate twice for normalized sequence if you need that elsewhere. In that case you would still need to call normalize before calling process though.

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