bpp-seq3  3.0.0
bpp::DNAToRNA Class Reference

Reverse iterator to convert RNA to DNA. More...

#include <Bpp/Seq/DNAToRNA.h>

+ Inheritance diagram for bpp::DNAToRNA:
+ Collaboration diagram for bpp::DNAToRNA:

Public Member Functions

 DNAToRNA ()
 
 DNAToRNA (const DNAToRNA &d2r)
 
DNAToRNAoperator= (const DNAToRNA &d2r)
 
virtual ~DNAToRNA ()
 
std::shared_ptr< const AlphabetgetSourceAlphabet () const override
 Get the source alphabet. More...
 
const AlphabetsourceAlphabet () const override
 Get the source alphabet. More...
 
std::shared_ptr< const AlphabetgetTargetAlphabet () const override
 Get the target alphabet. More...
 
const AlphabettargetAlphabet () const override
 Get the target alphabet. More...
 
int translate (int state) const override
 Translate a given state coded as a int from source alphabet to target alphabet. More...
 
std::string translate (const std::string &state) const override
 Translate a given state coded as a string from source alphabet to target alphabet. More...
 
std::unique_ptr< Sequencetranslate (const SequenceInterface &sequence) const override
 Translate a whole sequence from source alphabet to target alphabet. More...
 
int reverse (int state) const override
 Translate a given state coded as a int from target alphabet to source alphabet. More...
 
std::string reverse (const std::string &state) const override
 Translate a given state coded as a string from target alphabet to source alphabet. More...
 
std::unique_ptr< Sequencereverse (const SequenceInterface &sequence) const override
 Translate a whole sequence from target alphabet to source alphabet. More...
 

Private Attributes

std::shared_ptr< const Alphabetdna_
 
std::shared_ptr< const Alphabetrna_
 

Detailed Description

Reverse iterator to convert RNA to DNA.

This only changes U to T characters.

See also
NucleicAcidsReplication

Definition at line 23 of file DNAToRNA.h.

Constructor & Destructor Documentation

◆ DNAToRNA() [1/2]

bpp::DNAToRNA::DNAToRNA ( )
inline

Definition at line 30 of file DNAToRNA.h.

◆ DNAToRNA() [2/2]

bpp::DNAToRNA::DNAToRNA ( const DNAToRNA d2r)
inline

Definition at line 36 of file DNAToRNA.h.

◆ ~DNAToRNA()

virtual bpp::DNAToRNA::~DNAToRNA ( )
inlinevirtual

Definition at line 46 of file DNAToRNA.h.

Member Function Documentation

◆ getSourceAlphabet()

std::shared_ptr<const Alphabet> bpp::DNAToRNA::getSourceAlphabet ( ) const
inlineoverridevirtual

Get the source alphabet.

Returns
A pointer toward the source alphabet.

Implements bpp::TransliteratorInterface.

Definition at line 49 of file DNAToRNA.h.

References dna_.

◆ getTargetAlphabet()

std::shared_ptr<const Alphabet> bpp::DNAToRNA::getTargetAlphabet ( ) const
inlineoverridevirtual

Get the target alphabet.

Returns
A pointer toward the target alphabet.

Implements bpp::TransliteratorInterface.

Definition at line 53 of file DNAToRNA.h.

References rna_.

◆ operator=()

DNAToRNA& bpp::DNAToRNA::operator= ( const DNAToRNA d2r)
inline

Definition at line 38 of file DNAToRNA.h.

References dna_, and rna_.

◆ reverse() [1/3]

std::unique_ptr<Sequence> bpp::DNAToRNA::reverse ( const SequenceInterface sequence) const
inlineoverridevirtual

Translate a whole sequence from target alphabet to source alphabet.

Parameters
sequenceA sequence in target alphabet.
Returns
The corresponding sequence in source alphabet.

Implements bpp::ReverseTransliteratorInterface.

Definition at line 70 of file DNAToRNA.h.

References bpp::AbstractReverseTransliterator::reverse().

◆ reverse() [2/3]

string DNAToRNA::reverse ( const std::string &  state) const
overridevirtual

Translate a given state coded as a string from target alphabet to source alphabet.

Parameters
stateA state in target alphabet.
Returns
The corresponding state in source alphabet.

Implements bpp::AbstractReverseTransliterator.

Definition at line 36 of file DNAToRNA.cpp.

◆ reverse() [3/3]

int DNAToRNA::reverse ( int  state) const
overridevirtual

Translate a given state coded as a int from target alphabet to source alphabet.

Parameters
stateA state in target alphabet.
Returns
The corresponding state in source alphabet.

Implements bpp::AbstractReverseTransliterator.

Definition at line 28 of file DNAToRNA.cpp.

◆ sourceAlphabet()

const Alphabet& bpp::DNAToRNA::sourceAlphabet ( ) const
inlineoverridevirtual

Get the source alphabet.

Returns
A reference toward the source alphabet.

Implements bpp::TransliteratorInterface.

Definition at line 51 of file DNAToRNA.h.

References dna_.

◆ targetAlphabet()

const Alphabet& bpp::DNAToRNA::targetAlphabet ( ) const
inlineoverridevirtual

Get the target alphabet.

Returns
A reference toward the target alphabet.

Implements bpp::TransliteratorInterface.

Definition at line 55 of file DNAToRNA.h.

References rna_.

◆ translate() [1/3]

std::unique_ptr<Sequence> bpp::DNAToRNA::translate ( const SequenceInterface sequence) const
inlineoverridevirtual

Translate a whole sequence from source alphabet to target alphabet.

Parameters
sequenceA sequence in source alphabet.
Returns
The corresponding sequence in target alphabet.

Implements bpp::TransliteratorInterface.

Definition at line 61 of file DNAToRNA.h.

References bpp::AbstractTransliterator::translate().

◆ translate() [2/3]

string DNAToRNA::translate ( const std::string &  state) const
overridevirtual

Translate a given state coded as a string from source alphabet to target alphabet.

Parameters
stateA state in source alphabet.
Returns
The corresponding state in target alphabet.

Implements bpp::AbstractTransliterator.

Definition at line 20 of file DNAToRNA.cpp.

◆ translate() [3/3]

int DNAToRNA::translate ( int  state) const
overridevirtual

Translate a given state coded as a int from source alphabet to target alphabet.

Parameters
stateA state in source alphabet.
Returns
The corresponding state in target alphabet.

Implements bpp::AbstractTransliterator.

Definition at line 12 of file DNAToRNA.cpp.

Member Data Documentation

◆ dna_

std::shared_ptr<const Alphabet> bpp::DNAToRNA::dna_
private

Definition at line 27 of file DNAToRNA.h.

Referenced by getSourceAlphabet(), operator=(), and sourceAlphabet().

◆ rna_

std::shared_ptr<const Alphabet> bpp::DNAToRNA::rna_
private

Definition at line 27 of file DNAToRNA.h.

Referenced by getTargetAlphabet(), operator=(), and targetAlphabet().


The documentation for this class was generated from the following files: