File tree Expand file tree Collapse file tree
neat/read_simulator/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,7 +205,12 @@ def generate_variants(
205205 if location == 0 :
206206 continue
207207 trinuc = reference [location : location + 3 ].seq .upper ()
208- if "N" in trinuc :
208+ disallowed_chars = False
209+ for letter in trinuc :
210+ if letter not in ALLOWED_NUCL :
211+ disallowed_chars = True
212+ break
213+ if disallowed_chars :
209214 continue
210215 temp_variant = mutation_model .generate_snv (trinuc , location , options .rng )
211216
Original file line number Diff line number Diff line change @@ -406,8 +406,8 @@ def align_seqs(self):
406406 cig_length = 0
407407 curr_char = ''
408408 cig_string = ''
409- # Find first match
410- for char in range (len (self .read_sequence )):
409+ # Find first match. Added a +1 because all my matches were coming up short.
410+ for char in range (len (self .read_sequence ) + 1 ):
411411 if aligned_template_seq [char ] == '-' : # insertion
412412 if curr_char == 'I' : # more insertions
413413 cig_count += 1
You can’t perform that action at this time.
0 commit comments