53 static_assert(!std::same_as<alignment_result_type, empty_type>,
"Alignment result type was not configured.");
122 template <indexed_sequence_pair_range indexed_sequence_pairs_t,
typename callback_t>
123 requires std::invocable<callback_t, alignment_result_type>
139 this->optimal_coordinate,
147 template <indexed_sequence_pair_range indexed_sequence_pairs_t,
typename callback_t>
166 this->scoring_scheme.padding_symbol);
169 this->scoring_scheme.padding_symbol);
182 - (this->padding_offsets[index] * this->scoring_scheme.padding_match_score());
183 matrix_coordinate coordinate{
row_index_type{
size_t{this->optimal_coordinate.row[index]}},
188 std::move(coordinate),
215 template <
typename simd_sequence_t, std::ranges::forward_range sequence_collection_t, arithmetic padding_symbol_t>
216 requires std::ranges::output_range<simd_sequence_t, score_type>
245 requires std::ranges::forward_range<std::ranges::range_reference_t<alignment_matrix_t>>
246 && std::ranges::forward_range<std::ranges::range_reference_t<index_matrix_t>>
256 this->reset_optimum();
270 this->scoring_scheme_profile_column(
alphabet1),
280 auto alignment_column_it = alignment_column.begin();
309 template <std::ranges::input_range alignment_column_t,
360 template <std::ranges::input_range alignment_column_t,
376 auto alignment_column_it = alignment_column.begin();
379 auto cell = *alignment_column_it;
389 auto cell = *++alignment_column_it;
391 *alignment_column_it = this->track_cell(
Provides seqan3::aligned_allocator.
Provides helper type traits for the configuration and execution of the alignment algorithm.
T back_inserter(T... args)
Allocates uninitialized storage whose memory-alignment is specified by alignment.
Definition aligned_allocator.hpp:70
The alignment algorithm type to compute standard pairwise alignment using dynamic programming.
Definition pairwise_alignment_algorithm.hpp:44
pairwise_alignment_algorithm(alignment_configuration_t const &config)
Constructs and initialises the algorithm using the alignment configuration.
Definition pairwise_alignment_algorithm.hpp:73
void compute_matrix(sequence1_t &&sequence1, sequence2_t &&sequence2, alignment_matrix_t &&alignment_matrix, index_matrix_t &&index_matrix)
Compute the actual alignment.
Definition pairwise_alignment_algorithm.hpp:247
pairwise_alignment_algorithm & operator=(pairwise_alignment_algorithm const &)=default
Defaulted.
pairwise_alignment_algorithm(pairwise_alignment_algorithm &&)=default
Defaulted.
~pairwise_alignment_algorithm()=default
Defaulted.
pairwise_alignment_algorithm & operator=(pairwise_alignment_algorithm &&)=default
Defaulted.
pairwise_alignment_algorithm(pairwise_alignment_algorithm const &)=default
Defaulted.
pairwise_alignment_algorithm()=default
Defaulted.
typename traits_type::score_type score_type
The configured score type.
Definition pairwise_alignment_algorithm.hpp:49
::is_vectorised &&std::invocable< callback_t, alignment_result_type > auto operator()(indexed_sequence_pairs_t &&indexed_sequence_pairs, callback_t &&callback)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition pairwise_alignment_algorithm.hpp:149
void compute_column(alignment_column_t &&alignment_column, cell_index_column_t &&cell_index_column, alphabet1_t const &alphabet1, sequence2_t &&sequence2)
Initialise any column of the alignment matrix except the first one.
Definition pairwise_alignment_algorithm.hpp:365
void initialise_column(alignment_column_t &&alignment_column, cell_index_column_t &&cell_index_column, sequence2_t &&sequence2)
Initialise the first column of the alignment matrix.
Definition pairwise_alignment_algorithm.hpp:312
void convert_batch_of_sequences_to_simd_vector(simd_sequence_t &simd_sequence, sequence_collection_t &sequences, padding_symbol_t const &padding_symbol)
Converts a batch of sequences to a sequence of simd vectors.
Definition pairwise_alignment_algorithm.hpp:217
typename traits_type::alignment_result_type alignment_result_type
The configured alignment result type.
Definition pairwise_alignment_algorithm.hpp:51
void operator()(indexed_sequence_pairs_t &&indexed_sequence_pairs, callback_t &&callback)
Computes the pairwise sequence alignment for the given range over indexed sequence pairs.
Definition pairwise_alignment_algorithm.hpp:124
Provides seqan3::views::elements.
Provides seqan3::detail::empty_type.
@ diagonal
Trace comes from the diagonal entry.
A helper concept to check if a type is a sequence pair.
The basis for seqan3::alphabet, but requires only rank interface (not char).
The generic simd concept.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
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:412
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 is_vectorised
Flag to indicate vectorised mode.
Definition alignment/pairwise/detail/type_traits.hpp:112
std::conditional_t< is_vectorised, simd_type_t< original_score_type >, original_score_type > score_type
The score type for the alignment algorithm.
Definition alignment/pairwise/detail/type_traits.hpp:133
static constexpr size_t alignments_per_vector
The number of alignments that can be computed in one simd vector.
Definition alignment/pairwise/detail/type_traits.hpp:146
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
typename std::remove_reference_t< decltype(std::declval< configuration_t >().get_or(align_cfg::score_type< int32_t >{}))>::type original_score_type
The original score type selected by the user.
Definition alignment/pairwise/detail/type_traits.hpp:131
A strong type for designated initialisation of the column index of a matrix.
Definition matrix_coordinate.hpp:29
A strong type for designated initialisation of the row index of a matrix.
Definition matrix_coordinate.hpp:58
Provides seqan3::detail::to_simd view.
Provides traits to inspect some information of a type, for example its name.