12 #ifndef AP_CODON_TABLE_HXX
13 #define AP_CODON_TABLE_HXX
18 #ifndef STATIC_ASSERT_H
25 #define pn_assert(cond) arb_assert(cond)
39 #define AWT_CODON_TABLES 25 // number of different translation tables (aka genetic codes and codon tables)
40 #define AWT_MAX_CODONS 64 // maximum of possible codon ( = 4^3)
51 #define ALL_TABLES_MASK ((1<<AWT_CODON_TABLES)-1)
71 bool is_allowed(
int nr)
const {
return (allowed & bitmask(nr)) != 0; }
72 bool any()
const {
return allowed; }
73 bool none()
const {
return !allowed; }
76 void allow(
int nr) { allowed |= bitmask(nr); }
77 void forbid(
int nr) { allowed &= ~bitmask(nr); }
90 uint32_t tabs = allowed;
92 if (tabs&1)
return (tabs == 1) ? t : -1;
104 static char buffer[MAX_LEN];
114 out += sprintf(out,
",%i", shownNum);
134 void test_AWT_get_codons();
140 #error AP_codon_table.hxx included twice
141 #endif // AP_CODON_TABLE_HXX
int TTIT_embl2arb(int embl_code_nr)
void AP_initialize_codon_tables()
bool AWT_is_codon(char protein, const char *const dna, const TransTables &allowed, TransTables &allowed_left, const char **fail_reason_ptr=NULp)
const char * to_string(TranslationTableIndexType type) const
void forbidAllBut(int nr)
int TTIT_arb2embl(int arb_code_nr)
const char * AWT_get_codon_code_name(int code)
char buffer[MESSAGE_BUFFERSIZE]
const char * getAminoAcidAbbr(char aa)
int embl_feature_transl_table
void forbid(const TransTables &other)
const int AWAR_PROTEIN_TYPE_bacterial_code_index
int explicit_table() const
const char * AP_get_codons(char protein, int code_nr)
bool is_allowed(int nr) const
#define STATIC_ASSERT(const_expression)
bool is_subset_of(const TransTables &other) const
TranslationTableIndexType