Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions