-
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 penalty weights for pick_hyb_probe task #28
Conversation
a47953e
to
9dd4ebb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## em_feat_pick_hyb_probe #28 +/- ##
==========================================================
+ Coverage 97.37% 97.39% +0.02%
==========================================================
Files 25 25
Lines 1597 1614 +17
Branches 302 303 +1
==========================================================
+ Hits 1555 1572 +17
Misses 23 23
Partials 19 19 ☔ View full report in Codecov by Sentry. |
9dd4ebb
to
54b30a3
Compare
54b30a3
to
8275f3d
Compare
48f19af
to
8275f3d
Compare
prymer/primer3/primer3_input.py
Outdated
@@ -116,6 +121,7 @@ def to_input_tags(self, design_region: Span) -> dict[Primer3InputTag, Any]: | |||
assembled_tags = { | |||
**primer3_task_params, | |||
**self.params.to_input_tags(), | |||
**self.weights.to_input_tags(), | |||
**self.primer_weights.to_input_tags(), |
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 Check that this is not None
just like with probe_weights
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 am surprised that mypy
does not catch this!)
prymer/primer3/primer3_input.py
Outdated
primer_weights: Optional[PrimerAndAmpliconWeights] = PrimerAndAmpliconWeights() | ||
probe_weights: Optional[ProbeWeights] = None |
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.
note Per discussion, #48 adds validation of the presence of required weights, based on the specified task.
prymer/primer3/primer3_weights.py
Outdated
"""Holds the weights that Primer3 uses to adjust penalties | ||
that originate from the designed primer(s). | ||
|
||
The weights that Primer3 uses when a parameter is less than optimal are labeled with "_lt". | ||
"_gt" weights are penalties applied when a parameter is greater than optimal. | ||
|
||
Some of these settings depart from the default settings enumerated in the Primer3 manual. |
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.
Some of these settings depart from the default settings enumerated in the Primer3 manual. | |
Most of these settings depart from the default settings enumerated in the Primer3 manual. |
suggestion Open an issue, to enumerate the differences (and possibly the rationale?)
prymer/primer3/primer3_weights.py
Outdated
"""Holds the weights that Primer3 uses to adjust penalties | ||
that originate from the designed internal probe(s).""" |
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 Make the summary line one line, and add an Attributes
block
https://google.github.io/styleguide/pyguide.html#384-classes
Part of #11 . This PR adds
PRIMER_INTERNAL_WT_*
fields to aProbeWeights
dataclass that now exists alongside aPrimerAndAmpliconWeights
class. Similar to thePRIMER_
weights, the size, melting temperature, GC content, and complementarity of the probe are penalized. Defaults for the dataclass were chosen to heavily weight against probe complementarity and out-of-range melting temperature and apply a smaller penalty to out-of-spec GC content and probe size.ProbeWeights
is separate fromPrimerAndAmpliconWeights
to maintain separation of tasks and clarity.