SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
nucleotide_scoring_scheme.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2021, 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 
56  constexpr nucleotide_scoring_scheme() noexcept = default;
58  template <arithmetic score_arg_t>
59  constexpr nucleotide_scoring_scheme(match_score<score_arg_t> const ms, mismatch_score<score_arg_t> const mms)
60  : base_t{ms, mms}
61  {}
63  constexpr nucleotide_scoring_scheme(matrix_type const & matrix) noexcept
64  : base_t{matrix}
65  {}
67 };
68 
76 
80 template <arithmetic score_arg_type>
83 
85 template <arithmetic score_arg_type>
88 
89 } // namespace seqan3
A data structure for managing and computing the score of two nucleotides.
Definition: nucleotide_scoring_scheme.hpp:38
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.
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
constexpr nucleotide_scoring_scheme() noexcept=default
The default constructor (delegates to set_hamming_distance()).
nucleotide_scoring_scheme() -> nucleotide_scoring_scheme< int8_t >
Default constructed objects deduce to int8_t.
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_...
A CRTP base class for scoring schemes.
Definition: scoring_scheme_base.hpp:100
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
Provides seqan3::dna15, container aliases and string literals.
A type that satisfies std::is_arithmetic_v<t>.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::scoring_scheme_base.
A strong type of underlying type score_type that represents the score of two matching characters.
Definition: scoring_scheme_base.hpp:41
A strong type of underlying type score_type that represents the score two different characters.
Definition: scoring_scheme_base.hpp:66