Commit 120d9058 by MARIJON Pierre

If we can't find free extremity catch exception and print message

parent 38c7c212
......@@ -164,7 +164,7 @@ def __search_contig_extremity(overlap, read2info, n):
elif nM in read2info and read2info[nM]["tigID"] == read2info[n]["tigID"]:
return n + "+"
else:
raise Exception("We can't find free contig extremity")
raise Exception("We can't find free read extremity for "+n)
def generate_output_extract_graph(contig_layout, read_names, ov_bin, ov_store, gk_store, prefix):
read2info, tig2extremity = read_contig_layout(contig_layout)
......@@ -174,8 +174,11 @@ def generate_output_extract_graph(contig_layout, read_names, ov_bin, ov_store, g
tig2free = dict()
for tig, (beg, end) in tig2extremity.items():
if beg != end:
tig2free[tig] = (__search_contig_extremity(overlap, read2info, beg),
__search_contig_extremity(overlap, read2info, end))
try:
tig2free[tig] = (__search_contig_extremity(overlap, read2info, beg),
__search_contig_extremity(overlap, read2info, end))
except Exception(e):
print(e)
search_path = prefix + "_extremity_search.csv"
result_path = prefix + "_extremity_result.csv"
......
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