Problem B. DNA: Codon Segmenting 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 = 'agctttcattctgac' Can be broken into codons in the following three ways: agc ttt cat tct gac a gct ttc att ctg ac ag ctt tca ttc tga c # reading frame 0 # reading frame 1 # 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 segment that takes as an input a string containing a DNA strand, and a reading frame (0, 1 or 2) to use. The function should return a list containing the sequence of individual codons. You can assume that the dna string will be properly formatted: that is, it is entirely lowercase and consists only of the letters ‘a’, ‘t’, ‘c’, and ‘g’. You may also assume that there will be at least three characters in the given dna string. Examples: >>> segment('ttgttgtttg', 0) ['ttg', 'ttg', 'ttt', 'g'] >>> segment('ttgttgtttg', 1) ['t', 'tgt', 'tgt', 'ttg'] >>> segment('ttgttgtttg', 2) ['tt', 'gtt', 'gtt', 'tg'] >>> segment('agctttcattctgac', 1) ['a', 'gct', 'ttc', 'att', 'ctg', 'ac']

Biochemistry
6th Edition
ISBN:9781305577206
Author:Reginald H. Garrett, Charles M. Grisham
Publisher:Reginald H. Garrett, Charles M. Grisham
Chapter30: Protein Synthesis
Section: Chapter Questions
Problem 4P: Codon-Anticodon Recognition: Base-Pairing Possibilities (Integrates with Chapter 11.) Draw base-pair...
icon
Related questions
Question

Problem B. DNA: Codon Segmenting
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 = 'agctttcattctgac'

Can be broken into codons in the following three ways:

agc ttt cat tct gac a gct ttc att ctg ac ag ctt tca ttc tga c
# reading frame 0 # reading frame 1 # 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 segment that takes as an input a string containing a DNA strand, and a reading frame (0, 1 or 2) to use. The function should return a list containing the sequence of individual codons.

You can assume that the dna string will be properly formatted: that is, it is entirely lowercase and consists only of the letters ‘a’, ‘t’, ‘c’, and ‘g’. You may also assume that there will be at least three characters in the given dna string.

Examples:

>>> segment('ttgttgtttg', 0) ['ttg', 'ttg', 'ttt', 'g'] >>> segment('ttgttgtttg', 1) ['t', 'tgt', 'tgt', 'ttg'] >>> segment('ttgttgtttg', 2) ['tt', 'gtt', 'gtt', 'tg'] >>> segment('agctttcattctgac', 1) ['a', 'gct', 'ttc', 'att', 'ctg', 'ac']
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Genome annotation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, biology and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Biochemistry
Biochemistry
Biochemistry
ISBN:
9781305577206
Author:
Reginald H. Garrett, Charles M. Grisham
Publisher:
Cengage Learning