'''
Created on Sep 17, 2013

@author: rcd
'''

# use these variables to make your code more readable
START_CODON = 'atg'
STOP_CODONS = [ 'taa', 'tag', 'tga' ]
# these next two lists are meant to be used together,
#   i.e., the index of a codon in the first list matches
#         its corresponding amino acid in the second list
# they are taken from this web site:
#   http://en.wikipedia.org/wiki/DNA_codon_table
# and are intended to help you with the problem, 
# so you do not have to hand code the translation yourself
CODONS = [
  'gct', 'gcc', 'gca', 'gcg',
  'tgt', 'tgc', 
  'gat', 'gac',
  'gaa', 'gag', 
  'ttt', 'ttc', 
  'ggt', 'ggc', 'gga', 'ggg',
  'cat', 'cac',
  'att', 'atc', 'ata',
  'aaa', 'aag',
  'ctt', 'ctc', 'cta', 'ctg', 'tta', 'ttg',
  'atg',
  'aat', 'aac',
  'cct', 'ccc', 'cca', 'ccg',
  'caa', 'cag',
  'cgt', 'cgc', 'cga', 'cgg', 'aga', 'agg',
  'agt', 'agc', 'tct', 'tcc', 'tca', 'tcg', 
  'act', 'acc', 'aca', 'acg',
  'gtt', 'gtc', 'gta', 'gtg',
  'tgg',
  'tat', 'tac',
]
AMINO_ACIDS = [ 
  'A', 'A', 'A', 'A', 
  'C', 'C',
  'D', 'D', 
  'E', 'E', 
  'F', 'F',
  'G', 'G', 'G', 'G',
  'H', 'H',
  'I', 'I', 'I',
  'K', 'K', 
  'L', 'L', 'L', 'L', 'L', 'L',
  'M', 
  'N', 'N', 
  'P', 'P', 'P', 'P',
  'Q', 'Q',
  'R', 'R', 'R', 'R', 'R', 'R',
  'S', 'S',  'S', 'S', 'S', 'S',
  'T', 'T', 'T', 'T', 
  'V', 'V', 'V', 'V', 
  'W',
  'Y', 'Y', 
]


def translateDNAtoProtein (dna):
    """
    given a string composed only of lowercase letters 'gcta', 
    return a string of uppercase letters that represents the 
    longest protein found first within that string or its 
    reverse complement, or the empty string if no protein can
    be found
    """
    # TODO: complete this function
    return ""

