Question: python Problem B. (10 points) DNA Codon marking The way that DNA is often interpreted as genes is in groups of three nucleotides at a

python
python Problem B. (10 points) DNA Codon marking The way that DNA
is often interpreted as genes is in groups of three nucleotides at

Problem B. (10 points) DNA Codon marking The way that DNA is often interpreted as genes is in groups of three nucleotides at a time, called codons. Thus, the DNA strand dna_str = 'agctttcattetgac' Can be broken into codons in the following three ways: agc ttt cat tct gac # reading frame e a gct ttc att ctg ac # reading frame 1 ag ctt tca ttc tga c # reading frame 2 Notice that in these lines, we start reading codons at string indexes 0, 1 and 2. The three different start indices are known as reading frames, and are called reading frame 0, reading frame 1 and reading frame 2, respectively. It is not always clear which of these frames will be read by genetic transcription mechanisms, so it is often useful to be able to be flexible and consider any of them when working with dna strands. Write a function mark that takes as an input a string containing a DNA strand, a target codon to search for, and a reading frame (0.1 or 2) to use. The function should return a new string in which every occurrence of the target codon in the given reading frame is capitalized You can assume that the dna string will be properly formatted that is, it is entirely lowercase and consists only of the letters 'a', '1', 'c', and 'g: Hints: This problem can be tricky: it's unlikely that you'll write this correctly on the first shot. Make sure that you're using print statements so that you can figure out what's happening at each step of Hints: This problem can be tricky: it's unlikely that you'll write this correctly on the first shot. Make sure that you're using print statements so that you can figure out what's happening at each step of your loops. Just as in the last problem, proper use of string slicing will make the problem a lot more I reasonable Examples: >>> mark('tttttttttg', 'ttg', 0) TTGTTGtttg' >>> mark('ttgttgtttg', 'ttg', 1) 'ttgttgtTTG' >>> mark('ttttttttt', 'ttg', 2) 'ttgttgtttg' >>> mark('ttgttgacc', 'gtt', 2) 'ttaTTgacc >>> mark('agctttcattctgac', 'tga', 2) agctttcattcTGAC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!