@biolibs/bionet-tools 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/primer-bench.d.ts +120 -0
- package/dist/primer-bench.d.ts.map +1 -0
- package/dist/primer-bench.js +285 -0
- package/dist/primer-bench.js.map +1 -0
- package/dist/primer-design.d.ts +273 -0
- package/dist/primer-design.d.ts.map +1 -0
- package/dist/primer-design.js +273 -0
- package/dist/primer-design.js.map +1 -0
- package/dist/primer-working.d.ts +154 -0
- package/dist/primer-working.d.ts.map +1 -0
- package/dist/primer-working.js +245 -0
- package/dist/primer-working.js.map +1 -0
- package/dist/tools.d.ts +8 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -4
- package/dist/tools.js.map +1 -1
- package/dist/working.d.ts +16 -0
- package/dist/working.d.ts.map +1 -1
- package/dist/working.js +21 -0
- package/dist/working.js.map +1 -1
- package/package.json +3 -2
- package/src/index.ts +6 -0
- package/src/primer-bench.tsx +500 -0
- package/src/primer-design.ts +406 -0
- package/src/primer-working.ts +289 -0
- package/src/tools.tsx +14 -6
- package/src/working.tsx +29 -0
- package/tools.css +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primer-bench.js","sourceRoot":"","sources":["../src/primer-bench.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAqC,MAAM,OAAO,CAAC;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CA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AAE,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,qGAAqG,sDAA+C,IAC7N,IACG,EACX,YAAG,SAAS,EAAC,WAAW,6KAAiK,EACxL,IAAI,KAAK,IAAI,IAAI,YAAG,SAAS,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,YAAE,IAAI,GAAK,EAC9D,KAAK,KAAK,IAAI,IAAI,CACjB,aAAG,SAAS,EAAC,YAAY,uCAAwB,IAAI,CAAC,IAAI,kDACvD,KAAK,KAAK,SAAS,IAAI,mCAAG,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,4BAAsB,IAAG,IACnG,CACL,EACA,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,aAAG,SAAS,EAAC,WAAW,uCAAwB,IAAI,CAAC,IAAI,2BAAuB,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,uBAAuB,IAAI,CAAC,IAAI,wBAAwB,CAAC,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,EAAE,IAAK,IACnV,IACT,CACJ,IACG,CACP,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAA2C;IACpE,OAAO,4BAAG,cAAc,CAAC,KAAK,CAAC,CAAC,KAAK,GAAI,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pair of primers designed for a stretch of a part, with everything that was weighed on the way.
|
|
3
|
+
*
|
|
4
|
+
* The choosing is `@biolibs/pcr`'s: the forward primer starts at the first base of the stretch and
|
|
5
|
+
* the reverse primer ends at its last, so the only freedom is how long each is, and every length in
|
|
6
|
+
* range is measured and scored. Nothing here chooses differently. What this adds is what a person
|
|
7
|
+
* designing primers wants beside the answer: every candidate that was considered, each with the
|
|
8
|
+
* score that ranked it, so the winner can be seen to have won; the checks a careful person makes of
|
|
9
|
+
* a pair, not just of each primer; and the stretch said the way a lab says it, including one that
|
|
10
|
+
* runs through the origin of a plasmid.
|
|
11
|
+
*
|
|
12
|
+
* It is plain data in and plain data out, so a window can draw it and a test can check it.
|
|
13
|
+
*/
|
|
14
|
+
import type { PartFeature } from "@biolibs/bionet";
|
|
15
|
+
import { type PrimerLimits, type PrimerReport } from "@biolibs/pcr";
|
|
16
|
+
/** A stretch of a template to amplify. On a circle, `end` at or before `start` means it runs through the origin. */
|
|
17
|
+
export interface Stretch {
|
|
18
|
+
/** How many bases come before it. */
|
|
19
|
+
start: number;
|
|
20
|
+
/** One past its last base. */
|
|
21
|
+
end: number;
|
|
22
|
+
}
|
|
23
|
+
/** What somebody asks of a design. */
|
|
24
|
+
export interface DesignAsk {
|
|
25
|
+
/** The melting temperature aimed for, in °C. 60 unless said. */
|
|
26
|
+
targetTm?: number;
|
|
27
|
+
/** The shortest and longest primer to consider. 18 and 30 unless said. */
|
|
28
|
+
minLength?: number;
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
/** A length to use for either primer in place of the one that scored best. */
|
|
31
|
+
forwardLength?: number;
|
|
32
|
+
reverseLength?: number;
|
|
33
|
+
}
|
|
34
|
+
/** One candidate primer, and the score that ranked it. Lower is better. */
|
|
35
|
+
export interface ScoredCandidate {
|
|
36
|
+
/** What was measured of it. */
|
|
37
|
+
report: PrimerReport;
|
|
38
|
+
/** How far its melting temperature is from the one aimed for, in °C. */
|
|
39
|
+
offTarget: number;
|
|
40
|
+
/** What it loses for not ending in G or C: 2, or 0. */
|
|
41
|
+
clamp: number;
|
|
42
|
+
/** What it loses for its GC content being off the middle of the band: twice the distance, as a fraction. */
|
|
43
|
+
gc: number;
|
|
44
|
+
/** The three added up. */
|
|
45
|
+
score: number;
|
|
46
|
+
}
|
|
47
|
+
/** One end of a design: the candidates, the one that scored best, and the one in use. */
|
|
48
|
+
export interface DesignedPrimer {
|
|
49
|
+
/** Which primer it is. */
|
|
50
|
+
which: "forward" | "reverse";
|
|
51
|
+
/** Every length considered, shortest first. */
|
|
52
|
+
candidates: ScoredCandidate[];
|
|
53
|
+
/** The one that scored best. */
|
|
54
|
+
best: ScoredCandidate;
|
|
55
|
+
/** The one in use: the best, unless a length was asked for. */
|
|
56
|
+
chosen: ScoredCandidate;
|
|
57
|
+
/** Where it lies on the template: the bases before it, and one past its last. Past the template's length if it runs through the origin. */
|
|
58
|
+
start: number;
|
|
59
|
+
end: number;
|
|
60
|
+
/** Why the best one won, in a sentence. */
|
|
61
|
+
why: string;
|
|
62
|
+
}
|
|
63
|
+
/** Something a careful person would stop at. `stop` is likely to spoil the PCR; `look` is worth a second look. */
|
|
64
|
+
export interface DesignWarning {
|
|
65
|
+
weight: "stop" | "look";
|
|
66
|
+
/** Which primer it is about, or `pair` for something about the two together. */
|
|
67
|
+
about: "forward" | "reverse" | "pair";
|
|
68
|
+
/** What is wrong, in a sentence. */
|
|
69
|
+
says: string;
|
|
70
|
+
}
|
|
71
|
+
/** A designed pair. */
|
|
72
|
+
export interface PrimerDesign {
|
|
73
|
+
/** The stretch asked for. */
|
|
74
|
+
stretch: Stretch;
|
|
75
|
+
/** Whether it runs through a circle's origin. */
|
|
76
|
+
wraps: boolean;
|
|
77
|
+
/** How long the product is, in base pairs. */
|
|
78
|
+
length: number;
|
|
79
|
+
/** The melting temperature aimed for. */
|
|
80
|
+
targetTm: number;
|
|
81
|
+
forward: DesignedPrimer;
|
|
82
|
+
reverse: DesignedPrimer;
|
|
83
|
+
/** How far apart the two melting temperatures are, in °C. */
|
|
84
|
+
tmApart: number;
|
|
85
|
+
/** Everything worth warning about, the worst first. */
|
|
86
|
+
warnings: DesignWarning[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* How long a stretch is.
|
|
90
|
+
*
|
|
91
|
+
* @param stretch - The stretch.
|
|
92
|
+
* @param template - How long the template is, and whether it is a circle.
|
|
93
|
+
* @returns Its length in bases, or 0 if it is not a stretch of that template.
|
|
94
|
+
*/
|
|
95
|
+
export declare function stretchLength(stretch: Stretch, template: {
|
|
96
|
+
length: number;
|
|
97
|
+
circular: boolean;
|
|
98
|
+
}): number;
|
|
99
|
+
/**
|
|
100
|
+
* The bases of a stretch, read along the top strand.
|
|
101
|
+
*
|
|
102
|
+
* @param template - The template.
|
|
103
|
+
* @param stretch - The stretch.
|
|
104
|
+
* @returns Its bases, running on through the origin if the stretch does. Empty if it is not a stretch of that template.
|
|
105
|
+
*/
|
|
106
|
+
export declare function stretchBases(template: {
|
|
107
|
+
sequence: string;
|
|
108
|
+
circular: boolean;
|
|
109
|
+
}, stretch: Stretch): string;
|
|
110
|
+
/**
|
|
111
|
+
* The score a candidate is ranked by, term by term.
|
|
112
|
+
*
|
|
113
|
+
* This is the rule `@biolibs/pcr` chooses by, written out so that it can be shown: distance from the
|
|
114
|
+
* melting temperature aimed for, in degrees; 2 for a 3′ end that is not G or C; and twice the
|
|
115
|
+
* distance of the GC fraction from the middle of the band. The lowest wins, and of equals the shortest.
|
|
116
|
+
*
|
|
117
|
+
* @param report - A candidate.
|
|
118
|
+
* @param targetTm - The melting temperature aimed for.
|
|
119
|
+
* @param limits - The band GC content should be in.
|
|
120
|
+
* @returns The terms and their sum.
|
|
121
|
+
*/
|
|
122
|
+
export declare function scoreCandidate(report: PrimerReport, targetTm?: number, limits?: PrimerLimits): ScoredCandidate;
|
|
123
|
+
/** A place a primer's 3′ end matches a template. */
|
|
124
|
+
export interface BindingPlace {
|
|
125
|
+
/** The bases before the matched bases, and one past them. Past the template's length if it runs through the origin. */
|
|
126
|
+
start: number;
|
|
127
|
+
end: number;
|
|
128
|
+
/** `top` if the primer reads as the top strand there, and so is copied rightwards; `bottom` the other way. */
|
|
129
|
+
reads: "top" | "bottom";
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Every place the bases at a primer's 3′ end match a template, on either strand.
|
|
133
|
+
*
|
|
134
|
+
* `primerBinding` answers only when there is exactly one. This lists them all, since a second place
|
|
135
|
+
* is exactly what a designer needs to hear about, and looks through a circle's origin as well.
|
|
136
|
+
*
|
|
137
|
+
* @param template - The template.
|
|
138
|
+
* @param primer - The primer, 5′ to 3′.
|
|
139
|
+
* @param least - How many bases at its 3′ end to look for.
|
|
140
|
+
* @returns Each place, in order along the template.
|
|
141
|
+
*/
|
|
142
|
+
export declare function bindingPlaces(template: {
|
|
143
|
+
sequence: string;
|
|
144
|
+
circular: boolean;
|
|
145
|
+
}, primer: string, least?: number): BindingPlace[];
|
|
146
|
+
/** Two strands laid antiparallel, as they would pair: one written 5′ to 3′, the other under it 3′ to 5′. */
|
|
147
|
+
export interface PairedStrands {
|
|
148
|
+
/** The upper strand, 5′ to 3′. */
|
|
149
|
+
upper: string;
|
|
150
|
+
/** The lower strand, written 3′ to 5′, so that each base is under the one it would pair with. */
|
|
151
|
+
lower: string;
|
|
152
|
+
/** Which column of the upper strand the lower strand's first written base sits under, for the longest run. It may be negative. */
|
|
153
|
+
shift: number;
|
|
154
|
+
/** The longest run of bases that pair, as the column it starts at and how many there are. */
|
|
155
|
+
from: number;
|
|
156
|
+
length: number;
|
|
157
|
+
/** The longest run that takes in a 3′ end of either strand, where pairing gives the polymerase something to extend. */
|
|
158
|
+
endShift: number;
|
|
159
|
+
endFrom: number;
|
|
160
|
+
endLength: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* How well two primers pair with each other: the longest run of bases that would.
|
|
164
|
+
*
|
|
165
|
+
* One is slid along the other, antiparallel, and at each place the runs of pairing bases are
|
|
166
|
+
* counted. Given the same primer twice it measures what the engine's `selfComplementarity` measures,
|
|
167
|
+
* and also says where the run is, so that it can be written out. It counts pairing bases; it is not
|
|
168
|
+
* a folding energy.
|
|
169
|
+
*
|
|
170
|
+
* @param first - One primer, 5′ to 3′.
|
|
171
|
+
* @param second - The other, 5′ to 3′. The same primer again for how it pairs with itself.
|
|
172
|
+
* @returns The two strands as they pair best, the longest run, and the longest run that reaches a 3′ end.
|
|
173
|
+
*/
|
|
174
|
+
export declare function pairedStrands(first: string, second: string): PairedStrands;
|
|
175
|
+
/** The stretches of a part that somebody might want to amplify: what is marked on it. */
|
|
176
|
+
export interface FeatureStretch extends Stretch {
|
|
177
|
+
/** What the feature is called and what kind of thing it is. */
|
|
178
|
+
label: string;
|
|
179
|
+
type: string;
|
|
180
|
+
/** How long it is. */
|
|
181
|
+
length: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The features of a part that could be amplified whole, each as a stretch.
|
|
185
|
+
*
|
|
186
|
+
* A feature in several pieces is taken from the start of its first to the end of its last, since
|
|
187
|
+
* that is what amplifying it means. Primer sites and anything too short to hold two primers are left out.
|
|
188
|
+
*
|
|
189
|
+
* @param part - The part.
|
|
190
|
+
* @param least - The shortest stretch worth offering.
|
|
191
|
+
* @returns The stretches, in the order the features are marked.
|
|
192
|
+
*/
|
|
193
|
+
export declare function featureStretches(part: {
|
|
194
|
+
length: number;
|
|
195
|
+
circular: boolean;
|
|
196
|
+
features: readonly PartFeature[];
|
|
197
|
+
}, least?: number): FeatureStretch[];
|
|
198
|
+
/**
|
|
199
|
+
* Design a pair of primers for a stretch of a template, keeping everything that was considered.
|
|
200
|
+
*
|
|
201
|
+
* @param template - The template, and whether it is a circle.
|
|
202
|
+
* @param stretch - The stretch to amplify.
|
|
203
|
+
* @param ask - The melting temperature aimed for, the lengths to consider, and any length to use instead of the best.
|
|
204
|
+
* @returns The design, or `null` if the stretch is not one of that template or no length in range gives a usable primer at one of its ends.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```ts
|
|
208
|
+
* import { designPair } from "@biolibs/bionet-tools";
|
|
209
|
+
*
|
|
210
|
+
* const design = designPair({ sequence: plasmid, circular: true }, { start: 306, end: 1086 });
|
|
211
|
+
* design?.forward.chosen.report.sequence; // the forward primer, 5′ to 3′
|
|
212
|
+
* design?.forward.why; // why that length won
|
|
213
|
+
* design?.warnings; // what a careful person would stop at
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
export declare function designPair(template: {
|
|
217
|
+
sequence: string;
|
|
218
|
+
circular: boolean;
|
|
219
|
+
}, stretch: Stretch, ask?: DesignAsk): PrimerDesign | null;
|
|
220
|
+
/** How far apart two primers' melting temperatures may be before it is worth saying. */
|
|
221
|
+
export declare const TM_APART_LOOK = 3;
|
|
222
|
+
/** How far apart they may be before one annealing temperature will not suit both. */
|
|
223
|
+
export declare const TM_APART_STOP = 5;
|
|
224
|
+
/** The shortest 3′ end worth looking for a second binding place with. */
|
|
225
|
+
export declare const SECOND_PLACE_BASES = 12;
|
|
226
|
+
/**
|
|
227
|
+
* What a careful person would stop at in a design.
|
|
228
|
+
*
|
|
229
|
+
* Each primer's own warnings are the engine's. Added to them are the ones that are about the pair or
|
|
230
|
+
* about this template: melting temperatures too far apart, the two primers pairing with each other,
|
|
231
|
+
* a primer whose 3′ end is found in more than one place, and primers that overlap because the
|
|
232
|
+
* stretch is short.
|
|
233
|
+
*
|
|
234
|
+
* @param template - The template.
|
|
235
|
+
* @param design - The design, without its warnings.
|
|
236
|
+
* @param limits - The thresholds.
|
|
237
|
+
* @returns The warnings, the worst first.
|
|
238
|
+
*/
|
|
239
|
+
export declare function designWarnings(template: {
|
|
240
|
+
sequence: string;
|
|
241
|
+
circular: boolean;
|
|
242
|
+
}, design: Omit<PrimerDesign, "warnings">, limits?: PrimerLimits): DesignWarning[];
|
|
243
|
+
/** What to ask the lab to hold for a designed pair: two parts, and what to call them. */
|
|
244
|
+
export interface PrimerOrder {
|
|
245
|
+
/** Each primer as a part to add: its name, its bases 5′ to 3′, and that it is a line. */
|
|
246
|
+
parts: [{
|
|
247
|
+
name: string;
|
|
248
|
+
sequence: string;
|
|
249
|
+
circular: false;
|
|
250
|
+
}, {
|
|
251
|
+
name: string;
|
|
252
|
+
sequence: string;
|
|
253
|
+
circular: false;
|
|
254
|
+
}];
|
|
255
|
+
/** The pair as lines to send to whoever makes them: a name, a tab, and the bases 5′ to 3′. */
|
|
256
|
+
lines: [string, string];
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* A designed pair, as what the lab is asked to hold and what is sent to be made.
|
|
260
|
+
*
|
|
261
|
+
* Primers are ordered, not made at the bench. So this is two parts, known by their sequences like
|
|
262
|
+
* any other, and nothing here is a run: a tube of one that is added later is a tube that arrived.
|
|
263
|
+
*
|
|
264
|
+
* @param design - The design.
|
|
265
|
+
* @param names - What to call the two primers. Named after `base` with -F and -R if not given.
|
|
266
|
+
* @returns The parts to add, and the lines of an order.
|
|
267
|
+
*/
|
|
268
|
+
export declare function primerOrder(design: PrimerDesign, names?: {
|
|
269
|
+
base?: string;
|
|
270
|
+
forward?: string;
|
|
271
|
+
reverse?: string;
|
|
272
|
+
}): PrimerOrder;
|
|
273
|
+
//# sourceMappingURL=primer-design.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primer-design.d.ts","sourceRoot":"","sources":["../src/primer-design.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEpE,oHAAoH;AACpH,MAAM,WAAW,OAAO;IACtB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,sCAAsC;AACtC,MAAM,WAAW,SAAS;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EA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,KAAK,EAAE,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAA;KAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAClH,8FAA8F;IAC9F,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,WAAW,CAMhI"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { DEFAULT_DESIGN, PRIMER_LIMITS, bestCandidate, primerCandidates, reverseComplement, tmDifference } from "@biolibs/pcr";
|
|
2
|
+
const upper = (bases) => bases.replace(/\s+/g, "").toUpperCase();
|
|
3
|
+
const count = (value) => value.toLocaleString("en-US");
|
|
4
|
+
/**
|
|
5
|
+
* How long a stretch is.
|
|
6
|
+
*
|
|
7
|
+
* @param stretch - The stretch.
|
|
8
|
+
* @param template - How long the template is, and whether it is a circle.
|
|
9
|
+
* @returns Its length in bases, or 0 if it is not a stretch of that template.
|
|
10
|
+
*/
|
|
11
|
+
export function stretchLength(stretch, template) {
|
|
12
|
+
const { start, end } = stretch;
|
|
13
|
+
if (!Number.isInteger(start) || !Number.isInteger(end) || start < 0 || end < 0 || start >= template.length || end > template.length)
|
|
14
|
+
return 0;
|
|
15
|
+
if (end > start)
|
|
16
|
+
return end - start;
|
|
17
|
+
return template.circular ? template.length - start + end : 0;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The bases of a stretch, read along the top strand.
|
|
21
|
+
*
|
|
22
|
+
* @param template - The template.
|
|
23
|
+
* @param stretch - The stretch.
|
|
24
|
+
* @returns Its bases, running on through the origin if the stretch does. Empty if it is not a stretch of that template.
|
|
25
|
+
*/
|
|
26
|
+
export function stretchBases(template, stretch) {
|
|
27
|
+
const top = upper(template.sequence);
|
|
28
|
+
if (stretchLength(stretch, { length: top.length, circular: template.circular }) === 0)
|
|
29
|
+
return "";
|
|
30
|
+
return stretch.end > stretch.start ? top.slice(stretch.start, stretch.end) : top.slice(stretch.start) + top.slice(0, stretch.end);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The score a candidate is ranked by, term by term.
|
|
34
|
+
*
|
|
35
|
+
* This is the rule `@biolibs/pcr` chooses by, written out so that it can be shown: distance from the
|
|
36
|
+
* melting temperature aimed for, in degrees; 2 for a 3′ end that is not G or C; and twice the
|
|
37
|
+
* distance of the GC fraction from the middle of the band. The lowest wins, and of equals the shortest.
|
|
38
|
+
*
|
|
39
|
+
* @param report - A candidate.
|
|
40
|
+
* @param targetTm - The melting temperature aimed for.
|
|
41
|
+
* @param limits - The band GC content should be in.
|
|
42
|
+
* @returns The terms and their sum.
|
|
43
|
+
*/
|
|
44
|
+
export function scoreCandidate(report, targetTm = DEFAULT_DESIGN.targetTm, limits = PRIMER_LIMITS) {
|
|
45
|
+
const offTarget = Math.abs(report.tm - targetTm);
|
|
46
|
+
const clamp = report.gcClamp ? 0 : 2;
|
|
47
|
+
const gc = Math.abs(report.gc - (limits.minGc + limits.maxGc) / 2) * 2;
|
|
48
|
+
return { report, offTarget, clamp, gc, score: offTarget + clamp + gc };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Every place the bases at a primer's 3′ end match a template, on either strand.
|
|
52
|
+
*
|
|
53
|
+
* `primerBinding` answers only when there is exactly one. This lists them all, since a second place
|
|
54
|
+
* is exactly what a designer needs to hear about, and looks through a circle's origin as well.
|
|
55
|
+
*
|
|
56
|
+
* @param template - The template.
|
|
57
|
+
* @param primer - The primer, 5′ to 3′.
|
|
58
|
+
* @param least - How many bases at its 3′ end to look for.
|
|
59
|
+
* @returns Each place, in order along the template.
|
|
60
|
+
*/
|
|
61
|
+
export function bindingPlaces(template, primer, least = 18) {
|
|
62
|
+
const top = upper(template.sequence);
|
|
63
|
+
const bases = upper(primer);
|
|
64
|
+
if (least < 1 || bases.length < least || top.length < least)
|
|
65
|
+
return [];
|
|
66
|
+
// A circle is read on past its origin by as much as a match could overhang it.
|
|
67
|
+
const read = template.circular ? top + top.slice(0, least - 1) : top;
|
|
68
|
+
const end3 = bases.slice(-least);
|
|
69
|
+
const found = [];
|
|
70
|
+
const look = (needle, reads) => {
|
|
71
|
+
for (let at = read.indexOf(needle); at !== -1; at = read.indexOf(needle, at + 1))
|
|
72
|
+
found.push({ start: at, end: at + least, reads });
|
|
73
|
+
};
|
|
74
|
+
look(end3, "top");
|
|
75
|
+
look(reverseComplement(end3), "bottom");
|
|
76
|
+
return found.sort((a, b) => a.start - b.start);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* How well two primers pair with each other: the longest run of bases that would.
|
|
80
|
+
*
|
|
81
|
+
* One is slid along the other, antiparallel, and at each place the runs of pairing bases are
|
|
82
|
+
* counted. Given the same primer twice it measures what the engine's `selfComplementarity` measures,
|
|
83
|
+
* and also says where the run is, so that it can be written out. It counts pairing bases; it is not
|
|
84
|
+
* a folding energy.
|
|
85
|
+
*
|
|
86
|
+
* @param first - One primer, 5′ to 3′.
|
|
87
|
+
* @param second - The other, 5′ to 3′. The same primer again for how it pairs with itself.
|
|
88
|
+
* @returns The two strands as they pair best, the longest run, and the longest run that reaches a 3′ end.
|
|
89
|
+
*/
|
|
90
|
+
export function pairedStrands(first, second) {
|
|
91
|
+
const a = upper(first);
|
|
92
|
+
const b = upper(second);
|
|
93
|
+
// The second strand written backwards is 3′ to 5′; a base pairs with the one whose complement it is.
|
|
94
|
+
const lower = [...b].reverse().join("");
|
|
95
|
+
const pairs = (x, y) => reverseComplement(x) === y && "ACGT".includes(x);
|
|
96
|
+
let best = { shift: 0, from: 0, length: 0 };
|
|
97
|
+
let end = { shift: 0, from: 0, length: 0 };
|
|
98
|
+
for (let shift = -(lower.length - 1); shift < a.length; shift++) {
|
|
99
|
+
let run = 0;
|
|
100
|
+
for (let column = Math.max(0, shift); column < Math.min(a.length, shift + lower.length); column++) {
|
|
101
|
+
run = pairs(a[column], lower[column - shift]) ? run + 1 : 0;
|
|
102
|
+
if (run === 0)
|
|
103
|
+
continue;
|
|
104
|
+
const from = column - run + 1;
|
|
105
|
+
if (run > best.length)
|
|
106
|
+
best = { shift, from, length: run };
|
|
107
|
+
// The upper strand's 3′ end is its last column; the lower strand's, written backwards, is its first.
|
|
108
|
+
const reachesEnd = column === a.length - 1 || from - shift === 0;
|
|
109
|
+
if (reachesEnd && run > end.length)
|
|
110
|
+
end = { shift, from, length: run };
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { upper: a, lower, shift: best.shift, from: best.from, length: best.length, endShift: end.shift, endFrom: end.from, endLength: end.length };
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The features of a part that could be amplified whole, each as a stretch.
|
|
117
|
+
*
|
|
118
|
+
* A feature in several pieces is taken from the start of its first to the end of its last, since
|
|
119
|
+
* that is what amplifying it means. Primer sites and anything too short to hold two primers are left out.
|
|
120
|
+
*
|
|
121
|
+
* @param part - The part.
|
|
122
|
+
* @param least - The shortest stretch worth offering.
|
|
123
|
+
* @returns The stretches, in the order the features are marked.
|
|
124
|
+
*/
|
|
125
|
+
export function featureStretches(part, least = 2 * DEFAULT_DESIGN.minLength) {
|
|
126
|
+
return part.features.flatMap((feature) => {
|
|
127
|
+
const first = feature.parts[0];
|
|
128
|
+
const last = feature.parts.at(-1);
|
|
129
|
+
if (first === undefined || last === undefined || feature.type === "primer_bind")
|
|
130
|
+
return [];
|
|
131
|
+
const stretch = { start: first.start, end: last.end };
|
|
132
|
+
const length = stretchLength(stretch, part);
|
|
133
|
+
return length < least ? [] : [{ ...stretch, label: feature.label, type: feature.type, length }];
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/** Why the best candidate won, said for a person. */
|
|
137
|
+
function whyBest(best, candidates, targetTm) {
|
|
138
|
+
const next = [...candidates].filter((one) => one !== best).sort((a, b) => a.score - b.score)[0];
|
|
139
|
+
const tm = `${best.report.tm.toFixed(1)} °C is ${best.offTarget.toFixed(1)} from the ${targetTm} °C aimed for`;
|
|
140
|
+
const clamp = best.report.gcClamp ? `it ends in ${best.report.sequence.at(-1)}` : "it does not end in G or C, which costs it 2";
|
|
141
|
+
const head = `${best.report.length} bases scores lowest, at ${best.score.toFixed(2)}: ${tm}, ${clamp}, and its GC content is ${(best.report.gc * 100).toFixed(0)}%.`;
|
|
142
|
+
if (next === undefined)
|
|
143
|
+
return `${head} It was the only length that could be used.`;
|
|
144
|
+
const tie = next.score === best.score ? ` ${next.report.length} bases scores the same, and the shorter is taken.` : ` The next best is ${next.report.length} bases, at ${next.score.toFixed(2)}.`;
|
|
145
|
+
return head + tie;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Design a pair of primers for a stretch of a template, keeping everything that was considered.
|
|
149
|
+
*
|
|
150
|
+
* @param template - The template, and whether it is a circle.
|
|
151
|
+
* @param stretch - The stretch to amplify.
|
|
152
|
+
* @param ask - The melting temperature aimed for, the lengths to consider, and any length to use instead of the best.
|
|
153
|
+
* @returns The design, or `null` if the stretch is not one of that template or no length in range gives a usable primer at one of its ends.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* import { designPair } from "@biolibs/bionet-tools";
|
|
158
|
+
*
|
|
159
|
+
* const design = designPair({ sequence: plasmid, circular: true }, { start: 306, end: 1086 });
|
|
160
|
+
* design?.forward.chosen.report.sequence; // the forward primer, 5′ to 3′
|
|
161
|
+
* design?.forward.why; // why that length won
|
|
162
|
+
* design?.warnings; // what a careful person would stop at
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export function designPair(template, stretch, ask = {}) {
|
|
166
|
+
const top = upper(template.sequence);
|
|
167
|
+
const within = { length: top.length, circular: template.circular };
|
|
168
|
+
const length = stretchLength(stretch, within);
|
|
169
|
+
const bases = stretchBases(template, stretch);
|
|
170
|
+
if (length === 0)
|
|
171
|
+
return null;
|
|
172
|
+
const targetTm = ask.targetTm ?? DEFAULT_DESIGN.targetTm;
|
|
173
|
+
const minLength = Math.max(8, Math.floor(ask.minLength ?? DEFAULT_DESIGN.minLength));
|
|
174
|
+
const maxLength = Math.max(minLength, Math.floor(ask.maxLength ?? DEFAULT_DESIGN.maxLength));
|
|
175
|
+
const options = { targetTm, minLength, maxLength };
|
|
176
|
+
const wraps = stretch.end <= stretch.start;
|
|
177
|
+
const one = (which, anchored, wanted) => {
|
|
178
|
+
const reports = primerCandidates(anchored, options);
|
|
179
|
+
const picked = bestCandidate(reports, options);
|
|
180
|
+
if (picked === null)
|
|
181
|
+
return null;
|
|
182
|
+
const candidates = reports.map((report) => scoreCandidate(report, targetTm));
|
|
183
|
+
const best = candidates.find((each) => each.report === picked);
|
|
184
|
+
const chosen = candidates.find((each) => each.report.length === wanted) ?? best;
|
|
185
|
+
const far = stretch.start + length;
|
|
186
|
+
const [start, end] = which === "forward" ? [stretch.start, stretch.start + chosen.report.length] : [far - chosen.report.length, far];
|
|
187
|
+
return { which, candidates, best, chosen, start, end, why: whyBest(best, candidates, targetTm) };
|
|
188
|
+
};
|
|
189
|
+
const forward = one("forward", bases, ask.forwardLength);
|
|
190
|
+
const reverse = one("reverse", reverseComplement(bases), ask.reverseLength);
|
|
191
|
+
if (forward === null || reverse === null)
|
|
192
|
+
return null;
|
|
193
|
+
const tmApart = tmDifference(forward.chosen.report, reverse.chosen.report);
|
|
194
|
+
const design = { stretch, wraps, length, targetTm, forward, reverse, tmApart };
|
|
195
|
+
return { ...design, warnings: designWarnings(template, design) };
|
|
196
|
+
}
|
|
197
|
+
/** How far apart two primers' melting temperatures may be before it is worth saying. */
|
|
198
|
+
export const TM_APART_LOOK = 3;
|
|
199
|
+
/** How far apart they may be before one annealing temperature will not suit both. */
|
|
200
|
+
export const TM_APART_STOP = 5;
|
|
201
|
+
/** The shortest 3′ end worth looking for a second binding place with. */
|
|
202
|
+
export const SECOND_PLACE_BASES = 12;
|
|
203
|
+
/**
|
|
204
|
+
* What a careful person would stop at in a design.
|
|
205
|
+
*
|
|
206
|
+
* Each primer's own warnings are the engine's. Added to them are the ones that are about the pair or
|
|
207
|
+
* about this template: melting temperatures too far apart, the two primers pairing with each other,
|
|
208
|
+
* a primer whose 3′ end is found in more than one place, and primers that overlap because the
|
|
209
|
+
* stretch is short.
|
|
210
|
+
*
|
|
211
|
+
* @param template - The template.
|
|
212
|
+
* @param design - The design, without its warnings.
|
|
213
|
+
* @param limits - The thresholds.
|
|
214
|
+
* @returns The warnings, the worst first.
|
|
215
|
+
*/
|
|
216
|
+
export function designWarnings(template, design, limits = PRIMER_LIMITS) {
|
|
217
|
+
const warnings = [];
|
|
218
|
+
const ends = [design.forward, design.reverse];
|
|
219
|
+
const size = upper(template.sequence).length;
|
|
220
|
+
if (design.tmApart > TM_APART_LOOK) {
|
|
221
|
+
const [cool, warm] = [...ends].sort((a, b) => a.chosen.report.tm - b.chosen.report.tm);
|
|
222
|
+
warnings.push({ about: "pair", weight: design.tmApart > TM_APART_STOP ? "stop" : "look",
|
|
223
|
+
says: `The melting temperatures are ${design.tmApart.toFixed(1)} °C apart: the ${cool.which} primer at ${cool.chosen.report.tm.toFixed(1)} °C and the ${warm.which} at ${warm.chosen.report.tm.toFixed(1)} °C. `
|
|
224
|
+
+ (design.tmApart > TM_APART_STOP ? "No one annealing temperature suits both. Try another length for one of them." : "They will anneal together, but a closer pair is more forgiving.") });
|
|
225
|
+
}
|
|
226
|
+
const cross = pairedStrands(design.forward.chosen.report.sequence, design.reverse.chosen.report.sequence);
|
|
227
|
+
if (cross.endLength > limits.maxEndSelfComplement) {
|
|
228
|
+
warnings.push({ about: "pair", weight: "stop", says: `${cross.endLength} bases at a 3′ end pair with the other primer. The polymerase can extend that, making a primer dimer in place of the product.` });
|
|
229
|
+
}
|
|
230
|
+
else if (cross.length > limits.maxSelfComplement) {
|
|
231
|
+
warnings.push({ about: "pair", weight: "look", says: `${cross.length} bases of one primer pair with the other, so some of each will be tied up as a dimer.` });
|
|
232
|
+
}
|
|
233
|
+
if (design.forward.chosen.report.length + design.reverse.chosen.report.length > design.length) {
|
|
234
|
+
warnings.push({ about: "pair", weight: "stop", says: `The stretch is ${count(design.length)} bases and the two primers come to ${design.forward.chosen.report.length + design.reverse.chosen.report.length}, so they overlap and would pair with each other. Choose a longer stretch.` });
|
|
235
|
+
}
|
|
236
|
+
for (const end of ends) {
|
|
237
|
+
const primer = end.chosen.report.sequence;
|
|
238
|
+
const sure = bindingPlaces(template, primer, Math.min(18, primer.length));
|
|
239
|
+
const loose = bindingPlaces(template, primer, Math.min(SECOND_PLACE_BASES, primer.length));
|
|
240
|
+
if (sure.length > 1) {
|
|
241
|
+
warnings.push({ about: end.which, weight: "stop", says: `The ${end.which} primer's last ${Math.min(18, primer.length)} bases are found in ${sure.length} places on this template, at ${sure.map((place) => count(place.start + 1)).join(" and ")}. It would make more than one product.` });
|
|
242
|
+
}
|
|
243
|
+
else if (loose.length > 1) {
|
|
244
|
+
// Its own place is where its 3′ end lies in the design; anywhere else is the second place.
|
|
245
|
+
const own = (end.which === "forward" ? end.end - SECOND_PLACE_BASES : end.start) % size;
|
|
246
|
+
const others = loose.filter((place) => place.start % size !== own);
|
|
247
|
+
warnings.push({ about: end.which, weight: "look", says: `The ${end.which} primer's last ${SECOND_PLACE_BASES} bases are also found at base ${others.map((place) => count(place.start + 1)).join(" and ")}. At a low annealing temperature it could start there too.` });
|
|
248
|
+
}
|
|
249
|
+
for (const says of end.chosen.report.warnings) {
|
|
250
|
+
const grave = says.includes("3' end are self-complementary") || says.includes("melting temperature");
|
|
251
|
+
warnings.push({ about: end.which, weight: grave ? "stop" : "look", says: `The ${end.which} primer: ${says.replace(/3' end/g, "3′ end")}.` });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return warnings.sort((a, b) => Number(b.weight === "stop") - Number(a.weight === "stop"));
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* A designed pair, as what the lab is asked to hold and what is sent to be made.
|
|
258
|
+
*
|
|
259
|
+
* Primers are ordered, not made at the bench. So this is two parts, known by their sequences like
|
|
260
|
+
* any other, and nothing here is a run: a tube of one that is added later is a tube that arrived.
|
|
261
|
+
*
|
|
262
|
+
* @param design - The design.
|
|
263
|
+
* @param names - What to call the two primers. Named after `base` with -F and -R if not given.
|
|
264
|
+
* @returns The parts to add, and the lines of an order.
|
|
265
|
+
*/
|
|
266
|
+
export function primerOrder(design, names = {}) {
|
|
267
|
+
const base = (names.base ?? "").trim() || "primer";
|
|
268
|
+
const called = (typed, usual) => ((typed ?? "").trim() || usual).slice(0, 200);
|
|
269
|
+
const forward = { name: called(names.forward, `${base}-F`), sequence: design.forward.chosen.report.sequence, circular: false };
|
|
270
|
+
const reverse = { name: called(names.reverse, `${base}-R`), sequence: design.reverse.chosen.report.sequence, circular: false };
|
|
271
|
+
return { parts: [forward, reverse], lines: [`${forward.name}\t${forward.sequence}`, `${reverse.name}\t${reverse.sequence}`] };
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=primer-design.js.map
|