diff --git a/CHANGELOG.md b/CHANGELOG.md index fceeaff7e2..dd3ad463d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,6 +120,8 @@ Note that 3.1.0 will be the first API stable release and interfaces in this rele * When invoking the alignment algorithm with a user defined thread count using the `seqan3::align_cfg::parallel` configuration element, `std::thread::hardware_concurrency()` many threads were always spawned. This is now fixed and only the specified number of threads will be spawned ([\#1854](https://github.com/seqan/seqan3/pull/1854)). +* Using an unsigned `score_type` is prevented with a static assert, since gaps and mismatches have negative scores and + thus need a signed score type ([\#1891](https://github.com/seqan/seqan3/pull/1891)). ### Argument Parser diff --git a/include/seqan3/alignment/configuration/align_config_result.hpp b/include/seqan3/alignment/configuration/align_config_result.hpp index 9e7a11ec61..2fbdfa43a8 100644 --- a/include/seqan3/alignment/configuration/align_config_result.hpp +++ b/include/seqan3/alignment/configuration/align_config_result.hpp @@ -140,7 +140,10 @@ class result : public pipeable_config_element, + "The alignment algorithm cannot be computed with an unsigned type as the score type. If you " + "explicitly want an unsigned type as the score type, please submit a feature request explaining the " + "your specific use case on our github page: github.com/seqan/seqan3.git."); /*!\name Constructors, destructor and assignment * \{ */ diff --git a/test/snippet/alignment/configuration/align_cfg_result_example.cpp b/test/snippet/alignment/configuration/align_cfg_result_example.cpp index b7a4688211..ffe113067e 100644 --- a/test/snippet/alignment/configuration/align_cfg_result_example.cpp +++ b/test/snippet/alignment/configuration/align_cfg_result_example.cpp @@ -19,7 +19,7 @@ int main() // You can also change the score type: // Compute only the score given a specific score_type. - seqan3::align_cfg::result cfg_score_uint16{seqan3::with_score, seqan3::using_score_type}; + seqan3::align_cfg::result cfg_score_uint16{seqan3::with_score, seqan3::using_score_type}; // Compute the score given a specific score_type and the back coordinate. seqan3::align_cfg::result cfg_end_double{seqan3::with_back_coordinate, seqan3::using_score_type};