File: alphabet.cpp

package info (click to toggle)
seqan 1.4.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 34,164 kB
  • sloc: cpp: 226,267; python: 7,737; xml: 189; sh: 153; awk: 129; makefile: 48
file content (25 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
///A tutorial about the use of alphabets.
#include <iostream>
#include <seqan/basic.h>
using namespace seqan;

int main()
{
///The typical alphabet is convertible to $char$.
///A conversion of a $char$ back and forth into another alphabet can, however, change the value of the $char$.
	Dna a = 'a';
	std::cout << a << std::endl; 

///'f' is not in Dna5 and hence $b$ is set to 'N'.
	Dna5 b = 'f'; 
	std::cout << b << std::endl; 

///Many SeqAn alphabet classes can be converted into each other.
	b = a;
	std::cout << b << std::endl; 

	Iupac c = b;
	std::cout << c << std::endl; 

	return 0;
}