Question: Write a function called closestMatch ( geneName , allScoresD ) . Given a gene name and a dictionary of alignment scores, closestMatch returns the protein
Write a function called closestMatchgeneNameallScoresD
Given a gene name and a dictionary of alignment scores, closestMatch returns the protein from the other species which is most similar has the highest alignment score
To do this you will want to look for geneName in every key in allScoresD. The following syntax will be useful:
allScoresDkeys
This returns a list of keys here a list of tuples, since our keys are tuplesYou can then search through this list for entries that have geneName in them. For this part, the following will likely be useful:
T spam'pims'
spam in T
True
donkey in T
False
Here are some examples of closestMatch with the sample data:
allScoresDallScoressampleHumanGeneListsampleChickenGeneList
closestMatchcallScoresD
h
closestMatchhallScoresD
c
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
