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,
-- 
http://mail.python.org/mailman/listinfo/python-list
  • [no subject] mannu jha
    • Re: Shashank Singh

Reply via email to