diff --git a/test/performance/alignment/global_affine_alignment_benchmark.cpp b/test/performance/alignment/global_affine_alignment_benchmark.cpp index a0530f07eb5..34df896a14b 100644 --- a/test/performance/alignment/global_affine_alignment_benchmark.cpp +++ b/test/performance/alignment/global_affine_alignment_benchmark.cpp @@ -26,11 +26,12 @@ #include #endif +constexpr auto nt_score_scheme = seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, + seqan3::mismatch_score{-5}}; constexpr auto affine_cfg = seqan3::align_cfg::method_global{} | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}} | - seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}; + seqan3::align_cfg::scoring_scheme{nt_score_scheme}; // ============================================================================ // affine; score; dna4; single diff --git a/test/performance/alignment/global_affine_alignment_parallel_benchmark.cpp b/test/performance/alignment/global_affine_alignment_parallel_benchmark.cpp index 935352ff97e..9840fd45d75 100644 --- a/test/performance/alignment/global_affine_alignment_parallel_benchmark.cpp +++ b/test/performance/alignment/global_affine_alignment_parallel_benchmark.cpp @@ -31,11 +31,12 @@ #include #endif +constexpr auto nt_score_scheme = seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, + seqan3::mismatch_score{-5}}; constexpr auto affine_cfg = seqan3::align_cfg::method_global{} | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}} | - seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}; + seqan3::align_cfg::scoring_scheme{nt_score_scheme}; // Aliases to beautify the benchmark output using score = seqan3::detail::with_score_type; diff --git a/test/performance/alignment/global_affine_alignment_simd_benchmark.cpp b/test/performance/alignment/global_affine_alignment_simd_benchmark.cpp index ca62cd703ab..2404580c824 100644 --- a/test/performance/alignment/global_affine_alignment_simd_benchmark.cpp +++ b/test/performance/alignment/global_affine_alignment_simd_benchmark.cpp @@ -26,11 +26,12 @@ #include #endif +constexpr auto nt_score_scheme = seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, + seqan3::mismatch_score{-5}}; constexpr auto affine_cfg = seqan3::align_cfg::method_global{} | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}} | - seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}; + seqan3::align_cfg::scoring_scheme{nt_score_scheme}; // Globally defined constants to ensure same test data. inline constexpr size_t sequence_length = 150; diff --git a/test/performance/io/format_sam_benchmark.cpp b/test/performance/io/format_sam_benchmark.cpp index f0f69a5a984..438a7ac3afb 100644 --- a/test/performance/io/format_sam_benchmark.cpp +++ b/test/performance/io/format_sam_benchmark.cpp @@ -38,9 +38,10 @@ static std::string create_sam_file_string(size_t const n_queries) auto reference = seqan3::test::generate_sequence(reference_size, length_variance, seed); // align + constexpr auto nt_score_scheme = seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, + seqan3::mismatch_score{-2}}; auto config = seqan3::align_cfg::method_global{} | - seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-2}}} | + seqan3::align_cfg::scoring_scheme{nt_score_scheme} | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}} | seqan3::align_cfg::aligned_ends{seqan3::free_ends_first} | seqan3::align_cfg::result{seqan3::with_alignment}; diff --git a/test/unit/alignment/pairwise/fixture/global_affine_banded.hpp b/test/unit/alignment/pairwise/fixture/global_affine_banded.hpp index d0f414aea3f..2a59fd92cf1 100644 --- a/test/unit/alignment/pairwise/fixture/global_affine_banded.hpp +++ b/test/unit/alignment/pairwise/fixture/global_affine_banded.hpp @@ -30,6 +30,8 @@ namespace seqan3::test::alignment::fixture::global::affine::banded inline constexpr auto align_config = seqan3::align_cfg::method_global{} | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}}; +inline constexpr auto nt_score_scheme = seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, + seqan3::mismatch_score{-5}}; static auto dna4_01 = []() { // AACCGGTTAACCGGTT @@ -50,8 +52,7 @@ static auto dna4_01 = []() "ACGTACGTA"_dna4, align_config | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{-3}, seqan3::align_cfg::upper_diagonal{8}} | - seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::align_cfg::scoring_scheme{nt_score_scheme}, -18, "A---ACCGGTTAACCGGTT", "ACGTAC----------GTA", diff --git a/test/unit/alignment/pairwise/fixture/local_affine_banded.hpp b/test/unit/alignment/pairwise/fixture/local_affine_banded.hpp index 879cb85b433..e1a0b6d7005 100644 --- a/test/unit/alignment/pairwise/fixture/local_affine_banded.hpp +++ b/test/unit/alignment/pairwise/fixture/local_affine_banded.hpp @@ -47,7 +47,7 @@ static auto dna4_01 = []() "AACCGGTTTAACCGGTT"_dna4, "ACGTCTACGTA"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}} + seqan3::mismatch_score{-5}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{-2}, seqan3::align_cfg::upper_diagonal{5}}, 11, @@ -101,7 +101,7 @@ static auto dna4_02 = []() "ACGTCTACGTA"_dna4, "AACCGGTTTAACCGGTT"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}} + seqan3::mismatch_score{-5}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{-2}, seqan3::align_cfg::upper_diagonal{5}}, 8, @@ -169,7 +169,7 @@ static auto dna4_03 = []() seqan3::align_cfg::method_local | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{0}, seqan3::gap_open_score{0}}} | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{2}, - seqan3::mismatch_score{-1}}} + seqan3::mismatch_score{-1}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{0}, seqan3::align_cfg::upper_diagonal{0}}, 8, @@ -223,7 +223,7 @@ static auto dna4_04 = []() "AAAAAA"_dna4, "CCCCCC"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}} + seqan3::mismatch_score{-5}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{-2}, seqan3::align_cfg::upper_diagonal{2}}, 0, @@ -267,7 +267,7 @@ static auto dna4_05 = []() "AAAAAATCCCCCC"_dna4, "CCCCCCTAAAAAA"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}} + seqan3::mismatch_score{-5}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{-100}, seqan3::align_cfg::upper_diagonal{0}}, 24, @@ -326,7 +326,7 @@ static auto dna4_06 = []() "AAAAAATCCCCCC"_dna4, "CCCCCCTAAAAAA"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}} + seqan3::mismatch_score{-5}}} | seqan3::align_cfg::band_fixed_size{seqan3::align_cfg::lower_diagonal{0}, seqan3::align_cfg::upper_diagonal{100}}, 24, diff --git a/test/unit/alignment/pairwise/fixture/local_affine_unbanded.hpp b/test/unit/alignment/pairwise/fixture/local_affine_unbanded.hpp index f3762109d19..4830f4b1958 100644 --- a/test/unit/alignment/pairwise/fixture/local_affine_unbanded.hpp +++ b/test/unit/alignment/pairwise/fixture/local_affine_unbanded.hpp @@ -46,7 +46,7 @@ static auto dna4_01 = []() "AACCGGTTTAACCGGTT"_dna4, "ACGTCTACGTA"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 11, "GTTTA", "GTCTA", @@ -98,7 +98,7 @@ static auto dna4_02 = []() "ACGTCTACGTA"_dna4, "AACCGGTTTAACCGGTT"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 11, "GTCTA", "GTTTA", @@ -164,7 +164,7 @@ static auto dna4_03 = []() seqan3::align_cfg::method_local | seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-1}}} | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{2}, - seqan3::mismatch_score{-1}}}, + seqan3::mismatch_score{-1}}}, 9, "ATAAGCGT", "AT-AGAGT", @@ -218,7 +218,7 @@ static auto dna4_04 = []() "AAAAAA"_dna4, "CCCCCC"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 0, "", "", @@ -260,7 +260,7 @@ static auto dna4_05 = []() "AAAAAATCCCCCC"_dna4, "CCCCCCTAAAAAA"_dna4, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 24, "AAAAAA", "AAAAAA", @@ -316,7 +316,7 @@ static auto rna5_01 = []() "AAAAAAUUUUNNUUUUCCCCCC"_rna5, "AAAAAACCCCCC"_rna5, align_config | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 28, "AAAAAAUUUUNNUUUUCCCCCC", "AAAAAA----------CCCCCC", diff --git a/test/unit/alignment/pairwise/fixture/semi_global_affine_banded.hpp b/test/unit/alignment/pairwise/fixture/semi_global_affine_banded.hpp index 2e26d3143b7..ce026961175 100644 --- a/test/unit/alignment/pairwise/fixture/semi_global_affine_banded.hpp +++ b/test/unit/alignment/pairwise/fixture/semi_global_affine_banded.hpp @@ -44,7 +44,7 @@ static auto dna4_01_semi_first = []() "ACGTAAAACGT"_dna4, align_config_semi_seq1 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 10, "ACGT---ATGT", "ACGTAAAACGT", @@ -96,7 +96,7 @@ static auto dna4_01_semi_first = []() // "TTTTTACGTATGTCCCCC"_dna4, // align_config_semi_seq1 // | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, -// seqan3::mismatch_score{-5}}}, +// seqan3::mismatch_score{-5}}}, // -13, // "-----ACGTA--------AAACGT", // "TTTTTACGTATGTCCCCC------", @@ -113,7 +113,7 @@ static auto dna4_03_semi_second = []() "ACGTAAAACGT"_dna4, align_config_semi_seq2 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, -19, "TTTTTACGTATGTCCCCC", "GTAAAACGT---------", @@ -162,7 +162,7 @@ static auto dna4_04_semi_second = []() "TTTTTACGTATGTCCCCC"_dna4, align_config_semi_seq2 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, -5, "ACGTAAAACGT", "------TACGT", diff --git a/test/unit/alignment/pairwise/fixture/semi_global_affine_unbanded.hpp b/test/unit/alignment/pairwise/fixture/semi_global_affine_unbanded.hpp index 2779e2f9216..4fccff8aa6b 100644 --- a/test/unit/alignment/pairwise/fixture/semi_global_affine_unbanded.hpp +++ b/test/unit/alignment/pairwise/fixture/semi_global_affine_unbanded.hpp @@ -44,7 +44,7 @@ static auto dna4_01_semi_first = []() "ACGTAAAACGT"_dna4, align_config_semi_seq1 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 10, "ACGT---ATGT", "ACGTAAAACGT", @@ -96,7 +96,7 @@ static auto dna4_02_semi_first = []() "TTTTTACGTATGTCCCCC"_dna4, align_config_semi_seq1 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, -13, "-----ACGTA--------", "TTTTTACGTATGTCCCCC", @@ -162,7 +162,7 @@ static auto dna4_03_semi_second = []() "ACGTAAAACGT"_dna4, align_config_semi_seq2 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, -13, "TTTTTACGTATGTCCCCC", "-----ACGTA--------", @@ -214,7 +214,7 @@ static auto dna4_04_semi_second = []() "TTTTTACGTATGTCCCCC"_dna4, align_config_semi_seq2 | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}, + seqan3::mismatch_score{-5}}}, 10, "ACGTAAAACGT", "ACGT---ATGT", diff --git a/test/unit/alignment/pairwise/semi_global_affine_banded_test.cpp b/test/unit/alignment/pairwise/semi_global_affine_banded_test.cpp index 268df3b33d1..da49bb2503d 100644 --- a/test/unit/alignment/pairwise/semi_global_affine_banded_test.cpp +++ b/test/unit/alignment/pairwise/semi_global_affine_banded_test.cpp @@ -36,7 +36,7 @@ struct pairwise_semiglobal_affine_banded : public ::testing::Test seqan3::align_cfg::gap{seqan3::gap_scheme{seqan3::gap_score{-1}, seqan3::gap_open_score{-10}}} | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, - seqan3::mismatch_score{-5}}}; + seqan3::mismatch_score{-5}}}; } };