USE Python 2.7(screen shot code with indentation and output exactly in the question) the task is: takes in a list of protein sequences as input and finds all the transmembrane domains and returns them in a list for each sequence in the list with given nonpolar regions and returns the lists for those.
1. This code should call two other functions that you write: regionProteinFind takes in a protein sequence and should return a list of 10 amino acid windows, if the sequence is less than 10 amino acids, it should just return that sequence. (initially it should grab amino acids 1-10…the next time it is called it should grab amino acids 2-11…) for each sequence in the list. testcode: "protein='MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR'' the regionProteinFind returns:['MKLVVRPWAG','KLVVRPWAGC','LVVRPWAGCW','VVRPWAGCWW','VRPWAGCWWS','RPWAGCWWST','PWAGCWWSTL','WAGCWWSTLG','AGCWWSTLGP','GCWWSTLGPR', 'CWWSTLGPRG','WWSTLGPRGS','WSTLGPRGSL','STLGPRGSLS','TLGPRGSLSP','LGPRGSLSPL','GPRGSLSPLG','PRGSLSPLGI','RGSLSPLGIC','GSLSPLGICP','SLSPLGICPL','LSPLGICPLL','SPLGICPLLM','PLGICPLLML','LGICPLLMLL','GICPLLMLLW','ICPLLMLLWA','CPLLMLLWAT','PLLMLLWATL','LLMLLWATLR'] 2nd testcode; protein=MP region protein sequence should return: ['ME']
2. A second function called testForTM , which should calculate and return the decimal fraction of ten amino acid window which are nonpolar for each sequence in the list. the nonpolar regions are (A,V,L,I,P,M,F,W). my code for this is:
def testForTM(AAWindow):
totalNP= 0
nonPolarList=['A', 'V', 'L', 'I', 'P', 'M', 'F', 'W']
for aa in AAWindow:
if aa in nonPolarList:
totalNP+=1
return totalNP/10.0 #THIS SHOULD DEVIDE BY len(AAWindow) so it works for sequences less than 10 length like 'MP'
3. The last function,tmSCANNER should call the get protein region and test for TM and Ultimately, as a result the code should be used to scan each protein sequence in the list as input generating list of numbers of non polar for each protein sequence which measures the fraction of nonpolar residues in each 10bp window(it slides 10 amino acids at a time until it is at the last aa window of a protein sequence with any length and give the lists for those. The code should output what is displayed below.
#Test code for TMFinder
listOfProtein=['MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR', 'MARKCSVPLVMAWLTWTTSRAPLPH', 'MPWPTSITXXXXXXSWSPEWLSSGLRSILGWEQPRVSHKGHSHEWHRRP'] tmValuesList=TMFinder(listOfProtein) print 'The list of TM values are:', tmValuesList as a result it should print out this list: ["protein 1:'MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR'", 'TMValue:[0.7, 0.6, 0.7, 0.7, 0.6, 0.5, 0.6, 0.5, 0.5, 0.4, 0.4, 0.4, 0.4, 0.3, 0.4, 0.5, 0.4, 0.5, 0.4, 0.5, 0.6, 0.7, 0.7, 0.8, 0.8, 0.8, 0.9, 0.8, 0.9, 0.8]',"protein2:'MARKCSVPLVMAWLTWTTSRAPLPH'", 'TMValue:[0.6, 0.6, 0.6, 0.7, 0.8, 0.8, 0.9, 0.8, 0.7, 0.6, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]',"protein3:'MPWPTSITXXXXXXSWSPEWLSSGLRSILGWEQPRVSHKGHSHEWHRRP'",'TMValue:[0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.1, 0.2, 0.2, 0.3, 0.4, 0.4, 0.4, 0.4, 0.5, 0.4, 0.4, 0.4, 0.5, 0.4, 0.4, 0.4, 0.4, 0.5, 0.4, 0.5, 0.5, 0.4, 0.3, 0.3, 0.2, 0.2, 0.2, 0.1, 0.2, 0.1, 0.1, 0.1]']
Thank you for the help!!!
ANSWER:
CODE TEXT
## function regionProteinFind to find all AAWindoe
def regionProteinFind(protein):
## if protein length is less than 10 return protein itself in
list
if len(protein)<10:
return [protein]
## otherwise we use list comprehension to form list of all
## window of length 10
## range(n) creates a list of whole numbers from 0 to n-1
return [protein[i:i+10] for i in range(len(protein)+1-10)]
## function testForTM
def testForTM(AAWindow):
totalNP= 0
nonPolarList=['A', 'V', 'L', 'I', 'P', 'M', 'F', 'W']
for aa in AAWindow:
if aa in nonPolarList:
totalNP+=1
return totalNP/float(len(AAWindow))
## function TM Finder
def TMFinder(listOfProtein):
## creating a empty list
output_list=[]
## iterating through each protein in listOfProtein
## using enumerate to fetch index of protein in the list
for index,protein in enumerate(listOfProtein):
## appending formated string containing protein number and
protein
## as asked in format
output_list.append("Protein{}:'{}'".format(index+1,protein))
## fetching list of protein windows by calling
regionProteinFind
prot_wind=regionProteinFind(protein)
## using list comprehension to find TM value of each window
tm_list=[testForTM(window) for window in prot_wind]
## apeninding TMValue in output_list in the format asked
output_list.append('TMValue:{}'.format(tm_list))
## returning output_list
return output_list
## defining input
listOfProtein=['MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR',
'MARKCSVPLVMAWLTWTTSRAPLPH',
'MPWPTSITXXXXXXSWSPEWLSSGLRSILGWEQPRVSHKGHSHEWHRRP']
## calling TMFinder and priniting output
print TMFinder(listOfProtein)
CODE IMAGE


OUTPUT IMAGE

USE Python 2.7(screen shot code with indentation and output exactly in the question) the task is:...
intelligent control systems
fuzzy logic based contril
0.8 0.7 04 0.3 0.2 0.3 b) Plot the ou a) Plot the output: -BUB 1.0 0.9 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.5 0.4A 0.3 0.2 0.2 0.17 0.1 c) Determine the defuzzified output y, by using I. Center of Gravity Method (COG) Height Method (H) II. + 1 (0.5)+3 05)+ 5(0.1) 6()
0.8 0.7 04 0.3 0.2 0.3 b) Plot the ou a) Plot the output: -BUB 1.0 0.9 0.9...
B13. (Excel: Portfolio returns and stand 996 a standard deviation of 10%, and HMT has an expected return of 12% and a standard ation of 20%. The portfolio return and risk, of course, depend on the portfolio weight ard deviations) ARC has an expected return of dev,. rtfolio returns and stan- the correlation between ARC and HMT returns. Calculate the portfolio returns and ad dard deviations for the weights and correlations shown in the table PORTFOLIO STANDARD DEVIATION WEIGHTS FOR...
Use python 2.7 to write this code: This code takes in a bunch of protein sequences as input listed below and tracks the highest average TM value (number under each protein) and If a protein has the highest TM value of all proteins found so far, track it. At the very end, the program should print out that as well: For example, at the very end when run, it should print something like this: Protein with the highest TM value:...
I need a code written on PYTHON LANGUAGE, you
can use any class in scikit. Below, you can see the "Movie
Rate.txt" provided. Can you solve this question? I will give thumbs
up
Consider the table given below. It contains the movie ratings of a single user. There are 15 movies and we also have four movie features (romance, adventure, historical, horror). Each feature numerically represents how much the movie belongs to that genre. For example, Ml is a historical...
Please help!
4. (3 points) Which set of binding data is likely to represent cooperative ligand binding to an oligomeric protein? Explain! (Note: Yor Theta is the percent saturation of receptor with ligand) a. | [Ligand] (mM) | Y 0.1 0.2 0.4 0.7 0.3 0.5 0.7 0.9 b. 0.3 0.4 0.6 0.3 0.6 0.8
A distillation column is separating a feed that is 40 mol%
methanol and 60% water. The two phase feed is 60% liquid.
Distillate product should be 92% methanol and bottoms 4 mol%. A
total reboiler and a total condenser are used and reflux is
saturated. Operation is at atmospheric pressure with a reflux ratio
of 0.9. Under these conditions, HG = 1.3 ft and HL = 0.8ft in both
the stripping and enriching sections. Determine the required
packing height in...
Use the graph to estimate K. 1.0 0.75 Yo₂ 0.5 0.25 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 [L] (M)
Use contour integration to evaluate the integral 2T 1 I (5 4 cos (0))2 S 0 diagram showing the contour and the singularities Draw and label a For your information, the graph of the integrand is given below. L0- 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1. 7T 2n 4. -
Use contour integration to evaluate the integral 2T 1 I (5 4 cos (0))2 S 0 diagram showing the contour and the singularities Draw and label a For...
Use the following cell phone airport data speeds (Mbps) from a particular network. Find the percentile corresponding to the data speed 1.1 Mbps. 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.7 1.5 0.1 0.7 1.5 4.8 9.7 0.8 2.2 0.2 0.9 2.3 6.4 0.9 2.4 0.8 1.8 5.5 11.2 0.3 0.9 2.6 7.9 1.7 1.1 2.9 8.4 14.6 1.5 3.1 8.6 15.5 3.8 8.7 6.7 5.3 10.5 5.6 11.2 11.6 11.6 12.2 30.6 Percentile of 1.1 = (Round to the...
Provide answers to the following questions using complete sentences. 1. Make a plot of vavg vs. r on linear graph paper for each set of data. Draw a best fit line through each set of data on the plot. 2. What is the slope of each best fit line for each set of data in the plot of vavg VS. ? What does this slope represent? 3. Make a plot of a vs. sin6 fon linear graph and draw a...