Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is python. Also, Please use the conditions statements below. Learning objectives: . Conditional statements: if, elif, else. Loops: for. Functions and string slicing. Central
This is python. Also, Please use the conditions statements below.
Learning objectives: . Conditional statements: if, elif, else. Loops: for. Functions and string slicing. Central dogma of molecular biology, transcription and translation. Finding open reading frames Previously, in Assignment 4, we wrote a crude ORF finder, which only checked for the presence of the standard first and last codons (the start and stop codons), as well as the length of the sequence (divisible by three, and therefore possibly coding for amino acids, in absence of introns). Together, we used these three tests for assessing whether a nucleotide sequence may be coding. Here, your new challenge is to write a more complex function get_orf that takes one argument dna and finds an ORF, similar to what you did previously, but with a few wrinkles. The function get_orf will also be useful for your first project of the semester (Project 1), so you may wish to pay close attention. The function get_orf should perform the following tasks: 1. Check if the first three letters are ATG. If so, get_orf should continue to the next step, otherwise the function should return an empty string. 2. Find the next in-frame stop codon, and return the sequence from the start to that stop codon. The sequence that is returned should include the start codon but not the stop codon. 3. If there is no in-frame stop codon, get_orf should assume that the reading frame extends through the end of the sequence and simply return the entire sequence. You can confirm that your get_orf function works correctly by running the following test cases. Notice the expected output. Your function should perform identically: >>> get_orf ('ACGTGAA) >>> get_orf ('ATGTGAA') 'ATG >>> get_orf ("ATGAGATAAG') 'ATGAGA >>> get_orf ('ATGAGATAGG') 'ATGAGA' >>> get_orf("ATGAGATGAGGGTAA') 'ATGAGA' >>> get_orf ('ATGAAATT') ATGAAATT Note that in the last example there is no in-frame stop codon, so the whole string is returned. Learning objectives: . Conditional statements: if, elif, else. Loops: for. Functions and string slicing. Central dogma of molecular biology, transcription and translation. Finding open reading frames Previously, in Assignment 4, we wrote a crude ORF finder, which only checked for the presence of the standard first and last codons (the start and stop codons), as well as the length of the sequence (divisible by three, and therefore possibly coding for amino acids, in absence of introns). Together, we used these three tests for assessing whether a nucleotide sequence may be coding. Here, your new challenge is to write a more complex function get_orf that takes one argument dna and finds an ORF, similar to what you did previously, but with a few wrinkles. The function get_orf will also be useful for your first project of the semester (Project 1), so you may wish to pay close attention. The function get_orf should perform the following tasks: 1. Check if the first three letters are ATG. If so, get_orf should continue to the next step, otherwise the function should return an empty string. 2. Find the next in-frame stop codon, and return the sequence from the start to that stop codon. The sequence that is returned should include the start codon but not the stop codon. 3. If there is no in-frame stop codon, get_orf should assume that the reading frame extends through the end of the sequence and simply return the entire sequence. You can confirm that your get_orf function works correctly by running the following test cases. Notice the expected output. Your function should perform identically: >>> get_orf ('ACGTGAA) >>> get_orf ('ATGTGAA') 'ATG >>> get_orf ("ATGAGATAAG') 'ATGAGA >>> get_orf ('ATGAGATAGG') 'ATGAGA' >>> get_orf("ATGAGATGAGGGTAA') 'ATGAGA' >>> get_orf ('ATGAAATT') ATGAAATT Note that in the last example there is no in-frame stop codon, so the whole string is returnedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started