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

constexpr detail::search_mode_all seqan3::search_cfg::all
 Configuration element to receive all hits within the error bounds.
 
constexpr detail::search_mode_all_best seqan3::search_cfg::all_best
 Configuration element to receive all hits within the lowest number of errors.
 
constexpr detail::search_mode_best 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...
 
constexpr detail::search_output_index_cursor seqan3::search_cfg::index_cursor
 Configuration element to receive all hits within the error bounds.
 
constexpr detail::search_output_text_position 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
inlineconstexpr
Initial value:

The default configuration.

seqan3::search_cfg::parallel
seqan3::detail::parallel_mode< std::integral_constant< detail::search_config_id, detail::search_config_id::parallel > > parallel
Enables the parallel execution of the search algorithm if possible for the given configuration.
Definition: parallel.hpp:34
seqan3::search_cfg::max_error::max_error
max_error() -> max_error<>
Deduces empty list of error specifiers.
parallel.hpp
Provides seqan3::search_cfg::parallel configuration.
seqan3::search_cfg::deletion
A strong type of underlying type uint8_t or double that represents the number or rate of deletions.
Definition: max_error_common.hpp:130
seqan3::search_cfg::output::output
output(output_t) -> output< remove_cvref_t< output_t >>
Deduces search output type from constructor argument.
seqan3::search_cfg::substitution::substitution
substitution(value_t) -> substitution< uint8_t >
Deduces to uint8_t for all types modelling std::integral.
max_error.hpp
Provides the configuration for maximum number of errors for all error types.
seqan3::search_cfg::total::insertion
insertion(value_t) -> insertion< uint8_t >
Deduces to uint8_t for all types modelling std::integral.
seqan3::configuration
Collection of elements to configure an algorithm.
Definition: configuration.hpp:81
seqan3::search_cfg::all
constexpr detail::search_mode_all all
Configuration element to receive all hits within the error bounds.
Definition: mode.hpp:43
seqan3::search_cfg::substitution
A strong type of underlying type uint8_t or double that represents the number or rate of substitution...
Definition: max_error_common.hpp:64
seqan3::align_cfg::mode::mode
mode(mode_type) -> mode< mode_type >
Deduces the alignment mode from the given constructor argument.
all.hpp
Meta-header for the search configuration module .
seqan3::search_cfg::total::total
total(value_t) -> total< uint8_t >
Deduces to uint8_t for all types modelling std::integral.
seqan3::search_cfg::total
A strong type of underlying type uint8_t or double that represents the number or rate of total errors...
Definition: max_error_common.hpp:30
seqan3::search_cfg::max_error
A configuration element for the maximum number of errors across all error types (mismatches,...
Definition: max_error.hpp:43
seqan3::search_cfg::deletion::deletion
deletion(value_t) -> deletion< uint8_t >
Deduces to uint8_t for integral types.
seqan3::search_cfg::insertion
A strong type of underlying type uint8_t or double that represents the number or rate of insertions.
Definition: max_error_common.hpp:97
seqan3::search_cfg::mode
Configuration element to determine the search mode.
Definition: mode.hpp:86
seqan3::search_cfg::output
Configuration element to determine the output type of hits.
Definition: output.hpp:59
seqan3::search_cfg::text_position
constexpr detail::search_output_text_position text_position
Configuration element to receive all hits within the lowest number of errors.
Definition: output.hpp:42