[Search] Shapes are the wrong way around

Open
#2,832 8 comments 0 reactions 1 assignee View on GitHub

@eseiler is already working on this.

Since Oct 20, 2022.

Assessment

This issue has not been assessed yet.

Description

question

I think the kmer hash view does not work with views, which have shapes in the form 1101 or 1011.

#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/search/views/kmer_hash.hpp>

int main()
{
    using namespace seqan3::literals;

    std::vector<seqan3::dna4> const text{"ACGTC"_dna4};
    auto const shape1011 = seqan3::shape{seqan3::bin_literal{0b1011}};
    auto const shape1101 = seqan3::shape{seqan3::bin_literal{0b1101}};

    seqan3::debug_stream << "shape1011\nExpected: [11,29]\nActual  : "
                         << (text | seqan3::views::kmer_hash(shape1011)) << "\n\n";

    seqan3::debug_stream << "shape1101\nExpected: [7,25]\nActual  : "
                         << (text | seqan3::views::kmer_hash(shape1101)) << '\n';
}
shape1011
Expected: [11,29]
Actual  : [7,25]

shape1101
Expected: [7,25]
Actual  : [11,29]

My assumption is that the shift does not work correctly with these shapes, the only shapes we tested so far are shapes of the sort 1(any number of zeros)1.

Dominant language
C++
Stars
463
Forks
90
Avg merge
1h 11m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from seqan/seqan3

All issues in seqan/seqan3

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.