Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Codon tables and amino acid letter converters In this exercise, you will create a Python solution that uses mappings to convert sequence information between different
Codon tables and amino acid letter converters
In this exercise, you will create a Python solution that uses mappings to convert sequence information between different amino acid representations. This includes the letter codon code RNA and DNA the one letter amino acid code and the letter amino acid code. The program will use different dictionaries that represent : codon tables one for DNA and the other for RNA, and amino acid letter representation converters.
Your task is to create a solution that asks for and collects a single input string using input parses the string, looks up the information in the appropriate dictionary, and outputs the correct conversion For example:
if I enter ATGwithout quotes then the program will output:
ATG MET
if I enter UAGwithout quotes then the program will output:
UAG
if I enter Ewithout quotes then the program will output:
E GLU
if I enter Aspwithout quotes then the program will output:
ASP D
Hints:
The program might not get a valid codon. In that case, it should output 'unknown'. You can use the dictionary method 'get' and include a defaultvalue to handle the 'unknown' case. Remeeber our discussion of how the or function is a shortcircuit operator.
To get full credit on this assignment, your program needs to:
Run properly execute and produce the correct output
Contain docstrings and line comments using #
Include any assumptions or design decisions you made in writing your code
Include an overview describing what your program does with expected inputs and outputs as a program level docstring
converter
#usrbinenv python
# Name: Your full name
# Group Members: List full names or None
Program docstring goes here
shortAA
CYS: C 'ASP': D 'SER': SGLN: QLYS: K
'ILE': I 'PRO': PTHR: T 'PHE': F 'ASN': N
GLY: G 'HIS': H 'LEU': L 'ARG': RTRP: W
'ALA': A 'VAL': V 'GLU': ETYR: Y 'MET': M
longAA value:key for key,value in shortAAitems
RNAcodontable
# Second Base
# U C A G
#U
'UUU': 'Phe', 'UCU': 'Ser', 'UAU': Tyr 'UGU': Cys
'UUC': 'Phe', 'UCC': 'Ser', 'UAC': Tyr 'UGC': Cys
'UUA': 'Leu', 'UCA': 'Ser', 'UAA': 'UGA':
'UUG': 'Leu', 'UCG': 'Ser', 'UAG': 'UGG': Trp
#C
'CUU': 'Leu', 'CCU': 'Pro', 'CAU': 'His', 'CGU': 'Arg',
'CUC': 'Leu', CCC: 'Pro', 'CAC': 'His', CGC: 'Arg',
'CUA': 'Leu', 'CCA': 'Pro', 'CAA': Gln 'CGA': 'Arg',
'CUG': 'Leu', CCG: 'Pro', 'CAG': GlnCGG: 'Arg',
#A
'AUU': 'Ile', 'ACU': Thr 'AAU': 'Asn', 'AGU': 'Ser',
'AUC': 'Ile', 'ACC': Thr 'AAC': 'Asn', 'AGC': 'Ser',
'AUA': 'Ile', 'ACA': Thr 'AAA': Lys 'AGA': 'Arg',
'AUG': 'Met', 'ACG': Thr 'AAG': Lys 'AGG': 'Arg',
#G
'GUU': 'Val', 'GCU': 'Ala', 'GAU': 'Asp', 'GGU': Gly
'GUC': 'Val', GCC: 'Ala', 'GAC': 'Asp', GGC: Gly
'GUA': 'Val', 'GCA': 'Ala', 'GAA': 'Glu', 'GGA': Gly
'GUG': 'Val', GCG: 'Ala', 'GAG': 'Glu', GGG: Gly
dnaCodonTable keyreplaceUT:value for key, value in rnaCodonTable.items
def main:
Function docstring goes here'
pass
main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started