SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
seqan3::align_cfg::result< alignment_result_tag_t, score_t > Class Template Reference

Sets the result of the alignment computation. More...

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

+ Inheritance diagram for seqan3::align_cfg::result< alignment_result_tag_t, score_t >:

Public Types

using score_type = score_t
 The score type of the alignment result.
 

Public Member Functions

Constructors, destructor and assignment
constexpr result ()=default
 Defaulted.
 
constexpr result (result const &)=default
 Defaulted.
 
constexpr resultoperator= (result const &)=default
 Defaulted.
 
constexpr result (result &&)=default
 Defaulted.
 
constexpr resultoperator= (result &&)=default
 Defaulted.
 
 ~result ()=default
 Defaulted.
 
constexpr result (alignment_result_tag_t result_tag) noexcept
 Construction from the result feature you want to compute (e.g. seqan3::with_score). More...
 
constexpr result (alignment_result_tag_t result_tag, detail::score_type< score_t > score_type_tag) noexcept
 Construction from the result feature you want to compute (e.g. seqan3::with_score). More...
 

Related Functions

(Note that these are not member functions.)

template<arithmetic score_t>
constexpr detail::score_type< score_t > using_score_type {}
 Helper variable used to configure the score type for the alignment algorithm. More...
 
constexpr detail::with_alignment_type with_alignment {}
 Helper Variable used to select trace computation.
 
constexpr detail::with_back_coordinate_type with_back_coordinate {}
 Helper variable used to select end-position computation.
 
constexpr detail::with_front_coordinate_type with_front_coordinate {}
 Helper variable used to select begin position computation.
 
constexpr detail::with_score_type with_score {}
 Helper variable used to select score-only computation.
 
Type deduction guides
template<typename alignment_result_tag_t >
 result (alignment_result_tag_t) -> result< alignment_result_tag_t >
 Deduces the alignment result from the given constructor argument.
 
template<typename alignment_result_tag_t , arithmetic score_t>
 result (alignment_result_tag_t, detail::score_type< score_t >) -> result< alignment_result_tag_t, score_t >
 Deduces the alignment result from the given constructor arguments.
 

Detailed Description

template<typename alignment_result_tag_t = detail::with_score_type, typename score_t = int32_t>
class seqan3::align_cfg::result< alignment_result_tag_t, score_t >

Sets the result of the alignment computation.

Template Parameters
alignment_result_tag_tThe type used to specify which feature should be computed during the pairwise alignment. Defaults to seqan3::detail::with_score_type.

The output of the pairwise alignment can be configured using this result configuration element. Depending on the settings, the most efficient implementation is chosen to compute the result. Currently four different modes can be configured (first constructor parameter):

  1. computing only the score,
  2. computing in addition the end position,
  3. computing in addition the begin position,
  4. and finally also computing the alignment.

These settings will directly affect the contents of the seqan3::alignment_result object which is returned by the alignment algorithm. For example, if you chose the alignment feature, your result object will contain the score, end point, begin point and the alignment.

In addition, you can specify the score type with the second constructor argument (see example).

By default, the alignment algorithm will only compute the score with score type int32_t.

Example

int main()
{
// Compute only the score.
// same as
seqan3::align_cfg::result cfg_score{seqan3::with_score};
// Compute the score and the back coordinate.
seqan3::align_cfg::result cfg_end{seqan3::with_back_coordinate};
// Compute the score, the back coordinate and the front coordinate.
seqan3::align_cfg::result cfg_begin{seqan3::with_front_coordinate};
// Compute the score, the back coordinate, the front coordinate and the alignment.
seqan3::align_cfg::result cfg_alignment{seqan3::with_alignment};
// You can also change the score type:
// Compute only the score given a specific score_type.
seqan3::align_cfg::result cfg_score_uint16{seqan3::with_score, seqan3::using_score_type<uint16_t>};
// Compute the score given a specific score_type and the back coordinate.
seqan3::align_cfg::result cfg_end_double{seqan3::with_back_coordinate, seqan3::using_score_type<double>};
// ...
}

Constructor & Destructor Documentation

◆ result() [1/2]

template<typename alignment_result_tag_t = detail::with_score_type, typename score_t = int32_t>
constexpr seqan3::align_cfg::result< alignment_result_tag_t, score_t >::result ( alignment_result_tag_t  result_tag)
inlineconstexprnoexcept

Construction from the result feature you want to compute (e.g. seqan3::with_score).

Parameters
[in]result_tagThe feature you want the alignment algorithm to compute (e.g. seqan3::with_score).

◆ result() [2/2]

template<typename alignment_result_tag_t = detail::with_score_type, typename score_t = int32_t>
constexpr seqan3::align_cfg::result< alignment_result_tag_t, score_t >::result ( alignment_result_tag_t  result_tag,
detail::score_type< score_t >  score_type_tag 
)
inlineconstexprnoexcept

Construction from the result feature you want to compute (e.g. seqan3::with_score).

Parameters
[in]result_tagThe feature you want the alignment algorithm to compute (e.g. seqan3::with_score).
[in]score_type_tagThe score type to use (e.g. seqan3::using_score_type<int>).

Friends And Related Function Documentation

◆ using_score_type

template<typename alignment_result_tag_t = detail::with_score_type, typename score_t = int32_t>
template<arithmetic score_t>
constexpr detail::score_type<score_t> using_score_type {}
related

Helper variable used to configure the score type for the alignment algorithm.

Template Parameters
tThe type to use for the computed alignment score; must model seqan3::arithmetic.

The documentation for this class was generated from the following file:
seqan3::align_cfg::result
Sets the result of the alignment computation.
Definition: align_config_result.hpp:136
align_config_result.hpp
Provides configuration for alignment output.