Personal tools
University Computing Service

Information & documentation

amino

#!/usr/bin/python

# Note: the lists start_codons and stop_codons are not
# used in the exercise set as homework.

# Dictionary mapping gene sequence triplets to amino acids
triplet_to_acid = {
    'GCU': 'Ala',
    'GCC': 'Ala',
    'GCA': 'Ala',
    'GCG': 'Ala',
    'CGU': 'Arg',
    'CGC': 'Arg',
    'CGA': 'Arg',
    'CGG': 'Arg',
    'AGA': 'Arg',
    'AGG': 'Arg',
    'AAU': 'Asn',
    'AAC': 'Asn',
    'GAU': 'Asp',
    'GAC': 'Asp',
    'UGU': 'Cys',
    'UGC': 'Cys',
    'CAA': 'Gln',
    'CAG': 'Gln',
    'GAA': 'Glu',
    'GAG': 'Glu',
    'GGU': 'Gly',
    'GGC': 'Gly',
    'GGA': 'Gly',
    'GGG': 'Gly',
    'CAU': 'His',
    'CAC': 'His',
    'AUU': 'Ile',
    'AUC': 'Ile',
    'AUA': 'Ile',
    'UUA': 'Leu',
    'UUG': 'Leu',
    'CUU': 'Leu',
    'CUC': 'Leu',
    'CUA': 'Leu',
    'CUG': 'Leu',
    'AAA': 'Lys',
    'AAG': 'Lys',
    'AUG': 'Met',
    'UUU': 'Phe',
    'UUC': 'Phe',
    'CCU': 'Pro',
    'CCC': 'Pro',
    'CCA': 'Pro',
    'CCG': 'Pro',
    'UCU': 'Ser',
    'UCC': 'Ser',
    'UCA': 'Ser',
    'UCG': 'Ser',
    'AGU': 'Ser',
    'AGC': 'Ser',
    'ACU': 'Thr',
    'ACC': 'Thr',
    'ACA': 'Thr',
    'ACG': 'Thr',
    'UGG': 'Trp',
    'UAU': 'Tyr',
    'UAC': 'Tyr',
    'GUU': 'Val',
    'GUC': 'Val',
    'GUA': 'Val',
    'GUG': 'Val',
    }

# List of messenger RNA start codons
start_codons = [ 'AUG' ]

# List of messenger RNA stop codons 
stop_codons = [ 'UAG', 'UGA', 'UAA' ]