diff --git a/gapmm2/align.py b/gapmm2/align.py index 19c893e..c49e582 100644 --- a/gapmm2/align.py +++ b/gapmm2/align.py @@ -149,10 +149,7 @@ def left_update_paf_plus(paf, align, slide, offset): try: assert intron_len > 0, "Introns cannot be less than zero" except AssertionError as e: - print(f"Assertion failed: {str(e)}") - print(paf) - print(align) - raise SystemExit(1) + return paf new_cs = "cs:Z::{}~gt{}ag{}".format( align["cigar"].strip("="), intron_len, new_cs_str ) @@ -199,10 +196,7 @@ def left_update_paf_minus(paf, align, slide, offset): try: assert intron_len > 0, "Introns cannot be less than zero" except AssertionError as e: - print(f"Assertion failed: {str(e)}") - print(paf) - print(align) - raise SystemExit(1) + return paf new_cs = "cs:Z:{}~ct{}ac:{}".format( new_cs_str, intron_len, align["cigar"].strip("=") ) @@ -251,10 +245,7 @@ def right_update_paf_plus(paf, align, slide, offset): try: assert intron_len > 0, "Introns cannot be less than zero" except AssertionError as e: - print(f"Assertion failed: {str(e)}") - print(paf) - print(align) - raise SystemExit(1) + return paf new_cs = "cs:Z:{}~gt{}ag:{}".format( old_cs, intron_len, align["cigar"].strip("=") ) @@ -301,14 +292,7 @@ def right_update_paf_minus(paf, align, slide, offset): try: assert intron_len > 0, "Introns cannot be less than zero" except AssertionError as e: - print(f"Assertion failed: {str(e)}") - print(f"function=right_update_paf_minus") - print(f"paf={paf}") - print(f"align={align}") - print(f"slide={slide}") - print(f"offset={offset}") - print(f"old_cs_tup={old_cs_tup}") - raise SystemExit(1) + return paf new_cs = "cs:Z::{}~ct{}ac{}".format( align["cigar"].strip("="), intron_len, new_cs_str )