SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
|
Implements the alignment recursion function for the alignment algorithm using affine gap costs with trace information. More...
#include <seqan3/alignment/pairwise/detail/policy_affine_gap_with_trace_recursion.hpp>
Protected Types | |
using | affine_cell_type = affine_cell_proxy< std::pair< affine_score_tuple_t, affine_trace_tuple_t > > |
The affine cell type returned by the functions. | |
using | affine_score_tuple_t = std::tuple< score_type, score_type, score_type > |
The internal tuple storing the scores of an affine cell. | |
using | affine_trace_tuple_t = std::tuple< trace_type, trace_type, trace_type > |
The internal tuple storing the trace directions of an affine cell. | |
using | base_t = policy_affine_gap_recursion< alignment_configuration_t > |
The type of the base policy. | |
using | score_type = typename traits_type::score_type |
The configured score type. | |
using | trace_type = typename traits_type::trace_type |
The trace type to use. | |
using | traits_type = alignment_configuration_traits< alignment_configuration_t > |
The configuration traits type. | |
![]() | |
using | affine_cell_type = affine_cell_proxy< affine_score_tuple_t > |
The affine cell type returned by the functions. | |
using | affine_score_tuple_t = std::tuple< score_type, score_type, score_type > |
The internal tuple storing the scores of an affine cell. | |
using | original_score_type = typename traits_type::original_score_type |
The configured original score type. | |
using | score_type = typename traits_type::score_type |
The configured score type. | |
using | traits_type = alignment_configuration_traits< alignment_configuration_t > |
The configuration traits type. | |
Protected Member Functions | |
template<typename affine_cell_t > | |
affine_cell_type | compute_inner_cell (score_type diagonal_score, affine_cell_t previous_cell, score_type const sequence_score) const noexcept |
Computes an inner cell of the alignment matrix. | |
template<typename affine_cell_t > | |
affine_cell_type | initialise_first_column_cell (affine_cell_t previous_cell) const noexcept |
Initialises a cell of the first alignment matrix column. | |
template<typename affine_cell_t > | |
affine_cell_type | initialise_first_row_cell (affine_cell_t previous_cell) const noexcept |
Initialises the first cell of a alignment matrix column. | |
affine_cell_type | initialise_origin_cell () const noexcept |
Initialises the first cell of the alignment matrix in the top left corner of the matrix. | |
Constructors, destructor and assignment | |
policy_affine_gap_with_trace_recursion ()=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion (policy_affine_gap_with_trace_recursion const &)=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion (policy_affine_gap_with_trace_recursion &&)=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion & | operator= (policy_affine_gap_with_trace_recursion const &)=default |
Defaulted. | |
policy_affine_gap_with_trace_recursion & | operator= (policy_affine_gap_with_trace_recursion &&)=default |
Defaulted. | |
~policy_affine_gap_with_trace_recursion ()=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion (alignment_configuration_t const &config) | |
Defaulted. | |
![]() | |
template<typename affine_cell_t > | |
affine_cell_type | compute_inner_cell (score_type diagonal_score, affine_cell_t previous_cell, score_type const sequence_score) const noexcept |
Computes an inner cell of the alignment matrix. | |
template<typename affine_cell_t > | |
affine_cell_type | initialise_first_column_cell (affine_cell_t previous_cell) const noexcept |
Initialises a cell of the first alignment matrix column. | |
template<typename affine_cell_t > | |
affine_cell_type | initialise_first_row_cell (affine_cell_t previous_cell) const noexcept |
Initialises the first cell of a alignment matrix column. | |
affine_cell_type | initialise_origin_cell () const noexcept |
Initialises the first cell of the alignment matrix in the top left corner of the matrix. | |
score_type | lowest_viable_score () const noexcept |
Returns the lowest viable score. | |
template<typename score_t > requires arithmetic<std::remove_cvref_t<score_t>> | |
constexpr auto | maybe_convert_to_simd (score_t &&score) const noexcept |
Converts the given score type to a simd vector if the alignment is executed in vectorised mode. | |
policy_affine_gap_recursion ()=default | |
Defaulted. | |
policy_affine_gap_recursion (policy_affine_gap_recursion const &)=default | |
Defaulted. | |
policy_affine_gap_recursion (policy_affine_gap_recursion &&)=default | |
Defaulted. | |
policy_affine_gap_recursion & | operator= (policy_affine_gap_recursion const &)=default |
Defaulted. | |
policy_affine_gap_recursion & | operator= (policy_affine_gap_recursion &&)=default |
Defaulted. | |
~policy_affine_gap_recursion ()=default | |
Defaulted. | |
policy_affine_gap_recursion (alignment_configuration_t const &config) | |
Construction and initialisation using the alignment configuration. | |
Protected Attributes | |
bool | first_column_is_free |
Initialisation state of the first column of the alignment. | |
bool | first_row_is_free |
Initialisation state of the first row of the alignment. | |
score_type | gap_extension_score |
The score for a gap extension. | |
score_type | gap_open_score |
The score for a gap opening including the gap extension. | |
![]() | |
bool | first_column_is_free {} |
Initialisation state of the first column of the alignment. | |
bool | first_row_is_free {} |
Initialisation state of the first row of the alignment. | |
score_type | gap_extension_score {} |
The score for a gap extension. | |
score_type | gap_open_score {} |
The score for a gap opening including the gap extension. | |
Implements the alignment recursion function for the alignment algorithm using affine gap costs with trace information.
alignment_configuration_t | The type of the alignment configuration. |
Implements the functions to initialise and compute the alignment matrix using the recursion formula for affine gaps. Other policies can inherit from this policy and overload the recursion functions, e.g. to change the initialisation of the alignment matrix.
|
no-apiinlineexplicitprotected |
Defaulted.
|
no-apiinlineprotectednoexcept |
Computes an inner cell of the alignment matrix.
affine_cell_t | The type of the affine cell; must be an instance of seqan3::detail::affine_cell_proxy. |
[in] | diagonal_score | The previous diagonal score, which corresponds to |
[in] | previous_cell | The predecessor cell corresponding to the values |
[in] | sequence_score | The score obtained from the scoring scheme for the current cell ( |
Computes the current cell according to following recursion formula:
|
no-apiinlineprotectednoexcept |
Initialises a cell of the first alignment matrix column.
affine_cell_t | The type of the affine cell; must be an instance of seqan3::detail::affine_cell_proxy. |
[in] | previous_cell | The predecessor cell on the same column |
Initialises a cell of the first alignment matrix column. The optimal score is the same as the vertical score which is equal to
|
no-apiinlineprotectednoexcept |
Initialises the first cell of a alignment matrix column.
affine_cell_t | The type of the affine cell; must be an instance of seqan3::detail::affine_cell_proxy. |
[in] | previous_cell | The predecessor cell on the same row |
Initialises the first cell of a alignment matrix column. The optimal score is the same as the horizontal score which is equal to
|
no-apiinlineprotectednoexcept |
Initialises the first cell of the alignment matrix in the top left corner of the matrix.
Initialises the cell at the origin of the alignment matrix (top left corner of the matrix). The optimal score is initialised to 0, while the value of the horizontal and vertical matrix are initialised as: