Skip to content

Commit

Permalink
feat: simplified error messages to strictly greater than 0 for max_am…
Browse files Browse the repository at this point in the history
…plicon_size and three_prime_region_length
  • Loading branch information
ameynert committed Jan 7, 2025
1 parent d6779bf commit 97c929e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions prymer/offtarget/offtarget_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,7 @@ def __init__(
"""
errors: list[str] = []
if max_amplicon_size < 1:
errors.append(
f"'max_amplicon_size' must be greater than or equal to 1. Saw {max_amplicon_size}"
)
errors.append(f"'max_amplicon_size' must be greater than 0. Saw {max_amplicon_size}")
if max_primer_hits < 0:
errors.append(
f"'max_primer_hits' must be greater than or equal to 0. Saw {max_primer_hits}"
Expand All @@ -250,7 +248,7 @@ def __init__(
)
if three_prime_region_length < 1:
errors.append(
"'three_prime_region_length' must be greater than or equal to 1. "
"'three_prime_region_length' must be greater than 0. "
f"Saw {three_prime_region_length}"
)
if (
Expand All @@ -259,7 +257,7 @@ def __init__(
):
errors.append(
"'max_mismatches_in_three_prime_region' must be between 0 and "
f"{three_prime_region_length}, inclusive. "
f"{three_prime_region_length} inclusive. "
f"Saw {max_mismatches_in_three_prime_region}"
)
if max_mismatches < 0:
Expand Down

0 comments on commit 97c929e

Please sign in to comment.