|
SeqAn3 3.4.2-rc.1
The Modern C++ library for sequence analysis.
|
Provides the function max_error_counts if inherited by a search algorithm.
More...
#include <seqan3/search/detail/policy_max_error.hpp>
Protected Member Functions | |
| template<std::ranges::forward_range query_t> | |
| auto | max_error_counts (query_t &&query) |
| Returns a detail::search_param object filled by the information from the configuration. | |
Constructors, destructor and assignment | |
| policy_max_error ()=default | |
| Defaulted. | |
| policy_max_error (policy_max_error const &)=default | |
| Defaulted. | |
| policy_max_error (policy_max_error &&)=default | |
| Defaulted. | |
| policy_max_error & | operator= (policy_max_error const &)=default |
| Defaulted. | |
| policy_max_error & | operator= (policy_max_error &&)=default |
| Defaulted. | |
| ~policy_max_error ()=default | |
| Defaulted. | |
| template<typename configuration_t > requires is_type_specialisation_of_v<configuration_t, seqan3::configuration> | |
| policy_max_error (configuration_t const &config) | |
| Initialises the policy with the given configuration. | |
Protected Attributes | |
| search_cfg::max_error_deletion | deletion {} |
| The deletion errors set by the user. | |
| bool | has_max_error_total {false} |
| Flag indicating if max error total was given. | |
| search_cfg::max_error_insertion | insertion {} |
| The insertion errors set by the user. | |
| bool | only_max_error_total {false} |
| Flag indicating if only max error was given. | |
| search_cfg::max_error_substitution | substitution {} |
| The substitution errors set by the user. | |
| search_cfg::max_error_total | total {} |
| The total errors set by the user. | |
Private Member Functions | |
| uint8_t | to_error_count (std::variant< search_cfg::error_count, search_cfg::error_rate > const &error_variant, size_t const query_size) |
| Returns a uint8_t object directly given by the search_cfg::error_count or calculated by the search_cfg::error_rate depending on the set alternative. | |
Provides the function max_error_counts if inherited by a search algorithm.
|
inlineexplicitprotected |
Initialises the policy with the given configuration.
| configuration_t | The configuration type; must be an instance of seqan3::configuration. |
| [in] | config | The search configuration object. |
Initialises the maximal errors for the respective edit operations from the given configuration.
|
inlineprotected |
Returns a detail::search_param object filled by the information from the configuration.
| query_t | Must model std::ranges::forward_range over the index's alphabet. |
| [in] | query | The current query sequence. |
| std::invalid_argument |
|
inlineprivate |
Returns a uint8_t object directly given by the search_cfg::error_count or calculated by the search_cfg::error_rate depending on the set alternative.
| [in] | error_variant | A std::variant over search_cfg::error_count and search_cfg::error_rate. |
| [in] | query_size | The size of the query. |
| std::invalid_argument | if error_rate is not between 0 and 1. |
If seqan3::search_cfg::error_count is set in the configuration, its value already is of type uint8_t and can be returned as is. If seqan3::search_cfg::error_rate is set in the configuration, the error rates are converted to error counts based on the length of the query sequence.