|
SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
|
Configures the alignment algorithm given the sequences and the configuration object. More...
#include <seqan3/alignment/pairwise/alignment_configurator.hpp>
Inheritance diagram for seqan3::detail::alignment_configurator:Classes | |
| struct | select_find_optimum_policy |
| Transformation trait that chooses the correct find optimum policy. More... | |
| struct | select_gap_policy |
| Transformation trait that chooses the correct gap policy. More... | |
| struct | select_gap_recursion_policy |
| Selects the gap recursion policy. More... | |
| struct | select_matrix_policy |
| Transformation trait that chooses the correct matrix policy. More... | |
Static Public Member Functions | |
| template<align_pairwise_range_input sequences_t, typename config_t > requires is_type_specialisation_of_v<config_t, configuration> | |
| static constexpr auto | configure (config_t const &cfg) |
| Configures the algorithm. | |
Private Types | |
| template<typename traits_t , typename... args_t> | |
| using | select_alignment_algorithm_t = lazy_conditional_t< traits_t::is_banded, lazy< pairwise_alignment_algorithm_banded, args_t... >, lazy< pairwise_alignment_algorithm, args_t... > > |
| Selects either the banded or the unbanded alignment algorithm based on the given traits type. | |
Static Private Member Functions | |
| template<typename function_wrapper_t , typename config_t > | |
| static constexpr function_wrapper_t | configure_edit_distance (config_t const &cfg) |
| Configures the edit distance algorithm. | |
| template<typename function_wrapper_t , typename config_t > | |
| static constexpr function_wrapper_t | configure_scoring_scheme (config_t const &cfg) |
| Configures the scoring scheme to use for the alignment computation. | |
| template<typename function_wrapper_t , typename... policies_t, typename config_t > | |
| static constexpr function_wrapper_t | make_algorithm (config_t const &cfg) |
| Constructs the actual alignment algorithm wrapped in the passed std::function object. | |
| template<typename config_t > | |
| static constexpr auto | maybe_default_output (config_t const &config) noexcept |
| Adds maybe the default output arguments if the user did not provide any. | |
Configures the alignment algorithm given the sequences and the configuration object.
|
inlinestaticconstexpr |
Configures the algorithm.
| sequences_t | The range type containing the sequence pairs; must model std::ranges::forward_range. |
| config_t | The alignment configuration type; must be a specialisation of seqan3::configuration. |
| [in] | cfg | The configuration object. |
This function reads the seqan3::configuration object and generates the corresponding alignment algorithm type. During this process some runtime configurations are converted to static configurations if required. In case of a missing configuration that has a default, e.g. the seqan3::align_cfg::output_* options, the default version of this configuration element is added to the passed configuration object. The return type is a std::pair over a std::function object and the adapted configuration object. Thus, the calling function has access to the possibly modified configuration object. The function object type is determined using the following type trait:
The arguments to the function object are two ranges, which always need to be passed as lvalue references. Note that even if they are not passed as const lvalue reference (which is not possible, since not all views are const-iterable), they are not modified within the alignment algorithm.
|
inlinestaticconstexprprivate |
Configures the edit distance algorithm.
| function_wrapper_t | The invocable alignment function type-erased via std::function. |
| config_t | The alignment configuration type. |
| [in] | cfg | The passed configuration object. |
|
staticconstexprprivate |
Configures the scoring scheme to use for the alignment computation.
| function_wrapper_t | The invocable alignment function type-erased via std::function. |
| config_t | The alignment configuration type. |
| [in] | cfg | The passed configuration object. |
The correct scoring scheme is selected based on the vectorisation mode. If no vectorisation is enabled, the scoring scheme is the one configured in seqan3::align_cfg::scoring. If vectorisation is enabled, then the appropriate scoring scheme for the vectorised alignment algorithm is selected. This involves checking whether the passed scoring scheme is a matrix or a simple scoring scheme, which has only mismatch and match costs.
|
inlinestaticconstexprprivate |
Constructs the actual alignment algorithm wrapped in the passed std::function object.
| function_wrapper_t | The invocable alignment function type-erased via std::function. |
| policies_t | A template parameter pack for the already configured policy types. |
| config_t | The alignment configuration type. |
| [in] | cfg | The passed configuration object. |
Configures the matrix and the gap policy and constructs the algorithm with the configured policies.
|
inlinestaticconstexprprivatenoexcept |
Adds maybe the default output arguments if the user did not provide any.
| config_t | The original type of the alignment configuration. |
| [in] | config | The original user configuration to check. |