SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
detail.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
13#pragma once
14
16
17namespace seqan3::detail
18{
19
23enum struct align_config_id : uint8_t
24{
25 band,
26 debug,
27 gap,
28 global,
29 local,
30 min_score,
31 on_result,
32 output_alignment,
33 output_begin_position,
34 output_end_position,
35 output_sequence1_id,
36 output_sequence2_id,
37 output_score,
38 parallel,
39 result_type,
40 score_type,
41 scoring,
42 vectorised,
43 SIZE
44};
45
46// ----------------------------------------------------------------------------
47// compatibility_table
48// ----------------------------------------------------------------------------
49
55template <>
56inline constexpr std::array<std::array<bool, static_cast<uint8_t>(align_config_id::SIZE)>,
57 static_cast<uint8_t>(align_config_id::SIZE)> compatibility_table<align_config_id>
58{
59 { //band
60 //| debug
61 //| | gap
62 //| | | global
63 //| | | | local
64 //| | | | | min_score
65 //| | | | | | on_result
66 //| | | | | | | output_alignment
67 //| | | | | | | | output_begin_position
68 //| | | | | | | | | output_end_position
69 //| | | | | | | | | | output_sequence1_id
70 //| | | | | | | | | | | output_sequence2_id
71 //| | | | | | | | | | | | output_score
72 //| | | | | | | | | | | | | parallel
73 //| | | | | | | | | | | | | | result_type
74 //| | | | | | | | | | | | | | | score_type
75 //| | | | | | | | | | | | | | | | scoring
76 //| | | | | | | | | | | | | | | | | vectorised
77 { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 0: band
78 { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 1: debug
79 { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 2: gap
80 { 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 3: global
81 { 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 4: local
82 { 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 5: max_error
83 { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 6: on_result
84 { 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 7: output_alignment
85 { 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 8: output_begin_position
86 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, // 9: output_end_position
87 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1}, // 10: output_sequence1_id
88 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}, // 11: output_sequence2_id
89 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1}, // 12: output_score
90 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1}, // 13: parallel
91 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1}, // 14: result_type
92 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1}, // 15: score_type
93 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, // 16: scoring
94 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0} // 17: vectorised
95 }
96};
97
98} // namespace seqan3::detail
Provides concepts for the configuration classes.
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:38
on_result(callback_t &&) -> on_result< std::decay_t< callback_t > >
Deduces the callback type from a forwarding constructor argument.