# Concept AlphabetWithQualitiesConcept
An alphabet where qualities can be attached to the characters.

Extends | AlphabetConcept
All Extended | AlphabetConcept, AssignableConcept, CopyConstructibleConcept, DefaultConstructibleConcept
Defined in | <seqan/basic.h>
Signature | ``

## Member Function Overview

### Member Functions Inherited From AssignableConcept

- `operator=`

## Interface Function Overview

- `void assignQualityValue(c, q);`
  Assigns quality to a character from an alphabet with integrated quality, e.g. to a specified element from a sequence.
- `int getQualityValue(c);`
  Returns the quality of a character from an alphabet with integrated quality, e.g. the quality associated with a specified element from a sequence.

### Interface Functions Inherited From AssignableConcept

- `assign`
- `move`
- `set`

## Interface Metafunction Overview

- `HasQualities<TAlphabet>::VALUE;, HasQualities<TAlphabet>::Type;`
  Return whether the given type stores qualities besides the alphabet.
- `QualityValueSize<TAlphabet>::VALUE;`
  Return the number of quality values in characters from alphabet with qualities.

### Interface Metafunctions Inherited From AlphabetConcept

- `BitsPerValue`

## Interface Functions Detail

### `void assignQualityValue(c, q);`

Assigns quality to a character from an alphabet with integrated quality, e.g. to a specified element from a sequence.

#### Parameters

`c` | Target character to assign quality to.
`q` | Quality to assign to the character. The quality value is an integral value between 0 and 62 (inclusive).

If `q` is a `char` then `'!'` is subtracted from `q`. This is useful for ASCII encoded PHRED scores.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### See Also

- assignQualities
- convertQuality
- getQualityValue

### `int getQualityValue(c);`

Returns the quality of a character from an alphabet with integrated quality, e.g. the quality associated with a specified element from a sequence.

#### Parameters

`c` | Character to retrieve the quality from.

#### Returns

`int` | Quality value of `c`. The quality value is an `int` value between 0 and 62 (inclusive).

#### Examples

    String<Dna5Q> seq = "TATA";
    // Assign quality value to first 'T' in sequence seq
    assignQualityValue(seq[0], 35);
    // Print quality value of first 'T', and default quality value of first 'A'
    std::cout << getQualityValue(seq[0]) << std::endl; // Defined as 35
    std::cout << getQualityValue(seq[1]) << std::endl; // Default value 60

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### See Also

- assignQualityValue
- convertQuality

## Interface Metafunctions Detail

### `HasQualities<TAlphabet>::VALUE; HasQualities<TAlphabet>::Type;`

Return whether the given type stores qualities besides the alphabet.

#### Template Parameters

`TAlphabet` | The alphabe to query.

#### Returns

`VALUE` | `true` or `false`
`Type` | `True` or `False`

### `QualityValueSize<TAlphabet>::VALUE;`

Return the number of quality values in characters from alphabet with qualities.

#### Template Parameters

`TAlphabet` | The alphabet to query for its value size.

#### Returns

`VALUE` | The cardinality of the set of qualities.

#### Dox Sources

    /*!
     * @concept AlphabetWithQualitiesConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @extends AlphabetConcept
     *
     * @brief An alphabet where qualities can be attached to the characters.
     *
     * @mfn AlphabetWithQualitiesConcept#HasQualities
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Return whether the given type stores qualities besides the alphabet.
     *
     * @signature HasQualities<TAlphabet>::VALUE;
     * @signature HasQualities<TAlphabet>::Type;
     *
     * @tparam TAlphabet The alphabe to query.
     *
     * @return VALUE <tt>true</tt> or <tt>false</tt>
     * @return Type <tt>True</tt> or <tt>False</tt>
     *
     * @mfn AlphabetWithQualitiesConcept#QualityValueSize
     *
     * @brief Return the number of quality values in characters from alphabet with
     *        qualities.
     *
     * @signature QualityValueSize<TAlphabet>::VALUE;
     *
     * @tparam TAlphabet The alphabet to query for its value size.
     *
     * @return VALUE The cardinality of the set of qualities.
     *
     * @fn AlphabetWithQualitiesConcept#getQualityValue
     *
     * @brief Returns the quality of a character from an alphabet with integrated
     *        quality, e.g. the quality associated with a specified element from a
     *        sequence.
     *
     * @signature int getQualityValue(c);
     *
     * @param[in] c Character to retrieve the quality from.
     *
     * @return int Quality value of <tt>c</tt>. The quality value is an <tt>int</tt>
     *             value between 0 and 62 (inclusive).
     *
     * @section Examples
     *
     * @code{.cpp}
     * String<Dna5Q> seq = "TATA";
     * // Assign quality value to first 'T' in sequence seq
     * assignQualityValue(seq[0], 35);
     * // Print quality value of first 'T', and default quality value of first 'A'
     * std::cout << getQualityValue(seq[0]) << std::endl; // Defined as 35
     * std::cout << getQualityValue(seq[1]) << std::endl; // Default value 60
     * @endcode
     *
     *
     * @see AlphabetWithQualitiesConcept#assignQualityValue
     * @see convertQuality
     *
     * @fn AlphabetWithQualitiesConcept#assignQualityValue
     *
     * @brief Assigns quality to a character from an alphabet with integrated
     *        quality, e.g. to a specified element from a sequence.
     *
     * @signature void assignQualityValue(c, q);
     *
     * @param[out] c Target character to assign quality to.
     * @param[in] q Quality to assign to the character. The quality value is an
     *              integral value between 0 and 62 (inclusive).
     *
     * If <tt>q</tt> is a <tt>char</tt> then <tt>'!'</tt> is subtracted from
     * <tt>q</tt>. This is useful for ASCII encoded PHRED scores.
     *
     * @see AlphabetWithQualitiesConcept#getQualityValue
     * @see convertQuality
     * @see assignQualities
     */