Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function 3 : find _ max _ consecutive This function will have two parameters: dna ( type: str ) : The DNA strand to search

Function 3: find_max_consecutive
This function will have two parameters:
dna (type: str): The DNA strand to search for the STRs in.
target (type: str): The STR (e.g.ATAC) that you are searching for.
It should return the following type of value: int
This function should return the maximum number of times the target STR shows up consecutively in the given DNA sequence. The algorithm for finding this information will be a bit tricky so you should start by coming up with some small examples, e.g. a DNA sequence of ATAACACTT and an STR of AC.
Here is a hint: you may want to create a separate function that tells you how many times the target sequence repeats starting at a given index in the string. For example, this would tell you AC repeats 0 times starting at index 0, while it would tell you AC repeats 2 times if you starting at index 3.
Testing the find_max_consecutive Function
Once again, write doctest examples in this functions docstring to test its functionality. I recommend having at least a couple short examples (like the one I mentioned earlier), and at least one based on real DNA (e.g. using Alices DNA sequence and one of the STRs given in dna_database.csv).

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago