-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add parameter validation for OffTargetDetector.__init__
#103
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 96.77% 96.81% +0.04%
==========================================
Files 26 26
Lines 1766 1789 +23
Branches 205 215 +10
==========================================
+ Hits 1709 1732 +23
Misses 31 31
Partials 26 26 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if three_prime_region_length < 1: | ||
errors.append( | ||
"'three_prime_region_length' must be greater than 0. " | ||
f"Saw {three_prime_region_length}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we use this to drive the "seed region" for bwa I think we should probably enforce a higher miniumum. @nh13 do you have a thought on what's reasonable? E.g. 8, 10, 12 or somewhere around there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that since this value is use for the seed length, we should (1) add that explanation to the parameter or class docs, and (2) have a minimum of 8.
…plicon_size and three_prime_region_length
…gion error message
1a61cb0
to
c9075ac
Compare
I've added checks for |
WalkthroughThe changes enhance parameter validation in the 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (4)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@ameynert as things have gotten a bit complicated, why don't we merge this with |
max_amplicon_size > 0
max_primer_hits >= 0
max_primer_pair_hits >= 0
min_primer_pair_hits >= 0
three_prime_region_length > 0
0 <= max_mismatches_in_three_prime_region <= three_prime_region_length
max_mismatches >= 0
max_gap_opens >= 0
max_gap_extends == -1
ormax_gap_extends >= 0