Package Bio :: Package Data :: Module CodonTable
[hide private]
[frames] | no frames]

Source Code for Module Bio.Data.CodonTable

  1  # This code is part of the Biopython distribution and governed by its 
  2  # license.  Please see the LICENSE file that should have been included 
  3  # as part of this package. 
  4  """Codon tables based on those from the NCBI. 
  5   
  6  These tables are based on parsing the NCBI file: 
  7  ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt 
  8   
  9  Last updated for Version 3.9 
 10  """ 
 11   
 12  from __future__ import print_function 
 13   
 14  from Bio import Alphabet 
 15  from Bio.Alphabet import IUPAC 
 16  from Bio.Data import IUPACData 
 17   
 18  unambiguous_dna_by_name = {} 
 19  unambiguous_dna_by_id = {} 
 20  unambiguous_rna_by_name = {} 
 21  unambiguous_rna_by_id = {} 
 22  generic_by_name = {} # unambiguous DNA or RNA 
 23  generic_by_id = {} # unambiguous DNA or RNA 
 24   
 25  ambiguous_dna_by_name = {} 
 26  ambiguous_dna_by_id = {} 
 27  ambiguous_rna_by_name = {} 
 28  ambiguous_rna_by_id = {} 
 29  ambiguous_generic_by_name = {} # ambiguous DNA or RNA 
 30  ambiguous_generic_by_id = {} # ambiguous DNA or RNA 
 31   
 32  # standard IUPAC unambiguous codons 
 33  standard_dna_table = None 
 34  standard_rna_table = None 
 35   
 36  # In the future, the back_table could return a statistically 
 37  # appropriate distribution of codons, so do not cache the results of 
 38  # back_table lookups! 
 39   
 40   
41 -class TranslationError(Exception):
42 pass
43 44
45 -class CodonTable(object):
46 nucleotide_alphabet = Alphabet.generic_nucleotide 47 protein_alphabet = Alphabet.generic_protein 48 49 forward_table = {} # only includes codons which actually code 50 back_table = {} # for back translations 51 start_codons = [] 52 stop_codons = [] 53 54 # Not always called from derived classes!
55 - def __init__(self, nucleotide_alphabet = nucleotide_alphabet, 56 protein_alphabet = protein_alphabet, 57 forward_table = forward_table, back_table = back_table, 58 start_codons = start_codons, stop_codons = stop_codons):
65
66 - def __str__(self):
67 """Returns a simple text representation of the codon table 68 69 e.g. 70 >>> import Bio.Data.CodonTable 71 >>> print(Bio.Data.CodonTable.standard_dna_table) 72 >>> print(Bio.Data.CodonTable.generic_by_id[1]) 73 """ 74 75 if self.id: 76 answer = "Table %i" % self.id 77 else: 78 answer = "Table ID unknown" 79 if self.names: 80 answer += " " + ", ".join([x for x in self.names if x]) 81 82 #Use the main four letters (and the conventional ordering) 83 #even for ambiguous tables 84 letters = self.nucleotide_alphabet.letters 85 if isinstance(self.nucleotide_alphabet, Alphabet.DNAAlphabet) \ 86 or (letters is not None and "T" in letters): 87 letters = "TCAG" 88 else: 89 #Should be either RNA or generic nucleotides, 90 #e.g. Bio.Data.CodonTable.generic_by_id[1] 91 letters = "UCAG" 92 93 #Build the table... 94 answer += "\n\n |" + "|".join(" %s " % c2 for c2 in letters) + "|" 95 answer += "\n--+" + "+".join("---------" for c2 in letters) + "+--" 96 for c1 in letters: 97 for c3 in letters: 98 line = c1 + " |" 99 for c2 in letters: 100 codon = c1+c2+c3 101 line += " %s" % codon 102 if codon in self.stop_codons: 103 line += " Stop|" 104 else: 105 try: 106 amino = self.forward_table[codon] 107 except KeyError: 108 amino = "?" 109 except TranslationError: 110 amino = "?" 111 if codon in self.start_codons: 112 line += " %s(s)|" % amino 113 else: 114 line += " %s |" % amino 115 line += " " + c3 116 answer += "\n"+ line 117 answer += "\n--+" + "+".join("---------" for c2 in letters) + "+--" 118 return answer
119 120
121 -def make_back_table(table, default_stop_codon):
122 # ONLY RETURNS A SINGLE CODON 123 # Do the sort so changes in the hash implementation won't affect 124 # the result when one amino acid is coded by more than one codon. 125 back_table = {} 126 for key in sorted(table): 127 back_table[table[key]] = key 128 back_table[None] = default_stop_codon 129 return back_table
130 131
132 -class NCBICodonTable(CodonTable):
133 nucleotide_alphabet = Alphabet.generic_nucleotide 134 protein_alphabet = IUPAC.protein 135
136 - def __init__(self, id, names, table, start_codons, stop_codons):
137 self.id = id 138 self.names = names 139 self.forward_table = table 140 self.back_table = make_back_table(table, stop_codons[0]) 141 self.start_codons = start_codons 142 self.stop_codons = stop_codons
143 144
145 -class NCBICodonTableDNA(NCBICodonTable):
146 nucleotide_alphabet = IUPAC.unambiguous_dna
147 148
149 -class NCBICodonTableRNA(NCBICodonTable):
150 nucleotide_alphabet = IUPAC.unambiguous_rna
151 152 153 ######### Deal with ambiguous forward translations 154
155 -class AmbiguousCodonTable(CodonTable):
156 - def __init__(self, codon_table, 157 ambiguous_nucleotide_alphabet, 158 ambiguous_nucleotide_values, 159 ambiguous_protein_alphabet, 160 ambiguous_protein_values):
161 CodonTable.__init__(self, 162 ambiguous_nucleotide_alphabet, 163 ambiguous_protein_alphabet, 164 AmbiguousForwardTable(codon_table.forward_table, 165 ambiguous_nucleotide_values, 166 ambiguous_protein_values), 167 codon_table.back_table, 168 169 # These two are WRONG! I need to get the 170 # list of ambiguous codons which code for 171 # the stop codons XXX 172 list_ambiguous_codons(codon_table.start_codons, ambiguous_nucleotide_values), 173 list_ambiguous_codons(codon_table.stop_codons, ambiguous_nucleotide_values) 174 ) 175 self._codon_table = codon_table
176 177 # Be sneaky and forward attribute lookups to the original table. 178 # This lets us get the names, if the original table is an NCBI 179 # table.
180 - def __getattr__(self, name):
181 return getattr(self._codon_table, name)
182 183
184 -def list_possible_proteins(codon, forward_table, ambiguous_nucleotide_values):
185 c1, c2, c3 = codon 186 x1 = ambiguous_nucleotide_values[c1] 187 x2 = ambiguous_nucleotide_values[c2] 188 x3 = ambiguous_nucleotide_values[c3] 189 possible = {} 190 stops = [] 191 for y1 in x1: 192 for y2 in x2: 193 for y3 in x3: 194 try: 195 possible[forward_table[y1+y2+y3]] = 1 196 except KeyError: 197 # If tripping over a stop codon 198 stops.append(y1+y2+y3) 199 if stops: 200 if possible: 201 raise TranslationError("ambiguous codon '%s' codes " % codon 202 + "for both proteins and stop codons") 203 # This is a true stop codon - tell the caller about it 204 raise KeyError(codon) 205 return list(possible.keys())
206 207
208 -def list_ambiguous_codons(codons, ambiguous_nucleotide_values):
209 """Extends a codon list to include all possible ambigous codons. 210 211 e.g. ['TAG', 'TAA'] -> ['TAG', 'TAA', 'TAR'] 212 ['UAG', 'UGA'] -> ['UAG', 'UGA', 'URA'] 213 214 Note that ['TAG', 'TGA'] -> ['TAG', 'TGA'], this does not add 'TRR'. 215 Thus only two more codons are added in the following: 216 217 e.g. ['TGA', 'TAA', 'TAG'] -> ['TGA', 'TAA', 'TAG', 'TRA', 'TAR'] 218 219 Returns a new (longer) list of codon strings. 220 """ 221 222 #Note ambiguous_nucleotide_values['R'] = 'AG' (etc) 223 #This will generate things like 'TRR' from ['TAG', 'TGA'], which 224 #we don't want to include: 225 c1_list = sorted(letter for (letter, meanings) 226 in ambiguous_nucleotide_values.items() 227 if set(codon[0] for codon in codons).issuperset(set(meanings))) 228 c2_list = sorted(letter for (letter, meanings) 229 in ambiguous_nucleotide_values.items() 230 if set(codon[1] for codon in codons).issuperset(set(meanings))) 231 c3_list = sorted(letter for (letter, meanings) 232 in ambiguous_nucleotide_values.items() 233 if set(codon[2] for codon in codons).issuperset(set(meanings))) 234 #candidates is a list (not a set) to preserve the iteration order 235 candidates = [] 236 for c1 in c1_list: 237 for c2 in c2_list: 238 for c3 in c3_list: 239 codon = c1+c2+c3 240 if codon not in candidates and codon not in codons: 241 candidates.append(codon) 242 answer = codons[:] # copy 243 #print "Have %i new candidates" % len(candidates) 244 for ambig_codon in candidates: 245 wanted = True 246 #e.g. 'TRR' -> 'TAA', 'TAG', 'TGA', 'TGG' 247 for codon in [c1+c2+c3 248 for c1 in ambiguous_nucleotide_values[ambig_codon[0]] 249 for c2 in ambiguous_nucleotide_values[ambig_codon[1]] 250 for c3 in ambiguous_nucleotide_values[ambig_codon[2]]]: 251 if codon not in codons: 252 #This ambiguous codon can code for a non-stop, exclude it! 253 wanted=False 254 #print "Rejecting %s" % ambig_codon 255 continue 256 if wanted: 257 answer.append(ambig_codon) 258 return answer
259 260 assert list_ambiguous_codons(['TGA', 'TAA'], IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TRA'] 261 assert list_ambiguous_codons(['TAG', 'TGA'], IUPACData.ambiguous_dna_values) == ['TAG', 'TGA'] 262 assert list_ambiguous_codons(['TAG', 'TAA'], IUPACData.ambiguous_dna_values) == ['TAG', 'TAA', 'TAR'] 263 assert list_ambiguous_codons(['UAG', 'UAA'], IUPACData.ambiguous_rna_values) == ['UAG', 'UAA', 'UAR'] 264 assert list_ambiguous_codons(['TGA', 'TAA', 'TAG'], 265 IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TAR', 'TRA'] 266 267 # Forward translation is "onto", that is, any given codon always maps 268 # to the same protein, or it doesn't map at all. Thus, I can build 269 # off of an existing table to produce the ambiguous mappings. 270 # 271 # This handles the general case. Perhaps it's overkill? 272 # >>> t = CodonTable.ambiguous_dna_by_id[1] 273 # >>> t.forward_table["AAT"] 274 # 'N' 275 # >>> t.forward_table["GAT"] 276 # 'D' 277 # >>> t.forward_table["RAT"] 278 # 'B' 279 # >>> t.forward_table["YTA"] 280 # 'L' 281 282
283 -class AmbiguousForwardTable(object):
284 - def __init__(self, forward_table, ambiguous_nucleotide, ambiguous_protein):
285 self.forward_table = forward_table 286 287 self.ambiguous_nucleotide = ambiguous_nucleotide 288 self.ambiguous_protein = ambiguous_protein 289 290 inverted = {} 291 for name, val in ambiguous_protein.items(): 292 for c in val: 293 x = inverted.get(c, {}) 294 x[name] = 1 295 inverted[c] = x 296 for name, val in inverted.items(): 297 inverted[name] = list(val.keys()) 298 self._inverted = inverted 299 300 self._cache = {}
301
302 - def get(self, codon, failobj = None):
303 try: 304 return self.__getitem__(codon) 305 except KeyError: 306 return failobj
307
308 - def __getitem__(self, codon):
309 try: 310 x = self._cache[codon] 311 except KeyError: 312 pass 313 else: 314 if x is TranslationError: 315 raise TranslationError(codon) # no unique translation 316 if x is KeyError: 317 raise KeyError(codon) # it's a stop codon 318 return x 319 try: 320 x = self.forward_table[codon] 321 self._cache[codon] = x 322 return x 323 except KeyError: 324 pass 325 326 # XXX Need to make part of this into a method which returns 327 # a list of all possible encodings for a codon! 328 try: 329 possible = list_possible_proteins(codon, 330 self.forward_table, 331 self.ambiguous_nucleotide) 332 except KeyError: 333 self._cache[codon] = KeyError 334 raise KeyError(codon) # stop codon 335 except TranslationError: 336 self._cache[codon] = TranslationError 337 raise TranslationError(codon) # does not code 338 assert len(possible) > 0, "unambiguous codons must code" 339 340 # Hah! Only one possible protein, so use it 341 if len(possible) == 1: 342 self._cache[codon] = possible[0] 343 return possible[0] 344 345 # See if there's an ambiguous protein encoding for the multiples. 346 # Find residues which exist in every coding set. 347 ambiguous_possible = {} 348 for amino in possible: 349 for term in self._inverted[amino]: 350 ambiguous_possible[term] = ambiguous_possible.get(term, 0) + 1 351 352 n = len(possible) 353 possible = [] 354 for amino, val in ambiguous_possible.items(): 355 if val == n: 356 possible.append(amino) 357 358 # No amino acid encoding for the results 359 if len(possible) == 0: 360 self._cache[codon] = TranslationError 361 raise TranslationError(codon) # no valid translation 362 363 # All of these are valid, so choose one 364 # To be unique, sort by smallet ambiguity then alphabetically 365 # Can get this if "X" encodes for everything. 366 #def _sort(x, y, table = self.ambiguous_protein): 367 # a = cmp(len(table[x]), len(table[y])) 368 # if a == 0: 369 # return cmp(x, y) 370 # return a 371 372 #Sort by key is 2.x and 3.x compatible 373 possible.sort(key=lambda x:(len(self.ambiguous_protein[x]), x)) 374 375 x = possible[0] 376 self._cache[codon] = x 377 return x
378 379
380 -def register_ncbi_table(name, alt_name, id, 381 table, start_codons, stop_codons):
382 """Turns codon table data into objects, and stores them in the dictionaries (PRIVATE).""" 383 #In most cases names are divided by "; ", however there is also 384 #'Bacterial and Plant Plastid' (which used to be just 'Bacterial') 385 names = [x.strip() for x in name.replace(" and ", "; ").split("; ")] 386 387 dna = NCBICodonTableDNA(id, names + [alt_name], table, start_codons, 388 stop_codons) 389 390 ambig_dna = AmbiguousCodonTable(dna, 391 IUPAC.ambiguous_dna, 392 IUPACData.ambiguous_dna_values, 393 IUPAC.extended_protein, 394 IUPACData.extended_protein_values) 395 396 # replace all T's with U's for the RNA tables 397 rna_table = {} 398 generic_table = {} 399 for codon, val in table.items(): 400 generic_table[codon] = val 401 codon = codon.replace("T", "U") 402 generic_table[codon] = val 403 rna_table[codon] = val 404 rna_start_codons = [] 405 generic_start_codons = [] 406 for codon in start_codons: 407 generic_start_codons.append(codon) 408 codon = codon.replace("T", "U") 409 generic_start_codons.append(codon) 410 rna_start_codons.append(codon) 411 rna_stop_codons = [] 412 generic_stop_codons = [] 413 for codon in stop_codons: 414 generic_stop_codons.append(codon) 415 codon = codon.replace("T", "U") 416 generic_stop_codons.append(codon) 417 rna_stop_codons.append(codon) 418 419 generic = NCBICodonTable(id, names + [alt_name], generic_table, 420 generic_start_codons, generic_stop_codons) 421 422 #The following isn't very elegant, but seems to work nicely. 423 _merged_values = dict(IUPACData.ambiguous_rna_values.items()) 424 _merged_values["T"] = "U" 425 ambig_generic = AmbiguousCodonTable(generic, 426 Alphabet.NucleotideAlphabet(), 427 _merged_values, 428 IUPAC.extended_protein, 429 IUPACData.extended_protein_values) 430 431 rna = NCBICodonTableRNA(id, names + [alt_name], rna_table, 432 rna_start_codons, rna_stop_codons) 433 434 ambig_rna = AmbiguousCodonTable(rna, 435 IUPAC.ambiguous_rna, 436 IUPACData.ambiguous_rna_values, 437 IUPAC.extended_protein, 438 IUPACData.extended_protein_values) 439 440 if id == 1: 441 global standard_dna_table, standard_rna_table 442 standard_dna_table = dna 443 standard_rna_table = rna 444 445 unambiguous_dna_by_id[id] = dna 446 unambiguous_rna_by_id[id] = rna 447 generic_by_id[id] = generic 448 ambiguous_dna_by_id[id] = ambig_dna 449 ambiguous_rna_by_id[id] = ambig_rna 450 ambiguous_generic_by_id[id] = ambig_generic 451 452 if alt_name is not None: 453 names.append(alt_name) 454 455 for name in names: 456 unambiguous_dna_by_name[name] = dna 457 unambiguous_rna_by_name[name] = rna 458 generic_by_name[name] = generic 459 ambiguous_dna_by_name[name] = ambig_dna 460 ambiguous_rna_by_name[name] = ambig_rna 461 ambiguous_generic_by_name[name] = ambig_generic
462 463 464 ### These tables created from the data file 465 ### ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt 466 ### using the following: 467 ##import re 468 ##for line in open("gc.prt").readlines(): 469 ## if line[:2] == " {": 470 ## names = [] 471 ## id = None 472 ## aa = None 473 ## start = None 474 ## bases = [] 475 ## elif line[:6] == " name": 476 ## names.append(re.search('"([^"]*)"', line).group(1)) 477 ## elif line[:8] == " name": 478 ## names.append(re.search('"(.*)$', line).group(1)) 479 ## elif line == ' Mitochondrial; Mycoplasma; Spiroplasma" ,\n': 480 ## names[-1] = names[-1] + " Mitochondrial; Mycoplasma; Spiroplasma" 481 ## elif line[:4] == " id": 482 ## id = int(re.search('(\d+)', line).group(1)) 483 ## elif line[:10] == " ncbieaa ": 484 ## aa = line[12:12+64] 485 ## elif line[:10] == " sncbieaa": 486 ## start = line[12:12+64] 487 ## elif line[:9] == " -- Base": 488 ## bases.append(line[12:12+64]) 489 ## elif line[:2] == " }": 490 ## assert names != [] and id is not None and aa is not None 491 ## assert start is not None and bases != [] 492 ## if len(names) == 1: 493 ## names.append(None) 494 ## print "register_ncbi_table(name = %s," % repr(names[0]) 495 ## print " alt_name = %s, id = %d," % \ 496 ## (repr(names[1]), id) 497 ## print " table = {" 498 ## s = " " 499 ## for i in range(64): 500 ## if aa[i] != "*": 501 ## t = " '%s%s%s': '%s'," % (bases[0][i], bases[1][i], 502 ## bases[2][i], aa[i]) 503 ## if len(s) + len(t) > 75: 504 ## print s 505 ## s = " " + t 506 ## else: 507 ## s = s + t 508 ## print s, "}," 509 510 ## s = " stop_codons = [" 511 ## for i in range(64): 512 ## if aa[i] == "*": 513 ## t = " '%s%s%s'," % (bases[0][i], bases[1][i], bases[2][i]) 514 ## if len(s) + len(t) > 75: 515 ## print s 516 ## s = " " + t 517 ## else: 518 ## s = s + t 519 ## print s, "]," 520 521 ## s = " start_codons = [" 522 ## for i in range(64): 523 ## if start[i] == "M": 524 ## t = " '%s%s%s'," % (bases[0][i], bases[1][i], bases[2][i]) 525 ## if len(s) + len(t) > 75: 526 ## print s 527 ## s = " " + t 528 ## else: 529 ## s = s + t 530 ## print s, "]" 531 ## print " )" 532 ## elif line[:2] == "--" or line == "\n" or line == "}\n" or \ 533 ## line == 'Genetic-code-table ::= {\n': 534 ## pass 535 ## else: 536 ## raise Exception("Unparsed: " + repr(line)) 537 538 register_ncbi_table(name = 'Standard', 539 alt_name = 'SGC0', id = 1, 540 table = { 541 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 542 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 543 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 544 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 545 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 546 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 547 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 548 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 549 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 550 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 551 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 552 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 553 'GGG': 'G', }, 554 stop_codons = [ 'TAA', 'TAG', 'TGA', ], 555 start_codons = [ 'TTG', 'CTG', 'ATG', ] 556 ) 557 register_ncbi_table(name = 'Vertebrate Mitochondrial', 558 alt_name = 'SGC1', id = 2, 559 table = { 560 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 561 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 562 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 563 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 564 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 565 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 566 'ATT': 'I', 'ATC': 'I', 'ATA': 'M', 'ATG': 'M', 'ACT': 'T', 567 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 568 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'GTT': 'V', 569 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 'GCC': 'A', 570 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 'GAA': 'E', 571 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 'GGG': 'G', }, 572 stop_codons = [ 'TAA', 'TAG', 'AGA', 'AGG', ], 573 start_codons = [ 'ATT', 'ATC', 'ATA', 'ATG', 'GTG', ] 574 ) 575 register_ncbi_table(name = 'Yeast Mitochondrial', 576 alt_name = 'SGC2', id = 3, 577 table = { 578 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 579 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 580 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'T', 581 'CTC': 'T', 'CTA': 'T', 'CTG': 'T', 'CCT': 'P', 'CCC': 'P', 582 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 583 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 584 'ATT': 'I', 'ATC': 'I', 'ATA': 'M', 'ATG': 'M', 'ACT': 'T', 585 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 586 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 587 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 588 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 589 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 590 'GGA': 'G', 'GGG': 'G', }, 591 stop_codons = [ 'TAA', 'TAG', ], 592 start_codons = [ 'ATA', 'ATG', ] 593 ) 594 register_ncbi_table(name = 'Mold Mitochondrial; Protozoan Mitochondrial; Coelenterate Mitochondrial; Mycoplasma; Spiroplasma', 595 alt_name = 'SGC3', id = 4, 596 table = { 597 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 598 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 599 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 600 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 601 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 602 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 603 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 604 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 605 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 606 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 607 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 608 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 609 'GGA': 'G', 'GGG': 'G', }, 610 stop_codons = [ 'TAA', 'TAG', ], 611 start_codons = [ 'TTA', 'TTG', 'CTG', 'ATT', 'ATC', 612 'ATA', 'ATG', 'GTG', ] 613 ) 614 register_ncbi_table(name = 'Invertebrate Mitochondrial', 615 alt_name = 'SGC4', id = 5, 616 table = { 617 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 618 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 619 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 620 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 621 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 622 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 623 'ATT': 'I', 'ATC': 'I', 'ATA': 'M', 'ATG': 'M', 'ACT': 'T', 624 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 625 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'S', 626 'AGG': 'S', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 627 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 628 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 629 'GGA': 'G', 'GGG': 'G', }, 630 stop_codons = [ 'TAA', 'TAG', ], 631 start_codons = [ 'TTG', 'ATT', 'ATC', 'ATA', 'ATG', 632 'GTG', ] 633 ) 634 register_ncbi_table(name = 'Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear', 635 alt_name = 'SGC5', id = 6, 636 table = { 637 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 638 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 639 'TAA': 'Q', 'TAG': 'Q', 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 640 'CTT': 'L', 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 641 'CCC': 'P', 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 642 'CAA': 'Q', 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 643 'CGG': 'R', 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 644 'ACT': 'T', 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 645 'AAC': 'N', 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 646 'AGA': 'R', 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 647 'GTG': 'V', 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 648 'GAT': 'D', 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 649 'GGC': 'G', 'GGA': 'G', 'GGG': 'G', }, 650 stop_codons = [ 'TGA', ], 651 start_codons = [ 'ATG', ] 652 ) 653 register_ncbi_table(name = 'Echinoderm Mitochondrial; Flatworm Mitochondrial', 654 alt_name = 'SGC8', id = 9, 655 table = { 656 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 657 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 658 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 659 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 660 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 661 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 662 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 663 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 664 'AAA': 'N', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'S', 665 'AGG': 'S', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 666 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 667 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 668 'GGA': 'G', 'GGG': 'G', }, 669 stop_codons = [ 'TAA', 'TAG', ], 670 start_codons = [ 'ATG', 'GTG', ] 671 ) 672 register_ncbi_table(name = 'Euplotid Nuclear', 673 alt_name = 'SGC9', id = 10, 674 table = { 675 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 676 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 677 'TGT': 'C', 'TGC': 'C', 'TGA': 'C', 'TGG': 'W', 'CTT': 'L', 678 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 679 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 680 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 681 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 682 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 683 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 684 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 685 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 686 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 687 'GGA': 'G', 'GGG': 'G', }, 688 stop_codons = [ 'TAA', 'TAG', ], 689 start_codons = [ 'ATG', ] 690 ) 691 register_ncbi_table(name = 'Bacterial and Plant Plastid', 692 alt_name = None, id = 11, 693 table = { 694 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 695 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 696 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 697 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 698 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 699 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 700 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 701 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 702 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 703 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 704 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 705 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 706 'GGG': 'G', }, 707 stop_codons = [ 'TAA', 'TAG', 'TGA', ], 708 start_codons = [ 'TTG', 'CTG', 'ATT', 'ATC', 'ATA', 709 'ATG', 'GTG', ] 710 ) 711 register_ncbi_table(name = 'Alternative Yeast Nuclear', 712 alt_name = None, id = 12, 713 table = { 714 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 715 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 716 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 717 'CTA': 'L', 'CTG': 'S', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 718 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 719 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 720 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 721 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 722 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 723 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 724 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 725 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 726 'GGG': 'G', }, 727 stop_codons = [ 'TAA', 'TAG', 'TGA', ], 728 start_codons = [ 'CTG', 'ATG', ] 729 ) 730 register_ncbi_table(name = 'Ascidian Mitochondrial', 731 alt_name = None, id = 13, 732 table = { 733 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 734 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 735 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 736 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 737 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 738 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 739 'ATT': 'I', 'ATC': 'I', 'ATA': 'M', 'ATG': 'M', 'ACT': 'T', 740 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 741 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'G', 742 'AGG': 'G', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 743 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 744 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 745 'GGA': 'G', 'GGG': 'G', }, 746 stop_codons = [ 'TAA', 'TAG', ], 747 start_codons = [ 'TTG', 'ATA', 'ATG', 'GTG', ] 748 ) 749 register_ncbi_table(name = 'Alternative Flatworm Mitochondrial', 750 alt_name = None, id = 14, 751 table = { 752 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 753 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 754 'TAA': 'Y', 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 755 'CTT': 'L', 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 756 'CCC': 'P', 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 757 'CAA': 'Q', 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 758 'CGG': 'R', 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 759 'ACT': 'T', 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 760 'AAC': 'N', 'AAA': 'N', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 761 'AGA': 'S', 'AGG': 'S', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 762 'GTG': 'V', 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 763 'GAT': 'D', 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 764 'GGC': 'G', 'GGA': 'G', 'GGG': 'G', }, 765 stop_codons = [ 'TAG', ], 766 start_codons = [ 'ATG', ] 767 ) 768 register_ncbi_table(name = 'Blepharisma Macronuclear', 769 alt_name = None, id = 15, 770 table = { 771 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 772 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 773 'TAG': 'Q', 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 774 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 775 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 776 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 777 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 778 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 779 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 780 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 781 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 782 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 783 'GGA': 'G', 'GGG': 'G', }, 784 stop_codons = [ 'TAA', 'TGA', ], 785 start_codons = [ 'ATG', ] 786 ) 787 register_ncbi_table(name = 'Chlorophycean Mitochondrial', 788 alt_name = None, id = 16, 789 table = { 790 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 791 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 792 'TAG': 'L', 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 793 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 794 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 795 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 796 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 797 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 798 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 799 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 800 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 801 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 802 'GGA': 'G', 'GGG': 'G', }, 803 stop_codons = [ 'TAA', 'TGA', ], 804 start_codons = [ 'ATG', ] 805 ) 806 register_ncbi_table(name = 'Trematode Mitochondrial', 807 alt_name = None, id = 21, 808 table = { 809 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 810 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 811 'TGT': 'C', 'TGC': 'C', 'TGA': 'W', 'TGG': 'W', 'CTT': 'L', 812 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 813 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 814 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 815 'ATT': 'I', 'ATC': 'I', 'ATA': 'M', 'ATG': 'M', 'ACT': 'T', 816 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 817 'AAA': 'N', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'S', 818 'AGG': 'S', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 819 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 820 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 821 'GGA': 'G', 'GGG': 'G', }, 822 stop_codons = [ 'TAA', 'TAG', ], 823 start_codons = [ 'ATG', 'GTG', ] 824 ) 825 register_ncbi_table(name = 'Scenedesmus obliquus Mitochondrial', 826 alt_name = None, id = 22, 827 table = { 828 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 829 'TCC': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 'TAG': 'L', 830 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 831 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 832 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 833 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 834 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 835 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 836 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 837 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 838 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 839 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 840 'GGG': 'G', }, 841 stop_codons = [ 'TCA', 'TAA', 'TGA', ], 842 start_codons = [ 'ATG', ] 843 ) 844 register_ncbi_table(name = 'Thraustochytrium Mitochondrial', 845 alt_name = None, id = 23, 846 table = { 847 'TTT': 'F', 'TTC': 'F', 'TTG': 'L', 'TCT': 'S', 'TCC': 'S', 848 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 'TGT': 'C', 849 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 'CTA': 'L', 850 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 'CCG': 'P', 851 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 'CGT': 'R', 852 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 'ATC': 'I', 853 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 'ACA': 'T', 854 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 'AAG': 'K', 855 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 'GTT': 'V', 856 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 'GCC': 'A', 857 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 'GAA': 'E', 858 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 'GGG': 'G', }, 859 stop_codons = [ 'TTA', 'TAA', 'TAG', 'TGA', ], 860 start_codons = [ 'ATT', 'ATG', 'GTG', ] 861 ) 862 863 #Basic sanity test, 864 for key, val in generic_by_name.items(): 865 assert key in ambiguous_generic_by_name[key].names 866 for key, val in generic_by_id.items(): 867 assert ambiguous_generic_by_id[key].id == key 868 del key, val 869 870 for n in ambiguous_generic_by_id: 871 assert ambiguous_rna_by_id[n].forward_table["GUU"] == "V" 872 assert ambiguous_rna_by_id[n].forward_table["GUN"] == "V" 873 if n != 23 : 874 #For table 23, UUN = F, L or stop. 875 assert ambiguous_rna_by_id[n].forward_table["UUN"] == "X" # F or L 876 #R = A or G, so URR = UAA or UGA / TRA = TAA or TGA = stop codons 877 if "UAA" in unambiguous_rna_by_id[n].stop_codons \ 878 and "UGA" in unambiguous_rna_by_id[n].stop_codons: 879 try: 880 print(ambiguous_dna_by_id[n].forward_table["TRA"]) 881 assert False, "Should be a stop only" 882 except KeyError: 883 pass 884 assert "URA" in ambiguous_generic_by_id[n].stop_codons 885 assert "URA" in ambiguous_rna_by_id[n].stop_codons 886 assert "TRA" in ambiguous_generic_by_id[n].stop_codons 887 assert "TRA" in ambiguous_dna_by_id[n].stop_codons 888 del n 889 assert ambiguous_generic_by_id[1] == ambiguous_generic_by_name["Standard"] 890 assert ambiguous_generic_by_id[4] == ambiguous_generic_by_name["SGC3"] 891 assert ambiguous_generic_by_id[11] == ambiguous_generic_by_name["Bacterial"] 892 assert ambiguous_generic_by_id[11] == ambiguous_generic_by_name["Plant Plastid"] 893 assert ambiguous_generic_by_id[15] == ambiguous_generic_by_name['Blepharisma Macronuclear'] 894 assert generic_by_id[1] == generic_by_name["Standard"] 895 assert generic_by_id[4] == generic_by_name["SGC3"] 896 assert generic_by_id[11] == generic_by_name["Bacterial"] 897 assert generic_by_id[11] == generic_by_name["Plant Plastid"] 898 assert generic_by_id[15] == generic_by_name['Blepharisma Macronuclear'] 899