ARB
|
#include "AP_codon_table.hxx"
#include "AP_pro_a_nucs.hxx"
#include "iupac.h"
#include <arb_global_defs.h>
#include <arb_str.h>
#include <cctype>
Go to the source code of this file.
Classes | |
class | Codon_Group |
Macros | |
#define | pn_assert(cond) arb_assert(cond) |
#define | EMBL_BACTERIAL_TABLE_INDEX 11 |
#define | AWT_CODON_TABLE_MAX_NAME_LENGTH 57 |
#define | VALID_PROTEIN "ABCDEFGHIJKLMNPQRSTVWXYZ*" |
#define | VALID_PROTEIN_NO_X "ABCDEFGHIJKLMNPQRSTVWYZ*" |
#define | MAX_EMBL_TRANSL_TABLE_VALUE 31 |
#define | MAX_CODON_LIST_LENGTH (70*3) |
Functions | |
int | TTIT_embl2arb (int embl_code_nr) |
int | TTIT_arb2embl (int arb_code_nr) |
static void | addToAmbiguous (int codon_nr, char possible_translation) |
void | AP_initialize_codon_tables () |
int | dna2idx (char c) |
char | idx2dna (int idx) |
int | calc_codon_nr (const char *dna) |
void | build_codon (int codon_nr, char *to_buffer) |
const char * | AWT_get_codon_code_name (int code) |
const char * | getAminoAcidAbbr (char aa) |
char | isStartOrStopCodonNr (int codon_nr, int code_nr) |
bool | protMatches (char p1, char p2) |
bool | containsProtMatching (const char *pstr, char p) |
bool | isGap (char c) |
GB_ERROR | neverTranslatesError (const char *dna, char protein) |
bool | AWT_is_codon (char protein, const char *const dna, const TransTables &allowed, TransTables &remaining, const char **fail_reason_ptr) |
int | legal_dna_no (int i) |
const char * | buildMixedCodon (const char *const con1, const char *const con2) |
static int | expandMore (const char *bufferStart, int no_of_condons, char *&to_buffer) |
static Codon_Group * | get_Codon_Group (char protein, int code_nr) |
const char * | AP_get_codons (char protein, int code_nr) |
Variables | |
static AWT_Codon_Code_Definition | AWT_codon_def [AWT_CODON_TABLES+1] |
static bool | codon_tables_initialized = false |
static char | definite_translation [AWT_MAX_CODONS] |
static char * | ambiguous_codons [AWT_MAX_CODONS] |
static const char * | aa_3letter_name [26+1] |
#define pn_assert | ( | cond | ) | arb_assert(cond) |
Definition at line 21 of file AP_codon_table.cxx.
Referenced by AP_get_codons(), AP_initialize_codon_tables(), AWT_get_codon_code_name(), AWT_is_codon(), build_codon(), buildMixedCodon(), calc_codon_nr(), Codon_Group::Codon_Group(), containsProtMatching(), Codon_Group::expand(), get_Codon_Group(), idx2dna(), AWT_translator::isStartOrStopCodon(), isStartOrStopCodonNr(), protMatches(), TTIT_arb2embl(), and TTIT_embl2arb().
#define EMBL_BACTERIAL_TABLE_INDEX 11 |
Definition at line 23 of file AP_codon_table.cxx.
Referenced by TTIT_embl2arb().
#define AWT_CODON_TABLE_MAX_NAME_LENGTH 57 |
Definition at line 24 of file AP_codon_table.cxx.
Referenced by AP_initialize_codon_tables().
#define VALID_PROTEIN "ABCDEFGHIJKLMNPQRSTVWXYZ*" |
Definition at line 26 of file AP_codon_table.cxx.
Referenced by neverTranslatesError().
#define VALID_PROTEIN_NO_X "ABCDEFGHIJKLMNPQRSTVWYZ*" |
Definition at line 27 of file AP_codon_table.cxx.
Referenced by AWT_is_codon().
#define MAX_EMBL_TRANSL_TABLE_VALUE 31 |
Definition at line 216 of file AP_codon_table.cxx.
Referenced by TTIT_embl2arb().
#define MAX_CODON_LIST_LENGTH (70*3) |
Definition at line 987 of file AP_codon_table.cxx.
Referenced by AP_get_codons().
Definition at line 220 of file AP_codon_table.cxx.
References AWAR_PROTEIN_TYPE_bacterial_code_index, AWT_CODON_TABLES, EMBL_BACTERIAL_TABLE_INDEX, AWT_Codon_Code_Definition::embl_feature_transl_table, initialized, MAX_EMBL_TRANSL_TABLE_VALUE, pn_assert, and TTIT_arb2embl().
Referenced by translate_gene_sequence(), translate_getInfo(), and TranslateGeneToAminoAcidSequence().
Definition at line 259 of file AP_codon_table.cxx.
References AWT_CODON_TABLES, AWT_Codon_Code_Definition::embl_feature_transl_table, and pn_assert.
Referenced by ALI_translate_marked(), AWT_is_codon(), TransTables::to_string(), translate_saveInfo(), and TTIT_embl2arb().
Definition at line 269 of file AP_codon_table.cxx.
References AWT_MAX_CODONS, and length.
Referenced by AP_initialize_codon_tables().
void AP_initialize_codon_tables | ( | ) |
Definition at line 285 of file AP_codon_table.cxx.
References AWT_Codon_Code_Definition::aa, addToAmbiguous(), AWT_CODON_TABLE_MAX_NAME_LENGTH, AWT_CODON_TABLES, AWT_MAX_CODONS, codon_tables_initialized, NULp, pn_assert, and AWT_Codon_Code_Definition::startStop.
Referenced by ALI_realign_marked(), and AWT_translator::AWT_translator().
Definition at line 358 of file AP_codon_table.cxx.
Referenced by calc_codon_nr().
Definition at line 369 of file AP_codon_table.cxx.
References pn_assert.
Referenced by build_codon().
Definition at line 374 of file AP_codon_table.cxx.
References AWT_MAX_CODONS, dna2idx(), and pn_assert.
Referenced by AWT_is_codon(), and AWT_translator::isStartOrStopCodon().
Definition at line 384 of file AP_codon_table.cxx.
References AWT_MAX_CODONS, idx2dna(), and pn_assert.
Referenced by Codon_Group::expand().
Definition at line 392 of file AP_codon_table.cxx.
References AWT_CODON_TABLES, AWT_Codon_Code_Definition::name, and pn_assert.
Referenced by ED4_CreateProteinViewer_window(), and NT_create_dna_2_pro_window().
Definition at line 427 of file AP_codon_table.cxx.
References NULp.
Referenced by TranslateGeneToAminoAcidSequence().
Definition at line 503 of file AP_codon_table.cxx.
References arb_assert, AWT_CODON_TABLES, AWT_MAX_CODONS, implicated, pn_assert, and AWT_Codon_Code_Definition::startStop.
Referenced by AWT_is_codon(), and AWT_translator::isStartOrStopCodon().
return true if p1 matches p2
p1 | "normal" protein (neither B, Z nor J) |
p2 | any protein (B, Z and J ok) B is a shortcut for Asp(=D) or Asn(=N) J is a shortcut for Ile(=I) or Leu(=L) Z is a shortcut for Glu(=E) or Gln(=Q) |
Definition at line 546 of file AP_codon_table.cxx.
References pn_assert.
Referenced by AWT_is_codon().
return true, if 'pstr' contains any protein that matches 'p'. uses same logic as protMatches()
Definition at line 564 of file AP_codon_table.cxx.
References pn_assert.
Referenced by AWT_is_codon().
|
inline |
Definition at line 574 of file AP_codon_table.cxx.
References GAP::is_std_gap().
Referenced by AWT_is_codon().
Definition at line 576 of file AP_codon_table.cxx.
References GBS_global_string(), and VALID_PROTEIN.
Referenced by AWT_is_codon().
bool AWT_is_codon | ( | char | protein, |
const char *const | dna, | ||
const TransTables & | allowed, | ||
TransTables & | remaining, | ||
const char ** | fail_reason_ptr | ||
) |
test if 'dna' codes 'protein'
protein | amino acid |
dna | three nucleotides (gaps allowed, e.g. 'A-C' can be tested vs 'X') |
allowed | allowed translation tables |
remaining | returns the remaining allowed translation tables (only if this functions returns true) |
fail_reason_ptr | if not NULp => store reason for failure here (or set it to NULp on success) |
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().
Definition at line 851 of file AP_codon_table.cxx.
Definition at line 853 of file AP_codon_table.cxx.
References iupac::combine(), GB_AT_DNA, NULp, and pn_assert.
Referenced by expandMore().
Definition at line 891 of file AP_codon_table.cxx.
References buildMixedCodon(), and result.
Referenced by Codon_Group::expand().
|
static |
Definition at line 960 of file AP_codon_table.cxx.
References AWT_CODON_TABLES, codon_tables_initialized, N, NULp, and pn_assert.
Referenced by AP_get_codons().
Definition at line 989 of file AP_codon_table.cxx.
References buffer, Codon_Group::expand(), get_Codon_Group(), MAX_CODON_LIST_LENGTH, offset, and pn_assert.
Referenced by AWT_translator::AWT_translator().
|
static |
Definition at line 42 of file AP_codon_table.cxx.
|
static |
Definition at line 265 of file AP_codon_table.cxx.
Referenced by AP_initialize_codon_tables(), AWT_is_codon(), and get_Codon_Group().
|
static |
Definition at line 266 of file AP_codon_table.cxx.
|
static |
Definition at line 267 of file AP_codon_table.cxx.
|
static |
Definition at line 397 of file AP_codon_table.cxx.