24 throw IOException (
"PhredPoly::read: fail to open stream");
27 string temp, name, sequence =
"";
33 getline(input, temp,
'\n');
43 getline(input, temp,
'\n');
59 sequence += alphaPtr->getGeneric(v);
64 throw Exception(
"PhredPoly::read: sequence without name!");
void setName(const std::string &name) override
Set the name of this sequence.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to the list.
bool nextSequence(std::istream &input, Sequence &seq) const
PhredPoly(double ratio=0.8)
Build a new PhredPoly object.
A basic implementation of the Sequence interface.
void setContent(const std::string &sequence) override
Set the whole content of the sequence.
size_t numberOfRemainingTokens() const
const std::string & getToken(size_t pos) const
double toDouble(const std::string &s, char dec='.', char scientificNotation='e')
This alphabet is used to deal NumericAlphabet.