fulcrumgenomics / prymer

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

refactor: Primer -> Oligo, PrimerLike -> OligoLike #51

Closed emmcauley closed 6 days ago

emmcauley commented 2 weeks ago

The PR refactors the Primer object and planned Probe object into the same dataclass, now called Oligo. An Oligo object can represent single primer and probe designs. The corresponding base class, previously called PrimerLike, has been refactored to OligoLike.

The new Oligo object has the attributes that a Primer object had (tm, penalty, span and optional attributes bases, tail) plus three new optional attributes: self_any_th, self_end_th, and hairpin_th. These three attributes are emitted from Primer3 for probe design and, after an update to PrimerAndAmpliconParams, will also be emitted for primer designs.

For backwards compatibility, the Primer object now wraps an Oligo object and also emits a DeprecationWarning.

I left PrimerPair largely untouched -- a PrimerPair is now composed of two Oligo objects but the rest of the functionality of PrimerPair I left intact.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 92.67241% with 17 lines in your changes missing coverage. Please review.

Project coverage is 96.76%. Comparing base (f71dc65) to head (c0e869e). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
prymer/primer3/primer3.py 77.19% 8 Missing and 5 partials :warning:
prymer/api/oligo.py 96.36% 1 Missing and 1 partial :warning:
prymer/primer3/primer3_parameters.py 92.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #51 +/- ## ========================================== - Coverage 97.25% 96.76% -0.49% ========================================== Files 25 26 +1 Lines 1603 1701 +98 Branches 303 328 +25 ========================================== + Hits 1559 1646 +87 - Misses 23 29 +6 - Partials 21 26 +5 ```

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