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

refactor: Deprecate build_and_pick_primer_pairs and pick_top_primer_pairs #39

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading