36 #include "jsoncpp.cpp" 43 #include "codon_table.h" 59 #define DEFAULT_DIV_GENE_MIN_LEN 3 63 #define DEFAULT_MAX_INS_LENGTH 65 69 #define DEFAULT_AWE_V_RESERVE_SIZE 60 70 #define DEFAULT_AWE_D_RESERVE_SIZE 4000 71 #define DEFAULT_AWE_J_RESERVE_SIZE 60 86 typedef mpreal prob_t;
94 typedef long double prob_t;
98 typedef std::string sequence_t;
106 typedef uint16_t event_ind_t;
109 typedef uint16_t seq_len_t;
118 typedef Matrix<prob_t, seq_len_t> event_matrix_t;
121 typedef uint8_t seg_index_t;
124 using std::unique_ptr;
127 typedef std::pair<event_ind_t, prob_t> event_pair_t;
133 enum MAAGComputeProbAction {
160 enum ModelBehaviour {
203 VJ_VAR_JOI_INS_LEN = 4,
204 VJ_VAR_JOI_INS_NUC = 5,
205 VJ_VAR_JOI_INS_NUC_A = 5,
206 VJ_VAR_JOI_INS_NUC_C = 6,
207 VJ_VAR_JOI_INS_NUC_G = 7,
208 VJ_VAR_JOI_INS_NUC_T = 8,
216 VDJ_VAR_DIV_INS_LEN = 6,
217 VDJ_DIV_JOI_INS_LEN = 7,
218 VDJ_VAR_DIV_INS_NUC = 8,
219 VDJ_VAR_DIV_INS_NUC_A = 8,
220 VDJ_VAR_DIV_INS_NUC_C = 9,
221 VDJ_VAR_DIV_INS_NUC_G = 10,
222 VDJ_VAR_DIV_INS_NUC_T = 11,
223 VDJ_DIV_JOI_INS_NUC = 12,
224 VDJ_DIV_JOI_INS_NUC_A = 12,
225 VDJ_DIV_JOI_INS_NUC_C = 13,
226 VDJ_DIV_JOI_INS_NUC_G = 14,
227 VDJ_DIV_JOI_INS_NUC_T = 15,
232 enum MAAGNodeEventIndex {
233 VJ_VAR_JOI_GEN_I = 0,
235 VJ_VAR_JOI_INS_I = 2,
240 VDJ_VAR_DIV_INS_I = 2,
242 VDJ_DIV_JOI_INS_I = 4,
244 VDJ_JOI_DIV_GEN_I = 6
248 enum InsertionModelType {
263 Codons(std::pair<std::unordered_multimap<char, std::string>::const_iterator, std::unordered_multimap<char, std::string>::const_iterator> it)
264 : _begin(it.first), _end(it.second), _current(it.first)
269 std::string res = _current->second;
275 bool end()
const {
return _current == _end; }
278 std::unordered_multimap<char, std::string>::const_iterator _begin, _end, _current;
286 {
'A',
"GCT"}, {
'A',
"GCC"}, {
'A',
"GCA"}, {
'A',
"GCG"},
287 {
'L',
"TTA"}, {
'L',
"TTG"}, {
'L',
"CTT"}, {
'L',
"CTC"}, {
'L',
"CTA"}, {
'L',
"CTG"},
288 {
'R',
"CGT"}, {
'R',
"CGC"}, {
'R',
"CGA"}, {
'R',
"CGG"}, {
'R',
"AGA"}, {
'R',
"AGG"},
289 {
'K',
"AAA"}, {
'K',
"AAG"},
290 {
'N',
"AAT"}, {
'N',
"AAC"},
292 {
'D',
"GAT"}, {
'D',
"GAC"},
293 {
'F',
"TTT"}, {
'F',
"TTC"},
294 {
'C',
"TGT"}, {
'C',
"TGC"},
295 {
'P',
"CCT"}, {
'P',
"CCC"}, {
'P',
"CCA"}, {
'P',
"CCG"},
296 {
'Q',
"CAA"}, {
'Q',
"CAG"},
297 {
'S',
"TCT"}, {
'S',
"TCC"}, {
'S',
"TCA"}, {
'S',
"TCG"}, {
'S',
"AGT"}, {
'S',
"AGC"},
298 {
'E',
"GAA"}, {
'E',
"GAG"},
299 {
'T',
"ACT"}, {
'T',
"ACC"}, {
'T',
"ACA"}, {
'T',
"ACG"},
300 {
'G',
"GGT"}, {
'G',
"GGC"}, {
'G',
"GGA"}, {
'G',
"GGG"},
302 {
'H',
"CAT"}, {
'H',
"CAC"},
303 {
'Y',
"TAT"}, {
'Y',
"TAC"},
304 {
'I',
"ATT"}, {
'I',
"ATC"}, {
'I',
"ATA"},
305 {
'V',
"GTT"}, {
'V',
"GTC"}, {
'V',
"GTA"}, {
'V',
"GTG"},
306 {
'*',
"TAA"}, {
'*',
"TGA"}, {
'*',
"TAG"}
310 Codons codons(
char aminoacid)
const {
return Codons(_codons.equal_range(aminoacid)); }
315 std::unordered_multimap<char, std::string> _codons;
319 typedef std::pair<std::string*, uint> codons_t;
320 codons_t codons(
char aminoacid) {
322 default:
return codons_t(
nullptr, 0);
A struct for representing nucleotide codons for amino acids.
Definition: codon_table.h:17