Modules | |
Configuration | |
Data structures and utility functions for configuring search algorithm. | |
Functions | |
template<fm_index_concept index_t, typename queries_t , typename configuration_t > | |
auto | seqan3::search (index_t const &index, queries_t &&queries, configuration_t const &cfg) |
Search a query or a range of queries in an index. More... | |
template<fm_index_concept index_t, typename queries_t > | |
auto | seqan3::search (index_t const &index, queries_t &&queries) |
Search a query or a range of queries in an index. It will not allow for any errors and will output all matches as positions in the text. More... | |
The Search module offers a simple unified interface that allows searching SeqAn3 indices such as FM indices or k-mer indices and choosing the best algorithm based on the index at hand.
The search algorithms for FM indices implement either a trivial backtracking approach or an optimum search scheme. Latter are currently only available for searches with up to and including three errors using bidirectional indices. The optimum search schemes will be improved in the future to handle unidirectional indices and higher error counts.
Kianfar, K., Pockrandt, C., Torkamandi, B., Luo, H., & Reinert, K. (2018).
Optimum Search Schemes for Approximate String Matching Using Bidirectional FM-Index. bioRxiv, 301085. https://doi.org/10.1101/301085
|
inline |
Search a query or a range of queries in an index.
index_t | Must model seqan3::fm_index_concept. |
queries_t | Must be a std::ranges::RandomAccessRange over the index's alphabet. a range of queries must additionally model std::ranges::ForwardRange. |
[in] | index | String index to be searched. |
[in] | queries | A single query or a range of queries. |
[in] | cfg | A configuration object specifying the search parameters (e.g. number of errors, error types, output format, etc.). |
cfg
), or void
if an on_hit delegate has been specified.configuration_t
everywhere once it has been refactored by rrahn.Each query with errors takes
where
is the maximum number of errors.
Strong exception guarantee if iterating the query does not change its state and if invoking a possible delegate specified in cfg
also has a strong exception guarantee; basic exception guarantee otherwise.
|
inline |
Search a query or a range of queries in an index. It will not allow for any errors and will output all matches as positions in the text.
index_t | Must model seqan3::fm_index_concept. |
queries_t | Must be a std::ranges::RandomAccessRange over the index's alphabet. a range of queries must additionally model std::ranges::ForwardRange. |
[in] | index | String index to be searched. |
[in] | queries | A single query or a range of queries. |
Each query with errors takes
where
is the maximum number of errors.
Strong exception guarantee if iterating the query does not change its state; basic exception guarantee otherwise.