Question: please help with this code, I am confused. thank you! UnknownSeqs Layout References Mailings Review View Help Search A A Aa P A.D.A. S S

UnknownSeqs Layout References Mailings Review View Help Search A A Aa P A.D.A. S S 21 st. - - AaBbCcDc AaBbCcDc AaBb C AaBbcc 1 Normal No Spac... Heading 1 Heading Styles Paragraph 1. Write a function called restOfORF(DNA) that takes as input a DNA sequence written 5' to 3'. It assumes that this DNA sequence begins with a start codon "ATG". It then finds the next in frame stop codon, and returns the ORF from the start to that stop codon. The sequence that is returned should include the start codon but not the stop codon. If there is no in frame stop codon, restOTORF should assume that the reading frame extends through the end of the sequence and simply return the entire sequence. To this end, you will need to determine if a particular codon is a stop codon. Imagine that you have a string named codon and you wish to test if it is a stop codon, that is one of 'TAG', 'TAA', or 'TGA' You could do this: if codon TAG'or codon TAA' or codon 'TGA': blah, blah, blah Or, better yet, you could use in this way: if codon in [TAG', TAA', 'TGA'); blah, blah, blah Here are some examples of restORORE >>> testOFORE("ATGTGAA") 'ATG >>> restOFORE("ATGAGATAAG") 'ATGAGA >>>> SOLORE("ATGAGATAGG") ATGAGA >>> testOLORE("ATGAAATT") 'ATGAAATT 2. Next, you will write functions that can find open reading frames in sequences that don't begin with an ATG. These functions will search for ATGs and then call restOTORF to get the corresponding open reading frames. Consider some sequence of interest. Imagine we start at the position and count off in units of 3 nucleotides. This defines a particular reading frame for the sequence. Here is an illustration, where alternating +++ and -- are used to indicate the units of 3 nucleotides. Paragraph Styles EAGCTCCAATGTTTTAACCCCCCCC + ---+ ---+ ---+ ---+ Considering just the given sequence and not the reverse complement), we can define two other reading frames on this sequence, starting at either the l or the 2 positions, CAGCTACCATGTTTTAACCCCCCCC -+ +--- --+ --- CAGCTACCATGTTTTAACCCCCCCC --+ ---+ --+ -- -- Every open reading frame between an ATG and a stop must fall in one of these three reading frames. A useful way to look for genes involves searching each of these frames separately for open reading frames. one Frame 3. Write a function oneFrame(DNA) that starts at the 0 position of DNA and searches forward in units of three looking for start codons. When it finds a start codon, oneFrame should take the slice of DNA beginning with that "ATG" and ask restOIORF for the open reading frame that begins there. It should store that sequence in a list and then continue searching for the next "ATG" start codon and repeat this process. Ultimately, this function returns the list of all ORFs that it found. Here are some examples of oneFrame in action: >>> oneFrame("CCCATGTTTTGAAAAATGCCCGGGTAAA") JATGTTT', 'ATGCCCGGG'] >>> oneFrame("CCATGTAGAAATGCCC") >>> oneFrame("ATGCCCATGGGGAAATTTTGACCC") L'ATGCCCATGGGGAAATTT, 'ATGGGGAAATTT)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
