bpp-seq
2.2.0
|
This class implements the vertebrate mitochondrial genetic code as describe on the NCBI web site: http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=t#SG2. More...
#include <Bpp/Seq/GeneticCode/VertebrateMitochondrialGeneticCode.h>
Public Member Functions | |
VertebrateMitochondrialGeneticCode (const NucleicAlphabet *alphabet) | |
virtual | ~VertebrateMitochondrialGeneticCode () |
virtual VertebrateMitochondrialGeneticCode * | clone () const |
size_t | getNumberOfStopCodons () const |
std::vector< int > | getStopCodonsAsInt () const |
std::vector< std::string > | getStopCodonsAsChar () const |
bool | isStop (int state) const throw (BadIntException) |
Tells is a particular codon is a stop codon. More... | |
bool | isStop (const std::string &state) const throw (BadCharException) |
Tells is a particular codon is a stop codon. More... | |
bool | isAltStart (int state) const throw (BadIntException) |
Tells is a particular codon is an alternative start codon. More... | |
bool | isAltStart (const std::string &state) const throw (BadCharException) |
Tells is a particular codon is an alternative start codon. More... | |
Methods form the Transliterator interface. | |
const CodonAlphabet * | getSourceAlphabet () const |
Get the source alphabet. More... | |
const ProteicAlphabet * | getTargetAlphabet () const |
Get the target alphabet. More... | |
virtual int | translate (int state) const throw (BadIntException, Exception) |
Translate a given state coded as a int from source alphabet to target alphabet. More... | |
virtual std::string | translate (const std::string &state) const throw (BadCharException, Exception) |
Translate a given state coded as a string from source alphabet to target alphabet. More... | |
virtual Sequence * | translate (const Sequence &sequence) const throw (Exception) |
Translate a whole sequence from source alphabet to target alphabet. More... | |
Specific methods. | |
virtual bool | isStart (int state) const throw (BadIntException) |
Tells is a particular codon is a start codon. More... | |
virtual bool | isStart (const std::string &state) const throw (BadCharException) |
Tells is a particular codon is a start codon. More... | |
bool | areSynonymous (int i, int j) const throw (BadIntException) |
Tell if two codons are synonymous, that is, if they encode the same amino-acid. More... | |
bool | areSynonymous (const std::string &i, const std::string &j) const throw (BadCharException) |
Tell if two codons are synonymous, that is, if they encode the same amino-acid. More... | |
std::vector< int > | getSynonymous (int aminoacid) const throw (BadIntException) |
std::vector< std::string > | getSynonymous (const std::string &aminoacid) const throw (BadCharException) |
bool | isFourFoldDegenerated (int codon) const |
Sequence * | getCodingSequence (const Sequence &sequence, bool lookForInitCodon=false, bool includeInitCodon=false) const throw (Exception) |
Get the subsequence corresponding to the coding part of a given sequence. More... | |
Protected Attributes | |
CodonAlphabet | codonAlphabet_ |
ProteicAlphabet | proteicAlphabet_ |
std::map< int, int > | tlnTable_ |
This class implements the vertebrate mitochondrial genetic code as describe on the NCBI web site: http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=t#SG2.
Definition at line 53 of file VertebrateMitochondrialGeneticCode.h.
VertebrateMitochondrialGeneticCode::VertebrateMitochondrialGeneticCode | ( | const NucleicAlphabet * | alphabet | ) |
Definition at line 48 of file VertebrateMitochondrialGeneticCode.cpp.
References bpp::GeneticCode::codonAlphabet_, bpp::ProteicAlphabet::getUnknownCharacterCode(), bpp::WordAlphabet::getUnknownCharacterCode(), bpp::GeneticCode::proteicAlphabet_, and bpp::GeneticCode::tlnTable_.
Referenced by clone().
|
inlinevirtual |
Definition at line 59 of file VertebrateMitochondrialGeneticCode.h.
|
inlineinherited |
Tell if two codons are synonymous, that is, if they encode the same amino-acid.
i | The numeric code for the first codon. |
j | The numeric code for the second codon. |
BadIntException | if at least one of the states is not supported by the alphabet. |
Definition at line 206 of file GeneticCode.h.
References bpp::GeneticCode::translate().
Referenced by bpp::CodonSiteTools::numberOfSynonymousDifferences().
|
inlineinherited |
Tell if two codons are synonymous, that is, if they encode the same amino-acid.
i | The character code for the first codon. |
j | The character code for the second codon. |
BadCharException | if at least one of the states is not supported by the alphabet. |
Definition at line 219 of file GeneticCode.h.
References bpp::GeneticCode::translate().
|
inlinevirtual |
Implements bpp::GeneticCode.
Definition at line 61 of file VertebrateMitochondrialGeneticCode.h.
References VertebrateMitochondrialGeneticCode().
|
inherited |
Get the subsequence corresponding to the coding part of a given sequence.
If lookForInitCodon if set to 'true', the subsequence will start at the first AUG motif, otherwise the subsequence will start at the begining of the sequence. The subsequence ends at the first stop codon (excluded) found, or the end of the sequence.
The sequence may have a nucleotide or codon alphabet. The subsequence has the same alphabet, name and comments of the input sequence. In case of nucleotide sequence and if the lookForInitCodon option is checked, the phase will be determined from the sequence.
sequence | The sequence to parse. |
lookForInitCodon | Tell if the AUG codon must be found. |
includeInitCodon | (if lookForInitCodon is true) tell if the init codon must be included in the subsequence. |
Definition at line 149 of file GeneticCode.cpp.
References bpp::AbstractAlphabet::intToChar(), bpp::AlphabetTools::isCodonAlphabet(), bpp::AlphabetTools::isNucleicAlphabet(), bpp::SymbolList::size(), and bpp::SequenceTools::subseq().
|
inlinevirtual |
Implements bpp::GeneticCode.
Definition at line 66 of file VertebrateMitochondrialGeneticCode.h.
|
inlinevirtualinherited |
Get the source alphabet.
Implements bpp::Transliterator.
Definition at line 106 of file GeneticCode.h.
References bpp::GeneticCode::codonAlphabet_.
Referenced by bpp::CodonSiteTools::numberOfSynonymousDifferences().
|
inlinevirtual |
Implements bpp::GeneticCode.
Definition at line 77 of file VertebrateMitochondrialGeneticCode.h.
|
inlinevirtual |
Implements bpp::GeneticCode.
Definition at line 68 of file VertebrateMitochondrialGeneticCode.h.
|
inherited |
Definition at line 77 of file GeneticCode.cpp.
|
inherited |
Definition at line 98 of file GeneticCode.cpp.
|
inlinevirtualinherited |
Get the target alphabet.
Implements bpp::Transliterator.
Definition at line 107 of file GeneticCode.h.
References bpp::GeneticCode::proteicAlphabet_.
|
inlinevirtual |
Tells is a particular codon is an alternative start codon.
state | The numeric code for the state to test. |
BadIntException | if the state is not supported by the alphabet. |
Implements bpp::GeneticCode.
Definition at line 97 of file VertebrateMitochondrialGeneticCode.h.
References bpp::GeneticCode::codonAlphabet_, and bpp::AbstractAlphabet::intToChar().
|
inlinevirtual |
Tells is a particular codon is an alternative start codon.
state | The character code for the state to test. |
BadCharException | if the state is not supported by the alphabet. |
Implements bpp::GeneticCode.
Definition at line 103 of file VertebrateMitochondrialGeneticCode.h.
References bpp::WordAlphabet::charToInt(), and bpp::GeneticCode::codonAlphabet_.
|
inherited |
codon | The codon to test. |
Definition at line 119 of file GeneticCode.cpp.
References bpp::GeneticCode::codonAlphabet_, bpp::CodonAlphabet::getCodon(), bpp::WordAlphabet::getPositions(), bpp::GeneticCode::isStop(), and bpp::GeneticCode::translate().
Referenced by bpp::CodonSiteTools::isFourFoldDegenerated().
|
inlinevirtualinherited |
Tells is a particular codon is a start codon.
state | The numeric code for the state to test. |
BadIntException | if the state is not supported by the alphabet. |
Definition at line 163 of file GeneticCode.h.
References bpp::GeneticCode::codonAlphabet_, and bpp::AbstractAlphabet::intToChar().
Referenced by bpp::SequenceTools::getCDS(), and bpp::GeneticCode::isStart().
|
inlinevirtualinherited |
Tells is a particular codon is a start codon.
state | The character code for the state to test. |
BadCharException | if the state is not supported by the alphabet. |
Definition at line 176 of file GeneticCode.h.
References bpp::WordAlphabet::charToInt(), bpp::GeneticCode::codonAlphabet_, and bpp::GeneticCode::isStart().
|
inlinevirtual |
Tells is a particular codon is a stop codon.
state | The numeric code for the state to test. |
BadIntException | if the state is not supported by the alphabet. |
Implements bpp::GeneticCode.
Definition at line 86 of file VertebrateMitochondrialGeneticCode.h.
References bpp::GeneticCode::codonAlphabet_, and bpp::AbstractAlphabet::intToChar().
|
inlinevirtual |
Tells is a particular codon is a stop codon.
state | The character code for the state to test. |
BadCharException | if the state is not supported by the alphabet. |
Implements bpp::GeneticCode.
Definition at line 92 of file VertebrateMitochondrialGeneticCode.h.
References bpp::WordAlphabet::charToInt(), and bpp::GeneticCode::codonAlphabet_.
|
virtualinherited |
Translate a given state coded as a int from source alphabet to target alphabet.
state | A state in source alphabet. |
BadIntException | If the state is not a proper state for source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::AbstractTransliterator.
Definition at line 55 of file GeneticCode.cpp.
Referenced by bpp::GeneticCode::areSynonymous(), and bpp::GeneticCode::isFourFoldDegenerated().
|
virtualinherited |
Translate a given state coded as a string from source alphabet to target alphabet.
state | A state in source alphabet. |
BadCharException | If the state is not a proper state for source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::AbstractTransliterator.
Definition at line 69 of file GeneticCode.cpp.
|
inlinevirtualinherited |
Translate a whole sequence from source alphabet to target alphabet.
sequence | A sequence in source alphabet. |
AlphabetMismatchException | If the sequence alphabet do not match the source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Reimplemented from bpp::AbstractTransliterator.
Definition at line 110 of file GeneticCode.h.
References bpp::AbstractTransliterator::translate().
|
protectedinherited |
Definition at line 84 of file GeneticCode.h.
Referenced by bpp::AscidianMitochondrialGeneticCode::AscidianMitochondrialGeneticCode(), bpp::EchinodermMitochondrialGeneticCode::EchinodermMitochondrialGeneticCode(), bpp::GeneticCode::getSourceAlphabet(), bpp::InvertebrateMitochondrialGeneticCode::InvertebrateMitochondrialGeneticCode(), bpp::EchinodermMitochondrialGeneticCode::isAltStart(), bpp::StandardGeneticCode::isAltStart(), bpp::InvertebrateMitochondrialGeneticCode::isAltStart(), bpp::YeastMitochondrialGeneticCode::isAltStart(), bpp::MoldMitochondrialGeneticCode::isAltStart(), bpp::AscidianMitochondrialGeneticCode::isAltStart(), isAltStart(), bpp::GeneticCode::isFourFoldDegenerated(), bpp::GeneticCode::isStart(), bpp::EchinodermMitochondrialGeneticCode::isStop(), bpp::StandardGeneticCode::isStop(), bpp::InvertebrateMitochondrialGeneticCode::isStop(), bpp::YeastMitochondrialGeneticCode::isStop(), bpp::MoldMitochondrialGeneticCode::isStop(), isStop(), bpp::AscidianMitochondrialGeneticCode::isStop(), bpp::MoldMitochondrialGeneticCode::MoldMitochondrialGeneticCode(), bpp::StandardGeneticCode::StandardGeneticCode(), VertebrateMitochondrialGeneticCode(), and bpp::YeastMitochondrialGeneticCode::YeastMitochondrialGeneticCode().
|
protectedinherited |
Definition at line 85 of file GeneticCode.h.
Referenced by bpp::AscidianMitochondrialGeneticCode::AscidianMitochondrialGeneticCode(), bpp::EchinodermMitochondrialGeneticCode::EchinodermMitochondrialGeneticCode(), bpp::GeneticCode::getTargetAlphabet(), bpp::InvertebrateMitochondrialGeneticCode::InvertebrateMitochondrialGeneticCode(), bpp::MoldMitochondrialGeneticCode::MoldMitochondrialGeneticCode(), bpp::StandardGeneticCode::StandardGeneticCode(), VertebrateMitochondrialGeneticCode(), and bpp::YeastMitochondrialGeneticCode::YeastMitochondrialGeneticCode().
|
protectedinherited |
Definition at line 86 of file GeneticCode.h.
Referenced by bpp::AscidianMitochondrialGeneticCode::AscidianMitochondrialGeneticCode(), bpp::EchinodermMitochondrialGeneticCode::EchinodermMitochondrialGeneticCode(), bpp::InvertebrateMitochondrialGeneticCode::InvertebrateMitochondrialGeneticCode(), bpp::MoldMitochondrialGeneticCode::MoldMitochondrialGeneticCode(), bpp::StandardGeneticCode::StandardGeneticCode(), VertebrateMitochondrialGeneticCode(), and bpp::YeastMitochondrialGeneticCode::YeastMitochondrialGeneticCode().