Skip to content

Commit

Permalink
Fixed bug where searching left would break if the final correct prime…
Browse files Browse the repository at this point in the history
…r sequence was identified but was not the last primer.
  • Loading branch information
jackwadden committed Jul 27, 2021
1 parent 00319eb commit cd61a59
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lamprey.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 118,10 @@ def __init__(self, primer_set_filename):
self.primer_dict[primer_name[:-1]] = rc(primer_string)
else:
self.primer_dict[primer_name] = primer_string



print(self.fwd_primer_order)
print(self.rev_primer_order)
#########################
class Alignment:
'''
Expand Down Expand Up @@ -404,6 407,10 @@ def setPrimerColor(primer_string):
color = '\u001b[38;5;4;7m'
elif primer_string == 'F2c':
color = '\u001b[38;5;4m'
elif primer_string == 'F3':
color = '\u001b[38;5;4;7m'
elif primer_string == 'F3c':
color = '\u001b[38;5;4m'
elif primer_string == 'F1':
color = '\u001b[38;5;75;7m'
elif primer_string == 'F1c':
Expand All @@ -412,6 419,10 @@ def setPrimerColor(primer_string):
color = '\u001b[38;5;1;7m'
elif primer_string == 'B2c':
color = '\u001b[38;5;1m'
elif primer_string == 'B3':
color = '\u001b[38;5;1;7m'
elif primer_string == 'B3c':
color = '\u001b[38;5;1m'
elif primer_string == 'B1':
color = '\u001b[38;5;204;7m'
elif primer_string == 'B1c':
Expand Down Expand Up @@ -636,6 647,10 @@ def extractAmpliconAroundTarget(primer_set, alignments, target):
else:
primer_counter = primer_counter - 1

# if primer counter goes below zero, break
if primer_counter < 0:
break

if all_matched:
amplicon_start = 0

Expand Down

0 comments on commit cd61a59

Please sign in to comment.