SeqAn3
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...
 

Detailed Description

Data structures and utility functions for configuring search algorithm.

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 algoirthms.

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

// No errors, all hits as text position
configuration const default_cfg = search_cfg::max_error{search_cfg::total{0},
search_cfg::substitution{0},
search_cfg::insertion{0},
search_cfg::deletion{0}}
| search_cfg::output{search_cfg::text_position}
| search_cfg::mode{search_cfg::all};

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