Skip to content

Commit

Permalink
temporary patch when NEAT has a bad alignment (usually related to N-r…
Browse files Browse the repository at this point in the history
…egions)
  • Loading branch information
joshfactorial committed Oct 30, 2024
1 parent 9d8aaaf commit 19ddfee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions neat/read_simulator/utils/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,12 @@ def make_cigar(self):
cig_string, cig_count, curr_char, cig_length = self.align_seqs()
if cig_length < self.run_read_length:
_LOG.warning("Poor alignment, trying reversed")
cig_string2, cig_count2, curr_char2, cig_length = self.align_seqs()
if cig_length < self.run_read_length:
_LOG.error("Alignment still not working")
sys.exit(1)
cig_string2, cig_count2, curr_char2, cig_length2 = self.align_seqs()
if cig_length2 < cig_length:
cig_length = cig_length2
while cig_length < self.run_read_length:
cig_string += "M"
cig_length += 1

# append the final section as we return
return cig_string + str(cig_count) + curr_char
Expand Down

0 comments on commit 19ddfee

Please sign in to comment.