forked from labseven/GeneFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amino_acids.py
31 lines (29 loc) · 995 Bytes
/
amino_acids.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
aa = ['F', 'L', 'I', 'M', 'V', 'S', 'P', 'T', 'A', 'Y',
'|', 'H', 'Q', 'N', 'K', 'D', 'E', 'C', 'W', 'R',
'G']
codons = [['TTT', 'TTC'],
['TTA', 'TTG', 'CTT', 'CTC', 'CTA', 'CTG'],
['ATT', 'ATC', 'ATA'],
['ATG'],
['GTT', 'GTC', 'GTA', 'GTG'],
['TCT', 'TCC', 'TCA', 'TCG', 'AGT', 'AGC'],
['CCT', 'CCC', 'CCA', 'CCG'],
['ACT', 'ACC', 'ACA', 'ACG'],
['GCT', 'GCC', 'GCA', 'GCG'],
['TAT', 'TAC'],
['TAA', 'TAG', 'TGA'],
['CAT', 'CAC'],
['CAA', 'CAG'],
['AAT', 'AAC'],
['AAA', 'AAG'],
['GAT', 'GAC'],
['GAA', 'GAG'],
['TGT', 'TGC'],
['TGG'],
['CGT', 'CGC', 'CGA', 'CGG', 'AGA', 'AGG'],
['GGT', 'GGC', 'GGA', 'GGG']]
# create a dictionary lookup table for mapping codons into amino acids
aa_table = {}
for i in range(len(aa)):
for codon in codons[i]:
aa_table[codon] = aa[i]