Skip to content

Commit 19ddfee

Browse files
committed
temporary patch when NEAT has a bad alignment (usually related to N-regions)
1 parent 9d8aaaf commit 19ddfee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

neat/read_simulator/utils/read.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,12 @@ def make_cigar(self):
453453
cig_string, cig_count, curr_char, cig_length = self.align_seqs()
454454
if cig_length < self.run_read_length:
455455
_LOG.warning("Poor alignment, trying reversed")
456-
cig_string2, cig_count2, curr_char2, cig_length = self.align_seqs()
457-
if cig_length < self.run_read_length:
458-
_LOG.error("Alignment still not working")
459-
sys.exit(1)
456+
cig_string2, cig_count2, curr_char2, cig_length2 = self.align_seqs()
457+
if cig_length2 < cig_length:
458+
cig_length = cig_length2
459+
while cig_length < self.run_read_length:
460+
cig_string += "M"
461+
cig_length += 1
460462

461463
# append the final section as we return
462464
return cig_string + str(cig_count) + curr_char

0 commit comments

Comments
 (0)