SeqAn3 3.1.0
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.

SeqAn offers the computation of banded alignments to reduce the running time of the algorithm. This can be helpful if the region in which the optimal alignment exists is known a priori. To specify the banded alignment the developer can use the seqan3::align_cfg::band_fixed_size option.
This band configuration is initialised with a seqan3::align_cfg::lower_diagonal and a seqan3::align_cfg::upper_diagonal. The term diagonal is used to describe the position of the band boundary within the alignment matrix. The given value represents the offset that the lower, respectively upper, diagonal is shifted from the main diagonal, which starts in the origin of the alignment matrix. Accordingly, a negative value shifts the band boundary downwards in the alignment matrix and a positive value shifts the band boundary to the right.

The band parameters might be restricted depending on the configured alignment algorithm, e.g. the origin of the alignment matrix and the sink (the last cell in the last column) must be covered by the band when a global alignment is ought to be computed.
In general, the upper diagonal must always be greater than or equal to the lower diagonal to specify a valid band.

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.
}
Provides seqan3::detail::align_config_band.
Configuration element for setting a fixed size band.
Definition: align_config_band.hpp:63
A strong type representing the lower diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:31
A strong type representing the upper diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:42
Remarks
For a complete overview, take a look at Pairwise.

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: