Question: In Python, write a function that takes three arguments: an amino acid, a codon position (1, 2, 3), and a nucleotide base (A, C, T,
In Python, write a function that takes three arguments: an amino acid, a codon position (1, 2, 3), and a nucleotide base (A, C, T, G). The function then does the following:
- finds all the codons that would produce the given amino acid
- mutates the codon at the specified position by replacing that existing base with the given base
- returns the amino acids that are encoded by the new, mutated codon
For example:
Input: function_name("H", 1, "G")
All codons that make H: CAC, CAT
Mutation: GAC, GAT
Output: D
Based on this dictionary, where keys are codons and values are amino acids:
geneticcode = { 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L', 'CCA':'P', 'CCC':'P', 'CCG':'P', 'CCT':'P', 'CAC':'H', 'CAT':'H', 'CAA':'Q', 'CAG':'Q', 'CGA':'R', 'CGC':'R', 'CGG':'R', 'CGT':'R', 'GTA':'V', 'GTC':'V', 'GTG':'V', 'GTT':'V', 'GCA':'A', 'GCC':'A', 'GCG':'A', 'GCT':'A', 'GAC':'D', 'GAT':'D', 'GAA':'E', 'GAG':'E', 'GGA':'G', 'GGC':'G', 'GGG':'G', 'GGT':'G', 'TCA':'S', 'TCC':'S', 'TCG':'S', 'TCT':'S', 'TTC':'F', 'TTT':'F', 'TTA':'L', 'TTG':'L', 'TAC':'Y', 'TAT':'Y', 'TGC':'C', 'TGT':'C', 'TGG':'W', }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
