Question: (This is being done in Python3) #STARTING CODE# ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #!/usr/bin/env python3 # Name: Your full name (CATS account username) # Group Members: List full names
(This is being done in Python3)
#STARTING CODE#
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/env python3 # Name: Your full name (CATS account username) # Group Members: List full names (CATS usernames) or None
''' Program docstring goes here ''' short_AA = { 'CYS': 'C', 'ASP': 'D', 'SER': 'S', 'GLN': 'Q', 'LYS': 'K', 'ILE': 'I', 'PRO': 'P', 'THR': 'T', 'PHE': 'F', 'ASN': 'N', 'GLY': 'G', 'HIS': 'H', 'LEU': 'L', 'ARG': 'R', 'TRP': 'W', 'ALA': 'A', 'VAL': 'V', 'GLU': 'E', 'TYR': 'Y', 'MET': 'M' }
long_AA = {value:key for key,value in short_AA.items()}
RNA_codon_table = { # 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': 'Gln', 'CGG': '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 = {key.replace('U','T'):value for key, value in rnaCodonTable.items()}
def main(): ''' Function docstring goes here''' pass
main()
Codon tables and amino acid letter converters In this exercise, you will create a program that uses mappings to convert sequence information between different amio acid representations. This includes the 3-letter codon code (RNA and DNA), the one letter amino acid code and the 3-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 Python program called converter 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 "ATG (without quotes), then the program will output: ATG MET if I enter "UAG" (without quotes), then the program will output if I enter "E" (without quotes), then the program will output E GLU if I enter "Asp (without quotes), then the program will output ASP D 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 default_value to handle the 'unknown' case. See Model p. 72 for an example. 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 Codon tables and amino acid letter converters In this exercise, you will create a program that uses mappings to convert sequence information between different amio acid representations. This includes the 3-letter codon code (RNA and DNA), the one letter amino acid code and the 3-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 Python program called converter 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 "ATG (without quotes), then the program will output: ATG MET if I enter "UAG" (without quotes), then the program will output if I enter "E" (without quotes), then the program will output E GLU if I enter "Asp (without quotes), then the program will output ASP D 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 default_value to handle the 'unknown' case. See Model p. 72 for an example. 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
