Gap

Meta-header for the gap submodule; includes all headers from alphabet/gap/. gap.

Author
Marcel Ehrhardt <marcel.ehrhardt AT fu-berlin.de>

Contains seqan3::gap.

Author
Marcel Ehrhardt <marcel.ehrhardt AT fu-berlin.de>
Author
David Heller <david.heller AT fu-berlin.de>

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

struct gap
#include <alphabet/gap/gap.hpp>

The alphabet of a gap character ‘-‘.

The alphabet always has the same value (‘-‘).

gap my_gap = gap::GAP;
gap another_gap{}.assign_char('A'); // setting this does not change anything

std::cout << my_gap.to_char(); // outputs '-'
if (my_gap.to_char() == another_gap.to_char())
   std::cout << "Both gaps are the same!";

Inherits from seqan3::alphabet_concept

Requirements for seqan3::semi_alphabet_concept

You can expect these functions on all types that implement seqan3::semi_alphabet_concept.

Requirements for seqan3::alphabet_concept

You can expect these functions on all types that implement seqan3::alphabet_concept.

Letter values

Static member “letters” that can be assigned to the alphabet or used in aggregate initialization.

constexpr gap GAP = {}

Read functions

constexpr char_type to_char() const

Return the letter as a character of char_type (returns always ‘-‘).

constexpr rank_type to_rank() const

Return the letter’s numeric value or rank in the alphabet. (returns always 0)

Write functions

constexpr gap &assign_char(char_type const)

Assign from a character (no-op, since gap has only one character).

Parameters
  • c: not used, since gap has only one character

constexpr gap& seqan3::gap::assign_rank(] rank_type const i)

Assign from a numeric value (no-op, since gap has only one character).

Parameters
  • i: not used, since gap has only one character

Comparison operators

constexpr bool operator==(gap const&) const
constexpr bool operator!=(gap const&) const
constexpr bool operator<(gap const&) const
constexpr bool operator>(gap const&) const
constexpr bool operator<=(gap const&) const
constexpr bool operator>=(gap const&) const

Public Types

using char_type = char

The type of the alphabet when converted to char (e.g. via to_char()).

using rank_type = bool

The type of the alphabet when represented as a number (e.g. via to_rank()).

Public Static Attributes

constexpr rank_type value_size = {1}

The size of the alphabet, i.e. the number of different values it can take.

Contains seqan3::gapped.

Author
Marcel Ehrhardt <marcel.ehrhardt AT fu-berlin.de>
Author
David Heller <david.heller AT fu-berlin.de>

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

template <typename alphabet_t>
struct gapped
#include <alphabet/gap/gapped.hpp>

A gapped that extends a given alphabet with a gap character.

The gapped represents the union of a given alphabet and the seqan3::gap alphabet (e.g. the four letter DNA alphabet + a gap character). Note that you cannot assign regular characters, but additional functions for this are available.

Template Parameters
  • alphabet_t: Type of the letter, e.g. dna4; must satisfy seqan3::alphabet_concept.

gapped<dna4> gapped_letter{};
gapped<dna4> converted_letter{dna4::C};
// doesn't work:
// gapped<dna4> my_letter{'A'};

gapped<dna4>{}.assign_char('C'); // <- this does!
gapped<dna4>{}.assign_char('-'); // gap character
gapped<dna4>{}.assign_char('K'); // unknown characters map to the default/unknown
                                          // character of the given alphabet type (i.e. A of dna4)

See
For more details see union_composition, which is the base class and more general than the gapped.

Inherits from seqan3::alphabet_concept, seqan3::union_composition< alphabet_t, gap >

Requirements for seqan3::semi_alphabet_concept

You can expect these functions on all types that implement seqan3::semi_alphabet_concept.

Requirements for seqan3::alphabet_concept

You can expect these functions on all types that implement seqan3::alphabet_concept.

Public Functions

constexpr gapped &assign_char(char_type const c)

Assign from a character.

constexpr gapped &assign_rank(rank_type const i)

Assign from a numeric value.