henhaobio
Sign in

Peer Community JournalBioinformaticsPeer-reviewed journal article

General encoding of canonical k-mers

Roland WittleriD

PDFDOIPreprint

Abstract

To index or compare sequences efficiently, often k-mers, i.e., substrings of fixed length k, are used. For efficient indexing or storage, k-mers are often encoded as integers, e.g., applying some bijective mapping between all possible{sigma} k k-mers and the interval [0,{sigma} k -1], where{sigma} is the alphabet size. In many applications, e.g., when the reading direction of a DNA-sequence is ambiguous, canonical k-mers are considered, i.e., the lexicographically smaller of a given k-mer and its reverse (or reverse complement) is chosen as a representative. In naive encodings, canonical k-mers are not evenly distributed within the interval [0,{sigma} k -1]. We present a minimal encoding of canonical k-mers on alphabets of arbitrary size, i.e., a mapping to the interval [0,{sigma} k/2-1]. The approach is introduced for canonicalization under reversal and extended to canonicalization under reverse complementation. We further present a space and time efficient bit-based implementation for the DNA alphabet.

Citations
7
FWCI
0.62
Field percentile
top 31%

Reproducibility ledger

Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.

Sign in to file a reproducibility report.

Similarity Map
SelectedSame fieldCross-field
THISMarçais '24Pibiri '22Levallois '26Pellow '23DeBlasio '19Rahman '20
65% semantic matchBioinformatics
Guillaume Marçais, C.S. Elder, Carl Kingsford·Bioinformatics·Oct 17, 2024· 6 citations