Skip to content

Commit

Permalink
feat: added parameter name range for max_mixmatches_in_three_prime_re…
Browse files Browse the repository at this point in the history
…gion error message
  • Loading branch information
ameynert committed Jan 7, 2025
1 parent 73785e3 commit 1a61cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prymer/offtarget/offtarget_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,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'={three_prime_region_length} inclusive. "
f"Saw {max_mismatches_in_three_prime_region}"
)
if max_mismatches < 0:
Expand Down
4 changes: 2 additions & 2 deletions tests/offtarget/test_offtarget.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ class CustomPrimer(Oligo):
(1, -1, 1, 20, 0, 0, 1, "'max_primer_pair_hits' must be greater than or equal to 0. Saw -1"), # noqa: E501
(1, 1, -1, 20, 0, 0, 1, "'min_primer_pair_hits' must be greater than or equal to 0. Saw -1"), # noqa: E501
(1, 1, 1, 0, 0, 0, 1, "'three_prime_region_length' must be greater than 0. Saw 0"),
(1, 1, 1, 20, -1, 0, 1, "'max_mismatches_in_three_prime_region' must be between 0 and 20 inclusive. Saw -1"), # noqa: E501
(1, 1, 1, 20, 21, 0, 1, "'max_mismatches_in_three_prime_region' must be between 0 and 20 inclusive. Saw 21"), # noqa: E501
(1, 1, 1, 20, -1, 0, 1, "'max_mismatches_in_three_prime_region' must be between 0 and 'three_prime_region_length'=20 inclusive. Saw -1"), # noqa: E501
(1, 1, 1, 20, 21, 0, 1, "'max_mismatches_in_three_prime_region' must be between 0 and 'three_prime_region_length'=20 inclusive. Saw 21"), # noqa: E501
(1, 1, 1, 20, 0, -1, 1, "'max_mismatches' must be greater than or equal to 0. Saw -1"),
(1, 1, 1, 20, 0, 0, 0, "'max_amplicon_size' must be greater than 0. Saw 0"),
],
Expand Down

0 comments on commit 1a61cb0

Please sign in to comment.