Skip to content

Instantly share code, notes, and snippets.

@gkarthik
Created January 23, 2019 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkarthik/1a640fdc0eaf84a16513a14878c8e78e to your computer and use it in GitHub Desktop.
Save gkarthik/1a640fdc0eaf84a16513a14878c8e78e to your computer and use it in GitHub Desktop.
bases = "tcag"
codons = [a + b + c for a in bases for b in bases for c in bases]
amino_acids = 'FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG'
codon_table = dict(zip(codons, amino_acids))
# To get amino acid
codon_table['atg']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment