Question: Python Language problem :: Need help with PART 2 Use Python Part 3: In this part you have to implement the similarity score and best

Python Language problem :: Need help with PART 2

Python Language problem :: Need help with PART 2 Use Python PartUse Python

Part 3: In this part you have to implement the similarity score and best match functions from Assignment 4. 1) similarity_score(...) This function should take two string parameters: seq1 and segz, and compute the similarity score by using the hamming distance. Recall: 1) the hamming distance is the number of mismatches between the characters at index i of two strings. 2) The similarity score is computed by using the following formula: lenOf seq hamming Distance lenOf seq 3) The function should only calculate the similarity score if the two strings are of the same length otherwise return a 0. sequencel = CCGCCGCCGA ||*||1*|| sequence2 = CCTECTCCTA Matches = 7, Mismatches = 3 Hamming distance = 3, Length = 10 similarity = (10 - 3) / 10 = 0.7 similarity_score("cCGCCGCCGA", "CCTCCTCCTA" ) ; >> 0.7 2) best_match(...) This function should take two string parameters, a genome and a sequence. The function will return the index i at which we find the best similarity score. To find te best match you will want to compare consecutive subsets of the genome against tl e sequence. Use similarity_score(...) to implement best_match(...)

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!