Hi all, I have written a program that translates a given cDNA sequence into 6 reading frames with three-letter amino acids. I need to change the codes to ask the user if they want to see the translations with three- or single-letter amino acids. for this, I have added another codon table containing the single-letter amino acids. I am a bit confused about how to change the codes; I have tried doing something this but it didn't work:
choice = input(" Single-letter or Three-letter ? type 'S' for single and 'T' for three") if choice == "s": # (here I put all the code except the codes for loading FASTA and the sequence and just changed the name of the codon_table which contains the single-letter amino acids) elif choice == "T": # (here I put my original codes which contain a different name for the codon_table containing three-letter amino acids) else: print("Please choose either 'S' or 'T'.")
Could you please suggest another way of doing it?
Note: Unfortunately, as I will have to submit my project online, I cannot write my codes here.