@biolibs/bionet-tools 0.1.0 → 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.
- package/README.md +37 -1
- package/dist/digest-tool.d.ts.map +1 -1
- package/dist/digest-tool.js +2 -1
- package/dist/digest-tool.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/pcr-bench.d.ts +94 -0
- package/dist/pcr-bench.d.ts.map +1 -0
- package/dist/pcr-bench.js +187 -0
- package/dist/pcr-bench.js.map +1 -0
- package/dist/pcr-scene.d.ts +247 -0
- package/dist/pcr-scene.d.ts.map +1 -0
- package/dist/pcr-scene.js +287 -0
- package/dist/pcr-scene.js.map +1 -0
- package/dist/pcr-tool.d.ts.map +1 -1
- package/dist/pcr-tool.js +2 -1
- package/dist/pcr-tool.js.map +1 -1
- package/dist/run.d.ts +3 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +5 -1
- package/dist/run.js.map +1 -1
- package/dist/tools.d.ts +6 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -3
- package/dist/tools.js.map +1 -1
- package/package.json +2 -1
- package/src/digest-tool.tsx +2 -1
- package/src/index.ts +4 -0
- package/src/pcr-bench.tsx +350 -0
- package/src/pcr-scene.ts +408 -0
- package/src/pcr-tool.tsx +2 -1
- package/src/run.ts +8 -1
- package/src/tools.tsx +5 -4
- package/tools.css +28 -0
package/dist/pcr-tool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pcr-tool.js","sourceRoot":"","sources":["../src/pcr-tool.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CA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,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,OAAO,6BAAoB,GAAM,EAC7I,aAAI,SAAS,EAAC,KAAK,YAAE,GAAG,CAAC,IAAI,IAAI,EAAE,GAAM,KAHlC,GAAG,CAAC,GAAG,CAIX,CACN,CAAC;gCACJ,CAAC,CAAC,GACI,IACF,IACA,CACX,IACG,CACP,CAAC;AACJ,CAAC"}
|
package/dist/run.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import type { ItemState, PartState, PlaceState } from "@biolibs/bionet";
|
|
9
9
|
import { type DigestPlan } from "./digest.js";
|
|
10
10
|
import { type PcrPlan } from "./pcr.js";
|
|
11
|
+
import type { PcrProgramme } from "./pcr-scene.js";
|
|
11
12
|
/** As much of a lab as a tool reads. */
|
|
12
13
|
export interface ToolLab {
|
|
13
14
|
parts: readonly PartState[];
|
|
@@ -59,6 +60,8 @@ export interface PcrChoice {
|
|
|
59
60
|
unit?: string | null;
|
|
60
61
|
/** Anything worth saying about the run. */
|
|
61
62
|
note?: string | null;
|
|
63
|
+
/** The programme the machine was set to, to be kept with the run. */
|
|
64
|
+
programme?: PcrProgramme;
|
|
62
65
|
}
|
|
63
66
|
/** A PCR as chosen: what it would make, and what to ask the lab to record. */
|
|
64
67
|
export interface PcrRun {
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1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AAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,gFAAgF;IAChF,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,wGAAwG;IACxG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,SAAS,CAgBvE;AAED,2BAA2B;AAC3B,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExC,oDAAoD;AACpD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAkD,CAAC;AAE1G;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,CAG/F;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAG/G"}
|
package/dist/run.js
CHANGED
|
@@ -59,7 +59,11 @@ export function pcrRun(lab, choice) {
|
|
|
59
59
|
{ item: choice.forward, amount: whole(choice.used?.forward, 1), role: "forward primer" },
|
|
60
60
|
{ item: choice.reverse, amount: whole(choice.used?.reverse, 1), role: "reverse primer" },
|
|
61
61
|
],
|
|
62
|
-
|
|
62
|
+
// What the operator set is part of what was done, and is what somebody repeating the run needs.
|
|
63
|
+
settings: { anneal_at_least: least, ...(choice.programme === undefined ? {} : {
|
|
64
|
+
denature_c: choice.programme.steps[0].celsius, anneal_c: choice.programme.steps[1].celsius, anneal_s: choice.programme.steps[1].seconds,
|
|
65
|
+
extend_c: choice.programme.steps[2].celsius, extend_s: choice.programme.steps[2].seconds, cycles: choice.programme.cycles,
|
|
66
|
+
}) },
|
|
63
67
|
note: choice.note ?? null,
|
|
64
68
|
};
|
|
65
69
|
const product = plan.problem === null ? plan.products[0] : null;
|
package/dist/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAgB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAgB,MAAM,UAAU,CAAC;AAoBnF;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAY;IACnC,MAAM,GAAG,GAAiB,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,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AAC,IAAI,EAAE,CAAC;AAC5E,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Getting to a tool: from the instrument it is used at, or from a list of them all. */
|
|
2
|
+
import { type ReactNode } from "react";
|
|
1
3
|
import { type ToolName } from "./run.js";
|
|
2
4
|
/** What each tool is called. */
|
|
3
5
|
export declare const TOOL_NAMES: Readonly<Record<ToolName, string>>;
|
|
@@ -15,9 +17,11 @@ export declare function InstrumentTool({ place, onDone }: {
|
|
|
15
17
|
*
|
|
16
18
|
* A run is still recorded as done at the instrument for that tool, if the lab has placed one.
|
|
17
19
|
*
|
|
18
|
-
* @param props - `tool` is which to open on
|
|
20
|
+
* @param props - `tool` is which to open on; `views` lets a host show a tool its own way, such as
|
|
21
|
+
* at its instrument in a scene, in place of the plain form.
|
|
19
22
|
*/
|
|
20
|
-
export declare function Tools({ tool: first }: {
|
|
23
|
+
export declare function Tools({ tool: first, views }: {
|
|
21
24
|
tool?: ToolName;
|
|
25
|
+
views?: Partial<Record<ToolName, ReactNode>>;
|
|
22
26
|
}): import("react").JSX.Element | null;
|
|
23
27
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEjE,gCAAgC;AAChC,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAA4C,CAAC;AAOvG;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sCAiBvF;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,KAAa,EAAE,KAAU,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;CAAE,sCAc3H"}
|
package/dist/tools.js
CHANGED
|
@@ -32,13 +32,14 @@ export function InstrumentTool({ place, onDone }) {
|
|
|
32
32
|
*
|
|
33
33
|
* A run is still recorded as done at the instrument for that tool, if the lab has placed one.
|
|
34
34
|
*
|
|
35
|
-
* @param props - `tool` is which to open on
|
|
35
|
+
* @param props - `tool` is which to open on; `views` lets a host show a tool its own way, such as
|
|
36
|
+
* at its instrument in a scene, in place of the plain form.
|
|
36
37
|
*/
|
|
37
|
-
export function Tools({ tool: first = "pcr" }) {
|
|
38
|
+
export function Tools({ tool: first = "pcr", views = {} }) {
|
|
38
39
|
const lab = useLab()?.lab;
|
|
39
40
|
const [tool, setTool] = useState(first);
|
|
40
41
|
if (lab === null || lab === undefined)
|
|
41
42
|
return null;
|
|
42
|
-
return (_jsxs("div", { className: "tools", children: [_jsx("div", { className: "row tight pick", role: "tablist", "aria-label": "Tools", children: Object.keys(TOOL_NAMES).map((one) => (_jsx("button", { type: "button", role: "tab", "aria-selected": one === tool, className: one === tool ? "" : "quiet", onClick: () => setTool(one), children: TOOL_NAMES[one] }, one))) }), _jsx(Tool, { tool: tool, instrument: instrumentFor(lab, tool) }, tool)] }));
|
|
43
|
+
return (_jsxs("div", { className: "tools", children: [_jsx("div", { className: "row tight pick", role: "tablist", "aria-label": "Tools", children: Object.keys(TOOL_NAMES).map((one) => (_jsx("button", { type: "button", role: "tab", "aria-selected": one === tool, className: one === tool ? "" : "quiet", onClick: () => setTool(one), children: TOOL_NAMES[one] }, one))) }), views[tool] ?? _jsx(Tool, { tool: tool, instrument: instrumentFor(lab, tool) }, tool)] }));
|
|
43
44
|
}
|
|
44
45
|
//# sourceMappingURL=tools.js.map
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,wFAAwF;AACxF,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,wFAAwF;AACxF,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAiB,MAAM,UAAU,CAAC;AAEjE,gCAAgC;AAChC,MAAM,CAAC,MAAM,UAAU,GAAuC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AAEvG,SAAS,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAA0G;IAChJ,MAAM,IAAI,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IACpD,OAAO,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,UAAU,EAAE,UAAU,KAAM,IAAI,GAAI,CAAC,CAAC,CAAC,KAAC,UAAU,IAAC,UAAU,EAAE,UAAU,KAAM,IAAI,GAAI,CAAC;AAC3H,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,M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K,SAAS,EAAC,gBAAgB,EAAC,IAAI,EAAC,SAAS,gBAAY,OAAO,YAC7D,MAAM,CAAC,IAAI,CAAC,UAAU,CAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpD,iBAAkB,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,mBAAgB,GAAG,KAAK,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAG,UAAU,CAAC,GAAG,CAAC,IAAhJ,GAAG,CAAuJ,CACxK,CAAC,GACE,EACL,KAAK,CAAC,IAAI,CAAC,IAAI,KAAC,IAAI,IAAY,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,IAAtD,IAAI,CAAsD,IACjF,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"@biolibs/bionet-react": "^0.2.0",
|
|
10
10
|
"@biolibs/dseqrecord": "^1.1.1",
|
|
11
11
|
"@biolibs/gel": "^1.0.0",
|
|
12
|
+
"@biolibs/glossary-react": "^0.1.0",
|
|
12
13
|
"@biolibs/restriction": "^1.0.0",
|
|
13
14
|
"@biolibs/seq": "^1.0.0",
|
|
14
15
|
"@biolibs/seqtools": "^1.0.0"
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
],
|
|
59
60
|
"type": "module",
|
|
60
61
|
"types": "dist/index.d.ts",
|
|
61
|
-
"version": "0.1.
|
|
62
|
+
"version": "0.1.1"
|
|
62
63
|
}
|
package/src/digest-tool.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import { useMemo, useState } from "react";
|
|
|
10
10
|
import type { Band } from "@biolibs/gel";
|
|
11
11
|
import { GELS, LADDERS } from "@biolibs/gel";
|
|
12
12
|
import { useAct, useLab } from "@biolibs/bionet-react";
|
|
13
|
+
import { Glossed } from "@biolibs/glossary-react";
|
|
13
14
|
import { cutters, enzymeNamed } from "./digest.js";
|
|
14
15
|
import { digestRun, digestTubes } from "./run.js";
|
|
15
16
|
|
|
@@ -94,7 +95,7 @@ export function DigestTool({ instrument = null, onDone }: { instrument?: { id: s
|
|
|
94
95
|
<div className="toolhead">
|
|
95
96
|
<div>
|
|
96
97
|
<h2>Digest and gel{instrument === null ? "" : ` · ${instrument.name}`}</h2>
|
|
97
|
-
<p className="dim small"
|
|
98
|
+
<p className="dim small"><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." /></p>
|
|
98
99
|
</div>
|
|
99
100
|
{onDone !== undefined && <button type="button" className="quiet" onClick={onDone}>Back to the lab</button>}
|
|
100
101
|
</div>
|
package/src/index.ts
CHANGED
|
@@ -8,17 +8,21 @@
|
|
|
8
8
|
* which run made it.
|
|
9
9
|
*
|
|
10
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
|
|
11
12
|
* - `digest.ts` — where enzymes cut, the pieces, and the gel they would give
|
|
12
13
|
* - `run.ts` — a PCR as a lab does one: which tubes, and what to record
|
|
13
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
|
|
14
16
|
* - `tools.tsx` — getting to one: from an instrument, or from a list of them all
|
|
15
17
|
*
|
|
16
18
|
* The tools are drawn with the styles of `@biolibs/bionet-panels` and belong inside its `LabWindow`.
|
|
17
19
|
* Import `@biolibs/bionet-tools/tools.css` once.
|
|
18
20
|
*/
|
|
19
21
|
export * from "./pcr.js";
|
|
22
|
+
export * from "./pcr-scene.js";
|
|
20
23
|
export * from "./digest.js";
|
|
21
24
|
export * from "./run.js";
|
|
22
25
|
export * from "./pcr-tool.js";
|
|
23
26
|
export * from "./digest-tool.js";
|
|
24
27
|
export * from "./tools.js";
|
|
28
|
+
export * from "./pcr-bench.js";
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A PCR at the machine: everything beside the scene, and what the scene is told to show.
|
|
5
|
+
*
|
|
6
|
+
* It knows nothing of three dimensions. It holds what has been chosen and which view is showing,
|
|
7
|
+
* works out what the machine would show and what is in the tube, and hands those to whatever draws
|
|
8
|
+
* the instrument as plain data. The scene package's `InstrumentStage` takes them as they are.
|
|
9
|
+
*
|
|
10
|
+
* What is beside the scene keeps four things apart: what the **machine** shows, what is true of this
|
|
11
|
+
* **run**, the **checks** a careful operator would make, and, for somebody new, what is going on.
|
|
12
|
+
*/
|
|
13
|
+
import { useEffect, useMemo, useState, type ReactNode } from "react";
|
|
14
|
+
import { bandsOf, gelById, ladderBands, ladderById } from "@biolibs/gel";
|
|
15
|
+
import { useAct, useLab } from "@biolibs/bionet-react";
|
|
16
|
+
import { Glossed } from "@biolibs/glossary-react";
|
|
17
|
+
import { Gel } from "./digest-tool.js";
|
|
18
|
+
import { primerTm } from "./pcr.js";
|
|
19
|
+
import { primerBinding, programmeChecks, screenOf, strandCounts, suggestProgramme, tubeLens, tubeView,
|
|
20
|
+
type PcrProgramme, type PcrStepName, type TubeLens, type TubeStrand } from "./pcr-scene.js";
|
|
21
|
+
import { pcrRun, pcrTubes, type TubeChoice } from "./run.js";
|
|
22
|
+
|
|
23
|
+
/** The views of the machine, in the order a person meets them. */
|
|
24
|
+
export type BenchView = "machine" | "block" | "screen" | "tube" | "result";
|
|
25
|
+
|
|
26
|
+
/** What the scene is told to show. It is shaped to be spread onto `InstrumentStage`. */
|
|
27
|
+
export interface BenchStage {
|
|
28
|
+
model: "thermocycler";
|
|
29
|
+
name: string;
|
|
30
|
+
view: BenchView;
|
|
31
|
+
onView: (view: BenchView) => void;
|
|
32
|
+
screen: { text: string; lit?: boolean }[];
|
|
33
|
+
well?: { row: number; column: number };
|
|
34
|
+
tube?: { length: number; strands: TubeStrand[] };
|
|
35
|
+
/** The real bases at the primer being looked at, for any moment of the step showing. */
|
|
36
|
+
lens?: (through: number) => (TubeLens & { rows: [number, number] }) | null;
|
|
37
|
+
legend: Partial<Record<TubeStrand["kind"], string>>;
|
|
38
|
+
/** How long the step showing should take to play, when the bench is setting the pace. */
|
|
39
|
+
seconds?: number;
|
|
40
|
+
/** Called when the step showing has finished playing. */
|
|
41
|
+
onPlayed: () => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A cycle's temperatures as a line, with a mark on the step it is at.
|
|
46
|
+
*
|
|
47
|
+
* @param props - `programme` is the programme; `step` is the step it is on.
|
|
48
|
+
*/
|
|
49
|
+
export function TemperatureTrace({ programme, step }: { programme: PcrProgramme; step: PcrStepName }) {
|
|
50
|
+
const total = programme.steps.reduce((sum, one) => sum + one.seconds, 0);
|
|
51
|
+
const y = (celsius: number): number => 58 - ((celsius - 40) / 60) * 50;
|
|
52
|
+
let x = 8;
|
|
53
|
+
const spans = programme.steps.map((one) => { const from = x; x += (one.seconds / total) * 204; return { one, from, to: x }; });
|
|
54
|
+
const line = spans.flatMap(({ one, from, to }) => [`${from},${y(one.celsius)}`, `${to},${y(one.celsius)}`]).join(" ");
|
|
55
|
+
const now = spans.find(({ one }) => one.name === step)!;
|
|
56
|
+
return (
|
|
57
|
+
<svg className="trace" viewBox="0 0 220 70" role="img"
|
|
58
|
+
aria-label={`One cycle: ${programme.steps.map((one) => `${one.name} at ${one.celsius} degrees for ${one.seconds} seconds`).join(", ")}. It is on ${step}.`}>
|
|
59
|
+
<polyline points={line} fill="none" className="line" />
|
|
60
|
+
<rect x={now.from} y={4} width={now.to - now.from} height={60} className="now" />
|
|
61
|
+
{spans.map(({ one, from, to }) => <text key={one.name} x={(from + to) / 2} y={y(one.celsius) - 5} textAnchor="middle" className={one.name === step ? "on" : undefined}>{one.celsius}°</text>)}
|
|
62
|
+
</svg>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* How many strands of each kind there are, as bars.
|
|
68
|
+
*
|
|
69
|
+
* The bars are on a doubling scale, since the product doubles: each step along is twice as many.
|
|
70
|
+
*
|
|
71
|
+
* @param props - `counts` is how many there are; `cycles` is how many cycles the programme runs,
|
|
72
|
+
* which sets how long a full bar is.
|
|
73
|
+
*/
|
|
74
|
+
export function StrandBars({ counts, cycles }: { counts: { template: number; long: number; product: number }; cycles: number }) {
|
|
75
|
+
const rows: [string, number, string][] = [["Template", counts.template, "template"], ["Too long", counts.long, "long"], ["Product", counts.product, "product"]];
|
|
76
|
+
return (
|
|
77
|
+
<div className="bars" role="img" aria-label={rows.map(([label, count]) => `${label}: ${count.toLocaleString("en-US")} strands`).join(". ")}>
|
|
78
|
+
{rows.map(([label, count, kind]) => (
|
|
79
|
+
<div key={kind} className="bar">
|
|
80
|
+
<span>{label}</span>
|
|
81
|
+
<span className="track"><span className={`fill ${kind}`} style={{ width: `${Math.min(100, (Math.log2(count + 1) / (cycles + 1)) * 100)}%` }} /></span>
|
|
82
|
+
<span className="count">{count.toLocaleString("en-US")}</span>
|
|
83
|
+
</div>
|
|
84
|
+
))}
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const STEPS: readonly PcrStepName[] = ["denature", "anneal", "extend"];
|
|
90
|
+
const whole = (text: string): number | undefined => (text.trim() === "" || !Number.isFinite(Number(text)) ? undefined : Math.round(Number(text)));
|
|
91
|
+
|
|
92
|
+
function Pick({ label, choices, value, onChange }: { label: string; choices: TubeChoice[]; value: string; onChange: (item: string) => void }) {
|
|
93
|
+
return (
|
|
94
|
+
<label>{label}
|
|
95
|
+
<select value={value} onChange={(event) => onChange(event.target.value)} aria-label={label}>
|
|
96
|
+
<option value="">Choose a tube…</option>
|
|
97
|
+
{choices.map((one) => <option key={one.item} value={one.item}>{one.label}</option>)}
|
|
98
|
+
</select>
|
|
99
|
+
</label>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* A PCR at the machine.
|
|
105
|
+
*
|
|
106
|
+
* @param options - `instrument` is the thermocycler it is run on, if the lab has placed one;
|
|
107
|
+
* `onDone` adds a way to leave.
|
|
108
|
+
* @returns `stage`, to spread onto whatever draws the instrument, and `panel`, to put beside it.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```tsx
|
|
112
|
+
* import { usePcrBench } from "@biolibs/bionet-tools";
|
|
113
|
+
*
|
|
114
|
+
* const bench = usePcrBench({ instrument });
|
|
115
|
+
* // InstrumentStage is the scene package's; anything that draws an instrument from this data will do.
|
|
116
|
+
* <InstrumentStage {...bench.stage}>{bench.panel}</InstrumentStage>
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export function usePcrBench({ instrument = null, onDone }: { instrument?: { id: string; name: string } | null; onDone?: () => void } = {}): { stage: BenchStage; panel: ReactNode } {
|
|
120
|
+
const lab = useLab()?.lab;
|
|
121
|
+
const act = useAct();
|
|
122
|
+
const [view, setView] = useState<BenchView>("machine");
|
|
123
|
+
const [template, setTemplate] = useState("");
|
|
124
|
+
const [forward, setForward] = useState("");
|
|
125
|
+
const [reverse, setReverse] = useState("");
|
|
126
|
+
const [least, setLeast] = useState("18");
|
|
127
|
+
const [set, setSet] = useState<PcrProgramme | null>(null);
|
|
128
|
+
const [step, setStep] = useState<PcrStepName>("denature");
|
|
129
|
+
const [cycle, setCycle] = useState(1);
|
|
130
|
+
const [name, setName] = useState("");
|
|
131
|
+
const [amount, setAmount] = useState("50");
|
|
132
|
+
const [note, setNote] = useState("");
|
|
133
|
+
const [busy, setBusy] = useState(false);
|
|
134
|
+
const [said, setSaid] = useState<string | null>(null);
|
|
135
|
+
const [running, setRunning] = useState(false);
|
|
136
|
+
const [site, setSite] = useState<"top" | "bottom">("top");
|
|
137
|
+
|
|
138
|
+
const tubes = useMemo(() => (lab === null || lab === undefined ? { templates: [], primers: [] } : pcrTubes(lab)), [lab]);
|
|
139
|
+
const partOf = (item: string) => [...tubes.templates, ...tubes.primers].find((one) => one.item === item)?.part;
|
|
140
|
+
const [templatePart, forwardPart, reversePart] = [partOf(template), partOf(forward), partOf(reverse)];
|
|
141
|
+
const annealAtLeast = whole(least) ?? 18;
|
|
142
|
+
|
|
143
|
+
// What is true of this run: what the engine says the primers make, and where each binds.
|
|
144
|
+
const drafted = useMemo(() => (lab === null || lab === undefined ? null : pcrRun(lab, { template, forward, reverse, annealAtLeast })), [lab, template, forward, reverse, annealAtLeast]);
|
|
145
|
+
const product = drafted?.plan?.problem === null ? drafted.plan.products[0]! : null;
|
|
146
|
+
const bindings = useMemo(() => {
|
|
147
|
+
if (templatePart === undefined || forwardPart === undefined || reversePart === undefined) return null;
|
|
148
|
+
const found = [primerBinding(templatePart.sequence, forwardPart.sequence, annealAtLeast), primerBinding(templatePart.sequence, reversePart.sequence, annealAtLeast)];
|
|
149
|
+
const top = found.find((one) => one?.reads === "top");
|
|
150
|
+
const bottom = found.find((one) => one?.reads === "bottom");
|
|
151
|
+
return top === undefined || top === null || bottom === undefined || bottom === null ? null : { top, bottom };
|
|
152
|
+
}, [templatePart, forwardPart, reversePart, annealAtLeast]);
|
|
153
|
+
const reaction = useMemo(() => ({
|
|
154
|
+
length: product?.length ?? 0,
|
|
155
|
+
primers: [forwardPart, reversePart].flatMap((part) => (part === undefined ? [] : [{ name: part.name, tm: primerTm(part.sequence) ?? 60 }])),
|
|
156
|
+
}), [product, forwardPart, reversePart]);
|
|
157
|
+
const suggested = useMemo(() => suggestProgramme(reaction), [reaction]);
|
|
158
|
+
// A new choice of tubes is a new reaction, so what was set for the last one is let go.
|
|
159
|
+
useEffect(() => { setSet(null); setSaid(null); }, [template, forward, reverse]);
|
|
160
|
+
const programme = set ?? suggested;
|
|
161
|
+
const checks = product === null ? [] : programmeChecks(programme, reaction);
|
|
162
|
+
const run = useMemo(() => (lab === null || lab === undefined ? null : pcrRun(lab, {
|
|
163
|
+
template, forward, reverse, annealAtLeast, instrument: instrument?.id ?? null, name, note, programme, ...(whole(amount) === undefined ? {} : { amount: whole(amount)! }),
|
|
164
|
+
})), [lab, template, forward, reverse, annealAtLeast, instrument, name, note, programme, amount]);
|
|
165
|
+
|
|
166
|
+
// The real bases, at whichever primer is being looked at.
|
|
167
|
+
const lens = useMemo(() => {
|
|
168
|
+
if (bindings === null || templatePart === undefined || forwardPart === undefined || reversePart === undefined) return undefined;
|
|
169
|
+
const binding = bindings[site];
|
|
170
|
+
const primer = [forwardPart, reversePart].find((part) => primerBinding(templatePart.sequence, part.sequence, annealAtLeast)?.reads === site)!;
|
|
171
|
+
// Heating parts the template's own two strands; after that a primer is with the strand beside it.
|
|
172
|
+
const rows: [number, number] = step === "denature" ? [0, 3] : site === "top" ? [2, 3] : [0, 1];
|
|
173
|
+
return (through: number) => ({ ...tubeLens(templatePart.sequence, primer.sequence, binding, step, through, { primer: primer.name, template: templatePart.name }), rows });
|
|
174
|
+
}, [bindings, templatePart, forwardPart, reversePart, annealAtLeast, site, step]);
|
|
175
|
+
const inTube = bindings === null || templatePart === undefined ? undefined : tubeView(templatePart.length, bindings.top, bindings.bottom, step, cycle);
|
|
176
|
+
// Running the programme: each step plays into the next, and each cycle into the next, as the
|
|
177
|
+
// machine would. The first three cycles are played at the pace chosen, since each shows something
|
|
178
|
+
// new. After that every cycle looks alike, so they go by quickly and the counts are what to watch.
|
|
179
|
+
const onward = (): void => {
|
|
180
|
+
const next = STEPS[STEPS.indexOf(step) + 1];
|
|
181
|
+
if (next !== undefined) { setStep(next); return; }
|
|
182
|
+
if (cycle >= programme.cycles) { setRunning(false); return; }
|
|
183
|
+
setCycle(cycle + 1);
|
|
184
|
+
setStep("denature");
|
|
185
|
+
};
|
|
186
|
+
const played = (): void => { if (running) onward(); };
|
|
187
|
+
const onMachine = (line: { text: string; step?: PcrStepName }, at: number): { text: string; lit?: boolean } =>
|
|
188
|
+
(at === 1 ? { text: `Cycle ${Math.min(cycle, programme.cycles)} of ${programme.cycles}`, ...(running ? { lit: true } : {}) }
|
|
189
|
+
: { text: line.text, ...(line.step === step ? { lit: true } : {}) });
|
|
190
|
+
const stage: BenchStage = {
|
|
191
|
+
model: "thermocycler", name: instrument?.name ?? "Thermocycler", view, onView: (to) => { setView(to); if (to !== "tube") setRunning(false); },
|
|
192
|
+
onPlayed: played, ...(running && cycle > 3 ? { seconds: 0.22 } : {}),
|
|
193
|
+
screen: product === null ? [{ text: "No programme" }] : screenOf(programme).map(onMachine),
|
|
194
|
+
...(templatePart === undefined ? {} : { well: { row: 0, column: 0 } }),
|
|
195
|
+
...(inTube === undefined || templatePart === undefined ? {} : { tube: { length: templatePart.length, strands: inTube.strands } }),
|
|
196
|
+
...(lens === undefined || cycle > 3 ? {} : { lens }),
|
|
197
|
+
legend: { template: "the template's two strands", primer: "a primer", long: "a copy that runs on too far", product: "the product, at its exact length" },
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const change = (edit: (programme: PcrProgramme) => void): void => { const next = structuredClone(programme); edit(next); setSet(next); };
|
|
201
|
+
const record = async (what: Record<string, unknown> | null, done: string): Promise<void> => {
|
|
202
|
+
if (what === null) return;
|
|
203
|
+
setBusy(true);
|
|
204
|
+
const answer = await act("recordRun", what);
|
|
205
|
+
setBusy(false);
|
|
206
|
+
if (answer.ok) { setSaid(done); setName(""); setNote(""); }
|
|
207
|
+
};
|
|
208
|
+
const chosen = templatePart !== undefined && forwardPart !== undefined && reversePart !== undefined;
|
|
209
|
+
|
|
210
|
+
const panel = lab === null || lab === undefined ? null : (
|
|
211
|
+
<div className="bionet benchpanel">
|
|
212
|
+
<section className="card">
|
|
213
|
+
<div className="toolhead">
|
|
214
|
+
<h2>PCR</h2>
|
|
215
|
+
{onDone !== undefined && <button type="button" className="quiet" onClick={onDone}>Back to the lab</button>}
|
|
216
|
+
</div>
|
|
217
|
+
{tubes.templates.length === 0 ? <p className="empty">There are no tubes to run a PCR from. Add a part and a tube of it on the Freezer tab.</p> : (
|
|
218
|
+
<fieldset disabled={busy} className="stack">
|
|
219
|
+
<Pick label="Template" choices={tubes.templates} value={template} onChange={setTemplate} />
|
|
220
|
+
<Pick label="Forward primer" choices={tubes.primers} value={forward} onChange={setForward} />
|
|
221
|
+
<Pick label="Reverse primer" choices={tubes.primers} value={reverse} onChange={setReverse} />
|
|
222
|
+
</fieldset>
|
|
223
|
+
)}
|
|
224
|
+
{chosen && drafted?.plan?.problem !== null && drafted?.plan !== null && <p className="trouble" role="status">{drafted?.plan?.problem}</p>}
|
|
225
|
+
</section>
|
|
226
|
+
|
|
227
|
+
{view === "machine" && (
|
|
228
|
+
<section className="card">
|
|
229
|
+
<h2>At the machine</h2>
|
|
230
|
+
<p className="small"><Glossed text="PCR copies the stretch of a template that lies between two primers, over and over, by heating and cooling it." /></p>
|
|
231
|
+
<p className="dim small">A thermocycler shows its programme, the block's temperature and which cycle it is on. It shows nothing of the DNA. The first three views are what it shows; the last two are what you have to picture.</p>
|
|
232
|
+
</section>
|
|
233
|
+
)}
|
|
234
|
+
|
|
235
|
+
{view === "block" && (
|
|
236
|
+
<section className="card">
|
|
237
|
+
<h2>The block</h2>
|
|
238
|
+
<p className="voice">The machine</p>
|
|
239
|
+
<p className="small">96 wells under a heated lid, which presses on the tubes so nothing condenses on their caps.</p>
|
|
240
|
+
<p className="voice">This run</p>
|
|
241
|
+
<p className="small">{templatePart === undefined ? "No tube is in the block yet. Choose a template above." : "Your reaction is in well A1, at the back left."}</p>
|
|
242
|
+
</section>
|
|
243
|
+
)}
|
|
244
|
+
|
|
245
|
+
{view === "screen" && (
|
|
246
|
+
<section className="card">
|
|
247
|
+
<h2>The programme</h2>
|
|
248
|
+
{product === null ? <p className="dim small">Choose tubes that make one product and a programme is suggested for it.</p> : (
|
|
249
|
+
<>
|
|
250
|
+
<p className="voice">The machine</p>
|
|
251
|
+
<fieldset disabled={busy} className="programme">
|
|
252
|
+
<label>Anneal at<input type="number" min={30} max={80} step={1} value={programme.steps[1].celsius} onChange={(event) => change((p) => { p.steps[1].celsius = whole(event.target.value) ?? p.steps[1].celsius; })} /> °C</label>
|
|
253
|
+
<label>Extend for<input type="number" min={5} max={1800} step={5} value={programme.steps[2].seconds} onChange={(event) => change((p) => { p.steps[2].seconds = whole(event.target.value) ?? p.steps[2].seconds; })} /> s</label>
|
|
254
|
+
<label>Cycles<input type="number" min={1} max={60} step={1} value={programme.cycles} onChange={(event) => change((p) => { p.cycles = whole(event.target.value) ?? p.cycles; })} /></label>
|
|
255
|
+
{set !== null && <button type="button" className="plain" onClick={() => setSet(null)}>back to what was suggested</button>}
|
|
256
|
+
</fieldset>
|
|
257
|
+
<p className="voice">This run</p>
|
|
258
|
+
<p className="small">
|
|
259
|
+
{reaction.primers.map((one) => `${one.name} melts near ${Math.round(one.tm)} °C`).join("; ")}. The product is {product.length.toLocaleString("en-US")} bases.
|
|
260
|
+
</p>
|
|
261
|
+
<p className="voice">Checks</p>
|
|
262
|
+
{checks.length === 0 ? <p className="small good">Nothing in this programme looks wrong for this reaction.</p> : (
|
|
263
|
+
<ul className="checks">{checks.map((check) => <li key={check.says} className={check.weight}>{check.says}</li>)}</ul>
|
|
264
|
+
)}
|
|
265
|
+
</>
|
|
266
|
+
)}
|
|
267
|
+
</section>
|
|
268
|
+
)}
|
|
269
|
+
|
|
270
|
+
{view === "tube" && (
|
|
271
|
+
<section className="card">
|
|
272
|
+
<h2>In the tube</h2>
|
|
273
|
+
{inTube === undefined ? <p className="dim small">{chosen ? "These primers do not each bind this template in one place, so there is nothing to draw." : "Choose a template and two primers to see what happens to them."}</p> : (
|
|
274
|
+
<>
|
|
275
|
+
<div className="row tight pick" role="group" aria-label="Step of the cycle">
|
|
276
|
+
{STEPS.map((one) => <button key={one} type="button" aria-pressed={one === step} className={one === step ? "" : "quiet"} onClick={() => setStep(one)}>{one[0]!.toUpperCase()}{one.slice(1)}</button>)}
|
|
277
|
+
</div>
|
|
278
|
+
<div className="row tight pick" role="group" aria-label="Cycle">
|
|
279
|
+
<span className="dim small">Cycle</span>
|
|
280
|
+
{[1, 2, 3].map((one) => <button key={one} type="button" aria-pressed={one === cycle} className={one === cycle ? "" : "quiet"} onClick={() => { setRunning(false); setCycle(one); }}>{one}</button>)}
|
|
281
|
+
{cycle > 3 && <span className="small">{cycle} of {programme.cycles}</span>}
|
|
282
|
+
</div>
|
|
283
|
+
<div className="row tight pick" role="group" aria-label="Which primer to read the bases at">
|
|
284
|
+
<span className="dim small">Read the bases at</span>
|
|
285
|
+
{(["top", "bottom"] as const).map((one) => {
|
|
286
|
+
const part = [forwardPart, reversePart].find((each) => each !== undefined && templatePart !== undefined && primerBinding(templatePart.sequence, each.sequence, annealAtLeast)?.reads === one);
|
|
287
|
+
return <button key={one} type="button" aria-pressed={one === site} className={one === site ? "" : "quiet"} onClick={() => setSite(one)}>{part?.name ?? one}</button>;
|
|
288
|
+
})}
|
|
289
|
+
</div>
|
|
290
|
+
<div className="row tight pick">
|
|
291
|
+
<button type="button" onClick={() => {
|
|
292
|
+
if (running) { setRunning(false); return; }
|
|
293
|
+
setRunning(true);
|
|
294
|
+
// The step showing has usually finished playing, so a run starts by moving on from it.
|
|
295
|
+
if (cycle >= programme.cycles && step === "extend") { setCycle(1); setStep("denature"); } else onward();
|
|
296
|
+
}}>
|
|
297
|
+
{running ? "Stop" : cycle >= programme.cycles && step === "extend" ? "Run it again" : "Run the programme"}
|
|
298
|
+
</button>
|
|
299
|
+
<span className="dim small">{running ? "Each step plays into the next." : "Or press a step to see it alone."}</span>
|
|
300
|
+
</div>
|
|
301
|
+
<p className="voice">The machine</p>
|
|
302
|
+
<p className="small"><code>{screenOf(programme).find((line) => line.step === step)?.text.trim()}</code> · cycle {Math.min(cycle, programme.cycles)} of {programme.cycles}</p>
|
|
303
|
+
<TemperatureTrace programme={programme} step={step} />
|
|
304
|
+
<p className="voice">What is going on</p>
|
|
305
|
+
<p className="small"><Glossed text={inTube.says} /></p>
|
|
306
|
+
<p className="voice">This run</p>
|
|
307
|
+
<StrandBars counts={inTube.counts} cycles={programme.cycles} />
|
|
308
|
+
<p className="dim small">
|
|
309
|
+
Strands in the tube now, from one double-stranded template. Each step along a bar is twice as many. The copies that run on too far
|
|
310
|
+
grow by two a cycle; the product doubles, and after {programme.cycles} cycles there are {strandCounts(programme.cycles).product.toLocaleString("en-US")}.
|
|
311
|
+
</p>
|
|
312
|
+
</>
|
|
313
|
+
)}
|
|
314
|
+
</section>
|
|
315
|
+
)}
|
|
316
|
+
|
|
317
|
+
{view === "result" && (
|
|
318
|
+
<section className="card">
|
|
319
|
+
<h2>The result</h2>
|
|
320
|
+
{product === null ? <p className="dim small">Choose tubes that make one product.</p> : (
|
|
321
|
+
<>
|
|
322
|
+
<p className="voice">This run</p>
|
|
323
|
+
<p><strong>{product.length.toLocaleString("en-US")} bp</strong> <span className="dim">linear</span></p>
|
|
324
|
+
<code className="wrap">{product.length <= 96 ? product.sequence : `${product.sequence.slice(0, 44)} … ${product.sequence.slice(-44)}`}</code>
|
|
325
|
+
<Gel ladder={ladderBands(ladderById(product.length < 1500 ? "100bp" : "1kb").sizes, gelById(product.length < 1500 ? "1.5" : "1.0"))}
|
|
326
|
+
bands={bandsOf([product.length], gelById(product.length < 1500 ? "1.5" : "1.0"))} name={run?.name ?? "product"} />
|
|
327
|
+
{checks.length > 0 && (
|
|
328
|
+
<>
|
|
329
|
+
<p className="voice">Checks</p>
|
|
330
|
+
<ul className="checks">{checks.map((check) => <li key={check.says} className={check.weight}>{check.says}</li>)}</ul>
|
|
331
|
+
</>
|
|
332
|
+
)}
|
|
333
|
+
<fieldset disabled={busy} className="stack">
|
|
334
|
+
<label>Call the product<input value={name} onChange={(event) => setName(event.target.value)} placeholder={run?.name ?? ""} maxLength={200} /></label>
|
|
335
|
+
<label>Amount, in µL<input type="number" min={0} step={1} value={amount} onChange={(event) => setAmount(event.target.value)} /></label>
|
|
336
|
+
<label>Note<input value={note} onChange={(event) => setNote(event.target.value)} maxLength={2000} /></label>
|
|
337
|
+
<div className="row">
|
|
338
|
+
<button type="button" onClick={() => void record(run?.worked ?? null, `Recorded. There is a new tube of ${run?.name ?? "the product"}, not yet put anywhere.`)}>Record the run</button>
|
|
339
|
+
<button type="button" className="quiet" onClick={() => void record(run?.failed ?? null, "Recorded as a run that gave nothing. The tubes were used all the same.")}>It gave nothing</button>
|
|
340
|
+
</div>
|
|
341
|
+
</fieldset>
|
|
342
|
+
</>
|
|
343
|
+
)}
|
|
344
|
+
{said !== null && <p className="small" role="status">{said}</p>}
|
|
345
|
+
</section>
|
|
346
|
+
)}
|
|
347
|
+
</div>
|
|
348
|
+
);
|
|
349
|
+
return { stage, panel };
|
|
350
|
+
}
|