We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f7bb09 commit 0cb0710Copy full SHA for 0cb0710
tests/builtin_specifications/test_AllowPrimer.py
@@ -1,23 +1,26 @@
1
"""Example of use of the AvoidChanges as an objective to minimize modifications
2
of a sequence."""
3
4
+import numpy
5
+
6
from dnachisel import AllowPrimer, DnaOptimizationProblem
7
8
9
def test_AllowPrimer():
10
+ numpy.random.seed(123)
11
primers = ["ATTGCGCCAAACT", "TAATCCACCCTAAT", "ATTCACACTTCAA"]
12
problem = DnaOptimizationProblem(
13
sequence=40 * "A",
14
constraints=[
15
AllowPrimer(
16
tmin=50,
17
tmax=60,
- max_homology_length=5,
18
+ max_homology_length=7,
19
location=(10, 30),
20
avoid_heterodim_with=primers,
21
)
22
],
- logger=None
23
+ logger=None,
24
25
problem.resolve_constraints()
26
assert problem.all_constraints_pass()
0 commit comments