Dear all,<br />
<br />
I am trying my problem in this way:<br />
<br />
import re<br />
expr = re.compile("Helix Helix| Sheet Sheet| Turn Turn| Coil Coil")<br />
f = open("CalcSecondary4.txt")<br />
for line in f:<br />
if expr.search(line):<br />
print line<br />
<br />
but with this it is printing only those line in which helix, sheet, turn and coil are coming twice. Kindly suggest how should I modify it so that whatever secondary structure is coming more than or equal to two times it should write that as final secondary structure and if two seconday structure are coming two-two times in one line itself like:<br />
<br />
4 ALA Helix Sheet Helix Sheet<br />
<br />
then it should write that as doubtful and rest it should write as error.<br />
<br />
Thanks,<br />
<br />
<br />
Dear all,<br />
<br />
I have a file like:<br />
<br />
1 ALA Helix Sheet Helix Coil<br />
2 ALA Coil Coil Coil Sheet<br />
3 ALA Helix Sheet Coil Turn<br />
<br />
now what I want is that write a python program in which I will put the condition that in each line whatever secondary structure is coming more than or equal to two times it should write that as final secondary structure and if two seconday structure are coming two-two times in one line itself like:<br />
<br />
4 ALA Helix Sheet Helix Sheet<br />
<br />
then it should write that as doubtful and rest it should write as error.<br />
<br />
Thanks,