Provides the gap alphabet and functionality to make an alphabet a gapped alphabet. More...
Classes | |
class | bio::alphabet::gap |
The alphabet of a gap character '-'. More... | |
Typedefs | |
template<typename alphabet_t > | |
using | bio::alphabet::gapped = variant< alphabet_t, gap > |
Extends a given alphabet with a gap character. | |
Provides the gap alphabet and functionality to make an alphabet a gapped alphabet.
The gap symbol (-
) is used in alignments to represent an interruption in an alignment, usually the result of an insertion or deletion. The bio::alphabet::gap alphabet represents this (single) gap symbol and satisfies the bio::alphabet::alphabet.
The main purpose of bio::alphabet::gap is to be combined with other alphabets. This can easily be achieved by using the bio::alphabet::gapped<> template which transforms any other alphabet to be a composite of that alphabet + the gap character.
using bio::alphabet::gapped = typedef variant<alphabet_t, gap> |
Extends a given alphabet with a gap character.
alphabet_t | Type of the letter, e.g. dna4; must satisfy bio::alphabet::writable_alphabet. |
The gapped alphabet represents the variant of a given alphabet and the bio::alphabet::gap alphabet (e.g. the four letter DNA alphabet + a gap character).
The gapped alphabet may be brace initialized from the static letter members of the underlying alphabet and the bio::alphabet::gap alphabet. Note that you cannot assign the alphabet by using letters of type char
, but you instead have to use the function assign_char() of the underlying alphabet or bio::alphabet::gap::assign_char().