75 template <fm_index_concept index_t,
typename queries_t,
typename configuration_t>
80 detail::is_algorithm_configuration_v<remove_cvref_t<configuration_t>>
82 inline auto search(index_t
const & index, queries_t && queries, configuration_t
const & cfg)
84 if constexpr (contains<search_cfg::id::max_error>(cfg))
86 auto & [total, subs, ins, del] = get<search_cfg::id::max_error>(cfg);
88 throw std::invalid_argument(
"The substitution error threshold is higher than the total error threshold.");
90 throw std::invalid_argument(
"The insertion error threshold is higher than the total error threshold.");
92 throw std::invalid_argument(
"The deletion error threshold is higher than the total error threshold.");
94 else if constexpr (contains<search_cfg::id::max_error_rate>(cfg))
96 auto & [total, subs, ins, del] = get<search_cfg::id::max_error_rate>(cfg);
98 throw std::invalid_argument(
"The substitution error threshold is higher than the total error threshold.");
100 throw std::invalid_argument(
"The insertion error threshold is higher than the total error threshold.");
102 throw std::invalid_argument(
"The deletion error threshold is higher than the total error threshold.");
105 if constexpr (contains<search_cfg::id::mode>(cfg))
107 if constexpr (contains<search_cfg::id::output>(cfg))
108 return detail::search_all(index, queries, cfg);
115 if constexpr (contains<search_cfg::id::output>(cfg))
116 return detail::search_all(index, queries, cfg2);
139 template <fm_index_concept index_t,
typename queries_t>
144 inline auto search(index_t
const & index, queries_t && queries)
152 return search(index, queries, default_cfg);
detail::search_output_text_position constexpr text_position
Configuration element to receive all hits within the lowest number of errors.
Definition: output.hpp:67
detail::search_config_output_adaptor< seqan3::detail::search_config_output > constexpr output
Configuration element to determine the output type of hits.
Definition: output.hpp:137
Provides the public interface for search algorithms.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
A strong type of underlying type uint8_t or double that represents the number or rate of deletions...
Definition: max_error_common.hpp:139
auto search(index_t const &index, queries_t &&queries, configuration_t const &cfg)
Search a query or a range of queries in an index.
Definition: search.hpp:82
A strong type of underlying type uint8_t or double that represents the number or rate of total errors...
Definition: max_error_common.hpp:57
A strong type of underlying type uint8_t or double that represents the number or rate of substitution...
Definition: max_error_common.hpp:85
Specifies requirements of a Range type for which begin returns a type that models std::RandomAccessIt...
Specifies requirements of a Range type for which begin returns a type that models std::ForwardIterato...
detail::search_mode_all constexpr all
Configuration element to receive all hits within the error bounds.
Definition: mode.hpp:67
Meta-header for the FM index module.
detail::search_config_mode_adaptor< seqan3::detail::search_config_mode > constexpr mode
Configuration element to determine the search mode.
Definition: mode.hpp:150
Provides seqan3::view::persist.
constexpr detail::search_config_max_error_adaptor max_error
A configuration element for the maximum number of errors across all error types (mismatches, insertions, deletions). This is an upper bound of errors independent from error numbers of specific error types.
Definition: max_error.hpp:168
A strong type of underlying type uint8_t or double that represents the number or rate of insertions...
Definition: max_error_common.hpp:112