SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::align_cfg::scoring_scheme< scoring_scheme_t > Class Template Reference

Sets the scoring scheme for the alignment algorithm. More...

#include <seqan3/alignment/configuration/align_config_scoring_scheme.hpp>

+ Inheritance diagram for seqan3::align_cfg::scoring_scheme< scoring_scheme_t >:

Public Member Functions

Constructors, destructor and assignment
constexpr scoring_scheme ()=default
 Defaulted.
 
constexpr scoring_scheme (scoring_scheme const &)=default
 Defaulted.
 
constexpr scoring_scheme (scoring_scheme &&)=default
 Defaulted.
 
constexpr scoring_schemeoperator= (scoring_scheme const &)=default
 Defaulted.
 
constexpr scoring_schemeoperator= (scoring_scheme &&)=default
 Defaulted.
 
 ~scoring_scheme ()=default
 Defaulted.
 
constexpr scoring_scheme (scoring_scheme_t scheme)
 Initialises the scoring scheme config with the given scheme.
 

Public Attributes

scoring_scheme_t scheme {}
 The scoring scheme to be used in the alignment algorithm.
 

Related Symbols

(Note that these are not member symbols.)

Type deduction guides
template<typename scheme_t >
 scoring_scheme (scheme_t) -> scoring_scheme< std::remove_cvref_t< scheme_t > >
 Deduces the scoring scheme type from the constructor argument.
 

Detailed Description

template<std::semiregular scoring_scheme_t>
class seqan3::align_cfg::scoring_scheme< scoring_scheme_t >

Sets the scoring scheme for the alignment algorithm.

Template Parameters
scoring_scheme_tThe type of the scoring scheme; must model std::semiregular.

The scoring scheme allows to specify how two symbols of an alphabet are scored inside of the alignment algorithm. The scheme depends on the alphabet type of the passed sequences and must be chosen accordingly. During the configuration of the pairwise alignment algorithm a static assert is triggered if the scoring scheme is not compatible with the given alphabet types (see seqan3::scoring_scheme_for). Accordingly, there is no default for this configuration since it depends on the sequences and it must be given as a minimal configuration.

Example

// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
using namespace seqan3::literals;
int main()
{
auto seq1 = "ACGT"_dna4;
auto seq2 = "ACCT"_dna4;
for (auto res : align_pairwise(std::tie(seq1, seq2), min_cfg))
seqan3::debug_stream << res.score() << '\n';
}
Provides global and local alignment configurations.
Provides seqan3::align_cfg::scoring_scheme.
Provides pairwise alignment function.
Sets the global alignment method.
Definition align_config_method.hpp:119
Sets the scoring scheme for the alignment algorithm.
Definition align_config_scoring_scheme.hpp:42
A data structure for managing and computing the score of two nucleotides.
Definition nucleotide_scoring_scheme.hpp:35
Provides seqan3::debug_stream and related types.
Provides seqan3::dna4, container aliases and string literals.
constexpr auto align_pairwise(sequence_t &&seq, alignment_config_t const &config)
Computes the pairwise alignment for a pair of sequences or a range over sequence pairs.
Definition align_pairwise.hpp:131
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition debug_stream.hpp:37
The SeqAn namespace for literals.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
SeqAn specific customisations in the standard namespace.
Provides seqan3::nucleotide_scoring_scheme.
A strong type of underlying type score_type that represents the score of two matching characters.
Definition scoring_scheme_base.hpp:38
A strong type of underlying type score_type that represents the score two different characters.
Definition scoring_scheme_base.hpp:63
T tie(T... args)

Constructor & Destructor Documentation

◆ scoring_scheme()

template<std::semiregular scoring_scheme_t>
constexpr seqan3::align_cfg::scoring_scheme< scoring_scheme_t >::scoring_scheme ( scoring_scheme_t  scheme)
inlineexplicitconstexpr

Initialises the scoring scheme config with the given scheme.

Parameters
[in]schemeThe scoring scheme to be used in the alignment algorithm.

This config stores a copy of the provided scheme.


The documentation for this class was generated from the following file:
Hide me