Commit fe5e6cb0 by Riccardo Vicedomini

fixed a bug due to long indels during hmmsearch output processing

parent d4e32bba
...@@ -63,10 +63,12 @@ def parseHMMER(fh,hmmDict): ...@@ -63,10 +63,12 @@ def parseHMMER(fh,hmmDict):
# process each domain hit (i.e., hmm-seq alignment) # process each domain hit (i.e., hmm-seq alignment)
while line and line.lstrip().startswith("== domain "): while line and line.lstrip().startswith("== domain "):
tokens = line.split() tokens = line.split()
hit = hitTable[ int(tokens[2])-1 ] hit_index = int(tokens[2])-1
hit = hitTable[hit_index]
hmm_cons = "" hmm_cons = ""
seq_cons = "" seq_cons = ""
pp_cons = "" pp_cons = ""
aln_to = 0
while True: while True:
line = fh.readline() line = fh.readline()
tokens = line.split() tokens = line.split()
...@@ -78,7 +80,8 @@ def parseHMMER(fh,hmmDict): ...@@ -78,7 +80,8 @@ def parseHMMER(fh,hmmDict):
hit.match_str += match_line[ match_cons_i : match_cons_i+len(tokens[2]) ] hit.match_str += match_line[ match_cons_i : match_cons_i+len(tokens[2]) ]
tokens = fh.readline().split() tokens = fh.readline().split()
seq_cons += tokens[2] seq_cons += tokens[2]
aln_to = int(tokens[3]) if tokens[3].isdigit():
aln_to = int(tokens[3])
tokens = fh.readline().split() tokens = fh.readline().split()
pp_cons += tokens[0] pp_cons += tokens[0]
if aln_to == hit.ali_to: if aln_to == hit.ali_to:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment