SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
nucleotide_scoring_scheme.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
14 #pragma once
15 
18 
19 namespace seqan3
20 {
21 
36 template <arithmetic score_type = int8_t>
37 class nucleotide_scoring_scheme : public scoring_scheme_base<nucleotide_scoring_scheme<score_type>, dna15, score_type>
38 {
39 private:
42 
44  friend base_t;
45 
46 public:
49  using typename base_t::matrix_type;
51 
55  constexpr nucleotide_scoring_scheme() noexcept = default;
58  template <arithmetic score_arg_t>
60  : base_t{ms, mms}
61  {}
63  constexpr nucleotide_scoring_scheme(matrix_type const & matrix) noexcept
64  : base_t{matrix}
65  {}
67 };
68 
74 nucleotide_scoring_scheme() -> nucleotide_scoring_scheme<int8_t>;
76 
80 template <arithmetic score_arg_type>
83 
85 template <arithmetic score_arg_type>
88 
89 } // namespace seqan3
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
constexpr nucleotide_scoring_scheme() noexcept=default
The default constructor (delegates to set_hamming_distance()).
dna15.hpp
Provides seqan3::dna15, container aliases and string literals.
seqan3::scoring_scheme_base
A CRTP base class for scoring schemes.
Definition: scoring_scheme_base.hpp:100
seqan3::nucleotide_scoring_scheme
A data structure for managing and computing the score of two nucleotides.
Definition: nucleotide_scoring_scheme.hpp:38
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
constexpr nucleotide_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()).
Definition: nucleotide_scoring_scheme.hpp:59
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
constexpr nucleotide_scoring_scheme(matrix_type const &matrix) noexcept
Constructor for a custom scheme (delegates to set_custom_matrix()).
Definition: nucleotide_scoring_scheme.hpp:63
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
nucleotide_scoring_scheme(std::array< std::array< score_arg_type, 15 >, 15 >) -> nucleotide_scoring_scheme< score_arg_type >
Deduce the score type from the provided matrix.
seqan3::mismatch_score
A strong type of underlying type score_type that represents the score two different characters.
Definition: scoring_scheme_base.hpp:66
std::array< std::array< score_type, matrix_size >, matrix_size >
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
nucleotide_scoring_scheme(match_score< score_arg_type >, mismatch_score< score_arg_type >) -> nucleotide_scoring_scheme< int8_t >
Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_...
scoring_scheme_base.hpp
Provides seqan3::scoring_scheme_base.
seqan3::scoring_scheme_base::matrix_type
std::array< std::array< score_type, matrix_size >, matrix_size > matrix_type
Type of the internal matrix (a two-dimensional array).
Definition: scoring_scheme_base.hpp:120
seqan3::match_score
A strong type of underlying type score_type that represents the score of two matching characters.
Definition: scoring_scheme_base.hpp:41