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