From 9200afaffe44128eacbe5f78934f72fd6b6f3439 Mon Sep 17 00:00:00 2001 From: marehr Date: Fri, 21 Feb 2020 10:16:35 +0100 Subject: [PATCH] [TEST] Fixes #1598: pairwise alignment does not work for some ranges --- .../alignment/pairwise/align_pairwise_test.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/unit/alignment/pairwise/align_pairwise_test.cpp b/test/unit/alignment/pairwise/align_pairwise_test.cpp index 328e1128ad..5b14c6479b 100644 --- a/test/unit/alignment/pairwise/align_pairwise_test.cpp +++ b/test/unit/alignment/pairwise/align_pairwise_test.cpp @@ -193,3 +193,20 @@ TYPED_TEST(align_pairwise_test, collection_with_double_score_type) } } } + +TYPED_TEST(align_pairwise_test, bug_1598) +{ + // https://github.com/seqan/seqan3/issues/1598 + using seqan3::operator""_dna4; + auto s1 = "TTACGTACGGACTAGCTACAACATTACGGACTAC"_dna4; + auto g = "GGACGACATGACGTACGACTTTACGTACGACTAGC"_dna4; + auto s2 = g | std::views::drop(2); + + // Configure the alignment kernel. + seqan3::configuration cfg = seqan3::align_cfg::mode{seqan3::global_alignment} | + seqan3::align_cfg::scoring{seqan3::nucleotide_scoring_scheme{}} | + seqan3::align_cfg::result{seqan3::with_alignment}; + + // Invoke the pairwise alignment which returns a lazy range over alignment results. + auto results = seqan3::align_pairwise(std::tie(s1, s2), cfg); +}