5 #ifndef BPP_SEQ_ALPHABET_PROTEICALPHABET_H
6 #define BPP_SEQ_ALPHABET_PROTEICALPHABET_H
82 unsigned int getSize()
const {
return 20; }
86 std::vector<int>
getAlias(
int state)
const;
87 std::vector<std::string>
getAlias(
const std::string& state)
const;
88 int getGeneric(
const std::vector<int>& states)
const;
89 std::string
getGeneric(
const std::vector<std::string>& states)
const;
106 std::string
getAbbr(
const std::string& aa)
const;
113 std::string
getAbbr(
int aa)
const;
virtual AlphabetState & getStateAt(size_t stateIndex)
Get a state at a position in the alphabet_ vector.
const AlphabetState & getState(const std::string &letter) const
Get a state by its letter.
Specialized partial implementation of Alphabet using single letters.
LetterAlphabet & operator=(const LetterAlphabet &bia)
int charToInt(const std::string &state) const
Give the int description of a state given its string description.
This is the base class to describe states in a ProteicAlphabet.
This alphabet is used to deal with proteins.
ProteicAlphabet(const ProteicAlphabet &bia)
std::vector< int > getAlias(int state) const
Get all resolved states that match a generic state.
virtual ~ProteicAlphabet()
int getUnknownCharacterCode() const
const ProteicAlphabetState & getStateAt(size_t pos) const
Get a state at a position in the alphabet_ vector.
bool isUnresolved(int state) const
unsigned int getNumberOfTypes() const
Get the number of distinct states in alphabet (e.g. return 15 for DNA alphabet). This is the number o...
int getGeneric(const std::vector< int > &states) const
Get the generic state that match a set of states.
bool isResolvedIn(int state1, int state2) const
Tells if a given (potentially unresolved) state can be resolved in another resolved state.
ProteicAlphabet * clone() const
const ProteicAlphabetState & getState(int num) const
Get a state by its num.
std::string getAbbr(const std::string &aa) const
Get the abbreviation (3 letter code) for a state coded as char.
std::string getAlphabetType() const
Identification method.
ProteicAlphabet & operator=(const ProteicAlphabet &bia)
const ProteicAlphabetState & getState(const std::string &letter) const
Get a state by its letter.
bool isUnresolved(const std::string &state) const
ProteicAlphabetState & getStateAt(size_t pos)
Get a state at a position in the alphabet_ vector.
unsigned int getSize() const
Get the number of resolved states in the alphabet (e.g. return 4 for DNA alphabet)....
This alphabet is used to deal NumericAlphabet.