41 #include <Bpp/Seq/Alphabet/DNA.h> 42 #include <Bpp/Seq/Alphabet/RNA.h> 43 #include <Bpp/Seq/Alphabet/ProteicAlphabet.h> 95 if (alpha_type !=
string(
"DNA") && alpha_type !=
string(
"RNA") && alpha_type !=
string(
"PROTEIN"))
96 throw Exception(
string(
"AnalyzedSequences::setAlphabet: bad alphabet type. (") + alpha_type +
string(
")."));
98 if (alpha_type ==
string(
"DNA"))
100 if (alpha_type ==
string(
"RNA"))
102 if (alpha_type ==
string(
"PROTEIN"))
103 alpha =
new ProteicAlphabet();
111 return string(
"---");
112 string alpha_type =
alphabet_->getAlphabetType();
113 size_t bs = alpha_type.find(
" ", 0);
114 alpha_type = string(alpha_type.begin(), alpha_type.begin() +
static_cast<ptrdiff_t
>(bs));
115 if (alpha_type ==
"Proteic")
116 alpha_type =
"PROTEIN";
std::string getAlphabetType() const
Get the alphabet type as a string.
The AnalyzedSequences class.
AnalyzedSequences & operator=(const AnalyzedSequences &as)
void setAlphabet(const Alphabet *alpha)
Set the alphabet used for the sequences.
const Alphabet * alphabet_