|
|
constexpr | aminoacid_scoring_scheme () noexcept=default |
| The default constructor (delegates to set_hamming_distance()).
|
|
template<arithmetic score_arg_t> |
constexpr | aminoacid_scoring_scheme (match_score< score_arg_t > const ms, mismatch_score< score_arg_t > const mms) |
| Constructor for the simple scheme (delegates to set_simple_scheme()).
|
|
constexpr | aminoacid_scoring_scheme (matrix_type const &matrix) noexcept |
| Constructor for a custom scheme (delegates to set_custom_matrix()).
|
|
constexpr | aminoacid_scoring_scheme (aminoacid_similarity_matrix const matrix_id) |
| Construct for seqan3::aminoacid_similarity_matrix.
|
|
|
constexpr void | set_similarity_matrix (aminoacid_similarity_matrix const matrix_id) |
| Set the similarity matrix scheme (e.g. blosum62).
|
|
constexpr | scoring_scheme_base (scoring_scheme_base const &) noexcept=default |
| Defaulted.
|
|
constexpr | scoring_scheme_base (scoring_scheme_base &&) noexcept=default |
| Defaulted.
|
|
constexpr scoring_scheme_base & | operator= (scoring_scheme_base const &) noexcept=default |
| Defaulted.
|
|
constexpr scoring_scheme_base & | operator= (scoring_scheme_base &&) noexcept=default |
| Defaulted.
|
|
| ~scoring_scheme_base () noexcept=default |
| Defaulted.
|
|
constexpr | scoring_scheme_base () noexcept |
| The default constructor (delegates to set_hamming_distance()).
|
|
template<arithmetic score_arg_t> |
constexpr | scoring_scheme_base (match_score< score_arg_t > const ms, mismatch_score< score_arg_t > const mms) |
| Constructor for the simple scheme (delegates to set_simple_scheme()).
|
|
constexpr | scoring_scheme_base (matrix_type const &matrix) noexcept |
| Constructor for a custom scheme (delegates to set_custom_matrix()).
|
|
constexpr void | set_hamming_distance () noexcept |
| Set the hamming scheme, a variant of the simple scheme where match is scored 0 and mismatch -1 .
|
|
template<arithmetic score_arg_t> |
constexpr void | set_simple_scheme (match_score< score_arg_t > const ms, mismatch_score< score_arg_t > const mms) |
| Set the simple scheme (everything is either match or mismatch).
|
|
constexpr void | set_custom_matrix (matrix_type const &matrix) noexcept |
| Set a custom scheme by passing a full matrix with arbitrary content.
|
|
template<typename alph1_t , typename alph2_t >
requires explicitly_convertible_to<alph1_t, alphabet_t> && explicitly_convertible_to<alph2_t, alphabet_t> |
constexpr score_t & | score (alph1_t const alph1, alph2_t const alph2) noexcept |
| Score two letters (either two nucleotids or two amino acids).
|
|
template<typename alph1_t , typename alph2_t >
requires explicitly_convertible_to<alph1_t, alphabet_t> && explicitly_convertible_to<alph2_t, alphabet_t> |
constexpr score_t | score (alph1_t const alph1, alph2_t const alph2) const noexcept |
| Score two letters (either two nucleotids or two amino acids).
|
|
constexpr bool | operator== (derived_t const &rhs) const noexcept |
| Checks whether *this is equal to rhs .
|
|
constexpr bool | operator!= (derived_t const &rhs) const noexcept |
| Checks whether *this is not equal to rhs .
|
|
|
(Note that these are not member symbols.)
|
|
| aminoacid_scoring_scheme () -> aminoacid_scoring_scheme< int8_t > |
| Default constructed objects deduce to int8_t .
|
|
template<arithmetic score_arg_type> |
| aminoacid_scoring_scheme (match_score< score_arg_type >, mismatch_score< score_arg_type >) -> aminoacid_scoring_scheme< int8_t > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_t . To use a larger type, specify the template argument manually.
|
|
template<arithmetic score_arg_type> |
| aminoacid_scoring_scheme (std::array< std::array< score_arg_type, 27 >, 27 >) -> aminoacid_scoring_scheme< score_arg_type > |
| Deduce the score type from the provided matrix.
|
|
| aminoacid_scoring_scheme (aminoacid_similarity_matrix) -> aminoacid_scoring_scheme< int8_t > |
| Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_t . To use a larger type, specify the template argument manually.
|
|
template<
arithmetic score_type = int8_t>
class seqan3::aminoacid_scoring_scheme< score_type >
A data structure for managing and computing the score of two amino acids.
You can use an instance of this class to score two amino acids. The amino acids need not be of the same type. Different scoring behaviour can be set via the member functions.
Example
int main()
{
seqan3::debug_stream <<
"blosum62 score for T and S: " << (int)scheme.score(
'T'_aa27,
'S'_aa27) <<
"\n";
seqan3::debug_stream <<
"blosum80 score for 'T'_aa27 and 'S'_aa20: " << (int)scheme.score(
'T'_aa27,
'S'_aa20)
<< "\n";
scheme.set_hamming_distance();
seqan3::debug_stream <<
"Hamming distance between T and S: " << (int)scheme.score(
'T'_aa27,
'S'_aa20)
<< "\n";
seqan3::debug_stream <<
"Hamming distance between T and T: " << (int)scheme.score(
'T'_aa27,
'T'_aa20)
<< "\n";
seqan3::debug_stream <<
"blosum80 score between T and S: " << (int)scheme2.score(
'T'_aa27,
'S'_aa27)
<< "\n";
auto & cell = scheme2.score('T'_aa27, 'S'_aa27);
cell = 3;
seqan3::debug_stream <<
"New score after editing entry: " << (int)scheme2.score(
'T'_aa27,
'S'_aa27) <<
"\n";
for (
auto pair :
seqan3::views::
zip(one, two))
}
Provides seqan3::aa27, container aliases and string literals.
Meta-header for the Alphabet / Aminoacid submodule .
Provides seqan3::aminoacid_scoring_scheme.
A data structure for managing and computing the score of two amino acids.
Definition aminoacid_scoring_scheme.hpp:72
constexpr score_t & score(alph1_t const alph1, alph2_t const alph2) noexcept
Score two letters (either two nucleotids or two amino acids).
Definition scoring_scheme_base.hpp:214
Provides seqan3::debug_stream and related types.
@ blosum80
The blosum80 matrix for closely related proteins.
@ blosum62
The blosum62 matrix recommended for most use-cases.
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition debug_stream.hpp:37
seqan::stl::views::zip zip
A view adaptor that takes several views and returns tuple-like values from every i-th element of each...
Definition zip.hpp:24
The SeqAn namespace for literals.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition configuration.hpp:412
SeqAn specific customisations in the standard namespace.
Provides seqan3::views::zip.