From 7322a0acadb7dd7479c0de8f09122f00ee142678 Mon Sep 17 00:00:00 2001 From: Matt Stone Date: Mon, 23 Sep 2024 12:07:42 -0400 Subject: [PATCH] chore: deprecate build_and_pick_primer_pairs and pick_top_primer_pairs --- prymer/api/picking.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/prymer/api/picking.py b/prymer/api/picking.py index 93b14ec..1e075ef 100644 --- a/prymer/api/picking.py +++ b/prymer/api/picking.py @@ -40,6 +40,7 @@ """ +import warnings from dataclasses import dataclass from typing import Callable from typing import Iterable @@ -367,6 +368,13 @@ def pick_top_primer_pairs( Returns: Up to `num_primers` primer pairs """ + warnings.warn( + "pick_top_primer_pairs is deprecated. Picking algorithms should be implemented on " + "a per-context basis, considering the needs of the specific application.", + DeprecationWarning, + stacklevel=2, + ) + selected: list[PrimerPair] = [] pp_iter = PeekableIterator(primer_pairs) last_pp: Optional[PrimerPair] = None @@ -437,6 +445,13 @@ def build_and_pick_primer_pairs( Returns: the list of primer pairs, sorted by penalty (increasing) """ + warnings.warn( + "build_and_pick_primer_pairs is deprecated. Picking algorithms should be implemented on " + "a per-context basis, considering the needs of the specific application.", + DeprecationWarning, + stacklevel=2, + ) + # build the list of primer pairs primer_pairs = build_primer_pairs( lefts=lefts, rights=rights, target=target, params=params, fasta=fasta