Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Function 3 : find _ max _ consecutive This function will have two parameters: dna ( type: str ) : The DNA strand to search
Function : findmaxconsecutive
This function will have two parameters:
dna type: str: The DNA strand to search for the STRs in
target type: str: The STR egATAC 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, eg 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 times starting at index while it would tell you AC repeats times if you starting at index
Testing the findmaxconsecutive 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 eg using Alices DNA sequence and one of the STRs given in dnadatabase.csv
Step 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