Skip to content

Commit 22cd7a9

Browse files
author
Manuel Caceres
committed
Fix bug parsing GAF
1 parent cb35466 commit 22cd7a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compute_summary.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def parse_gaf(raw_gaf, vertex_labels):
179179
for idx, node_id in enumerate(path):
180180

181181
ll = vertex_labels[node_id]
182+
original_length = len(ll)
182183

183184
if idx == 0 and idx == n - 1:
184185
if rev_cnt > 0:
@@ -198,6 +199,9 @@ def parse_gaf(raw_gaf, vertex_labels):
198199

199200
if rev_cnt > 0:
200201
ll = ''.join({'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C', 'N': 'N'}[b] for b in ll[::-1])
202+
last_node_off += original_length
203+
else:
204+
last_node_off -= original_lengthß
201205

202206
seqs.append(ll)
203207

0 commit comments

Comments
 (0)