5 #include <boost/test/unit_test.hpp> 8 BOOST_AUTO_TEST_SUITE(AlphabetTest)
10 BOOST_AUTO_TEST_CASE( check_dna_alphabet )
12 for (
auto c : {
'A',
'G',
'C',
'T'} )
20 BOOST_AUTO_TEST_CASE( check_isDNA_1 )
28 BOOST_AUTO_TEST_CASE( check_isDNA_2 )
31 auto itr = std::find_if( f.
begin(),f.
end(),
32 [](
const char & __ch) {
35 BOOST_REQUIRE_EQUAL( std::distance(f.
begin(),itr),4 );
37 f.seq.erase( std::remove_if(f.
begin(),
39 [](
const char & __ch) {
42 BOOST_REQUIRE_EQUAL(f.seq,
"ATGCAGC");
46 BOOST_AUTO_TEST_CASE( dna_poly_alphabet_1 )
52 BOOST_AUTO_TEST_CASE( dna_poly_alphabet_2 )
57 BOOST_AUTO_TEST_CASE( dna_poly_alphabet_3 )
59 for (
auto c : {
'A',
'C',
'G',
'T',
'N',
'0',
'1',
'-'} )
67 BOOST_AUTO_TEST_CASE( dna_poly_alphabet_4 )
69 for (
auto c : {
'a',
'c',
'g',
't',
'n',
'W',
'K'} )
77 BOOST_AUTO_TEST_CASE( dna_poly_alphabet_5 )
79 for (
auto c : {
'a',
'c',
'g',
't',
'n',
'W',
'K'} )
86 BOOST_AUTO_TEST_SUITE_END()
bool isDNA(const char &ch)
test if character is part of Sequence::dna_alphabet
const alphabet_t dna_alphabet
Alphabet for DNA sequences Valid DNA characters. Upper-case only. Only - is accepted as gap character...
const alphabet_t::size_type NOTPOLYCHAR
An index from dna_poly_alphabet >= this is not a valid character for variation analysis.
Declaration of Sequence::Fasta streams.
const alphabet_t dna_poly_alphabet
Alphabet for polymorphism (SNP) analysis. 16 characters are used so that we may encode 2 nucleotides ...
const alphabet_t::size_type POLYEOS
The value of terminating an encoded string of SNP data.