Skip to content

Commit 9514bb5

Browse files
committed
skip gap filling paths with incorrect clips
1 parent c41a544 commit 9514bb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scripts/insert_aln_gaps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def tangle_onetip(s_node, e_node, or_tangles, not_tips):
245245
for j in range(1, len(current_path)):
246246
path_length += len(node_seqs[current_path[j][1:]])
247247
path_length -= edge_overlaps[canontip(current_path[j-1], revnode(current_path[j]))]
248-
assert path_length > current_left_clip + current_right_clip
249-
f.write(name + "\t" + str(alns[i][6]) + "\t" + str(current_read_start) + "\t" + str(current_read_end) + "\t+\t" + "".join(current_path) + "\t" + str(path_length) + "\t" + str(current_left_clip) + "\t" + str(path_length - current_right_clip) + "\t0\t0\t60\n")
248+
if path_length > current_left_clip + current_right_clip:
249+
f.write(name + "\t" + str(alns[i][6]) + "\t" + str(current_read_start) + "\t" + str(current_read_end) + "\t+\t" + "".join(current_path) + "\t" + str(path_length) + "\t" + str(current_left_clip) + "\t" + str(path_length - current_right_clip) + "\t0\t0\t60\n")
250250

251251
with open(nongap_aln_file_out, "w") as f2:
252252
with open(input_aln_file) as f:

0 commit comments

Comments
 (0)