Question: Solve with Python You want to find the mean (average) hydrophobicity of the amino acids next to (neighbor- ing) each of the different kinds of

Solve with Python

Solve with Python You want to find the mean (average) hydrophobicity of

You want to find the mean (average) hydrophobicity of the amino acids next to (neighbor- ing) each of the different kinds of amino acids in your sequence. In this example sequence: 'GVGL', the neighbors of the first G is V and the neighbors of the second G are V and L. The hydrophobicity of V and L are 76 and 97. So to compute the mean hydrophobicity of neigh- bors of Guanosines you would do: (76 + 76 +97)/3. Note that the same V is counted twice because it is the neighbor of two different Gs. You want to do this for each of the different amino acids that appear in your sequence. You can assume the sequence is at least two amino acids long. Write a function, neighbor_hydrophobicity, which takes two arguments: 1. A string, which represents the protein sequence. 2. A list of integers, which represents hydrophobicity scores of each amino acid in the protein sequence. The function must return: A dictionary of floats. The keys in the dictionary must be the different amino acids in the sequence. The value associated with each amino acid key must be the mean hydrophobicity of all neighbors of each occurrence of that amino acid. Example usage: If the function is called like this: neighbor_hydrophobicity('GVGL', [0, 76, 0, 97]) then it should return (not necessarily with key-value pairs in that order): {'G': 83.0, 'V': 0.0, 'L': 0.0}

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!