SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
Configuration

Provides configuration elements for the pairwise alignment configuration. More...

+ Collaboration diagram for Configuration:

Classes

class  seqan3::align_cfg::band_fixed_size
 Configuration element for setting a fixed size band. More...
 
struct  seqan3::align_cfg::free_end_gaps_sequence1_leading
 A strong type representing free_end_gaps_sequence1_leading of the seqan3::align_cfg::method_global. More...
 
struct  seqan3::align_cfg::free_end_gaps_sequence1_trailing
 A strong type representing free_end_gaps_sequence1_trailing of the seqan3::align_cfg::method_global. More...
 
struct  seqan3::align_cfg::free_end_gaps_sequence2_leading
 A strong type representing free_end_gaps_sequence2_leading of the seqan3::align_cfg::method_global. More...
 
struct  seqan3::align_cfg::free_end_gaps_sequence2_trailing
 A strong type representing free_end_gaps_sequence2_trailing of the seqan3::align_cfg::method_global. More...
 
class  seqan3::align_cfg::gap_cost_affine
 A configuration element for the affine gap cost scheme. More...
 
struct  seqan3::align_cfg::lower_diagonal
 A strong type representing the lower diagonal of the seqan3::align_cfg::band_fixed_size. More...
 
class  seqan3::align_cfg::method_global
 Sets the global alignment method. More...
 
class  seqan3::align_cfg::method_local
 Sets the local alignment method. More...
 
class  seqan3::align_cfg::min_score
 Sets the minimal score (maximal errors) allowed during an distance computation e.g. edit distance. More...
 
class  seqan3::align_cfg::on_result< callback_t >
 Configuration element to provide a user defined callback function for the alignment. More...
 
class  seqan3::align_cfg::output_alignment
 Configures the alignment result to output the alignment. More...
 
class  seqan3::align_cfg::output_begin_position
 Configures the alignment result to output the begin positions. More...
 
class  seqan3::align_cfg::output_end_position
 Configures the alignment result to output the end position. More...
 
class  seqan3::align_cfg::output_score
 Configures the alignment result to output the score. More...
 
class  seqan3::align_cfg::output_sequence1_id
 Configures the alignment result to output the id of the first sequence. More...
 
class  seqan3::align_cfg::output_sequence2_id
 Configures the alignment result to output the id of the second sequence. More...
 
class  seqan3::align_cfg::score_type< score_t >
 A configuration element to set the score type used in the alignment algorithm. More...
 
struct  seqan3::align_cfg::upper_diagonal
 A strong type representing the upper diagonal of the seqan3::align_cfg::band_fixed_size. More...
 
class  seqan3::align_cfg::vectorised
 Enables the vectorised alignment computation if possible for the current configuration. More...
 

Typedefs

using seqan3::align_cfg::parallel = seqan3::detail::parallel_mode< std::integral_constant< seqan3::detail::align_config_id, seqan3::detail::align_config_id::parallel > >
 Enables the parallel execution of the alignment algorithm if possible for the given configuration. More...
 

Variables

constexpr configuration seqan3::align_cfg::edit_scheme
 Shortcut for edit distance configuration. More...
 

Detailed Description

Provides configuration elements for the pairwise alignment configuration.

See also
Alignment

Typedef Documentation

◆ parallel

using seqan3::align_cfg::parallel = typedef seqan3::detail::parallel_mode<std::integral_constant<seqan3::detail::align_config_id, seqan3::detail::align_config_id::parallel> >

Enables the parallel execution of the alignment algorithm if possible for the given configuration.

With this configuration you can enable the parallel execution of the pairwise sequence alignment. This means that for a batch of pairwise sequence alignments the specified number of threads will be spawned to compute them in parallel. Note that only independent alignment computations can be executed in parallel, i.e. you use this method when computing a batch of alignments rather than executing them separately. Depending on your processor architecture you can gain a significant speed-up.

The value represents the number of threads to be used and must be greater than 0.

Example

#include <thread>
int main()
{
// Enables parallel computation with two threads.
// Enables parallel computation with the number of concurrent threads supported by the current architecture.
;
}

Variable Documentation

◆ edit_scheme

constexpr configuration seqan3::align_cfg::edit_scheme
inlineconstexpr
Initial value:
gap_cost_affine{open_score{0}, extension_score{-1}}

Shortcut for edit distance configuration.

The edit distance computation is a specific sub-problem of the alignment computation with the aim to count the number of edits to transform one sequence into another. An edit operation can be a substitution, an insertion, or a deletion. Accordingly, this algorithm uses a predefined scoring scheme as well as a gap scheme, where the score for a match is 0, for a mismatch -1, for a gap -1, and for a gap open 0.

Performance

Under the hood SeqAn uses a fast bit-vector algorithm to compute the edit distance whenever possible. This depends on the final alignment configuration. Currently, the fast edit distance algorithm is only triggered for global alignments with the with free ends in the first sequence. So make sure to configure the seqan3::align_cfg::method_global configuration element accordingly (see class documentation).

The performance of the algorithm can further be improved if the number of maximal errors (edits) is known by using the align_cfg::min_score configuration.

Attention
If the edit distance configuration is combined with any other configuration element or setting, the algorithm falls back to the slower standard pairwise algorithm. For example the cfg_slow in the above example will trigger the slower algorithm which can handle the case if the ends are free in the second sequence instead of the first sequence.
seqan3::align_cfg::parallel
seqan3::detail::parallel_mode< std::integral_constant< seqan3::detail::align_config_id, seqan3::detail::align_config_id::parallel > > parallel
Enables the parallel execution of the alignment algorithm if possible for the given configuration.
Definition: align_config_parallel.hpp:40
seqan3::align_cfg::free_end_gaps_sequence1_trailing
A strong type representing free_end_gaps_sequence1_trailing of the seqan3::align_cfg::method_global.
Definition: align_config_method.hpp:85
seqan3::align_cfg::free_end_gaps_sequence2_leading
A strong type representing free_end_gaps_sequence2_leading of the seqan3::align_cfg::method_global.
Definition: align_config_method.hpp:75
align_config_method.hpp
Provides global and local alignment configurations.
seqan3::align_cfg::free_end_gaps_sequence1_leading
A strong type representing free_end_gaps_sequence1_leading of the seqan3::align_cfg::method_global.
Definition: align_config_method.hpp:65
seqan3::align_cfg::edit_scheme
constexpr configuration edit_scheme
Shortcut for edit distance configuration.
Definition: align_config_edit.hpp:51
seqan3::nucleotide_scoring_scheme::nucleotide_scoring_scheme
nucleotide_scoring_scheme() -> nucleotide_scoring_scheme< int8_t >
Default constructed objects deduce to int8_t.
thread
std::thread::hardware_concurrency
T hardware_concurrency(T... args)
seqan3::align_cfg::free_end_gaps_sequence2_trailing
A strong type representing free_end_gaps_sequence2_trailing of the seqan3::align_cfg::method_global.
Definition: align_config_method.hpp:95
seqan3::align_cfg::min_score
Sets the minimal score (maximal errors) allowed during an distance computation e.g....
Definition: align_config_min_score.hpp:37
seqan3::align_cfg::scoring_scheme::scoring_scheme
scoring_scheme(scheme_t) -> scoring_scheme< std::remove_cvref_t< scheme_t >>
Deduces the scoring scheme type from the constructor argument.
align_config_min_score.hpp
Provides seqan3::align_cfg::min_score configuration.
align_config_parallel.hpp
Provides seqan3::align_cfg::parallel configuration.
seqan3::align_cfg::method_global
Sets the global alignment method.
Definition: align_config_method.hpp:106
align_config_edit.hpp
Provides seqan3::align_cfg::edit_scheme.