Skip to content
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 probe-specific logic to Primer3 #48

Closed

Conversation

emmcauley
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 81.63265% with 18 lines in your changes missing coverage. Please review.

Project coverage is 96.60%. Comparing base (3a416d6) to head (090391b).

Files with missing lines Patch % Lines
prymer/primer3/primer3.py 84.31% 5 Missing and 3 partials ⚠️
prymer/primer3/primer3_input.py 30.00% 2 Missing and 5 partials ⚠️
prymer/primer3/primer3_task.py 89.65% 3 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           em_feat_add_Probe_object      #48      +/-   ##
============================================================
- Coverage                     97.05%   96.60%   -0.45%     
============================================================
  Files                            25       26       +1     
  Lines                          1664     1739      +75     
  Branches                        317      337      +20     
============================================================
+ Hits                           1615     1680      +65     
- Misses                           26       31       +5     
- Partials                         23       28       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emmcauley emmcauley changed the base branch from em_feat_api_probe to em_feat_add_Probe_object September 25, 2024 15:26


@dataclass(frozen=True, init=True, kw_only=True, slots=True)
class Probe(Primer, Metric["Probe"]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue Per discussion on the working group call today, we are going to add these fields directly to Primer (and maybe rename the class to Oligo or similar)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have documented this because I just bumped up against why I defaulted them both to None in the first place-- if you specify the default weights for either task, then Primer3 uses those weights as part of your scoring function, and it will complain if the corresponding params are not there, because it has no delta-off-optimal to score.

prymer/primer3/primer3.py Show resolved Hide resolved
"""Stores task-specific characteristics for designing an internal hybridization probe."""

@classmethod
def _to_input_tags(cls, target: Span, design_region: Span) -> dict[Primer3InputTag, Any]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question Does the task require either the target or design_region? How does primer3 know the range of valid locations for the probe?

prymer/primer3/primer3_input.py Show resolved Hide resolved
else:
if self.primer_weights is None:
object.__setattr__(self, "primer_weights", PrimerAndAmpliconWeights())
elif self.task.requires_probe_params:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question Is it ever possible for a task to require both probe and primer params?

If so, you may want to consider checking both and then reporting all collected errors. But if they're mutually exclusive it's unnecessary

prymer/primer3/primer3.py Show resolved Hide resolved
@emmcauley emmcauley deleted the branch em_feat_add_Probe_object September 26, 2024 16:06
@emmcauley emmcauley closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants