Skip to content

Commit

Permalink
chore: deprecate build_and_pick_primer_pairs and pick_top_primer_pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
msto committed Sep 23, 2024
1 parent 70f6840 commit 7322a0a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions prymer/api/picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"""

import warnings
from dataclasses import dataclass
from typing import Callable
from typing import Iterable
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7322a0a

Please sign in to comment.