ARB
Classes | Macros | Enumerations | Functions | Variables
AP_codon_table.hxx File Reference
#include <arb_assert.h>
#include <static_assert.h>
#include <stdint.h>
Include dependency graph for AP_codon_table.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AWT_Codon_Code_Definition
 
class  TransTables
 

Macros

#define pn_assert(cond)   arb_assert(cond)
 
#define AWT_CODON_TABLES   25
 
#define AWT_MAX_CODONS   64
 
#define ALL_TABLES_MASK   ((1<<AWT_CODON_TABLES)-1)
 

Enumerations

enum  TranslationTableIndexType { TTIT_ARB, TTIT_EMBL }
 

Functions

void AP_initialize_codon_tables ()
 
int TTIT_embl2arb (int embl_code_nr)
 
int TTIT_arb2embl (int arb_code_nr)
 
bool AWT_is_codon (char protein, const char *const dna, const TransTables &allowed, TransTables &allowed_left, const char **fail_reason_ptr=NULp)
 
const charAP_get_codons (char protein, int code_nr)
 
const chargetAminoAcidAbbr (char aa)
 
const charAWT_get_codon_code_name (int code)
 

Variables

const int AWAR_PROTEIN_TYPE_bacterial_code_index = 8
 

Macro Definition Documentation

#define pn_assert (   cond)    arb_assert(cond)

Definition at line 25 of file AP_codon_table.hxx.

Referenced by TransTables::explicit_table(), and TransTables::to_string().

#define AWT_CODON_TABLES   25
#define AWT_MAX_CODONS   64
#define ALL_TABLES_MASK   ((1<<AWT_CODON_TABLES)-1)

Definition at line 51 of file AP_codon_table.hxx.

Referenced by TransTables::all(), and TransTables::allowAll().

Enumeration Type Documentation

Enumerator
TTIT_ARB 
TTIT_EMBL 

Definition at line 53 of file AP_codon_table.hxx.

Function Documentation

void AP_initialize_codon_tables ( )
int TTIT_embl2arb ( int  embl_code_nr)
int TTIT_arb2embl ( int  arb_code_nr)
bool AWT_is_codon ( char  protein,
const char *const  dna,
const TransTables allowed,
TransTables allowed_left,
const char **  fail_reason_ptr = NULp 
)

test if 'dna' codes 'protein'

Parameters
proteinamino acid
dnathree nucleotides (gaps allowed, e.g. 'A-C' can be tested vs 'X')
allowedallowed translation tables
remainingreturns the remaining allowed translation tables (only if this functions returns true)
fail_reason_ptrif not NULp => store reason for failure here (or set it to NULp on success)
Returns
true if dna translates to protein

Definition at line 583 of file AP_codon_table.cxx.

References TransTables::all(), TransTables::allow(), TransTables::any(), ARB_strBeginsWith(), AWT_CODON_TABLES, AWT_is_codon(), AWT_MAX_CODONS, calc_codon_nr(), codon_tables_initialized, containsProtMatching(), iupac::decode(), TransTables::explicit_table(), TransTables::forbid(), TransTables::forbidAll(), GB_AT_DNA, GBS_global_string(), TransTables::is_allowed(), TransTables::is_subset_of(), isGap(), isStartOrStopCodonNr(), N, neverTranslatesError(), TransTables::none(), NULp, pn_assert, protMatches(), TransTables::to_string(), TTIT_arb2embl(), TTIT_EMBL, and VALID_PROTEIN_NO_X.

Referenced by AWT_is_codon(), AWT_translator::isStartOrStopCodon(), and Distributor::translates_to_Xs().

const char* AP_get_codons ( char  protein,
int  code_nr 
)
const char* getAminoAcidAbbr ( char  aa)

Definition at line 427 of file AP_codon_table.cxx.

References NULp.

Referenced by TranslateGeneToAminoAcidSequence().

const char* AWT_get_codon_code_name ( int  code)

Variable Documentation

const int AWAR_PROTEIN_TYPE_bacterial_code_index = 8