bpp-seq
2.2.0
|
Replication between to nucleic acids. More...
#include <Bpp/Seq/NucleicAcidsReplication.h>
Public Member Functions | |
NucleicAcidsReplication (const NucleicAlphabet *nuc1, const NucleicAlphabet *nuc2) | |
NucleicAcidsReplication (const NucleicAcidsReplication &nar) | |
NucleicAcidsReplication & | operator= (const NucleicAcidsReplication &nar) |
virtual | ~NucleicAcidsReplication () |
const Alphabet * | getSourceAlphabet () const |
Get the source alphabet. More... | |
const Alphabet * | getTargetAlphabet () const |
Get the target alphabet. More... | |
int | translate (int state) const throw (BadIntException) |
Translate a given state coded as a int from source alphabet to target alphabet. More... | |
std::string | translate (const std::string &state) const throw (BadCharException) |
Translate a given state coded as a string from source alphabet to target alphabet. More... | |
Sequence * | translate (const Sequence &sequence) const throw (AlphabetMismatchException) |
Translate a whole sequence from source alphabet to target alphabet. More... | |
int | reverse (int state) const throw (BadIntException) |
Translate a given state coded as a int from target alphabet to source alphabet. More... | |
std::string | reverse (const std::string &state) const throw (BadCharException) |
Translate a given state coded as a string from target alphabet to source alphabet. More... | |
Sequence * | reverse (const Sequence &sequence) const throw (AlphabetMismatchException, Exception) |
Translate a whole sequence from target alphabet to source alphabet. More... | |
Private Attributes | |
const NucleicAlphabet * | nuc1_ |
const NucleicAlphabet * | nuc2_ |
std::map< int, int > | trans_ |
Replication between to nucleic acids.
Example of use:
Since this is an instance of the ReverseIterator interface, transcription and reverse transcription may be achieved from the same instance of the object by using the translate and reverse methods.
Definition at line 65 of file NucleicAcidsReplication.h.
NucleicAcidsReplication::NucleicAcidsReplication | ( | const NucleicAlphabet * | nuc1, |
const NucleicAlphabet * | nuc2 | ||
) |
Definition at line 46 of file NucleicAcidsReplication.cpp.
References trans_.
|
inline |
Definition at line 74 of file NucleicAcidsReplication.h.
|
inlinevirtual |
Definition at line 87 of file NucleicAcidsReplication.h.
|
inlinevirtual |
Get the source alphabet.
Implements bpp::Transliterator.
Definition at line 90 of file NucleicAcidsReplication.h.
References nuc1_.
|
inlinevirtual |
Get the target alphabet.
Implements bpp::Transliterator.
Definition at line 91 of file NucleicAcidsReplication.h.
References nuc2_.
|
inline |
Definition at line 78 of file NucleicAcidsReplication.h.
|
virtual |
Translate a given state coded as a int from target alphabet to source alphabet.
state | A state in target alphabet. |
BadIntException | If the state is not a proper state for target alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::ReverseTransliterator.
Definition at line 96 of file NucleicAcidsReplication.cpp.
|
virtual |
Translate a given state coded as a string from target alphabet to source alphabet.
state | A state in target alphabet. |
BadCharException | If the state is not a proper state for target alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::ReverseTransliterator.
Definition at line 102 of file NucleicAcidsReplication.cpp.
|
virtual |
Translate a whole sequence from target alphabet to source alphabet.
sequence | A sequence in target alphabet. |
AlphabetMismatchException | If the sequence alphabet do not match the target alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::ReverseTransliterator.
Definition at line 108 of file NucleicAcidsReplication.cpp.
References bpp::BasicSymbolList::addElement().
|
virtual |
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::Transliterator.
Definition at line 70 of file NucleicAcidsReplication.cpp.
Referenced by bpp::SequenceWithQualityTools::complement(), bpp::SequenceTools::complement(), bpp::SequenceTools::getComplement(), and bpp::SequenceTools::invertComplement().
|
virtual |
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::Transliterator.
Definition at line 76 of file NucleicAcidsReplication.cpp.
|
virtual |
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. |
Implements bpp::Transliterator.
Definition at line 82 of file NucleicAcidsReplication.cpp.
References bpp::BasicSymbolList::addElement().
|
private |
Definition at line 69 of file NucleicAcidsReplication.h.
Referenced by getSourceAlphabet(), and operator=().
|
private |
Definition at line 69 of file NucleicAcidsReplication.h.
Referenced by getTargetAlphabet(), and operator=().
|
mutableprivate |
Definition at line 70 of file NucleicAcidsReplication.h.
Referenced by NucleicAcidsReplication(), and operator=().