31template <
typename alignment_configuration_t>
32 requires seqan3::detail::is_type_specialisation_of_v<alignment_configuration_t, configuration>
41 static_assert(!std::same_as<result_type, empty_type>,
"The alignment result type was not configured.");
84 template <
typename sequence_pair_t,
87 typename matrix_coordinate_t,
88 typename alignment_matrix_t,
90 requires std::invocable<callback_t, result_type>
92 [[maybe_unused]] index_t &&
id,
93 [[maybe_unused]] score_t score,
94 [[maybe_unused]] matrix_coordinate_t end_positions,
95 [[maybe_unused]] alignment_matrix_t
const & alignment_matrix,
96 callback_t && callback)
104 result.data.sequence1_id =
id;
107 result.data.sequence2_id =
id;
111 static_assert(!std::same_as<
decltype(result.data.score), invalid_t>,
112 "Invalid configuration. Expected result with score!");
113 result.data.score = std::move(score);
118 static_assert(!std::same_as<
decltype(result.data.end_positions), invalid_t>,
119 "Invalid configuration. Expected result with end positions!");
121 result.data.end_positions.first = end_positions.col;
122 result.data.end_positions.second = end_positions.row;
128 auto aligned_sequence_result = builder(alignment_matrix.trace_path(end_positions));
132 result.data.begin_positions.first = aligned_sequence_result.first_sequence_slice_positions.first;
133 result.data.begin_positions.second = aligned_sequence_result.second_sequence_slice_positions.first;
137 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:114
Implements the alignment result builder.
Definition policy_alignment_result_builder.hpp:34
typename traits_type::alignment_result_type result_type
The alignment result type.
Definition policy_alignment_result_builder.hpp:39
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:56
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:91
Provides seqan3::configuration and utility functions.
Provides seqan3::detail::empty_type.
A helper concept to check if a type is a sequence pair.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
A traits type for the alignment algorithm that exposes static information stored within the alignment...
Definition alignment/pairwise/detail/type_traits.hpp:80
static constexpr bool requires_trace_information
Flag indicating whether the trace matrix needs to be computed.
Definition alignment/pairwise/detail/type_traits.hpp:171
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:165
static constexpr bool compute_begin_positions
Flag indicating whether the begin positions shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:158
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:163
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:137
static constexpr bool compute_end_positions
Flag indicating whether the end positions shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:156
static constexpr bool compute_score
Flag indicating whether the score shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:154
Provides type traits for working with templates.