@biolibs/bionet-tools 0.0.0-stage → 0.1.1

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.
Files changed (48) hide show
  1. package/README.md +104 -2
  2. package/dist/digest-tool.d.ts +30 -0
  3. package/dist/digest-tool.d.ts.map +1 -0
  4. package/dist/digest-tool.js +84 -0
  5. package/dist/digest-tool.js.map +1 -0
  6. package/dist/digest.d.ts +94 -0
  7. package/dist/digest.d.ts.map +1 -0
  8. package/dist/digest.js +115 -0
  9. package/dist/digest.js.map +1 -0
  10. package/dist/index.d.ts +29 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +29 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/pcr-bench.d.ts +94 -0
  15. package/dist/pcr-bench.d.ts.map +1 -0
  16. package/dist/pcr-bench.js +187 -0
  17. package/dist/pcr-bench.js.map +1 -0
  18. package/dist/pcr-scene.d.ts +247 -0
  19. package/dist/pcr-scene.d.ts.map +1 -0
  20. package/dist/pcr-scene.js +287 -0
  21. package/dist/pcr-scene.js.map +1 -0
  22. package/dist/pcr-tool.d.ts +18 -0
  23. package/dist/pcr-tool.d.ts.map +1 -0
  24. package/dist/pcr-tool.js +73 -0
  25. package/dist/pcr-tool.js.map +1 -0
  26. package/dist/pcr.d.ts +59 -0
  27. package/dist/pcr.d.ts.map +1 -0
  28. package/dist/pcr.js +79 -0
  29. package/dist/pcr.js.map +1 -0
  30. package/dist/run.d.ts +161 -0
  31. package/dist/run.d.ts.map +1 -0
  32. package/dist/run.js +143 -0
  33. package/dist/run.js.map +1 -0
  34. package/dist/tools.d.ts +27 -0
  35. package/dist/tools.d.ts.map +1 -0
  36. package/dist/tools.js +45 -0
  37. package/dist/tools.js.map +1 -0
  38. package/package.json +61 -4
  39. package/src/digest-tool.tsx +199 -0
  40. package/src/digest.ts +136 -0
  41. package/src/index.ts +28 -0
  42. package/src/pcr-bench.tsx +350 -0
  43. package/src/pcr-scene.ts +408 -0
  44. package/src/pcr-tool.tsx +160 -0
  45. package/src/pcr.ts +87 -0
  46. package/src/run.ts +234 -0
  47. package/src/tools.tsx +64 -0
  48. package/tools.css +50 -0
package/README.md CHANGED
@@ -1,3 +1,105 @@
1
- # Temporary Holding Version
1
+ # @biolibs/bionet-tools
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The tools a lab uses at the bench, tied to its freezer: PCR, and a check digest with its gel. For PCR, choose a template and two primers from the tubes the lab holds, see what they would make, and record the run. The template and primers drop by what was used, and the product becomes a new tube that knows which run made it.
4
+
5
+ ```
6
+ npm install @biolibs/bionet-tools @biolibs/bionet-panels @biolibs/bionet-react @biolibs/bionet-theme react
7
+ ```
8
+
9
+ ## What a PCR would make
10
+
11
+ ```ts
12
+ import { planPcr, primerTm } from "@biolibs/bionet-tools";
13
+
14
+ const template = "GGATCACAGTCTACACTGCTCACTCCAACCCCGGCCCCTGAGTCCGAGGAGAGGGTGCTTCAGAGTATGTATACC";
15
+ const plan = planPcr({ sequence: template, circular: false }, "GGATCACAGTCTACACTG", "GGTATACATACTCTGAAG");
16
+ plan.problem; // null
17
+ plan.products[0].length; // 75
18
+ primerTm("GGATCACAGTCTACACTG"); // 54
19
+ ```
20
+
21
+ `planPcr` takes sequences and returns sequences, using the engine in `@biolibs/assembly2` that the cloning plans use. The primers may be given in either order. If they do not make exactly one product, `problem` says why in words.
22
+
23
+ ## From the freezer to a recorded run
24
+
25
+ ```ts
26
+ import { pcrRun, pcrTubes } from "@biolibs/bionet-tools";
27
+
28
+ const { templates, primers } = pcrTubes(lab); // lab is the `lab` of a client's snapshot
29
+ const run = pcrRun(lab, { template: templates[0].item, forward: primers[0].item, reverse: primers[1].item });
30
+ run.plan?.products[0]?.length; // what it would make
31
+ if (run.worked !== null) await act("recordRun", run.worked);
32
+ ```
33
+
34
+ `pcrTubes` offers short linear parts as primers and the rest as templates. `pcrRun` works a choice out into what to hand the lab's `recordRun`: `worked` when there is exactly one product, and `failed` for a run that was done and gave nothing, which still used the tubes.
35
+
36
+ ## A PCR at the machine
37
+
38
+ ```tsx
39
+ import { InstrumentStage } from "@biolibs/bionet-scene";
40
+ import { usePcrBench } from "@biolibs/bionet-tools";
41
+
42
+ const bench = usePcrBench({ instrument });
43
+ <InstrumentStage {...bench.stage}>{bench.panel}</InstrumentStage>
44
+ ```
45
+
46
+ `usePcrBench` is a PCR as a person at the machine meets it. `stage` is what a scene is told to show:
47
+ the programme on the screen, the well that is taken, the strands in the tube. `panel` is what goes
48
+ beside it, and keeps four things apart: what the **machine** shows, what is true of this **run**, the
49
+ **checks** a careful operator would make, and what is going on, for somebody new. This package does
50
+ not depend on three.js; the scene comes from `@biolibs/bionet-scene`.
51
+
52
+ The pieces are plain functions:
53
+
54
+ ```ts
55
+ import { primerBinding, programmeChecks, screenOf, strandCounts, suggestProgramme, tubeView } from "@biolibs/bionet-tools";
56
+
57
+ const programme = suggestProgramme({ length: 1500, primers: [{ name: "fwd", tm: 60 }, { name: "rev", tm: 58 }] });
58
+ programme.steps[1]; // { name: "anneal", celsius: 53, seconds: 30 }
59
+ screenOf(programme)[3].text; // " Anneal 53 °C 0:30"
60
+ programmeChecks(programme, { length: 1500, primers: [{ name: "fwd", tm: 60 }, { name: "rev", tm: 58 }] }); // []
61
+ strandCounts(3); // { template: 2, long: 6, product: 8 }
62
+ ```
63
+
64
+ `tubeView` says what is in the tube at each step of each cycle, including the thing people find
65
+ hardest to picture: the first cycle's copies run on too far, the second makes the first strands of
66
+ exactly the product's length, and from the third the product takes over. The programme a run was
67
+ set to is kept with the run.
68
+
69
+ ## A digest and its gel
70
+
71
+ ```ts
72
+ import { cutters, digestRun, planDigest } from "@biolibs/bionet-tools";
73
+
74
+ const plan = planDigest({ sequence: "AAAAAAAAAAGAATTCAAAAAAAAAAAAAAAAAAAAGGATCCAAAAAAAAAA", circular: true }, ["EcoRI", "BamHI"]);
75
+ plan.fragments; // [ 26, 26 ]
76
+ plan.problem; // null
77
+
78
+ cutters(part); // the usual enzymes that cut a part, fewest cuts first
79
+ const run = digestRun(lab, { tube, enzymes: ["EcoRI"] }); // what to record, if the gel matched or did not
80
+ ```
81
+
82
+ `planDigest` gives the cuts, the pieces, and the bands they and a ladder would show on a gel, from
83
+ `@biolibs/restriction` and `@biolibs/gel`. A digest here is a check: recording it uses some of the
84
+ tube, makes nothing, and notes which enzymes, what was expected and whether the gel showed it.
85
+ Keeping a cut piece as a tube is not offered, because a part cannot yet say what ends it has.
86
+
87
+ ## The tool
88
+
89
+ ```tsx
90
+ import "@biolibs/bionet-tools/tools.css";
91
+ import { InstrumentTool, PcrTool } from "@biolibs/bionet-tools";
92
+
93
+ <InstrumentTool place={thermocyclerId} onDone={close} /> // the tool for whichever instrument that is
94
+ <Tools /> // every tool, for a lab that has not drawn its room
95
+ <PcrTool /> // or one tool on its own; DigestTool likewise
96
+ ```
97
+
98
+ The tools use the lab's hooks and are drawn with the panels' styles, so they go inside a `LabProvider` and a `LabWindow`. `InstrumentTool` opens PCR for a place whose `model` is `thermocycler` and digest and gel for a `gel-station`, and says so when there is no tool for an instrument yet. `Tools` lists them all, and still records a run at the lab's instrument for that tool if it has placed one.
99
+
100
+ The tools' own descriptions explain their terms on hover, with a picture, through
101
+ [`@biolibs/glossary-react`](../glossary-react). Import its `glossary.css` once as well.
102
+
103
+ ## License
104
+
105
+ MIT
@@ -0,0 +1,30 @@
1
+ import type { Band } from "@biolibs/gel";
2
+ /**
3
+ * A gel, drawn: a ladder in one lane and the digest in the next.
4
+ *
5
+ * @param props - `ladder` and `bands` are what `planDigest` gave; `name` is what the sample is called.
6
+ */
7
+ export declare function Gel({ ladder, bands, name }: {
8
+ ladder: readonly Band[];
9
+ bands: readonly Band[];
10
+ name: string;
11
+ }): import("react").JSX.Element;
12
+ /**
13
+ * Cut a tube's molecule in silico, see the gel it should give, and record whether the real gel matched.
14
+ *
15
+ * Choose a tube and one or more enzymes. The enzymes usually on a shelf that cut it are offered,
16
+ * the ones that cut fewest times first, and any other can be named. The pieces are listed and drawn
17
+ * as a gel beside a ladder. Recording takes what was used from the tube and notes whether the gel
18
+ * showed what was expected; nothing is made.
19
+ *
20
+ * @param props - `instrument` is the gel station it is run at, if the lab has one; `onDone` adds a
21
+ * way to leave.
22
+ */
23
+ export declare function DigestTool({ instrument, onDone }: {
24
+ instrument?: {
25
+ id: string;
26
+ name: string;
27
+ } | null;
28
+ onDone?: () => void;
29
+ }): import("react").JSX.Element | null;
30
+ //# sourceMappingURL=digest-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest-tool.d.ts","sourceRoot":"","sources":["../src/digest-tool.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,+BAwB7G;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,UAAiB,EAAE,MAAM,EAAE,EAAE;IAAE,UAAU,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sCA4IlI"}
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * A check digest from the freezer, with the gel it should give.
5
+ *
6
+ * Like the PCR tool it holds only what has been chosen. The pieces and the gel come from
7
+ * `planDigest`, and recording is one thing asked of the lab.
8
+ */
9
+ import { useMemo, useState } from "react";
10
+ import { GELS, LADDERS } from "@biolibs/gel";
11
+ import { useAct, useLab } from "@biolibs/bionet-react";
12
+ import { Glossed } from "@biolibs/glossary-react";
13
+ import { cutters, enzymeNamed } from "./digest.js";
14
+ import { digestRun, digestTubes } from "./run.js";
15
+ /**
16
+ * A gel, drawn: a ladder in one lane and the digest in the next.
17
+ *
18
+ * @param props - `ladder` and `bands` are what `planDigest` gave; `name` is what the sample is called.
19
+ */
20
+ export function Gel({ ladder, bands, name }) {
21
+ const [top, height] = [26, 250];
22
+ const lane = (x, drawn, tone, labelled) => drawn.map((band, at) => {
23
+ const y = top + 10 + band.position * (height - 24);
24
+ return (_jsxs("g", { children: [_jsx("rect", { x: x, y: y - 1.6, width: 54, height: 3.2, rx: 1.2, fill: tone, opacity: 0.3 + 0.7 * band.intensity }), _jsxs("text", { x: labelled === "left" ? x - 6 : x + 60, y: y + 3.5, textAnchor: labelled === "left" ? "end" : "start", className: labelled === "left" ? "mark" : "size", children: [band.sizes.length > 1 ? `${band.sizes.join(" + ")}` : band.size, band.unresolved ? " *" : ""] })] }, `${x} ${at}`));
25
+ });
26
+ return (_jsxs("svg", { className: "gel", viewBox: "0 0 330 290", role: "img", "aria-label": `A gel: a ladder beside ${name}, cut into pieces of ${bands.flatMap((band) => band.sizes).join(", ")} base pairs`, children: [_jsx("rect", { x: 52, y: top, width: 176, height: height, rx: 6, className: "slab" }), _jsx("text", { x: 89, y: 16, textAnchor: "middle", className: "lane", children: "ladder" }), _jsx("text", { x: 177, y: 16, textAnchor: "middle", className: "lane", children: name.length > 16 ? `${name.slice(0, 15)}…` : name }), _jsx("rect", { x: 62, y: top + 4, width: 54, height: 4, className: "well" }), _jsx("rect", { x: 150, y: top + 4, width: 54, height: 4, className: "well" }), lane(62, ladder, "var(--bionet-dim)", "left"), lane(150, bands, "var(--bionet-held)", "right")] }));
27
+ }
28
+ /**
29
+ * Cut a tube's molecule in silico, see the gel it should give, and record whether the real gel matched.
30
+ *
31
+ * Choose a tube and one or more enzymes. The enzymes usually on a shelf that cut it are offered,
32
+ * the ones that cut fewest times first, and any other can be named. The pieces are listed and drawn
33
+ * as a gel beside a ladder. Recording takes what was used from the tube and notes whether the gel
34
+ * showed what was expected; nothing is made.
35
+ *
36
+ * @param props - `instrument` is the gel station it is run at, if the lab has one; `onDone` adds a
37
+ * way to leave.
38
+ */
39
+ export function DigestTool({ instrument = null, onDone }) {
40
+ const lab = useLab()?.lab;
41
+ const act = useAct();
42
+ const [tube, setTube] = useState("");
43
+ const [chosen, setChosen] = useState([]);
44
+ const [other, setOther] = useState("");
45
+ const [unknown, setUnknown] = useState(null);
46
+ const [used, setUsed] = useState("1");
47
+ const [gel, setGel] = useState("1.0");
48
+ const [ladder, setLadder] = useState("1kb");
49
+ const [note, setNote] = useState("");
50
+ const [busy, setBusy] = useState(false);
51
+ const [said, setSaid] = useState(null);
52
+ const tubes = useMemo(() => (lab === null || lab === undefined ? [] : digestTubes(lab)), [lab]);
53
+ const part = tubes.find((one) => one.item === tube)?.part;
54
+ const offered = useMemo(() => (part === undefined ? [] : cutters(part)), [part]);
55
+ const run = useMemo(() => (lab === null || lab === undefined ? null : digestRun(lab, {
56
+ tube, enzymes: chosen, gel, ladder, instrument: instrument?.id ?? null, note, ...(used.trim() === "" ? {} : { used: Number(used) }),
57
+ })), [lab, tube, chosen, gel, ladder, instrument, note, used]);
58
+ if (lab === null || lab === undefined || run === null)
59
+ return null;
60
+ const toggle = (name) => { setChosen(chosen.includes(name) ? chosen.filter((one) => one !== name) : [...chosen, name]); setSaid(null); };
61
+ const record = async (what, done) => {
62
+ if (what === null)
63
+ return;
64
+ setBusy(true);
65
+ const answer = await act("recordRun", what);
66
+ setBusy(false);
67
+ if (answer.ok) {
68
+ setSaid(done);
69
+ setNote("");
70
+ }
71
+ };
72
+ const here = lab.runs.filter((one) => one.kind === "digest" && (instrument === null || one.instrument === instrument.id)).slice(-5).reverse();
73
+ const partName = (item) => lab.parts.find((one) => one.checksum === lab.items.find((each) => each.item === item)?.part)?.name ?? "a tube";
74
+ return (_jsxs("div", { className: "pcr digest", children: [_jsxs("section", { className: "card", children: [_jsxs("div", { className: "toolhead", children: [_jsxs("div", { children: [_jsxs("h2", { children: ["Digest and gel", instrument === null ? "" : ` · ${instrument.name}`] }), _jsx("p", { className: "dim small", children: _jsx(Glossed, { text: "A restriction enzyme cuts DNA wherever its site occurs, and gel electrophoresis sorts the pieces by size. Choose a tube and the enzymes to cut it with. The pieces are worked out from its sequence, and drawn as the gel they should give." }) })] }), onDone !== undefined && _jsx("button", { type: "button", className: "quiet", onClick: onDone, children: "Back to the lab" })] }), tubes.length === 0 ? _jsx("p", { className: "empty", children: "There are no tubes to digest. Add a part and a tube of it on the Freezer tab." }) : (_jsxs("fieldset", { disabled: busy, className: "choose", children: [_jsxs("div", { className: "tube", children: [_jsxs("label", { children: ["Tube", _jsxs("select", { value: tube, onChange: (event) => { setTube(event.target.value); setChosen([]); setSaid(null); }, "aria-label": "Tube", children: [_jsx("option", { value: "", children: "Choose a tube\u2026" }), tubes.map((one) => _jsx("option", { value: one.item, children: one.label }, one.item))] })] }), _jsxs("label", { className: "used", children: ["used", _jsx("input", { type: "number", min: 0, step: 1, value: used, onChange: (event) => setUsed(event.target.value), "aria-label": "Amount used" })] }), part !== undefined && _jsxs("p", { className: "dim small", children: [part.length, " bp", part.circular ? " · circular" : " · linear"] })] }), part !== undefined && (_jsxs("div", { children: [_jsxs("p", { className: "label", children: ["Enzymes", offered.length === 0 ? " · none of the usual ones cut this" : ""] }), _jsxs("div", { className: "enzymes", children: [offered.map((one) => (_jsxs("label", { className: "check", title: `${one.site} · cuts ${one.positions.length === 1 ? "once" : `${one.positions.length} times`}`, children: [_jsx("input", { type: "checkbox", checked: chosen.includes(one.name), onChange: () => toggle(one.name) }), " ", one.name, " ", _jsxs("span", { className: "dim small", children: ["\u00D7", one.positions.length] })] }, one.name))), chosen.filter((name) => !offered.some((one) => one.name === name)).map((name) => (_jsxs("label", { className: "check", children: [_jsx("input", { type: "checkbox", checked: true, onChange: () => toggle(name) }), " ", name] }, name)))] }), _jsxs("form", { className: "row tight", onSubmit: (event) => {
75
+ event.preventDefault();
76
+ const name = enzymeNamed(other);
77
+ setUnknown(name === null && other.trim() !== "" ? other.trim() : null);
78
+ if (name !== null && !chosen.includes(name))
79
+ setChosen([...chosen, name]);
80
+ if (name !== null)
81
+ setOther("");
82
+ }, children: [_jsx("input", { value: other, onChange: (event) => setOther(event.target.value), placeholder: "Another enzyme, by name", "aria-label": "Another enzyme", maxLength: 40, spellCheck: false }), _jsx("button", { type: "submit", className: "quiet", children: "Add" })] }), unknown !== null && _jsxs("p", { className: "trouble small", role: "status", children: ["There is no enzyme called ", unknown, " here."] })] }))] }))] }), run.plan !== null && chosen.length > 0 && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "What it gives" }), run.plan.problem !== null ? _jsx("p", { className: "trouble", role: "status", children: run.plan.problem }) : (_jsxs("div", { className: "result", children: [_jsx(Gel, { ladder: run.plan.ladder, bands: run.plan.bands, name: part?.name ?? "digest" }), _jsxs("div", { children: [_jsxs("p", { children: [_jsxs("strong", { children: [run.plan.fragments.length, " ", run.plan.fragments.length === 1 ? "piece" : "pieces"] }), " ", _jsxs("span", { className: "dim", children: [run.plan.fragments.join(", "), " bp"] })] }), _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Enzyme" }), _jsx("th", { children: "Site" }), _jsx("th", { children: "Cuts after base" })] }) }), _jsx("tbody", { children: run.plan.cutters.map((one) => _jsxs("tr", { children: [_jsx("td", { children: one.name }), _jsx("td", { children: _jsx("code", { children: one.site }) }), _jsx("td", { children: one.positions.length === 0 ? _jsx("span", { className: "dim", children: "does not cut" }) : one.positions.join(", ") })] }, one.name)) })] }), _jsxs("div", { className: "row tight", children: [_jsxs("label", { children: ["Gel", _jsx("select", { value: gel, onChange: (event) => setGel(event.target.value), children: GELS.map((one) => _jsxs("option", { value: one.id, children: [one.percent, "% agarose"] }, one.id)) })] }), _jsxs("label", { children: ["Ladder", _jsx("select", { value: ladder, onChange: (event) => setLadder(event.target.value), children: LADDERS.map((one) => _jsx("option", { value: one.id, children: one.name }, one.id)) })] })] }), run.plan.bands.some((band) => band.unresolved) && _jsx("p", { className: "dim small", children: "* outside what this gel separates. Try another concentration." }), run.plan.bands.some((band) => band.sizes.length > 1) && _jsx("p", { className: "dim small", children: "Pieces too close in size to tell apart run as one band." })] })] })), run.plan.problem === null && (_jsxs("fieldset", { disabled: busy, className: "stack", children: [_jsxs("label", { children: ["Note", _jsx("input", { value: note, onChange: (event) => setNote(event.target.value), placeholder: "Anything worth remembering about this gel", maxLength: 2000 })] }), _jsxs("div", { className: "row", children: [_jsx("button", { type: "button", onClick: () => void record(run.matched, "Recorded: the gel showed what was expected."), children: "The gel matched" }), _jsx("button", { type: "button", className: "quiet", onClick: () => void record(run.differed, "Recorded: the gel did not show what was expected."), children: "The gel did not match" })] })] })), said !== null && _jsx("p", { className: "small", role: "status", children: said })] })), here.length > 0 && (_jsxs("section", { className: "card", children: [_jsxs("h2", { children: ["Recent digests", instrument === null ? "" : " here"] }), _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Tube" }), _jsx("th", { children: "Enzymes" }), _jsx("th", { children: "Expected" }), _jsx("th", { children: "Gel" }), _jsx("th", { children: "Note" })] }) }), _jsx("tbody", { children: here.map((one) => (_jsxs("tr", { children: [_jsx("td", { children: partName(one.inputs[0]?.item) }), _jsx("td", { children: String(one.settings["enzymes"] ?? "").replace(/\+/g, " + ") }), _jsx("td", { className: "dim", children: String(one.settings["expected"] ?? "") }), _jsx("td", { children: one.outcome === "worked" ? "matched" : _jsx("span", { className: "badge", children: "did not match" }) }), _jsx("td", { className: "dim", children: one.note ?? "" })] }, one.run))) })] })] }))] }));
83
+ }
84
+ //# sourceMappingURL=digest-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest-tool.js","sourceRoot":"","sources":["../src/digest-tool.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;GAKG;AACH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,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,GAAM,EACtE,aAAI,SAAS,EAAC,KAAK,YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,GAAM,EACjE,uBAAK,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,OAAO,8BAAqB,GAAM,EAC9F,aAAI,SAAS,EAAC,KAAK,YAAE,GAAG,CAAC,IAAI,IAAI,EAAE,GAAM,KALlC,GAAG,CAAC,GAAG,CAMX,CACN,CAAC,GACI,IACF,IACA,CACX,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * A restriction digest, and the gel it would give, worked out before either is run.
3
+ *
4
+ * Given a molecule and some enzymes this says where they cut, how long the pieces are, and where
5
+ * each piece would run on a gel beside a ladder. Like `pcr.ts` it knows sequences and nothing of
6
+ * the lab.
7
+ */
8
+ import { type Band } from "@biolibs/gel";
9
+ /** The enzymes offered first: the ones most often on a lab's shelf. Any other may be named. */
10
+ export declare const COMMON_ENZYMES: readonly string[];
11
+ /** The gel a digest is run on unless somebody says otherwise: 1% agarose. */
12
+ export declare const USUAL_GEL = "1.0";
13
+ /** The ladder run beside it unless somebody says otherwise. */
14
+ export declare const USUAL_LADDER = "1kb";
15
+ /** One enzyme and where it cuts a molecule. */
16
+ export interface Cutter {
17
+ /** The enzyme's name. */
18
+ name: string;
19
+ /** The sequence it recognises. */
20
+ site: string;
21
+ /** Where it cuts, counted from the start of the molecule, in order. */
22
+ positions: number[];
23
+ }
24
+ /** What a digest would give. */
25
+ export interface DigestPlan {
26
+ /** Each enzyme asked for that is a real one, and where it cuts. */
27
+ cutters: Cutter[];
28
+ /** How long each piece is, longest first. */
29
+ fragments: number[];
30
+ /** The bands the pieces would show. */
31
+ bands: Band[];
32
+ /** The bands of the ladder beside them. */
33
+ ladder: Band[];
34
+ /** The gel and the ladder it was worked out for. */
35
+ gel: string;
36
+ ladderName: string;
37
+ /** Why there is nothing to look at, said for a person, or `null` if there is. */
38
+ problem: string | null;
39
+ }
40
+ /**
41
+ * Find an enzyme whatever case its name was typed in.
42
+ *
43
+ * @param name - Something like `ecori`.
44
+ * @returns Its name as it is written, or `null` if there is no such enzyme.
45
+ */
46
+ export declare function enzymeNamed(name: string): string | null;
47
+ /**
48
+ * Where one enzyme cuts a molecule.
49
+ *
50
+ * @param part - The molecule.
51
+ * @param name - The enzyme, by its name as written.
52
+ * @returns The enzyme and its cuts, or `null` if there is no such enzyme or the molecule is not a sequence.
53
+ */
54
+ export declare function cutsOf(part: {
55
+ sequence: string;
56
+ circular: boolean;
57
+ }, name: string): Cutter | null;
58
+ /**
59
+ * The enzymes, of those usually on a shelf, that cut a molecule.
60
+ *
61
+ * @param part - The molecule.
62
+ * @param names - The enzymes to try.
63
+ * @returns Those that cut it, the ones that cut fewest times first, since one or two cuts is what a
64
+ * check digest wants.
65
+ */
66
+ export declare function cutters(part: {
67
+ sequence: string;
68
+ circular: boolean;
69
+ }, names?: readonly string[]): Cutter[];
70
+ /**
71
+ * Work out a digest and the gel it would give.
72
+ *
73
+ * @param part - The molecule.
74
+ * @param names - The enzymes, by name.
75
+ * @param options - `gel` is the agarose concentration's ID and `ladder` the ladder's, from `@biolibs/gel`.
76
+ * @returns The cuts, the pieces, the bands, and what is wrong if there is nothing to look at.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * import { planDigest } from "@biolibs/bionet-tools";
81
+ *
82
+ * const plan = planDigest({ sequence: "AAAAAAAAAAGAATTCAAAAAAAAAAAAAAAAAAAAGGATCCAAAAAAAAAA", circular: true }, ["EcoRI", "BamHI"]);
83
+ * plan.fragments; // [ 26, 26 ]
84
+ * plan.problem; // null
85
+ * ```
86
+ */
87
+ export declare function planDigest(part: {
88
+ sequence: string;
89
+ circular: boolean;
90
+ }, names: readonly string[], options?: {
91
+ gel?: string;
92
+ ladder?: string;
93
+ }): DigestPlan;
94
+ //# sourceMappingURL=digest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAA4D,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAInG,+FAA+F;AAC/F,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAG3C,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,SAAS,QAAQ,CAAC;AAE/B,+DAA+D;AAC/D,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,+CAA+C;AAC/C,MAAM,WAAW,MAAM;IACrB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,gCAAgC;AAChC,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,uCAAuC;IACvC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAID;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMvD;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWjG;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,EAAE,KAAK,GAAE,SAAS,MAAM,EAAmB,GAAG,MAAM,EAAE,CAG1H;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EACvE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,UAAU,CAkBtF"}
package/dist/digest.js ADDED
@@ -0,0 +1,115 @@
1
+ /**
2
+ * A restriction digest, and the gel it would give, worked out before either is run.
3
+ *
4
+ * Given a molecule and some enzymes this says where they cut, how long the pieces are, and where
5
+ * each piece would run on a gel beside a ladder. Like `pcr.ts` it knows sequences and nothing of
6
+ * the lab.
7
+ */
8
+ import { bandsOf, fragmentSizes, gelById, ladderBands, ladderById } from "@biolibs/gel";
9
+ import { enzymes } from "@biolibs/restriction";
10
+ import { Seq } from "@biolibs/seq";
11
+ /** The enzymes offered first: the ones most often on a lab's shelf. Any other may be named. */
12
+ export const COMMON_ENZYMES = [
13
+ "EcoRI", "BamHI", "HindIII", "XhoI", "NotI", "XbaI", "SpeI", "PstI", "NcoI", "NdeI", "KpnI", "SacI",
14
+ "SalI", "EcoRV", "SmaI", "BglII", "NheI", "AgeI", "ApaI", "ClaI", "MluI", "BsaI", "BsmBI", "DpnI",
15
+ ];
16
+ /** The gel a digest is run on unless somebody says otherwise: 1% agarose. */
17
+ export const USUAL_GEL = "1.0";
18
+ /** The ladder run beside it unless somebody says otherwise. */
19
+ export const USUAL_LADDER = "1kb";
20
+ const clean = (text) => text.replace(/\s+/g, "").toUpperCase();
21
+ /**
22
+ * Find an enzyme whatever case its name was typed in.
23
+ *
24
+ * @param name - Something like `ecori`.
25
+ * @returns Its name as it is written, or `null` if there is no such enzyme.
26
+ */
27
+ export function enzymeNamed(name) {
28
+ const typed = name.trim();
29
+ if (typed === "")
30
+ return null;
31
+ if (Object.hasOwn(enzymes, typed))
32
+ return typed;
33
+ const lower = typed.toLowerCase();
34
+ return Object.keys(enzymes).find((one) => one.toLowerCase() === lower) ?? null;
35
+ }
36
+ /**
37
+ * Where one enzyme cuts a molecule.
38
+ *
39
+ * @param part - The molecule.
40
+ * @param name - The enzyme, by its name as written.
41
+ * @returns The enzyme and its cuts, or `null` if there is no such enzyme or the molecule is not a sequence.
42
+ */
43
+ export function cutsOf(part, name) {
44
+ const enzyme = Object.hasOwn(enzymes, name) ? enzymes[name] : undefined;
45
+ if (enzyme === undefined)
46
+ return null;
47
+ const bases = clean(part.sequence);
48
+ try {
49
+ // The engine counts from 1 and gives the base after the cut.
50
+ const found = enzyme.search(new Seq(bases), !part.circular).map((at) => (at - 1 + bases.length) % bases.length);
51
+ return { name, site: String(enzyme.site), positions: [...new Set(found)].sort((a, b) => a - b) };
52
+ }
53
+ catch {
54
+ return null;
55
+ }
56
+ }
57
+ /**
58
+ * The enzymes, of those usually on a shelf, that cut a molecule.
59
+ *
60
+ * @param part - The molecule.
61
+ * @param names - The enzymes to try.
62
+ * @returns Those that cut it, the ones that cut fewest times first, since one or two cuts is what a
63
+ * check digest wants.
64
+ */
65
+ export function cutters(part, names = COMMON_ENZYMES) {
66
+ return names.map((name) => cutsOf(part, name)).filter((one) => one !== null && one.positions.length > 0)
67
+ .sort((a, b) => a.positions.length - b.positions.length || a.name.localeCompare(b.name));
68
+ }
69
+ /**
70
+ * Work out a digest and the gel it would give.
71
+ *
72
+ * @param part - The molecule.
73
+ * @param names - The enzymes, by name.
74
+ * @param options - `gel` is the agarose concentration's ID and `ladder` the ladder's, from `@biolibs/gel`.
75
+ * @returns The cuts, the pieces, the bands, and what is wrong if there is nothing to look at.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * import { planDigest } from "@biolibs/bionet-tools";
80
+ *
81
+ * const plan = planDigest({ sequence: "AAAAAAAAAAGAATTCAAAAAAAAAAAAAAAAAAAAGGATCCAAAAAAAAAA", circular: true }, ["EcoRI", "BamHI"]);
82
+ * plan.fragments; // [ 26, 26 ]
83
+ * plan.problem; // null
84
+ * ```
85
+ */
86
+ export function planDigest(part, names, options = {}) {
87
+ let gel = gelById(USUAL_GEL);
88
+ let ladder = ladderById(USUAL_LADDER);
89
+ try {
90
+ gel = gelById(options.gel ?? USUAL_GEL);
91
+ }
92
+ catch { /* an unknown gel is run as the usual one */ }
93
+ try {
94
+ ladder = ladderById(options.ladder ?? USUAL_LADDER);
95
+ }
96
+ catch { /* and an unknown ladder likewise */ }
97
+ const length = clean(part.sequence).length;
98
+ const found = [...new Set(names)].map((name) => cutsOf(part, name)).filter((one) => one !== null);
99
+ const empty = { cutters: found, fragments: [], bands: [], ladder: ladderBands(ladder.sizes, gel), gel: gel.id, ladderName: ladder.name };
100
+ if (names.length === 0)
101
+ return { ...empty, problem: "Choose at least one enzyme." };
102
+ if (found.length === 0)
103
+ return { ...empty, problem: "None of those is an enzyme this knows." };
104
+ const cuts = [...new Set(found.flatMap((one) => one.positions))];
105
+ if (cuts.length === 0)
106
+ return { ...empty, problem: `${found.map((one) => one.name).join(" and ")} ${found.length === 1 ? "does" : "do"} not cut this.` };
107
+ try {
108
+ const fragments = fragmentSizes(length, part.circular ? "circular" : "linear", cuts).sort((a, b) => b - a);
109
+ return { ...empty, fragments, bands: bandsOf(fragments, gel), problem: null };
110
+ }
111
+ catch {
112
+ return { ...empty, problem: "That could not be cut into pieces." };
113
+ }
114
+ }
115
+ //# sourceMappingURL=digest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest.js","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAA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,EAAE,CAAC;IACrE,CAAC;AACH,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * `@biolibs/bionet-tools`: the tools a lab uses at the bench, tied to its freezer.
4
+ *
5
+ * A tool here works on the tubes a lab holds and records what was done with them. Running a PCR is
6
+ * choosing a template and two primers from the freezer, seeing what they would make, and recording
7
+ * the run: the template and primers drop by what was used, and the product is a new tube that knows
8
+ * which run made it.
9
+ *
10
+ * - `pcr.ts` — what a PCR would make, worked out from sequences alone
11
+ * - `pcr-scene.ts` — a PCR as met at the machine: the programme it shows, the checks, and what is in the tube
12
+ * - `digest.ts` — where enzymes cut, the pieces, and the gel they would give
13
+ * - `run.ts` — a PCR as a lab does one: which tubes, and what to record
14
+ * - `pcr-tool.tsx`, `digest-tool.tsx` — the tools
15
+ * - `pcr-bench.tsx` — a PCR at the machine: what is beside the scene, and what the scene is told to show
16
+ * - `tools.tsx` — getting to one: from an instrument, or from a list of them all
17
+ *
18
+ * The tools are drawn with the styles of `@biolibs/bionet-panels` and belong inside its `LabWindow`.
19
+ * Import `@biolibs/bionet-tools/tools.css` once.
20
+ */
21
+ export * from "./pcr.js";
22
+ export * from "./pcr-scene.js";
23
+ export * from "./digest.js";
24
+ export * from "./run.js";
25
+ export * from "./pcr-tool.js";
26
+ export * from "./digest-tool.js";
27
+ export * from "./tools.js";
28
+ export * from "./pcr-bench.js";
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * `@biolibs/bionet-tools`: the tools a lab uses at the bench, tied to its freezer.
4
+ *
5
+ * A tool here works on the tubes a lab holds and records what was done with them. Running a PCR is
6
+ * choosing a template and two primers from the freezer, seeing what they would make, and recording
7
+ * the run: the template and primers drop by what was used, and the product is a new tube that knows
8
+ * which run made it.
9
+ *
10
+ * - `pcr.ts` — what a PCR would make, worked out from sequences alone
11
+ * - `pcr-scene.ts` — a PCR as met at the machine: the programme it shows, the checks, and what is in the tube
12
+ * - `digest.ts` — where enzymes cut, the pieces, and the gel they would give
13
+ * - `run.ts` — a PCR as a lab does one: which tubes, and what to record
14
+ * - `pcr-tool.tsx`, `digest-tool.tsx` — the tools
15
+ * - `pcr-bench.tsx` — a PCR at the machine: what is beside the scene, and what the scene is told to show
16
+ * - `tools.tsx` — getting to one: from an instrument, or from a list of them all
17
+ *
18
+ * The tools are drawn with the styles of `@biolibs/bionet-panels` and belong inside its `LabWindow`.
19
+ * Import `@biolibs/bionet-tools/tools.css` once.
20
+ */
21
+ export * from "./pcr.js";
22
+ export * from "./pcr-scene.js";
23
+ export * from "./digest.js";
24
+ export * from "./run.js";
25
+ export * from "./pcr-tool.js";
26
+ export * from "./digest-tool.js";
27
+ export * from "./tools.js";
28
+ export * from "./pcr-bench.js";
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}