Hi,
I am trying to calculate the propensity of amino acids in the beta-strands of my data-set. The problem with my data-set is that strands are of different length . For eg
There are strands like this :- ABCDG KJLIJ GBAHUUJKI BHAJYJKIIO
Considering the above case, there is no problem in calculating the propensity till the 5th position of the strand from the N-ter. The problem starts from the sixth position as the first two strands do not have any more residues.
I hope I have made my point clear. Can anybody help me out ??
1 answer
Is this what you are looking for?
import re
strands=["ABCDG","KJLIJ","GBAHUUJKI","BHAJYJKIIO"]
for strand in strands:
seen=[]
results=[]
results.append(strand)
for x in strand:
if x not in seen:
seen.append(x)
n=len(re.findall(x,strand))
results.append(x)
results.append(n)
print results
You can run this in python (check the indentation when copy/pasting). For each strand it prints a list counting each AA in each "strand" hope this helps
Log in to answer this question.
This question is not very clear. You mean that there are 4 different strands; the first two contain 5 residues, the third 9 and the fourth 10 residues? Also I think you mean "frequency", not "propensity".