Implements the alignment recursion function for the banded alignment algorithm using affine gap costs with trace information. More...
#include <seqan3/alignment/pairwise/detail/policy_affine_gap_with_trace_recursion_banded.hpp>
Protected Types | |
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 | 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_with_trace_recursion< alignment_configuration_t > |
The type of the base policy. | |
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 | 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. | |
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. More... | |
template<typename affine_cell_t > | |
affine_cell_type | initialise_band_first_cell (score_type diagonal_score, affine_cell_t previous_cell, score_type const sequence_score) const noexcept |
Initialises the first cell of a banded column that does not start in the first row of the matrix. More... | |
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. More... | |
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. More... | |
affine_cell_type | initialise_origin_cell () const noexcept |
Initialises the first cell of the alignment matrix in the top left corner of the matrix. More... | |
score_type | lowest_viable_score () const noexcept |
Returns the lowest viable score. More... | |
template<typename 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. More... | |
Constructors, destructor and assignment | |
policy_affine_gap_with_trace_recursion_banded ()=default | |
policy_affine_gap_with_trace_recursion_banded (policy_affine_gap_with_trace_recursion_banded const &)=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion_banded (policy_affine_gap_with_trace_recursion_banded &&)=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion_banded & | operator= (policy_affine_gap_with_trace_recursion_banded const &)=default |
Defaulted. | |
policy_affine_gap_with_trace_recursion_banded & | operator= (policy_affine_gap_with_trace_recursion_banded &&)=default |
Defaulted. | |
~policy_affine_gap_with_trace_recursion_banded ()=default | |
Defaulted. | |
policy_affine_gap_with_trace_recursion_banded (alignment_configuration_t const &config) | |
Defaulted. More... | |
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. | |
Implements the alignment recursion function for the banded 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.
|
protecteddefault |
Defaulted.
|
inlineexplicitprotected |
Defaulted.
|
inlineprotectednoexceptinherited |
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:
|
inlineprotectednoexcept |
Initialises the first cell of a banded column that does not start in the first row of the 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 value ![]() |
[in] | sequence_score | The score obtained from the scoring scheme for the current cell ( ![]() |
Computes the current cell according to following recursion formula:
|
inlineprotectednoexceptinherited |
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 . The horizontal score is initialised to
to prohibit extending a gap in the horizontal matrix from
.
|
inlineprotectednoexceptinherited |
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 . The vertical score is initialised to
to prohibit extending a gap in the vertical matrix from
.
|
inlineprotectednoexceptinherited |
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: .
|
inlineprotectednoexceptinherited |
Returns the lowest viable score.
In some versions of the algorithms a value representing minus infinity is needed. Since the data type is an signed integral there is no infinity but only the lowest possible value that can be represented by the score type. In order to avoid unnecessary if conditions to protect against signed integer underflow the lowest viable score is computed. Subtracting a gap penalty from this will still result in a valid score which represents minus infinity.
|
inlineconstexprprotectednoexceptinherited |
Converts the given score type to a simd vector if the alignment is executed in vectorised mode.
score_t | The score type to convert; must model seqan3::arithmetic. |
[in] | score | The score to convert. |