Question: 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

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!