-
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 ProbeParameters()
to encapsulate settings for PickHybProbeOnly
Primer3Task
#35
Conversation
54b30a3
to
8275f3d
Compare
feat: add penalty weights for pick_hyb_probe task
07a1c33
to
3421575
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## em_feat_pick_hyb_probe #35 +/- ##
==========================================================
- Coverage 97.39% 97.05% -0.35%
==========================================================
Files 25 25
Lines 1614 1664 +50
Branches 303 317 +14
==========================================================
+ Hits 1572 1615 +43
- Misses 23 26 +3
- Partials 19 23 +4 ☔ View full report in Codecov by Sentry. |
79ab7e1
to
6546c57
Compare
6546c57
to
3a416d6
Compare
"""Assembles necessary inputs for Primer3 to orchestrate primer, primer pair, and/or internal | ||
probe design.""" |
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.
doc same comment as on #28 - make the summary one line, and add Attributes
if self.primer_and_amplicon_params is not None and self.primer_weights is None: | ||
object.__setattr__(self, "primer_weights", PrimerAndAmpliconWeights()) | ||
|
||
if self.probe_params is not None and self.probe_weights is None: | ||
object.__setattr__(self, "probe_weights", ProbeWeights()) |
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.
suggestion I think it'd be appropriate to make each of these the default value for the attribute, and change the type of the attributes to not be Optional
optional_attributes = { | ||
field.name: getattr(self, field.name) | ||
for field in fields(self) | ||
if field.default is not MISSING |
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.
suggestion and if you make the above change, you can remove this check
probe_tms: the min, optimal, and max probe melting temperatures | ||
probe_gcs: the min and max GC content for individual probes | ||
number_probes_return: the number of probes to return | ||
probe_max_dinuc_bases: the max number of bases in a dinucleotide run in a probe |
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.
probe_max_dinuc_bases: the max number of bases in a dinucleotide run in a probe | |
probe_max_dinuc_bases: the max number of bases in a dinucleotide run in a probe |
isinstance(self.probe_excluded_region, tuple) | ||
and all(isinstance(param, int) for param in self.probe_excluded_region) |
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.
issue Also check that the length of the tuple is 2
# we use `type: ignore` here to bypass mypy | ||
replace( | ||
valid_probe_params, | ||
probe_sizes=MinOptMax(min=18.1, opt=22.1, max=30.1), # type: ignore |
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.
issue Add the ignore code, and a comment that the the mypy errors are deliberate in the context of this test - we are deliberately passing the wrong type to test our runtime checks
Primer3Parameters
to now be calledPrimerAndAmpliconParameters
DeprecationWarning
toPrimer3Parameters
for backwards compatibilityProbeParameters
to encapsulate settings forPickHybProbeOnly
Primer3Task, as well as apost_init()
andto_input_tags()
that maps each of the user-specified arguments to the correspondingPrimer3InputTag
*_params
and*_weights
both optional input toPrimer3Input
, use the__post_init()__
to assign default weights when given the corresponding params