SeqAn3  3.0.1
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>
81 nucleotide_scoring_scheme(match_score<score_arg_type>,
82  mismatch_score<score_arg_type>) -> nucleotide_scoring_scheme<int8_t>;
83 
85 template <arithmetic score_arg_type>
86 nucleotide_scoring_scheme(std::array<std::array<score_arg_type, 15>, 15>) -> nucleotide_scoring_scheme<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:37
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::mismatch_score
A strong type of underlying type score_type that represents the score two different characters.
Definition: scoring_scheme_base.hpp:67
std::array< std::array< score_type, matrix_size >, matrix_size >
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
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:121
seqan3::match_score
A strong type of underlying type score_type that represents the score of two matching characters.
Definition: scoring_scheme_base.hpp:42