Skip to content

Commit

Permalink
Check for MAX cutoff before checking for low coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Jun 4, 2021
1 parent 2f3c757 commit 017929a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gene_splicer/primer_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ def find_primers(
contig_seq: str = row.get('contig') or row['sequence']
contig_seq = contig_seq.upper()

# If percent consensus cutoff is not max, skip
if conseq_cutoff and conseq_cutoff != 'MAX':
new_row['error'] = errors.not_max
writer.writerow(new_row)
continue

# Determine if sequence has internal Xs
x_locations = [i for i, j in enumerate(contig_seq) if j == 'X']
if any([(sample_size < i < len(contig_seq) - sample_size)
Expand Down Expand Up @@ -211,12 +217,6 @@ def find_primers(
else:
continue

# If percent consensus cutoff is not max, skip
if conseq_cutoff and conseq_cutoff != 'MAX':
new_row['error'] = errors.not_max
writer.writerow(new_row)
continue

# Determine if sequence has non-tcga characters
found_non_tcga = re.findall(non_tcga, contig_seq)
mixtures = len([x for x in found_non_tcga if x[0].upper() != 'X'])
Expand Down

0 comments on commit 017929a

Please sign in to comment.