Question: Using your mighty Python skills, write a function to find the reverse complement of a DNA sequence. The complement of A is T, and the

 Using your mighty Python skills, write a function to find the

Using your mighty Python skills, write a function to find the reverse complement of a DNA sequence. The complement of A is T, and the complement of C is G (and vice versa). The complement of N, or any other non-ACGT character, will be N for our purposes. Your function should first convert all of the letters to uppercase. Your function should make use of a for loop (or loops) to then find the reverse complement. How you specifically implement the algorithm (reverse then complement, complement then reverse, or do it all in one step) is up to you. This function must be called rev_comp and take one argument called DNA_seq. An example of a call to this function with a typical input is: rev_comp("actggggNNAGGCCGCCCtt") Note that the 5' and 3' notation above was just for reference - it will NOT be part of the input and should not be part of the output. Please note that to reverse the string, you should not be looking up fancy classes or methods we haven't learned yet. You can do this using the tools you already have. Just consider the way that the "+" operator works for string concatenation. Write this function inside your text editor and save it in a file called rev_comp.py. Note that the file should contain the function and nothing else

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!