No subject

mannu jha mannu_0523 at rediffmail.com
Fri Apr 30 23:33:54 EDT 2010


Dear all,

I am trying my problem in this way:

import re
expr = re.compile("Helix Helix| Sheet Sheet| Turn Turn| Coil Coil")
f = open("CalcSecondary4.txt")
for line in f:
    if expr.search(line):
       print line

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:

4 ALA Helix Sheet Helix Sheet

then it should write that as doubtful and rest it should write as error.

Thanks,


Dear all,

I have a file like:

1 ALA Helix Sheet Helix Coil
2 ALA Coil Coil Coil Sheet
3 ALA Helix Sheet Coil Turn

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:

4 ALA Helix Sheet Helix Sheet

then it should write that as doubtful and rest it should write as error.

Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100501/21c476b5/attachment-0001.html>


More information about the Python-list mailing list