34template <
typename alignment_configuration_t>
35 requires is_type_specialisation_of_v<alignment_configuration_t, configuration>
44 static_assert(!std::same_as<result_type, empty_type>,
"The alignment result type was not configured.");
87 template <
typename sequence_pair_t,
90 typename matrix_coordinate_t,
91 typename alignment_matrix_t,
93 requires std::invocable<callback_t, result_type>
95 [[maybe_unused]] index_t &&
id,
96 [[maybe_unused]] score_t score,
97 [[maybe_unused]] matrix_coordinate_t end_positions,
98 [[maybe_unused]] alignment_matrix_t
const & alignment_matrix,
99 callback_t && callback)
107 result.data.sequence1_id =
id;
110 result.data.sequence2_id =
id;
114 static_assert(!std::same_as<
decltype(result.data.score), invalid_t>,
115 "Invalid configuration. Expected result with score!");
116 result.data.score = std::move(score);
121 static_assert(!std::same_as<
decltype(result.data.end_positions), invalid_t>,
122 "Invalid configuration. Expected result with end positions!");
124 result.data.end_positions.first = end_positions.col;
125 result.data.end_positions.second = end_positions.row;
131 auto aligned_sequence_result = builder(alignment_matrix.trace_path(end_positions));
135 result.data.begin_positions.first = aligned_sequence_result.first_sequence_slice_positions.first;
136 result.data.begin_positions.second = aligned_sequence_result.second_sequence_slice_positions.first;
140 callback(std::move(result));
Provides seqan3::detail::aligned_sequence_builder.
Provides helper type traits for the configuration and execution of the alignment algorithm.
Builds the alignment for a given pair of sequences and the respective trace.
Definition: aligned_sequence_builder.hpp:117
Implements the alignment result builder.
Definition: policy_alignment_result_builder.hpp:37
typename traits_type::alignment_result_type result_type
The alignment result type.
Definition: policy_alignment_result_builder.hpp:42
policy_alignment_result_builder()=default
Defaulted.
policy_alignment_result_builder(policy_alignment_result_builder const &)=default
Defaulted.
policy_alignment_result_builder(policy_alignment_result_builder &&)=default
Defaulted.
policy_alignment_result_builder & operator=(policy_alignment_result_builder &&)=default
Defaulted.
policy_alignment_result_builder(alignment_configuration_t const &config)
Construction and initialisation using the alignment configuration.
Definition: policy_alignment_result_builder.hpp:59
policy_alignment_result_builder & operator=(policy_alignment_result_builder const &)=default
Defaulted.
~policy_alignment_result_builder()=default
Defaulted.
void make_result_and_invoke(sequence_pair_t &&sequence_pair, index_t &&id, score_t score, matrix_coordinate_t end_positions, alignment_matrix_t const &alignment_matrix, callback_t &&callback)
Builds the seqan3::alignment_result based on the given alignment result type and then invokes the giv...
Definition: policy_alignment_result_builder.hpp:94
Provides seqan3::configuration and utility functions.
Provides seqan3::detail::empty_type.
@ id
The identifier, usually a string.
A helper concept to check if a type is a sequence pair.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: configuration.hpp:415
A traits type for the alignment algorithm that exposes static information stored within the alignment...
Definition: alignment/pairwise/detail/type_traits.hpp:83
static constexpr bool requires_trace_information
Flag indicating whether the trace matrix needs to be computed.
Definition: alignment/pairwise/detail/type_traits.hpp:175
static constexpr bool output_sequence2_id
Flag indicating whether the id of the second sequence shall be returned.
Definition: alignment/pairwise/detail/type_traits.hpp:169
static constexpr bool compute_begin_positions
Flag indicating whether the begin positions shall be computed.
Definition: alignment/pairwise/detail/type_traits.hpp:162
static constexpr bool output_sequence1_id
Flag indicating whether the id of the first sequence shall be returned.
Definition: alignment/pairwise/detail/type_traits.hpp:167
decltype(determine_alignment_result_type()) alignment_result_type
The alignment result type if present. Otherwise seqan3::detail::empty_type.
Definition: alignment/pairwise/detail/type_traits.hpp:140
static constexpr bool compute_end_positions
Flag indicating whether the end positions shall be computed.
Definition: alignment/pairwise/detail/type_traits.hpp:160
static constexpr bool compute_score
Flag indicating whether the score shall be computed.
Definition: alignment/pairwise/detail/type_traits.hpp:158
Provides type traits for working with templates.