Question: Programming part: Translating codons In life, proteins make up basic functional building blocks. A protein is a sequence of amino acids of which there are
Programming part: Translating codons In life, proteins make up basic functional building blocks. A protein is a sequence of amino acids of which there are 20 different kinds. DNA is made up of nucleic acids. There are four nucleic acids, abbreviated with the letters A, C, G, and T. A sequence of three nucleic acids make up a codon (e.g., AAT, GCT, TAC). Each codon corresponds to one of the twenty amino acids. You are to write a program called TranslateCodons.java that does the following: - Using one of the symbol table implementations in algs4 or myalgs4, builds a symbol table where the key is a three-letter codon (made up of the letters A, C, G, or T) and the value is the three-letter abbreviation for an amino acid (for example, "Ala", "Leu") or the instruction "Stp" that goes with that codon. For example, the codon "TTA" should have as its value "Leu", the codon "TAA" should have the value "Stp". You can find tables showing the correspondence between codons and amino acid three-letter codes in many places, including Wikipedia. - Processes a file where each line consists of a species name (which may include spaces), a tab character, and a DNA sequence whose length is a multiple of 3. For each line read in, print four lines: 1. the species name 2. the DNA sequence broken into three-letter groups separated by a space 3. the three-letter amino acid code corresponding to the codon in the DNA separated by hyphens 4. a blank line For example, if the input line is: Ailuropoda melanoleuca ATGTTCATTAACCGATGACTGTTTTCCACCAAA your program should print: Ailuropoda melanoleuca ATG TTC ATT AAC CGA TGA CTG TTT TCC ACC AAA Met-Phe-Ile-Asn-Arg-Stp-Leu-Phe-Ser-Thr-Lys Use the test file data/smallsequences.txt to test your program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
