SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
seqan3::align_cfg::band_fixed_size Class Reference

Configuration element for setting a fixed size band. More...

#include <seqan3/alignment/configuration/align_config_band.hpp>

+ Inheritance diagram for seqan3::align_cfg::band_fixed_size:

Public Member Functions

Constructor, destructor and assignment
constexpr band_fixed_size ()=default
 Defaulted.
 
constexpr band_fixed_size (band_fixed_size const &)=default
 Defaulted.
 
constexpr band_fixed_size (band_fixed_size &&)=default
 Defaulted.
 
constexpr band_fixed_sizeoperator= (band_fixed_size const &)=default
 Defaulted.
 
constexpr band_fixed_sizeoperator= (band_fixed_size &&)=default
 Defaulted.
 
 ~band_fixed_size ()=default
 Defaulted.
 
constexpr band_fixed_size (seqan3::align_cfg::lower_diagonal const lower_diagonal, seqan3::align_cfg::upper_diagonal const upper_diagonal)
 Initialises the fixed size band by setting the lower and the upper matrix diagonal. More...
 

Public Attributes

int32_t lower_diagonal {std::numeric_limits<int32_t>::lowest()}
 The selected lower diagonal. Defaults to std::numeric_limits<int32_t>::lowest().
 
int32_t upper_diagonal {std::numeric_limits<int32_t>::max()}
 The selected upper diagonal. Defaults to std::numeric_limits<int32_t>::max().
 

Detailed Description

Configuration element for setting a fixed size band.

Configures the banded alignment algorithm. Currently only a fixed size band is allowed. The band is given in form of a seqan3::align_cfg::lower_diagonal and a seqan3::align_cfg::upper_diagonal. A diagonal represents the cells in the alignment matrix that are not crossed by the alignment either downwards by the lower diagonal or rightwards by the upper diagonal. Thus any computed alignment will be inside the area defined by the lower and the upper diagonal.

If this configuration is default constructed or not set during the algorithm configuration the full alignment matrix will be computed.

Before the execution of the alignment algorithm the band configuration is validated. If the user provided an invalid band, e.g. the upper diagonal is smaller than the lower diagonal, the alignment matrix would be ill configured such that the requested alignment method cannot be computed (because the global alignment requires the first cell and the last cell of the matrix to be reachable), then a seqan3::invalid_alignment_configuration will be thrown.

Example

int main()
{
// A symmetric band around the main diagonal.
// A band starting with the main diagonal shifted by 3 cells to the right.
// A band starting with the main diagonal shifted by 3 cells down.
// An invalid band configuration.
// Using this band as a configuration in seqan3::align_pairwise would cause the algorithm to throw an exception.
}

Constructor & Destructor Documentation

◆ band_fixed_size()

constexpr seqan3::align_cfg::band_fixed_size::band_fixed_size ( seqan3::align_cfg::lower_diagonal const  lower_diagonal,
seqan3::align_cfg::upper_diagonal const  upper_diagonal 
)
inlineconstexpr

Initialises the fixed size band by setting the lower and the upper matrix diagonal.

Parameters
lower_diagonalThe selected lower diagonal. Defaults to std::numeric_limits<int32_t>::lowest().
upper_diagonalThe selected upper diagonal. Defaults to std::numeric_limits<int32_t>::max().

The lower diagonal represents the lower bound of the banded matrix, i.e. the alignment cannot pass below this diagonal. Similar, the upper diagonal represents the upper bound of the alignment. During the alignment configuration and execution the band parameters will be checked and an exception will be thrown in case of an invalid configuration.


The documentation for this class was generated from the following file:
align_config_band.hpp
Provides seqan3::detail::align_config_band.
seqan3::align_cfg::band_fixed_size
Configuration element for setting a fixed size band.
Definition: align_config_band.hpp:72
seqan3::align_cfg::lower_diagonal
A strong type representing the lower diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:29
seqan3::align_cfg::upper_diagonal
A strong type representing the upper diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:40