Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
gnTranslator Class Reference The gnTranslator class facilitates the translation of ambiguous DNA and RNA sequences to protein sequence.
More...
#include <gnTranslator.h >
Inheritance diagram for gnTranslator::
List of all members.
Detailed Description
The gnTranslator class facilitates the translation of ambiguous DNA and RNA sequences to protein sequence.
It can also perform reverse translation from Protein to RNA or DNA though the utility of this functionality is somewhat questionable since it does not assign nucleotides probabilistically. Do not attempt to instantiate this class unless you are defining a new translation type. Instead use the static member access functions ProteinDNATranslator (), ProteinRNATranslator (), DNAProteinTranslator (), and RNAProteinTranslator () In general, the gnFastTranslator class should be used instead of this one.
See also:
gnFastTranslator
Definition at line 37 of file gnTranslator.h .
Member Enumeration Documentation
enum gnTranslator::gnTranslatorType
Enumeration values:
ProteinDNATranslatorType
ProteinRNATranslatorType
DNAProteinTranslatorType
RNAProteinTranslatorType
Definition at line 46 of file gnTranslator.h .
Constructor & Destructor Documentation
gnTranslator::gnTranslator (
)
gnTranslator::gnTranslator (
const gnTranslator & sf )
Member Function Documentation
gnTranslator * gnTranslator::Clone (
) const [inline, virtual]
void gnTranslator::CreateDNAProteinTranslator (
) [private]
void gnTranslator::CreateProteinDNATranslator (
) [private]
void gnTranslator::CreateProteinRNATranslator (
) [private]
void gnTranslator::CreateRNAProteinTranslator (
) [private]
const gnTranslator * gnTranslator::DNAProteinTranslator (
) [static]
void gnTranslator::Filter (
string & seq ) const [virtual]
void gnTranslator::Filter (
gnSeqC ** seq ,
uint32 & len ) const [virtual]
Filter the given character array.
Parameters:
seq
A pointer to the character array
len
the length of the character array to filter
Returns:
The filtered character
Reimplemented from gnBaseFilter .
Definition at line 82 of file gnTranslator.cpp .
gnSeqC gnTranslator::Filter (
const gnSeqC ch ) const [virtual]
Filter the given character.
Parameters:
ch
The character to filter
Returns:
The filtered character
Reimplemented from gnBaseFilter .
Definition at line 73 of file gnTranslator.cpp .
Referenced by main ().
gnSeqC gnTranslator::GetDefaultChar (
) const [inline]
Gets the default character which is inserted into the destination sequence when no valid translation exists.
Parameters:
ch1
The default character
Definition at line 149 of file gnTranslator.h .
uint32 gnTranslator::GetDefaultInputWidth (
) const [inline]
Get the expected number of characters in each unit of translation.
For DNA to Protein, for instance, this is 3 because each codon is 3 characters of input.
Returns:
The expected input width
Definition at line 166 of file gnTranslator.h .
const gnTranslator * gnTranslator::ProteinDNATranslator (
) [static]
const gnTranslator * gnTranslator::ProteinRNATranslator (
) [static]
const gnTranslator * gnTranslator::RNAProteinTranslator (
) [static]
void gnTranslator::RemovePair (
const string & input )
Removes a translation mapping.
RemovePair removes the translation mapping corresponding to the given input string.
Parameters:
input
The input string to delete
Definition at line 150 of file gnTranslator.cpp .
void gnTranslator::SetCompare (
const gnCompare * comp ) [inline]
void gnTranslator::SetDefaultChar (
const gnSeqC ch1 ) [inline]
void gnTranslator::SetDefaultInputWidth (
const uint32 defaultInputWidth ) [inline]
Set the expected number of characters in each unit of translation.
For DNA to Protein, for instance, this is 3 because each codon is 3 characters of input.
Parameters:
Definition at line 161 of file gnTranslator.h .
void gnTranslator::SetPair (
const string & input ,
const string & output )
void gnTranslator::UseDefaultChar (
const boolean use = true ) [inline]
Set whether the default character is inserted upon translation failure.
Parameters:
use
True if the default character should be used.
Definition at line 155 of file gnTranslator.h .
Member Data Documentation
const gnCompare * gnTranslator::compare [private]
gnSeqC gnTranslator::m_defaultChar [private]
uint32 gnTranslator::m_defaultInputWidth [private]
vector< string > gnTranslator::m_inputTable<string> [private]
string gnTranslator::m_name [private]
vector< string > gnTranslator::m_outputTable [private]
boolean gnTranslator::use_default [private]
The documentation for this class was generated from the following files:
Generated at Fri Nov 30 15:36:57 2001 for libGenome by
1.2.8.1 written by Dimitri van Heesch ,
© 1997-2001