Dot Plot with Sliding Windows In class we looked at the simple dot plot algorith
ID: 3732165 • Letter: D
Question
Dot Plot with Sliding Windows In class we looked at the simple dot plot algorithm. We discussed how It can be difficult to see patterns in the plot when we are matching each character Individually. The sliding windows version of the dot plot allows us to visualize patterns in groups of characters In this lab you will Implement the sliding windows algorithm for computing a dot plot. L Compute Match Percentage (2 pts) Let's start by writing a function that will compute the percentage of matches found between a pair of given sequences. Note, you cannot assume that the sequences are of equal length. The function skeleton will look like this: def matchPct (seqi, seq2): Fill in the code to compute the percentage match between the sequences return pct Instructor Initials: II. Working with Substrings (2 pts). 1) In order to implement the sliding windows, we will have to access substrings from a Python string Python has a way to do this. If you want to take a substring from position 2 to up to but not including position 5 in a string, you can use nystring (2:51 Try this out. In the Python shell, enter the following nystringUNIVERSITY"Explanation / Answer
this function would help in returning the match percetanage
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.