A data structure for managing and computing the score of two nucleotides.
More...
#include <seqan3/alignment/scoring/nucleotide_scoring_scheme.hpp>
template<arithmetic score_type = int8_t>
class seqan3::nucleotide_scoring_scheme< score_type >
A data structure for managing and computing the score of two nucleotides.
- Template Parameters
-
score_type | The underlying type. |
You can use an instance of this class to score two nucleotides, the nucleotides need not be of the same type. Different scoring behaviour can be set via the member functions.
Example
#include <range/v3/view/zip.hpp>
int main()
{
using seqan3::operator""_dna5;
using seqan3::operator""_dna15;
using seqan3::operator""_rna15;
<< (int) scheme2.
score(
'A'_dna15,
'G'_dna15) <<
"\n";
scheme2.
score(
'A'_dna15,
'G'_dna15) = 3;
for (auto pair : seqan3::views::zip(one, two))
score += scheme3.
score(std::get<0>(pair), std::get<1>(pair));
}
◆ nucleotide_scoring_scheme() [1/3]
template<arithmetic score_type = int8_t>
◆ nucleotide_scoring_scheme() [2/3]
template<arithmetic score_type = int8_t>
template<arithmetic score_arg_t>
Constructor for the simple scheme (delegates to set_simple_scheme()).
- Template Parameters
-
score_arg_t | The underlying type of the arguments. |
- Parameters
-
- Exceptions
-
◆ nucleotide_scoring_scheme() [3/3]
template<arithmetic score_type = int8_t>
Constructor for a custom scheme (delegates to set_custom_matrix()).
- Parameters
-
[in] | matrix | A full matrix that is copied into the scheme. |
◆ score() [1/2]
|
inlineconstexprnoexceptinherited |
Score two letters (either two nucleotids or two amino acids).
- Template Parameters
-
alph1_t | Type of the first letter. |
alph2_t | Type of the second letter (needn't be the same as alph1_t). |
- Parameters
-
[in] | alph1 | The first letter to score. |
[in] | alph2 | The second letter to score. |
- Returns
- The score of the two letters in the current scheme.
◆ score() [2/2]
|
inlineconstexprnoexceptinherited |
Score two letters (either two nucleotids or two amino acids).
- Template Parameters
-
alph1_t | Type of the first letter. |
alph2_t | Type of the second letter (needn't be the same as alph1_t). |
- Parameters
-
[in] | alph1 | The first letter to score. |
[in] | alph2 | The second letter to score. |
- Returns
- The score of the two letters in the current scheme.
◆ set_custom_matrix()
|
inlineconstexprnoexceptinherited |
Set a custom scheme by passing a full matrix with arbitrary content.
- Parameters
-
[in] | matrix | A full matrix that is copied into the scheme. |
◆ set_simple_scheme()
Set the simple scheme (everything is either match or mismatch).
- Template Parameters
-
score_arg_t | The underlying type of the arguments. |
- Parameters
-
- Exceptions
-
The documentation for this class was generated from the following file: