Skip to content
Snippets Groups Projects
Commit e92657fd authored by Bienchen's avatar Bienchen
Browse files

Fix the HHblits parser for large alignments where the format slightly changes.

parent 07c5e6d0
Branches
Tags
No related merge requests found
......@@ -254,21 +254,27 @@ def ParseHHblitsOutput(output):
if line[1:].startswith(' ss_dssp'):
continue
if line.startswith('T '):
end_pos = line.find(' ', 22)
for start_pos in range(22, len(line)):
if line[start_pos].isalpha() or line[start_pos] == '-':
break
end_pos = line.find(' ', start_pos)
# this can fail if we didn't skip all other "T ..." lines
if end_pos == -1:
error_str = "Unparsable line '%s' for entry No %d" \
% (line.strip(), entry_index + 1)
raise AssertionError(error_str)
templ_str += line[22:end_pos]
templ_str += line[start_pos:end_pos]
if line.startswith('Q '):
end_pos = line.find(' ', 22)
for start_pos in range(22, len(line)):
if line[start_pos].isalpha() or line[start_pos] == '-':
break
end_pos = line.find(' ', start_pos)
# this can fail if we didn't skip all other "Q ..." lines
if end_pos == -1:
error_str = "Unparsable line '%s' for entry No %d" \
% (line.strip(), entry_index + 1)
raise AssertionError(error_str)
query_str += line[22:end_pos]
query_str += line[start_pos:end_pos]
except StopIteration:
if len(query_str) > 0:
hits[entry_index][0].aln = _MakeAln(query_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment