A scheme for representing and computing scores against gap characters.
More...
#include <seqan3/alignment/scoring/gap_scheme.hpp>
|
|
using | score_type = score_t |
| The template parameter exposed as member type.
|
|
|
|
constexpr | gap_scheme () noexcept=default |
|
constexpr | gap_scheme (gap_scheme const &) noexcept=default |
|
constexpr | gap_scheme (gap_scheme &&) noexcept=default |
|
constexpr gap_scheme & | operator= (gap_scheme const &) noexcept=default |
|
constexpr gap_scheme & | operator= (gap_scheme &&) noexcept=default |
|
| ~gap_scheme () noexcept=default |
|
template<arithmetic_concept score_arg_t> |
constexpr | gap_scheme (gap_score< score_arg_t > const g, gap_open_score< score_arg_t > const go) |
| Constructor for the Affine gap costs model (delegates to set_affine()). More...
|
|
template<arithmetic_concept score_arg_t> |
constexpr | gap_scheme (gap_score< score_arg_t > const g) |
| Constructor for the Linear gap costs model (delegates to set_linear()). More...
|
|
|
template<arithmetic_concept score_arg_t> |
constexpr void | set_affine (gap_score< score_arg_t > const g, gap_open_score< score_arg_t > const go) |
| Set the Affine gap costs model. More...
|
|
template<arithmetic_concept score_arg_t> |
constexpr void | set_linear (gap_score< score_arg_t > const g) |
| Set the Linear gap costs model. More...
|
|
|
constexpr score_t & | get_gap_score () noexcept |
| Return the gap score.
|
|
constexpr score_t | get_gap_score () const noexcept |
| A strong type of underlying type score_type that represents the score of any character against a gap character. More...
|
|
constexpr score_t & | get_gap_open_score () noexcept |
| Return the gap open score.
|
|
constexpr score_t | get_gap_open_score () const noexcept |
| A strong type of underlying type score_type that represents an additional score (usually negative) that is incurred once additionaly per stretch of consecutive gaps. More...
|
|
constexpr ptrdiff_t | score (size_t const number_of_consecutive_gaps) noexcept |
| Compute the score of a stretch of gap characters. More...
|
|
|
constexpr bool | operator== (gap_scheme const &rhs) const noexcept |
|
constexpr bool | operator!= (gap_scheme const &rhs) const noexcept |
|
|
(Note that these are not member functions.)
|
|
| gap_scheme () -> gap_scheme< int8_t > |
|
template<floating_point_concept score_arg_type> |
| gap_scheme (gap_score< score_arg_type >, gap_open_score< score_arg_type >) -> gap_scheme< float > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to float for floating point types. To use a larger type, specify the template argument manually.
|
|
template<floating_point_concept score_arg_type> |
| gap_scheme (gap_score< score_arg_type >) -> gap_scheme< float > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to float for floating point types. To use a larger type, specify the template argument manually.
|
|
template<arithmetic_concept score_arg_type> |
| gap_scheme (gap_score< score_arg_type >, gap_open_score< score_arg_type >) -> gap_scheme< int8_t > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_t for integer types. To use a larger type, specify the template argument manually.
|
|
template<arithmetic_concept score_arg_type> |
| gap_scheme (gap_score< score_arg_type >) -> gap_scheme< int8_t > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_t for integer types. To use a larger type, specify the template argument manually.
|
|
template<arithmetic_concept score_t = int8_t>
class seqan3::gap_scheme< score_t >
A scheme for representing and computing scores against gap characters.
- Template Parameters
-
score_type | Type of the score values saved internally. |
◆ gap_scheme() [1/2]
template<arithmetic_concept score_t = int8_t>
template<arithmetic_concept score_arg_t>
Constructor for the Affine gap costs model (delegates to set_affine()).
- Template Parameters
-
score_arg_t | The underlying type of the arguments. |
- Parameters
-
- Exceptions
-
std::invalid_argument | Thrown if you pass a value that is to large/low to be represented by score_t . |
The score for a sequence of n
gap characters is computed as n * g + go
.
- Attention
- This is the formula used most commonly in the literature, but it is different from SeqAn2 where the formula was
(n-1) * g + go
.
◆ gap_scheme() [2/2]
template<arithmetic_concept score_t = int8_t>
template<arithmetic_concept score_arg_t>
Constructor for the Linear gap costs model (delegates to set_linear()).
- Template Parameters
-
score_arg_t | The underlying type of the argument. |
- Parameters
-
- Exceptions
-
std::invalid_argument | Thrown if you pass a value that is to large/low to be represented by score_t . |
The score for a sequence of n
gap characters is computed as n * g
. This is the same as the affine model with a gap open score of 0
.
◆ get_gap_open_score()
template<arithmetic_concept score_t = int8_t>
A strong type of underlying type score_type
that represents an additional score (usually negative) that is incurred once additionaly per stretch of consecutive gaps.
- Template Parameters
-
score_type | The underlying type. |
- See also
- seqan3::gap_scheme
◆ get_gap_score()
template<arithmetic_concept score_t = int8_t>
A strong type of underlying type score_type
that represents the score of any character against a gap character.
- Template Parameters
-
score_type | The underlying type. |
- See also
- seqan3::gap_scheme
◆ score()
template<arithmetic_concept score_t = int8_t>
constexpr ptrdiff_t seqan3::gap_scheme< score_t >::score |
( |
size_t const |
number_of_consecutive_gaps | ) |
|
|
inlinenoexcept |
Compute the score of a stretch of gap characters.
- Parameters
-
number_of_consecutive_gaps | The number of consecutive gaps that you wish to know the score for. |
- Returns
- A signed integer (usually 64bit) that holds the score computed based on the selected scheme.
◆ set_affine()
template<arithmetic_concept score_t = int8_t>
template<arithmetic_concept score_arg_t>
Set the Affine gap costs model.
- Template Parameters
-
score_arg_t | The underlying type of the arguments. |
- Parameters
-
- Exceptions
-
std::invalid_argument | Thrown if you pass a value that is to large/low to be represented by score_t . |
The score for a sequence of n
gap characters is computed as n * g + go
.
- Attention
- This is the formula used most commonly in the literature, but it is different from SeqAn2 where the formula was
(n-1) * g + go
.
◆ set_linear()
template<arithmetic_concept score_t = int8_t>
template<arithmetic_concept score_arg_t>
Set the Linear gap costs model.
- Template Parameters
-
score_arg_t | The underlying type of the argument. |
- Parameters
-
- Exceptions
-
std::invalid_argument | Thrown if you pass a value that is to large/low to be represented by score_t . |
The score for a sequence of n
gap characters is computed as n * g
. This is the same as the affine model with a gap open score of 0
.
The documentation for this class was generated from the following file: