40 #ifndef _GENETICCODE_H_ 41 #define _GENETICCODE_H_ 43 #include "../Transliterator.h" 44 #include "../Alphabet/CodonAlphabet.h" 45 #include "../Alphabet/ProteicAlphabet.h" 46 #include <Bpp/Exceptions.h> 81 public virtual Clonable
166 return (state == 14);
259 #endif //_GENETICCODE_H_ virtual bool isAltStart(int state) const =0
Tells is a particular codon is an alternative start codon.
virtual Sequence * translate(const Sequence &sequence) const
Translate a whole sequence from source alphabet to target alphabet.
bool isFourFoldDegenerated(int codon) const
virtual std::vector< std::string > getStopCodonsAsChar() const =0
An alphabet exception thrown when trying to specify a bad char to the alphabet.
virtual bool isStart(int state) const
Tells is a particular codon is a start codon.
int charToInt(const std::string &state) const
Give the int description of a state given its string description.
Sequence * getCodingSequence(const Sequence &sequence, bool lookForInitCodon=false, bool includeInitCodon=false) const
Get the subsequence corresponding to the coding part of a given sequence.
virtual size_t getNumberOfStopCodons() const =0
This alphabet is used to deal NumericAlphabet.
const CodonAlphabet * getSourceAlphabet() const
Get the source alphabet.
ProteicAlphabet proteicAlphabet_
Partial implementation of the Transliterator interface.
bool areSynonymous(const std::string &i, const std::string &j) const
Tell if two codons are synonymous, that is, if they encode the same amino-acid.
virtual bool isStart(const std::string &state) const
Tells is a particular codon is a start codon.
This alphabet is used to deal with proteins.
CodonAlphabet codonAlphabet_
bool areSynonymous(int i, int j) const
Tell if two codons are synonymous, that is, if they encode the same amino-acid.
const ProteicAlphabet * getTargetAlphabet() const
Get the target alphabet.
virtual std::vector< int > getStopCodonsAsInt() const =0
std::vector< int > getSynonymous(int aminoacid) const
GeneticCode(const NucleicAlphabet *alphabet)
StopCodonException(const std::string &text, const std::string &codon)
virtual int translate(int state) const =0
Translate a given state coded as a int from source alphabet to target alphabet.
virtual const std::string & getCodon() const
virtual ~StopCodonException()
virtual bool isStop(int state) const =0
Tells is a particular codon is a stop codon.
Exception thrown when a stop codon is found.
An alphabet exception thrown when trying to specify a bad int to the alphabet.
std::map< int, int > tlnTable_
Partial implementation of the Transliterator interface for genetic code object.
virtual GeneticCode * clone() const =0
The abstract base class for nucleic alphabets.
std::string intToChar(int state) const
Give the string description of a state given its int description.
virtual int translate(int state) const
Translate a given state coded as a int from source alphabet to target alphabet.