fulcrumgenomics / prymer

Python Primer Design Library
https://prymer.readthedocs.io/en/latest/
MIT License
8 stars 0 forks source link

feat: add PickHybProbeOnly logic to Primer3Task and Primer3Input #52

Closed emmcauley closed 2 weeks ago

emmcauley commented 2 weeks ago

This PR:

  1. Add two boolean flags to each Primer3Task to indicate which set of parameters is required (ProbeParameters or PrimerAndAmpliconParameters)
  2. Adds both sets of parameters and weights as optional args to Primer3Input, and adds a __post_init()__ check where we ensure that the provided params match the selected task. If no weights are provided, default weights are instantiated.
  3. Using the refactored Oligo class, adds internal probe picking logic to primer3.py: _build_primers() is now _build_oligos(). _build_oligos() is used in conjunction with its downstream _assemble_single_designs() for each of the three single-oligo design tasks (internal probe, left and right primers).

I intend to add more tests in a follow-up commit.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 68.67470% with 26 lines in your changes missing coverage. Please review.

Project coverage is 96.16%. Comparing base (31c6c3f) to head (df512e1).

Files with missing lines Patch % Lines
prymer/primer3/primer3.py 68.18% 9 Missing and 5 partials :warning:
prymer/primer3/primer3_input.py 10.00% 5 Missing and 4 partials :warning:
prymer/primer3/primer3_task.py 89.65% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## em_refactor_primer_to_oligo #52 +/- ## =============================================================== - Coverage 97.07% 96.16% -0.91% =============================================================== Files 26 26 Lines 1673 1721 +48 Branches 318 335 +17 =============================================================== + Hits 1624 1655 +31 - Misses 26 38 +12 - Partials 23 28 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.