SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
Configuration

Data structures and utility functions for configuring search algorithm. More...

+ Collaboration diagram for Configuration:

Classes

struct  seqan3::search_cfg::deletion< value_t >
 A strong type of underlying type uint8_t or double that represents the number or rate of deletions. More...
 
struct  seqan3::search_cfg::insertion< value_t >
 A strong type of underlying type uint8_t or double that represents the number or rate of insertions. More...
 
class  seqan3::search_cfg::max_error< errors_t >
 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. More...
 
class  seqan3::search_cfg::max_error_rate< errors_t >
 A configuration element for the maximum number of errors in percent of the query length across all error types (mismatches, insertions, deletions). This is an upper bound of errors independent from error rates of specific error types. More...
 
struct  seqan3::search_cfg::mode< mode_t >
 Configuration element to determine the search mode. More...
 
struct  seqan3::search_cfg::output< output_t >
 Configuration element to determine the output type of hits. More...
 
struct  seqan3::search_cfg::strata
 Configuration element to receive all hits with the best number of errors plus the strata value. A strong type of underlying type uint8_t that represents the number or errors for strata. All hits are found with the fewest numbererrors plus 'value'. More...
 
struct  seqan3::search_cfg::substitution< value_t >
 A strong type of underlying type uint8_t or double that represents the number or rate of substitutions. More...
 
struct  seqan3::search_cfg::total< value_t >
 A strong type of underlying type uint8_t or double that represents the number or rate of total errors. More...
 

Typedefs

using seqan3::search_cfg::parallel = seqan3::detail::parallel_mode< std::integral_constant< detail::search_config_id, detail::search_config_id::parallel > >
 Enables the parallel execution of the search algorithm if possible for the given configuration. More...
 

Variables

detail::search_mode_all constexpr seqan3::search_cfg::all
 Configuration element to receive all hits within the error bounds.
 
detail::search_mode_all_best constexpr seqan3::search_cfg::all_best
 Configuration element to receive all hits within the lowest number of errors.
 
detail::search_mode_best constexpr seqan3::search_cfg::best
 Configuration element to receive one best hit (with the lowest number of errors).
 
constexpr configuration seqan3::search_cfg::default_configuration
 The default configuration. More...
 
detail::search_output_index_cursor constexpr seqan3::search_cfg::index_cursor
 Configuration element to receive all hits within the error bounds.
 
detail::search_output_text_position constexpr seqan3::search_cfg::text_position
 Configuration element to receive all hits within the lowest number of errors.
 

Detailed Description

Data structures and utility functions for configuring search algorithm.

See also
Search

Introduction

In SeqAn the search algorithm uses a configuration object to determine the desired number/rate of errors, what hits are considered as results, and how to output the result. These configurations exist in their own namespace, namely seqan3::search_cfg, to disambiguate them from the configuration of other algorithms.

If no configuration is provided upon invoking the seqan3::search algorithm, a default configuration is provided:

Combining configuration elements

Configurations can be combined using the |-operator. If a combination is invalid, a static assertion is triggered during compilation and will inform the user that the the last config cannot be combined with any of the configs from the left-hand side of the configuration specification. Unfortunately, the names of the invalid types cannot be printed within the static assert, but the following table shows which combinations are possible. In general, the same configuration element cannot occur more than once inside of a configuration specification.

| Config | 0 | 1 | 2 | 3 | | ---------------------------------------------------------—|----—|----—|----—|----—| | 0: Max error | ❌ | ❌ | ✅ | ✅ | ✅ | | 1: Max error rate | ❌ | ❌ | ✅ | ✅ | ✅ | | 2: Output | ✅ | ✅ | ❌ | ✅ | ✅ | | 3: Mode | ✅ | ✅ | ✅ | ❌ | ✅ | | 4: Parallel | ✅ | ✅ | ✅ | ✅ | ❌ |

Typedef Documentation

◆ parallel

using seqan3::search_cfg::parallel = typedef seqan3::detail::parallel_mode<std::integral_constant<detail::search_config_id, detail::search_config_id::parallel> >

Enables the parallel execution of the search algorithm if possible for the given configuration.

With this configuration you can enable the parallel execution of the search algorithm.

The config element takes the number of threads as a parameter, which must be greater than 0.

Example

int main()
{
// Enable parallel execution of the search algorithm with 8 threads (and allow 1 error of any type).
return 0;
}

Variable Documentation

◆ default_configuration

constexpr configuration seqan3::search_cfg::default_configuration
inline
Initial value:
substitution(value_t) -> substitution< uint8_t >
Deduces to uint8_t for all types modelling std::integral.
output(output_t) -> output< remove_cvref_t< output_t >>
Deduces search output type from constructor argument.
max_error() -> max_error<>
Deduces empty list of error specifiers.
detail::search_output_text_position constexpr text_position
Configuration element to receive all hits within the lowest number of errors.
Definition: output.hpp:42
insertion(value_t) -> insertion< uint8_t >
Deduces to uint8_t for all types modelling std::integral.
detail::search_mode_all constexpr all
Configuration element to receive all hits within the error bounds.
Definition: mode.hpp:43
mode(mode_type) -> mode< mode_type >
Deduces the alignment mode from the given constructor argument.
deletion(value_t) -> deletion< uint8_t >
Deduces to uint8_t for integral types.
total(value_t) -> total< uint8_t >
Deduces to uint8_t for all types modelling std::integral.

The default configuration.