Example Program
Alphabets
Examples for common alphabets.
SeqAn offers some common alphabets like Dna, Iupac, and AminoAcid, which are all simple types.
1#include <iostream>
2#include <seqan/basic.h>
3using namespace seqan;
4
5int main()
6{
The typical alphabet is convertible to char. Note that a conversion of a char into another alphabet and back can change the value of the char.
7    Dna a = 'a';
8    std::cout << a; //output: 'A'
9
10    Dna5 b = 'f'; //'f' is unknown character
11    std::cout << b; //output: 'N'
12
Many SeqAn alphabet classes can be converted into each other.
13    b = a;
14    std::cout << b; //output: 'A'
15
16    Iupac c = b;
17    std::cout << c; //output: 'A'
18
19    return 0;
20}
SeqAn - Sequence Analysis Library - www.seqan.de