SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t > Class Template Reference

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>

+ Inheritance diagram for seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t >:

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 base_t = policy_affine_gap_with_trace_recursion< alignment_configuration_t >
 The type of the base policy.
 
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 Types inherited from seqan3::detail::policy_affine_gap_with_trace_recursion< alignment_configuration_t >
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.
 
- Protected Types inherited from seqan3::detail::policy_affine_gap_recursion< alignment_configuration_t >
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 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.
 
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_bandedoperator= (policy_affine_gap_with_trace_recursion_banded const &)=default
 Defaulted.
 
policy_affine_gap_with_trace_recursion_bandedoperator= (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.
 
- Protected Member Functions inherited from seqan3::detail::policy_affine_gap_with_trace_recursion< alignment_configuration_t >
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.
 
 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_recursionoperator= (policy_affine_gap_with_trace_recursion const &)=default
 Defaulted.
 
policy_affine_gap_with_trace_recursionoperator= (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.
 
- Protected Member Functions inherited from seqan3::detail::policy_affine_gap_recursion< alignment_configuration_t >
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_recursionoperator= (policy_affine_gap_recursion const &)=default
 Defaulted.
 
policy_affine_gap_recursionoperator= (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

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.
 
- Protected Attributes inherited from seqan3::detail::policy_affine_gap_with_trace_recursion< alignment_configuration_t >
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.
 
- Protected Attributes inherited from seqan3::detail::policy_affine_gap_recursion< alignment_configuration_t >
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.
 

Detailed Description

template<typename alignment_configuration_t>
class seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t >

Implements the alignment recursion function for the banded alignment algorithm using affine gap costs with trace information.

Template Parameters
alignment_configuration_tThe 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.

Note
For more information, please refer to the original article for the alignment with affine gap cost function: GOTOH, Osamu. An improved algorithm for matching biological sequences. Journal of molecular biology, 1982, 162. Jg., Nr. 3, S. 705-708.

Constructor & Destructor Documentation

◆ policy_affine_gap_with_trace_recursion_banded() [1/2]

template<typename alignment_configuration_t >
seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t >::policy_affine_gap_with_trace_recursion_banded ( )
protecteddefault

Defaulted.

◆ policy_affine_gap_with_trace_recursion_banded() [2/2]

template<typename alignment_configuration_t >
seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t >::policy_affine_gap_with_trace_recursion_banded ( alignment_configuration_t const &  config)
inlineexplicitprotected

Defaulted.

Member Function Documentation

◆ initialise_band_first_cell()

template<typename alignment_configuration_t >
template<typename affine_cell_t >
affine_cell_type seqan3::detail::policy_affine_gap_with_trace_recursion_banded< alignment_configuration_t >::initialise_band_first_cell ( score_type  diagonal_score,
affine_cell_t  previous_cell,
score_type const  sequence_score 
) const
inlineprotectednoexcept

Initialises the first cell of a banded column that does not start in the first row of the matrix.

Template Parameters
affine_cell_tThe type of the affine cell; must be an instance of seqan3::detail::affine_cell_proxy.
Parameters
[in]diagonal_scoreThe previous diagonal score, which corresponds to \(M[i - 1, j - 1]\).
[in]previous_cellThe predecessor cell corresponding to the value \(H[i, j -1]\).
[in]sequence_scoreThe score obtained from the scoring scheme for the current cell ( \( \delta\)).
Returns
The computed affine cell.

Computes the current cell according to following recursion formula:

  • \( H[i, j] = \max \{M[i, j - 1] + g_o, H[i, j - 1] + g_e\}\)
  • \( M[i, j] = \max \{M[i - 1, j - 1] + \delta, H[i, j]\}\)

The documentation for this class was generated from the following file:
Hide me