diff --git a/include/seqan3/search/views/kmer_hash.hpp b/include/seqan3/search/views/kmer_hash.hpp index cf20dc0080f..f47bcc06482 100644 --- a/include/seqan3/search/views/kmer_hash.hpp +++ b/include/seqan3/search/views/kmer_hash.hpp @@ -774,6 +774,9 @@ namespace seqan3::views * * See the \link views views submodule documentation \endlink for detailed descriptions of the view properties. * + * \attention The Shape is defined is from right to left. The mask 0b1101 applied to ACGT will return + * the sequence AGT. + * * ### Example * * \include test/snippet/search/views/kmer_hash.cpp diff --git a/test/snippet/search/views/kmer_hash.cpp b/test/snippet/search/views/kmer_hash.cpp index cfa7c8369a1..d08a795ccbe 100644 --- a/test/snippet/search/views/kmer_hash.cpp +++ b/test/snippet/search/views/kmer_hash.cpp @@ -14,4 +14,13 @@ int main() seqan3::debug_stream << (text | seqan3::views::kmer_hash(seqan3::ungapped{3})) << '\n'; // [6,27,44,50,9] seqan3::debug_stream << (text | seqan3::views::kmer_hash(0b101_shape)) << '\n'; // [2,7,8,14,1] + + // Note: the Shape is defined is from right to left. The mask 0b1101 applied to ACGT will give + // the same result as mask 0b111 applied to AGT. + { + auto text1 = "ACGT"_dna4; + auto text2 = "AGT"_dna4; + seqan3::debug_stream << (text1 | seqan3::views::kmer_hash(0b1101_shape)) << '\n'; // [11] + seqan3::debug_stream << (text2 | seqan3::views::kmer_hash(0b111_shape)) << '\n'; // [11] + } }