Wraps the sequence end-gap specifiers and provides ordered access to the respective values. More...
#include <seqan3/alignment/configuration/align_config_aligned_ends.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | end_gaps () noexcept |
Default constructor. | |
constexpr | end_gaps (end_gaps const &) noexcept=default |
Defaulted. | |
constexpr | end_gaps (end_gaps &&) noexcept=default |
Defaulted. | |
constexpr end_gaps & | operator= (end_gaps const &) noexcept=default |
Defaulted. | |
constexpr end_gaps & | operator= (end_gaps &&) noexcept=default |
Defaulted. | |
~end_gaps () noexcept=default | |
Defaulted. | |
constexpr | end_gaps (ends_t const ...args) noexcept requires sizeof...(ends_t) > 0 |
Construction from at least one sequence end-gap specifier. | |
Static Public Member Functions | |
template<size_t pos> | |
static constexpr bool | is_static () noexcept |
Returns whether a value at the given position was set statically. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Predefined end-gaps configurations | |
constexpr end_gaps | free_ends_all |
All ends are free. More... | |
constexpr end_gaps | free_ends_none |
All ends are penalised. More... | |
constexpr end_gaps | free_ends_first |
Ends of the first sequence are free. More... | |
constexpr end_gaps | free_ends_second |
Ends for the second sequence are free. More... | |
Type deduction guides | |
template<typename ... ends_t> | |
end_gaps (ends_t const &...) -> end_gaps< ends_t... > | |
Deduces the end-gap specifier from the constructor arguments. More... | |
Element access | |
constexpr bool | operator[] (size_t const pos) const noexcept |
Returns the value for the specifier at the given position. More... | |
template<size_t pos> | |
static constexpr bool | get_static () noexcept |
Returns the static value for the specifier at the given position. More... | |
Wraps the sequence end-gap specifiers and provides ordered access to the respective values.
ends_t | A parameter pack containing at most 4 sequence end-gap specifier. |
A wrapper for providing ordered access to the end-gap specifiers independent of the input order. The possible input types can be: seqan3::front_end_first, seqan3::back_end_first, seqan3::front_end_second and seqan3::back_end_second. The types in the parameter pack ends_t
are deduced by the corresponding constructor argument. If a specifier is not set it will default to false
and thus the respective end-gap will be penalised in the pairwise alignment.
The end_gaps class preserves the static/non-static property of the respective end-gap specifier. Those specifiers can, depending on how they are constructed, contain a static information or a runtime information whether or not a specific end-gap is enabled. To check whether the information was static the function end_gaps::is_static can be used. If it was static the function end_gaps::get_static can be used to obtain the respective value at compile time. Note that both functions are static and thus need to be called on the type and not on an instance of the type.
To get the respective value at runtime use the []-operator. This function returns always the respective value independent of whether the value was provided by a static variable or a runtime variable. Also note that static and non-static end-gap specifier can be mixed within the end_gaps class template.
It is strongly recommended to use the static information if possible and only make those specifiers depend on runtime parameters that cannot be resolved at compile time. This will reduce the compile time while configuring the alignment algorithm since the runtime information need to be translated into static information for the alignment algorithm.
|
inlinestaticconstexprnoexcept |
Returns the static value for the specifier at the given position.
pos | The position to get the value for the respective end-gap for. |
The sequence end-gap specifier are stored in an ordered fashion. The following position mapping will be used to access the respective values: seqan3::front_end_first → 0; seqan3::back_end_first → 1; seqan3::front_end_second → 2; seqan3::back_end_second → 3.
true
if the respective sequence end-gap is set to be free, false
otherwise.
|
inlinestaticconstexprnoexcept |
Returns whether a value at the given position was set statically.
\ name Observers
pos | The position to get the value for the respective end-gap for. |
pos | The position to get the value for the respective end-gap for. |
The sequence end-gap specifier are stored in an ordered fashion. The following position mapping will be used to access the respective values: seqan3::front_end_first → 0; seqan3::back_end_first → 1; seqan3::front_end_second → 2; seqan3::back_end_second → 3.
true
if the respective sequence end-gap is set to be free, false
otherwise.true
if the respective sequence end-gap was set in a static context, false
otherwise.
|
inlineconstexprnoexcept |
Returns the value for the specifier at the given position.
[in] | pos | The position to get the value for the respective end-gap for. |
The sequence end-gap specifier are stored in an ordered fashion. The following position mapping will be used to access the respective values: seqan3::front_end_first → 0; seqan3::back_end_first → 1; seqan3::front_end_second → 2; seqan3::back_end_second → 3.
true
if the respective sequence end-gap is set to be free, false
otherwise. Deduces the end-gap specifier from the constructor arguments.
ends_t | A template parameter pack containing at most 4 sequence end-gap specifiers. |
|
related |
All ends are free.
Computes an overlap alignment where the end of one sequence can overlap with the end of the other sequence. In the following example the gaps at the ends are not penalised and the sequences are aligned such that the prefix of the first sequences matches the suffix of the second sequence.
|
related |
Ends of the first sequence are free.
Computes a semi-global alignment where the ends of the first sequence can align to gaps without additional costs. For example in the following alignment, the leading and trailing gaps are not penalised and the smaller sequence can be aligned such that it matches the middle part of the longer sequence.
|
related |
All ends are penalised.
Computes a global alignment where all end-gaps are penalised. For example in the following alignment, the alignment is forced to cover the entire sequences and the leading gaps will be penalised.
|
related |
Ends for the second sequence are free.
Computes a semi-global alignment where the ends of the second sequence can align to gaps without additional costs. For example in the following alignment, the leading and trailing gaps are not penalised and the smaller sequence can be aligned such that it matches the middle part of the longer sequence.