Loading...
Searching...
No Matches
seqan3::align_cfg::min_score Class Reference
Sequence Alignment » Configuration

Sets the minimal score (maximal errors) allowed during an distance computation e.g. edit distance. More...

`#include <seqan3/alignment/configuration/align_config_min_score.hpp>`

Inheritance diagram for seqan3::align_cfg::min_score:
[legend]

## Public Member Functions

Constructors, destructor and assignment
constexpr | min_score () noexcept=default
| Defaulted.
constexpr | min_score (min_score const &) noexcept=default
| Defaulted.
constexpr | min_score (min_score &&) noexcept=default
| Defaulted.
constexpr min_score & | operator= (min_score const &) noexcept=default
| Defaulted.
constexpr min_score & | operator= (min_score &&) noexcept=default
| Defaulted.
| ~min_score () noexcept=default
| Defaulted.
constexpr | min_score (int32_t const score)
| Initialises the minimal score.

## Public Attributes

int32_t | score {std::numeric_limits<int32_t>::lowest()}
| Minimal score for the distance computation [default: -infinity].

## Static Public Attributes

static constexpr seqan3::detail::align_config_id | id {seqan3::detail::align_config_id::min_score}
| Internal id to check for consistent configuration settings.

## Detailed Description

Sets the minimal score (maximal errors) allowed during an distance computation e.g. edit distance.

This configuration can only be used for computing the edit distance. It restricts the number of substitutions, insertions, and deletions within the alignment to the given value and can thereby speed up the edit distance computation. A typical use case is to verify a candidate region during read mapping where the number of maximal errors is given beforehand. If this configuration is used for an alignment algorithm that does not compute the edit distance, a seqan3::invalid_alignment_configuration exception will be thrown.

### Example

// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <seqan3/alignment/configuration/align_config_min_score.hpp>
#include <seqan3/core/configuration/configuration.hpp>
int main()
{
// Allow a minimal score of -5, i.e. at most 5 edit operations.
seqan3::configuration config = seqan3::align_cfg::min_score{-5};
auto min_score = std::get<seqan3::align_cfg::min_score>(config);
min_score.score = -5;
}
align_config_min_score.hpp
Provides seqan3::align_cfg::min_score configuration.
seqan3::align_cfg::min_score
Sets the minimal score (maximal errors) allowed during an distance computation e.g....
Definition align_config_min_score.hpp:36
seqan3::align_cfg::min_score::score
int32_t score
Minimal score for the distance computation [default: -infinity].
Definition align_config_min_score.hpp:39
seqan3::configuration
Collection of elements to configure an algorithm.
Definition configuration.hpp:42
configuration.hpp
Provides seqan3::configuration and utility functions.

## Constructor & Destructor Documentation

## min_score()

seqan3::align_cfg::min_score::min_score | ( | int32_t const | score | ) |

inline constexpr

Initialises the minimal score.

Parameters

  score | Minimal score for the distance computation [default: -infinity].

The documentation for this class was generated from the following file:

- align_config_min_score.hpp

Hide me