@biolibs/bionet-tools 0.1.7 → 0.1.10

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 (91) hide show
  1. package/README.md +79 -2
  2. package/dist/assembly-bench.d.ts +62 -0
  3. package/dist/assembly-bench.d.ts.map +1 -0
  4. package/dist/assembly-bench.js +114 -0
  5. package/dist/assembly-bench.js.map +1 -0
  6. package/dist/assembly-design.d.ts +119 -0
  7. package/dist/assembly-design.d.ts.map +1 -0
  8. package/dist/assembly-design.js +157 -0
  9. package/dist/assembly-design.js.map +1 -0
  10. package/dist/codon-bench.d.ts +51 -0
  11. package/dist/codon-bench.d.ts.map +1 -0
  12. package/dist/codon-bench.js +93 -0
  13. package/dist/codon-bench.js.map +1 -0
  14. package/dist/codons.d.ts +126 -0
  15. package/dist/codons.d.ts.map +1 -0
  16. package/dist/codons.js +287 -0
  17. package/dist/codons.js.map +1 -0
  18. package/dist/digest-tool.d.ts +12 -3
  19. package/dist/digest-tool.d.ts.map +1 -1
  20. package/dist/digest-tool.js +10 -4
  21. package/dist/digest-tool.js.map +1 -1
  22. package/dist/digest.d.ts +14 -0
  23. package/dist/digest.d.ts.map +1 -1
  24. package/dist/digest.js +18 -0
  25. package/dist/digest.js.map +1 -1
  26. package/dist/index.d.ts +20 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +20 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/induce-bench.d.ts +91 -0
  31. package/dist/induce-bench.d.ts.map +1 -0
  32. package/dist/induce-bench.js +201 -0
  33. package/dist/induce-bench.js.map +1 -0
  34. package/dist/induce.d.ts +280 -0
  35. package/dist/induce.d.ts.map +1 -0
  36. package/dist/induce.js +353 -0
  37. package/dist/induce.js.map +1 -0
  38. package/dist/modify.d.ts +197 -0
  39. package/dist/modify.d.ts.map +1 -0
  40. package/dist/modify.js +253 -0
  41. package/dist/modify.js.map +1 -0
  42. package/dist/pcr-tool.js +1 -1
  43. package/dist/pcr-tool.js.map +1 -1
  44. package/dist/plans.d.ts.map +1 -1
  45. package/dist/plans.js +4 -1
  46. package/dist/plans.js.map +1 -1
  47. package/dist/primer-bench.js +1 -1
  48. package/dist/primer-bench.js.map +1 -1
  49. package/dist/protein.d.ts +106 -0
  50. package/dist/protein.d.ts.map +1 -0
  51. package/dist/protein.js +160 -0
  52. package/dist/protein.js.map +1 -0
  53. package/dist/run.d.ts +13 -1
  54. package/dist/run.d.ts.map +1 -1
  55. package/dist/run.js +20 -5
  56. package/dist/run.js.map +1 -1
  57. package/dist/sequences-tool.js +1 -1
  58. package/dist/sequences-tool.js.map +1 -1
  59. package/dist/tools.d.ts +1 -1
  60. package/dist/tools.d.ts.map +1 -1
  61. package/dist/tools.js +12 -6
  62. package/dist/tools.js.map +1 -1
  63. package/dist/verify-bench.d.ts +48 -0
  64. package/dist/verify-bench.d.ts.map +1 -0
  65. package/dist/verify-bench.js +77 -0
  66. package/dist/verify-bench.js.map +1 -0
  67. package/dist/verify.d.ts +138 -0
  68. package/dist/verify.d.ts.map +1 -0
  69. package/dist/verify.js +263 -0
  70. package/dist/verify.js.map +1 -0
  71. package/package.json +6 -4
  72. package/src/assembly-bench.tsx +232 -0
  73. package/src/assembly-design.ts +219 -0
  74. package/src/codon-bench.tsx +189 -0
  75. package/src/codons.ts +339 -0
  76. package/src/digest-tool.tsx +14 -5
  77. package/src/digest.ts +19 -0
  78. package/src/index.ts +20 -0
  79. package/src/induce-bench.tsx +406 -0
  80. package/src/induce.ts +448 -0
  81. package/src/modify.ts +350 -0
  82. package/src/pcr-tool.tsx +1 -1
  83. package/src/plans.tsx +4 -1
  84. package/src/primer-bench.tsx +1 -1
  85. package/src/protein.ts +206 -0
  86. package/src/run.ts +22 -6
  87. package/src/sequences-tool.tsx +1 -1
  88. package/src/tools.tsx +11 -5
  89. package/src/verify-bench.tsx +161 -0
  90. package/src/verify.ts +310 -0
  91. package/tools.css +13 -0
@@ -1,13 +1,22 @@
1
1
  import type { Band } from "@biolibs/gel";
2
2
  /**
3
- * A gel, drawn: a ladder in one lane and the digest in the next.
3
+ * A gel, drawn: a marker in one lane and the sample in the next.
4
4
  *
5
- * @param props - `ladder` and `bands` are what `planDigest` gave; `name` is what the sample is called.
5
+ * The same picture serves agarose and acrylamide, because reading one is reading the other: bands
6
+ * down a lane, read against a lane of known sizes. What differs is what the numbers are, and that
7
+ * has to be said rather than assumed, or a screen reader is told base pairs about a protein.
8
+ *
9
+ * @param props - `ladder` and `bands` are what a plan gave; `name` is what the sample is called;
10
+ * `unit` is what the sizes are in, base pairs unless it says otherwise; `marker` names the first
11
+ * lane, and `says` describes what the lane shows, for anybody who cannot see it.
6
12
  */
7
- export declare function Gel({ ladder, bands, name }: {
13
+ export declare function Gel({ ladder, bands, name, unit, marker, says }: {
8
14
  ladder: readonly Band[];
9
15
  bands: readonly Band[];
10
16
  name: string;
17
+ unit?: string;
18
+ marker?: string;
19
+ says?: string;
11
20
  }): import("react").JSX.Element;
12
21
  /**
13
22
  * Cut a tube's molecule in silico, see the gel it should give, and record whether the real gel matched.
@@ -1 +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"}
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;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAmB,EAAE,MAAiB,EAAE,IAAI,EAAE,EAAE;IACzF,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC9G,+BAyBA;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"}
@@ -13,17 +13,23 @@ import { Glossed } from "@biolibs/glossary-react";
13
13
  import { cutters, enzymeNamed } from "./digest.js";
14
14
  import { digestRun, digestTubes } from "./run.js";
15
15
  /**
16
- * A gel, drawn: a ladder in one lane and the digest in the next.
16
+ * A gel, drawn: a marker in one lane and the sample in the next.
17
17
  *
18
- * @param props - `ladder` and `bands` are what `planDigest` gave; `name` is what the sample is called.
18
+ * The same picture serves agarose and acrylamide, because reading one is reading the other: bands
19
+ * down a lane, read against a lane of known sizes. What differs is what the numbers are, and that
20
+ * has to be said rather than assumed, or a screen reader is told base pairs about a protein.
21
+ *
22
+ * @param props - `ladder` and `bands` are what a plan gave; `name` is what the sample is called;
23
+ * `unit` is what the sizes are in, base pairs unless it says otherwise; `marker` names the first
24
+ * lane, and `says` describes what the lane shows, for anybody who cannot see it.
19
25
  */
20
- export function Gel({ ladder, bands, name }) {
26
+ export function Gel({ ladder, bands, name, unit = "base pairs", marker = "ladder", says }) {
21
27
  const [top, height] = [26, 250];
22
28
  const lane = (x, drawn, tone, labelled) => drawn.map((band, at) => {
23
29
  const y = top + 10 + band.position * (height - 24);
24
30
  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
31
  });
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")] }));
32
+ return (_jsxs("svg", { className: "gel", viewBox: "0 0 330 290", role: "img", "aria-label": says ?? `A gel: a ${marker} beside ${name}, showing bands at ${bands.flatMap((band) => band.sizes).join(", ")} ${unit}`, 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: marker }), _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
33
  }
28
34
  /**
29
35
  * Cut a tube's molecule in silico, see the gel it should give, and record whether the real gel matched.
@@ -1 +1 @@
1
- {"version":3,"file":"digest-tool.js","sourceRoot":"","sources":["../src/digest-tool.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAElD;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAqE;IAC5G,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,KAAsB,EAAE,IAAY,EAAE,QAA0B,EAAmB,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE;QACpI,MAAM,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QACnD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,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"}
package/dist/digest.d.ts CHANGED
@@ -44,6 +44,20 @@ export interface DigestPlan {
44
44
  * @returns Its name as it is written, or `null` if there is no such enzyme.
45
45
  */
46
46
  export declare function enzymeNamed(name: string): string | null;
47
+ /**
48
+ * One enzyme's recognition sequence.
49
+ *
50
+ * @param name - The enzyme, by name, in any case.
51
+ * @returns The bases it recognises, in IUPAC letters, or `null` if there is no such enzyme.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * import { siteOf } from "@biolibs/bionet-tools";
56
+ *
57
+ * siteOf("EcoRI"); // "GAATTC"
58
+ * ```
59
+ */
60
+ export declare function siteOf(name: string): string | null;
47
61
  /**
48
62
  * Where one enzyme cuts a molecule.
49
63
  *
@@ -1 +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;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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 CHANGED
@@ -33,6 +33,24 @@ export function enzymeNamed(name) {
33
33
  const lower = typed.toLowerCase();
34
34
  return Object.keys(enzymes).find((one) => one.toLowerCase() === lower) ?? null;
35
35
  }
36
+ /**
37
+ * One enzyme's recognition sequence.
38
+ *
39
+ * @param name - The enzyme, by name, in any case.
40
+ * @returns The bases it recognises, in IUPAC letters, or `null` if there is no such enzyme.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import { siteOf } from "@biolibs/bionet-tools";
45
+ *
46
+ * siteOf("EcoRI"); // "GAATTC"
47
+ * ```
48
+ */
49
+ export function siteOf(name) {
50
+ const found = enzymeNamed(name);
51
+ const enzyme = found === null || !Object.hasOwn(enzymes, found) ? undefined : enzymes[found];
52
+ return enzyme === undefined ? null : String(enzyme.site).toUpperCase();
53
+ }
36
54
  /**
37
55
  * Where one enzyme cuts a molecule.
38
56
  *
@@ -1 +1 @@
1
- {"version":3,"file":"digest.js","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EA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AC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,gBAAgB,EAAE,CAAC;IACzJ,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3G,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAChF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,oCAAoC,EAAE,CAAC;IACrE,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -15,6 +15,16 @@
15
15
  * - `pcr-tool.tsx`, `digest-tool.tsx` — the tools
16
16
  * - `pcr-bench.tsx` — a PCR at the machine: what is beside the scene, and what the scene is told to show
17
17
  * - `pcr-working.ts` — the working behind what the PCR tool says: each figure with the steps that give it
18
+ * - `protein.ts` — the protein a gene codes for, and what its sequence says about it
19
+ * - `induce.ts` — growing a strain to express what was put into it, and the mass its band should run at
20
+ * - `modify.ts` — which residues would be phosphorylated, and whether the host has the enzyme to do it
21
+ * - `induce-bench.tsx` — an induction at the shaking incubator, with the protein gel that answers it
22
+ * - `verify-bench.tsx` — checking a construct against the design at a desk, saying what was not covered
23
+ * - `verify.ts` — a sequencing read against the design it was meant to be, and what each difference costs
24
+ * - `codons.ts` — a gene rewritten in a host's codons, from usage counted over that host's own genes
25
+ * - `codon-bench.tsx` — writing a gene in a host's codons at a desk, with the counting on the screen
26
+ * - `assembly-design.ts` — a ring designed from a lab's own parts: the pieces in order, and the primers that make them fit
27
+ * - `assembly-bench.tsx` — building a ring at a desk: the pieces in order, and the primers that make them fit
18
28
  * - `ligate.ts` — pieces that have already been cut, joined where their ends fit
19
29
  * - `ligate-working.ts` — a ligation's working: each join in its bases, the length, how much to put in
20
30
  * - `ligate-bench.tsx` — a ligation at the heat block: what is shown beside it, and what the scene draws
@@ -42,6 +52,16 @@ export * from "./pcr-tool.js";
42
52
  export * from "./digest-tool.js";
43
53
  export * from "./pcr-working.js";
44
54
  export * from "./digest-working.js";
55
+ export * from "./protein.js";
56
+ export * from "./induce.js";
57
+ export * from "./modify.js";
58
+ export * from "./induce-bench.js";
59
+ export * from "./verify.js";
60
+ export * from "./verify-bench.js";
61
+ export * from "./codons.js";
62
+ export * from "./codon-bench.js";
63
+ export * from "./assembly-design.js";
64
+ export * from "./assembly-bench.js";
45
65
  export * from "./ligate.js";
46
66
  export * from "./ligate-working.js";
47
67
  export * from "./ligate-bench.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,16 @@
15
15
  * - `pcr-tool.tsx`, `digest-tool.tsx` — the tools
16
16
  * - `pcr-bench.tsx` — a PCR at the machine: what is beside the scene, and what the scene is told to show
17
17
  * - `pcr-working.ts` — the working behind what the PCR tool says: each figure with the steps that give it
18
+ * - `protein.ts` — the protein a gene codes for, and what its sequence says about it
19
+ * - `induce.ts` — growing a strain to express what was put into it, and the mass its band should run at
20
+ * - `modify.ts` — which residues would be phosphorylated, and whether the host has the enzyme to do it
21
+ * - `induce-bench.tsx` — an induction at the shaking incubator, with the protein gel that answers it
22
+ * - `verify-bench.tsx` — checking a construct against the design at a desk, saying what was not covered
23
+ * - `verify.ts` — a sequencing read against the design it was meant to be, and what each difference costs
24
+ * - `codons.ts` — a gene rewritten in a host's codons, from usage counted over that host's own genes
25
+ * - `codon-bench.tsx` — writing a gene in a host's codons at a desk, with the counting on the screen
26
+ * - `assembly-design.ts` — a ring designed from a lab's own parts: the pieces in order, and the primers that make them fit
27
+ * - `assembly-bench.tsx` — building a ring at a desk: the pieces in order, and the primers that make them fit
18
28
  * - `ligate.ts` — pieces that have already been cut, joined where their ends fit
19
29
  * - `ligate-working.ts` — a ligation's working: each join in its bases, the length, how much to put in
20
30
  * - `ligate-bench.tsx` — a ligation at the heat block: what is shown beside it, and what the scene draws
@@ -42,6 +52,16 @@ export * from "./pcr-tool.js";
42
52
  export * from "./digest-tool.js";
43
53
  export * from "./pcr-working.js";
44
54
  export * from "./digest-working.js";
55
+ export * from "./protein.js";
56
+ export * from "./induce.js";
57
+ export * from "./modify.js";
58
+ export * from "./induce-bench.js";
59
+ export * from "./verify.js";
60
+ export * from "./verify-bench.js";
61
+ export * from "./codons.js";
62
+ export * from "./codon-bench.js";
63
+ export * from "./assembly-design.js";
64
+ export * from "./assembly-bench.js";
45
65
  export * from "./ligate.js";
46
66
  export * from "./ligate-working.js";
47
67
  export * from "./ligate-bench.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,U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,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * An induction and its gel, at the shaking incubator.
3
+ *
4
+ * The incubator shows a temperature, a speed and a time. It shows nothing of what the cells are
5
+ * doing, and nothing in this file pretends it does: the first three views are what is there to be
6
+ * read off the machine, the fourth is the gene the operator has to picture being read, and the fifth
7
+ * is the gel, which is where the answer actually comes from.
8
+ *
9
+ * The one place this tool differs from the others is the last step. A PCR's product is arithmetic,
10
+ * so the bench can offer to keep it. A culture's product is not: the band is there or it is not, and
11
+ * only the person holding the gel knows which. So both buttons record the run, and only one of them
12
+ * goes on to put a protein in the freezer.
13
+ */
14
+ import { type ReactNode } from "react";
15
+ import { type DrawnMolecule } from "./sequence-file.js";
16
+ /** The views of the incubator, by the same names every instrument's stage uses. */
17
+ export type InductionView = "machine" | "block" | "screen" | "tube" | "result";
18
+ /** What the scene is told to show. It is shaped to be spread onto `InstrumentStage`. */
19
+ export interface InductionStage {
20
+ model: "shaking-incubator";
21
+ name: string;
22
+ view: InductionView;
23
+ onView: (view: InductionView) => void;
24
+ /** What the incubator's display says. */
25
+ screen: {
26
+ text: string;
27
+ lit?: boolean;
28
+ }[];
29
+ /** The clamp the flask is in. */
30
+ well?: {
31
+ row: number;
32
+ column: number;
33
+ };
34
+ /** The gene being expressed, with its coding sequence marked, for the view into the cells. */
35
+ molecule?: DrawnMolecule;
36
+ /** The gel once run: the marker and the sample, for the last view. */
37
+ gel?: {
38
+ lanes: {
39
+ name: string;
40
+ tone: "dim" | "held";
41
+ bands: {
42
+ position: number;
43
+ intensity: number;
44
+ label: string;
45
+ }[];
46
+ }[];
47
+ ran: number;
48
+ };
49
+ }
50
+ /**
51
+ * An induction and the gel that checks it, at the shaking incubator.
52
+ *
53
+ * @param options - `start` says what to open on, for a tour or a link; `instrument` is the incubator
54
+ * it is grown in, if the lab has one; `onDone` adds a way to leave.
55
+ * @returns `stage`, to spread onto `InstrumentStage` from `@biolibs/bionet-scene`, and `panel`, to
56
+ * put inside it.
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * import { useInductionBench } from "@biolibs/bionet-tools";
61
+ *
62
+ * const bench = useInductionBench({ instrument });
63
+ * <InstrumentStage {...bench.stage}>{bench.panel}</InstrumentStage>
64
+ * ```
65
+ */
66
+ export declare function useInductionBench({ instrument, onDone, start }?: {
67
+ instrument?: {
68
+ id: string;
69
+ name: string;
70
+ } | null;
71
+ onDone?: () => void;
72
+ /** What to show: the view, the culture and gene chosen, how far the gel starts. Followed whenever it changes. */
73
+ start?: {
74
+ view?: InductionView;
75
+ culture?: string;
76
+ gene?: string;
77
+ cds?: string;
78
+ ran?: number;
79
+ };
80
+ }): {
81
+ stage: InductionStage;
82
+ panel: ReactNode;
83
+ };
84
+ /**
85
+ * The induction tool on its own, for a lab that has not drawn its room.
86
+ *
87
+ * @param props - `instrument` is the incubator it is grown in, if the lab has one; `start` says what
88
+ * to open on; `onDone` adds a way to leave.
89
+ */
90
+ export declare function InductionTool(props: Parameters<typeof useInductionBench>[0]): import("react").JSX.Element;
91
+ //# sourceMappingURL=induce-bench.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"induce-bench.d.ts","sourceRoot":"","sources":["../src/induce-bench.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASrE,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGpE,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/E,wF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AAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1F,GAAG;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAyTnD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,+BAc3E"}
@@ -0,0 +1,201 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ /**
4
+ * An induction and its gel, at the shaking incubator.
5
+ *
6
+ * The incubator shows a temperature, a speed and a time. It shows nothing of what the cells are
7
+ * doing, and nothing in this file pretends it does: the first three views are what is there to be
8
+ * read off the machine, the fourth is the gene the operator has to picture being read, and the fifth
9
+ * is the gel, which is where the answer actually comes from.
10
+ *
11
+ * The one place this tool differs from the others is the last step. A PCR's product is arithmetic,
12
+ * so the bench can offer to keep it. A culture's product is not: the band is there or it is not, and
13
+ * only the person holding the gel knows which. So both buttons record the run, and only one of them
14
+ * goes on to put a protein in the freezer.
15
+ */
16
+ import { useEffect, useMemo, useState } from "react";
17
+ import { PROTEIN_GELS, PROTEIN_LADDERS } from "@biolibs/gel";
18
+ import { useAct, useLab } from "@biolibs/bionet-react";
19
+ import { Glossed } from "@biolibs/glossary-react";
20
+ import { Gel } from "./digest-tool.js";
21
+ import { INDUCTION, USUAL_PROTEIN_GEL, inductionChecks, inductionCultures, inductionGenes, inductionRun, inductionWorking, markerFor } from "./induce.js";
22
+ import { SequenceMap } from "./map.js";
23
+ import { Proposed, withPlan } from "./plans.js";
24
+ import { useRunning } from "./running.js";
25
+ import { moleculeOf } from "./sequence-file.js";
26
+ import { ShowWorking } from "./working.js";
27
+ const count = (value) => value.toLocaleString("en-US");
28
+ const whole = (text) => (/^\d+$/.test(text.trim()) ? Number(text) : undefined);
29
+ const kda = (value) => `${Math.round(value * 10) / 10} kDa`;
30
+ /**
31
+ * An induction and the gel that checks it, at the shaking incubator.
32
+ *
33
+ * @param options - `start` says what to open on, for a tour or a link; `instrument` is the incubator
34
+ * it is grown in, if the lab has one; `onDone` adds a way to leave.
35
+ * @returns `stage`, to spread onto `InstrumentStage` from `@biolibs/bionet-scene`, and `panel`, to
36
+ * put inside it.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { useInductionBench } from "@biolibs/bionet-tools";
41
+ *
42
+ * const bench = useInductionBench({ instrument });
43
+ * <InstrumentStage {...bench.stage}>{bench.panel}</InstrumentStage>
44
+ * ```
45
+ */
46
+ export function useInductionBench({ instrument = null, onDone, start } = {}) {
47
+ const lab = useLab()?.lab;
48
+ const act = useAct();
49
+ const [view, setView] = useState(start?.view ?? "machine");
50
+ const [culture, setCulture] = useState(start?.culture ?? "");
51
+ const [gene, setGene] = useState(start?.gene ?? "");
52
+ const [cds, setCds] = useState(start?.cds ?? "");
53
+ const [cutSignal, setCutSignal] = useState(false);
54
+ const [inducer, setInducer] = useState("IPTG");
55
+ const [concentration, setConcentration] = useState("0.5 mM");
56
+ const [celsius, setCelsius] = useState("30");
57
+ const [rpm, setRpm] = useState("220");
58
+ const [hours, setHours] = useState("4");
59
+ const [used, setUsed] = useState("1");
60
+ const [gel, setGel] = useState(USUAL_PROTEIN_GEL);
61
+ // Empty means "whichever suits the gel", which is what a person does until they want another.
62
+ const [ladder, setLadder] = useState("");
63
+ const [name, setName] = useState("");
64
+ const [amount, setAmount] = useState("1");
65
+ const [note, setNote] = useState("");
66
+ const [busy, setBusy] = useState(false);
67
+ const [said, setSaid] = useState(null);
68
+ // A host driving the bench — a tour, or a link — says what to show by changing `start`.
69
+ const asked = JSON.stringify(start ?? null);
70
+ useEffect(() => {
71
+ if (start === undefined)
72
+ return;
73
+ if (start.view !== undefined)
74
+ setView(start.view);
75
+ if (start.culture !== undefined)
76
+ setCulture(start.culture);
77
+ if (start.gene !== undefined)
78
+ setGene(start.gene);
79
+ if (start.cds !== undefined)
80
+ setCds(start.cds);
81
+ }, [asked]);
82
+ const cultures = useMemo(() => (lab === null || lab === undefined ? [] : inductionCultures(lab)), [lab]);
83
+ const genes = useMemo(() => (lab === null || lab === undefined || culture === "" ? [] : inductionGenes(lab, culture)), [lab, culture]);
84
+ const chosen = genes.find((one) => one.part.checksum === gene);
85
+ // Arriving at the gel finds it running, because that is what a gel does.
86
+ const [ran, setRan, running] = useRunning(view === "result" && culture !== "" && gene !== "", start?.ran ?? 0);
87
+ const run = useMemo(() => (lab === null || lab === undefined ? null : inductionRun(lab, {
88
+ culture, gene, gel, ladder, instrument: instrument?.id ?? null, note, inducer, concentration,
89
+ ...(cds === "" ? {} : { cds }), ...(cutSignal ? { cutSignal: true } : {}), ...(name === "" ? {} : { name }),
90
+ ...(whole(used) === undefined ? {} : { used: whole(used) }), ...(whole(amount) === undefined ? {} : { amount: whole(amount) }),
91
+ ...(whole(celsius) === undefined ? {} : { celsius: whole(celsius) }),
92
+ ...(whole(rpm) === undefined ? {} : { rpm: whole(rpm) }),
93
+ ...(whole(hours) === undefined ? {} : { hours: whole(hours) }),
94
+ })), [lab, culture, gene, cds, cutSignal, gel, ladder, instrument, note, inducer, concentration, celsius, rpm, hours, used, amount, name]);
95
+ const plan = run?.plan ?? null;
96
+ const good = plan !== null && plan.problem === null && plan.kilodaltons !== null ? plan : null;
97
+ const checks = plan === null || plan.problem !== null ? [] : inductionChecks(plan);
98
+ const working = useMemo(() => (good === null ? [] : inductionWorking(good)), [good]);
99
+ // A protein the lab already holds is not added again: it is the same molecule, by the same checksum.
100
+ const already = good?.checksum == null ? undefined : lab?.parts.find((one) => one.checksum === good.checksum);
101
+ const stage = {
102
+ model: "shaking-incubator", name: instrument?.name ?? "Shaking incubator", view, onView: setView,
103
+ screen: [{ text: `${whole(celsius) ?? "—"} °C ${whole(rpm) ?? "—"} rpm`, lit: true }, { text: `${whole(hours) ?? "—"}:00 h` }],
104
+ ...(culture === "" ? {} : { well: { row: 0, column: 1 } }),
105
+ ...(chosen === undefined || view !== "tube" ? {} : { molecule: (() => {
106
+ const drawn = moleculeOf(chosen.part);
107
+ // The stretch being read is drawn on the gene, since that is the part of it that matters here.
108
+ const marked = cds === "" ? undefined : chosen.part.features.find((one) => one.label === cds)?.parts[0];
109
+ return marked === undefined ? drawn : {
110
+ ...drawn,
111
+ features: [{ start: marked.start, end: marked.end, strand: 0, tone: "found", label: `read · ${cds}` }, ...drawn.features],
112
+ };
113
+ })() }),
114
+ ...(good === null ? {} : { gel: { ran: ran / 100, lanes: [
115
+ // Bands the gel does not separate pile up in the well as one, and are named as the range they
116
+ // are. Labels that still crowd are the scene's to thin out, which it does by rank.
117
+ { name: "marker", tone: "dim", bands: good.ladder.map((band) => ({
118
+ position: band.position, intensity: 0.6,
119
+ label: band.sizes.length > 1 ? `${band.sizes.at(-1)}–${band.sizes[0]}` : `${band.size}`
120
+ })) },
121
+ { name: "induced", tone: "held", bands: good.bands.map((band) => ({ position: band.position, intensity: band.intensity, label: kda(band.size) })) },
122
+ ] } }),
123
+ };
124
+ /** Set the bench up as a plan says: its culture, and the gene it names. */
125
+ const setUp = (plan) => {
126
+ setCulture(plan.inputs.find((one) => one.role === "culture")?.item ?? "");
127
+ setGene(typeof plan.settings["gene_part"] === "string" ? plan.settings["gene_part"] : "");
128
+ setCds(typeof plan.settings["cds"] === "string" ? plan.settings["cds"] : "");
129
+ setCutSignal(plan.settings["signal_cut"] === "yes");
130
+ if (typeof plan.settings["inducer"] === "string")
131
+ setInducer(plan.settings["inducer"]);
132
+ if (typeof plan.settings["at"] === "string")
133
+ setConcentration(plan.settings["at"]);
134
+ setSaid(null);
135
+ setView("result");
136
+ };
137
+ /**
138
+ * Record the run, and — if the band was there — keep the protein.
139
+ *
140
+ * The order is the order it happened in: the run, then the part, then the tube of it. Each is its
141
+ * own entry, so a device that cannot read one still reads the others; and if the part is one the
142
+ * lab already holds, only a tube is added, because two labs that made the same protein made the
143
+ * same protein.
144
+ */
145
+ const record = async (showed) => {
146
+ const what = showed ? run?.showed ?? null : run?.nothing ?? null;
147
+ const keep = run?.keep ?? null;
148
+ if (what === null)
149
+ return;
150
+ setBusy(true);
151
+ const answer = await act("recordRun", withPlan(lab, what));
152
+ if (!answer.ok) {
153
+ setBusy(false);
154
+ setSaid(answer.error);
155
+ return;
156
+ }
157
+ if (!showed || keep === null) {
158
+ setBusy(false);
159
+ setNote("");
160
+ setSaid("Recorded: it was grown and induced, and nothing was at that mass.");
161
+ return;
162
+ }
163
+ if (already === undefined) {
164
+ const added = await act("addPart", { name: keep.name, sequence: keep.sequence, kind: "protein" });
165
+ if (!added.ok) {
166
+ setBusy(false);
167
+ setSaid(added.error);
168
+ return;
169
+ }
170
+ }
171
+ const tube = await act("addItem", { part: keep.checksum, amount: keep.amount, unit: keep.unit });
172
+ setBusy(false);
173
+ setNote("");
174
+ setSaid(tube.ok
175
+ ? `Recorded: the band is there, and ${keep.name} is in the freezer — ${keep.amount} ${keep.unit ?? ""}`.trim() + "."
176
+ : tube.error);
177
+ };
178
+ const here = lab === null || lab === undefined ? [] : lab.runs.filter((one) => one.kind === INDUCTION && (instrument === null || one.instrument === instrument.id)).slice(-5).reverse();
179
+ const strainName = (item) => {
180
+ const held = lab?.items.find((one) => one.item === item);
181
+ return lab?.strains.find((one) => one.strain === held?.strain)?.name ?? "a culture";
182
+ };
183
+ const checked = checks.length === 0 ? _jsx("p", { className: "small good", children: "Nothing about this induction looks wrong for this gel." })
184
+ : _jsx("ul", { className: "checks", children: checks.map((check) => _jsxs("li", { className: check.weight, children: [check.says, " ", _jsx("code", { className: "because", children: check.because })] }, check.says)) });
185
+ const panel = lab === null || lab === undefined ? null : (_jsxs("div", { className: "bionet benchpanel", children: [_jsxs("section", { className: "card", children: [_jsxs("div", { className: "toolhead", children: [_jsx("h2", { children: "Induction and gel" }), onDone !== undefined && _jsx("button", { type: "button", className: "quiet", onClick: onDone, children: "Back to the lab" })] }), cultures.length === 0 ? _jsx("p", { className: "empty", children: "There are no cultures to grow. A culture is of a strain: add a strain and a culture of it on the Strains tab, once something has been put into a host." }) : (_jsxs("fieldset", { disabled: busy, className: "stack", children: [_jsxs("label", { children: ["Culture", _jsxs("select", { value: culture, onChange: (event) => { setCulture(event.target.value); setGene(""); setCds(""); setSaid(null); }, "aria-label": "Culture", children: [_jsx("option", { value: "", children: "Choose a culture\u2026" }), cultures.map((one) => _jsx("option", { value: one.item, children: one.label }, one.item))] })] }), culture !== "" && (_jsxs("label", { children: ["Express", _jsxs("select", { value: gene, onChange: (event) => { setGene(event.target.value); setCds(""); setSaid(null); }, "aria-label": "What to express", children: [_jsx("option", { value: "", children: "Choose what it carries\u2026" }), genes.map((one) => _jsxs("option", { value: one.part.checksum, children: [one.part.name, " \u00B7 ", count(one.part.length), " bp"] }, one.part.checksum))] })] })), chosen !== undefined && chosen.coding.length > 0 && (_jsxs("label", { children: ["Read which coding sequence", _jsxs("select", { value: cds, onChange: (event) => { setCds(event.target.value); setSaid(null); }, "aria-label": "The coding sequence", children: [_jsx("option", { value: "", children: "the whole part" }), chosen.coding.map((one) => _jsx("option", { value: one, children: one }, one))] })] })), chosen !== undefined && (_jsxs("label", { className: "check", children: [_jsx("input", { type: "checkbox", checked: cutSignal, onChange: (event) => { setCutSignal(event.target.checked); setSaid(null); } }), "Take off a signal peptide, if one is marked"] }))] })), plan !== null && plan.problem !== null && culture !== "" && _jsx("p", { className: "trouble", role: "status", children: plan.problem })] }), _jsx(Proposed, { kind: INDUCTION, now: run?.showed ?? null, onSetUp: setUp }), view === "machine" && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "At the incubator" }), _jsx("p", { className: "small", children: _jsx(Glossed, { text: "Induction turns a promoter on, so that the cells carrying a gene start making the protein it codes for. A few hours later the protein is run on a polyacrylamide gel, which sorts proteins by mass." }) }), _jsx("p", { className: "dim small", children: "An incubator shows a temperature, a speed and a time, and nothing of what the cells are doing. The first three views are what is there to see. The fourth is the gene you have to picture being read. The fifth is the gel, which is where the answer comes from." }), _jsx("p", { className: "dim small", children: "Nothing here predicts a yield. What the cells make depends on the host, the promoter, the temperature and the protein itself, and no sequence tells you it. What is worked out is the protein the gene codes for and the mass its band should run at; whether that band is there is yours to read." })] })), view === "block" && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "The flasks" }), _jsx("p", { className: "voice", children: "The machine" }), _jsxs("fieldset", { disabled: busy, className: "programme", children: [_jsxs("label", { children: ["Induce with", _jsx("input", { value: inducer, onChange: (event) => setInducer(event.target.value), maxLength: 200, "aria-label": "The inducer" })] }), _jsxs("label", { children: ["at", _jsx("input", { value: concentration, onChange: (event) => setConcentration(event.target.value), maxLength: 200, "aria-label": "How much of it" })] })] }), _jsx("p", { className: "small", children: _jsx(Glossed, { text: "A flask of medium clamped to a platform that shakes, so that air is mixed in and the cells stay suspended." }) }), _jsx("p", { className: "voice", children: "This run" }), _jsxs("p", { className: "small", children: [plan?.strain == null ? "Nothing is growing yet. Choose a culture above." : _jsxs(_Fragment, { children: ["A flask of ", plan.strain.name, " \u2014 ", plan.strain.host, " \u2014 is in the second clamp."] }), plan?.gene != null && _jsxs(_Fragment, { children: [" It carries ", plan.gene.name, cds === "" ? "" : `, and ${cds} is what is being read`, "."] })] }), _jsx("p", { className: "dim small", children: "What the inducer is and how much of it was used are kept with the run as they are written here. Nothing works out whether that concentration is right for this promoter: that is in the literature, and in what this lab has found before." })] })), view === "screen" && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "The display" }), _jsx("p", { className: "voice", children: "The machine" }), _jsxs("fieldset", { disabled: busy, className: "programme", children: [_jsxs("label", { children: ["Grow at", _jsx("input", { type: "number", min: 4, max: 60, step: 1, value: celsius, onChange: (event) => setCelsius(event.target.value) }), " \u00B0C"] }), _jsxs("label", { children: ["shaking at", _jsx("input", { type: "number", min: 0, max: 400, step: 10, value: rpm, onChange: (event) => setRpm(event.target.value) }), " rpm"] }), _jsxs("label", { children: ["for", _jsx("input", { type: "number", min: 1, max: 96, step: 1, value: hours, onChange: (event) => setHours(event.target.value) }), " h"] })] }), _jsx("p", { className: "voice", children: "What is going on" }), _jsx("p", { className: "small", children: "The inducer lets the polymerase onto the promoter, so the gene behind it is read into messenger RNA and that is translated into protein. The cells go on growing and dividing while they do it, which is why the temperature and the shaking matter as much as the inducer." }), _jsx("p", { className: "dim small", children: "Growing cooler and for longer often gives less protein that is better folded, and warmer and briefly gives more of it stuck together in inclusion bodies. Nothing here works out which this will be. What is set is kept with the run, so that the next person can set it up the same way or deliberately differently." })] })), view === "tube" && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "In the cells" }), chosen === undefined || plan === null ? _jsx("p", { className: "dim small", children: "Choose a culture and what it carries to see the gene being read." }) : (_jsxs(_Fragment, { children: [_jsx(SequenceMap, { name: chosen.part.name, length: chosen.part.length, circular: chosen.part.circular, features: chosen.part.features, ...(cds === "" ? {} : { spans: chosen.part.features.filter((one) => one.label === cds).flatMap((one) => one.parts.map((piece) => ({ start: piece.start, end: piece.end, label: "read", strand: 0 }))) }) }), plan.made === null ? _jsx("p", { className: "dim small", children: plan.problem ?? "There is nothing here that reads as a gene." }) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "voice", children: "This run" }), _jsxs("p", { children: [_jsxs("strong", { children: [count(plan.made.length), " amino acids"] }), plan.kilodaltons !== null && _jsxs("span", { className: "dim", children: [" \u00B7 ", kda(plan.kilodaltons)] }), plan.made.signal !== null && _jsxs("span", { className: "dim", children: [" \u00B7 ", plan.made.signal.label, " cut off"] })] }), _jsx("p", { className: "small", children: _jsxs("code", { className: "seq", children: [plan.made.protein.slice(0, 120), plan.made.protein.length > 120 ? "…" : ""] }) }), plan.facts !== null && (_jsxs("p", { className: "small", children: ["It carries no net charge at pH ", plan.facts.isoelectric.toFixed(2), ", which is the pH it would come out of solution at.", plan.facts.extinction.reduced > 0
186
+ ? _jsxs(_Fragment, { children: [" It absorbs at 280 nm with ", count(plan.facts.extinction.reduced), " M\u207B\u00B9cm\u207B\u00B9, which is how its concentration is read off."] })
187
+ : _jsx(_Fragment, { children: " It has no tryptophan, tyrosine or cystine, so it does not absorb at 280 nm at all and its concentration cannot be read there: use a dye-based assay instead." })] })), _jsx("p", { className: "small", children: _jsx(Glossed, { text: "A signal peptide is the first stretch of a protein the cell means to let out, and is cut off on the way: what is collected from the medium is what is left." }) }), _jsx("p", { className: "voice", children: "Checks" }), checked] }))] }))] })), view === "result" && (_jsxs("section", { className: "card", children: [_jsx("h2", { children: "The gel" }), good === null ? _jsx("p", { className: "dim small", children: plan?.problem ?? "Choose a culture and a gene that codes for a protein to see the gel it should give." }) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "voice", children: "The machine" }), _jsxs("fieldset", { disabled: busy, className: "programme", children: [_jsxs("label", { children: ["Gel", _jsx("select", { value: gel, onChange: (event) => setGel(event.target.value), children: PROTEIN_GELS.map((one) => _jsxs("option", { value: one.id, children: [one.percent, "% acrylamide"] }, one.id)) })] }), _jsxs("label", { children: ["Marker", _jsxs("select", { value: ladder, onChange: (event) => setLadder(event.target.value), children: [_jsxs("option", { value: "", children: [markerFor(good.gel).name, " \u00B7 the one for this gel"] }), PROTEIN_LADDERS.map((one) => _jsx("option", { value: one.id, children: one.name }, one.id))] })] })] }), _jsx("p", { className: "voice", children: "This run" }), _jsx(Gel, { ladder: good.ladder, bands: good.bands, name: "induced", unit: "kilodaltons", marker: "marker", says: `A protein gel: a broad-range marker beside the induced culture, with one band to look for at ${kda(good.kilodaltons)}` }), _jsxs("p", { className: "small", children: ["The band to look for is at ", _jsx("strong", { children: kda(good.kilodaltons) }), ", between the marker\u2019s ", good.ladder.filter((one) => one.size >= good.kilodaltons).at(-1)?.size ?? good.gel.largest, " and ", good.ladder.filter((one) => one.size <= good.kilodaltons)[0]?.size ?? good.gel.smallest, " kDa bands. This gel separates ", good.gel.largest, " down to ", good.gel.smallest, " kDa."] }), _jsxs("label", { className: "small", children: ["How far it has run", running ? " · running" : "", _jsx("input", { type: "range", min: 0, max: 100, step: 1, value: Math.round(ran), onChange: (event) => setRan(Number(event.target.value)), "aria-label": "How far the gel has run" })] }), _jsx("p", { className: "dim small", children: "A lane of the same culture before it was induced, beside this one, is what makes a band mean anything: the protein is the band that is in one and not the other." }), _jsx("p", { className: "voice", children: "Checks" }), checked, _jsx("p", { className: "voice", children: "The working" }), working.map((one) => _jsx(ShowWorking, { working: one }, one.of)), _jsxs("fieldset", { disabled: busy, className: "stack", children: [_jsxs("label", { children: ["Call the protein", _jsx("input", { value: name, onChange: (event) => setName(event.target.value), maxLength: 200, placeholder: run?.keep?.name ?? "a name for it", "aria-label": "What to call the protein" })] }), _jsxs("label", { children: ["Used, from the culture", _jsx("input", { type: "number", min: 0, step: 1, value: used, onChange: (event) => setUsed(event.target.value), "aria-label": "Amount used" })] }), _jsxs("label", { children: ["How much came out, in mL", _jsx("input", { type: "number", min: 0, step: 1, value: amount, onChange: (event) => setAmount(event.target.value), "aria-label": "How much protein came out" })] }), _jsxs("label", { children: ["Note", _jsx("input", { value: note, onChange: (event) => setNote(event.target.value), placeholder: "Anything worth remembering about this induction", maxLength: 2000 })] }), already !== undefined && _jsxs("p", { className: "small", children: ["The lab already holds this protein, as ", already.name, ". Only a tube of it will be added: it is the same molecule."] }), _jsxs("div", { className: "row", children: [_jsx("button", { type: "button", onClick: () => void record(true), children: "The band is there" }), _jsx("button", { type: "button", className: "quiet", onClick: () => void record(false), children: "Nothing at that mass" })] }), _jsx("p", { className: "dim small", children: "Either way the run is recorded and the culture is used. Only the first puts a protein in the freezer, and it is named in the run\u2019s settings by the checksum it will have, so the two can be put back together afterwards." })] }), said !== null && _jsx("p", { className: "small", role: "status", children: said })] }))] })), here.length > 0 && view === "result" && (_jsxs("section", { className: "card", children: [_jsxs("h2", { children: ["Recent inductions", instrument === null ? "" : " here"] }), _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Culture" }), _jsx("th", { children: "Gene" }), _jsx("th", { children: "Induced with" }), _jsx("th", { children: "Expected" }), _jsx("th", { children: "Gel" })] }) }), _jsx("tbody", { children: here.map((one) => (_jsxs("tr", { children: [_jsx("td", { children: strainName(one.inputs[0]?.item) }), _jsx("td", { children: String(one.settings["gene"] ?? "—") }), _jsx("td", { className: "dim", children: [one.settings["inducer"], one.settings["at"]].filter((each) => each !== undefined).join(" ") || "—" }), _jsx("td", { className: "dim", children: one.settings["expected_kda"] === undefined ? "—" : `${String(one.settings["expected_kda"])} kDa` }), _jsx("td", { children: one.outcome === "worked" ? "band there" : _jsx("span", { className: "badge", children: "nothing" }) })] }, one.run))) })] })] }))] }));
188
+ return { stage, panel };
189
+ }
190
+ /**
191
+ * The induction tool on its own, for a lab that has not drawn its room.
192
+ *
193
+ * @param props - `instrument` is the incubator it is grown in, if the lab has one; `start` says what
194
+ * to open on; `onDone` adds a way to leave.
195
+ */
196
+ export function InductionTool(props) {
197
+ const bench = useInductionBench(props);
198
+ const names = [["machine", "The incubator"], ["block", "The flasks"], ["screen", "The display"], ["tube", "In the cells"], ["result", "The gel"]];
199
+ return (_jsxs("div", { className: "pcr", children: [_jsx("div", { className: "row tight pick", role: "tablist", "aria-label": `Views of ${bench.stage.name}`, children: names.map(([one, said]) => (_jsx("button", { type: "button", role: "tab", "aria-selected": one === bench.stage.view, className: one === bench.stage.view ? "" : "quiet", onClick: () => bench.stage.onView(one), children: said }, one))) }), bench.panel] }));
200
+ }
201
+ //# sourceMappingURL=induce-bench.js.map