@biolibs/bionet-tools 0.1.9 → 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.
- package/README.md +79 -2
- package/dist/digest-tool.d.ts +12 -3
- package/dist/digest-tool.d.ts.map +1 -1
- package/dist/digest-tool.js +10 -4
- package/dist/digest-tool.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/induce-bench.d.ts +91 -0
- package/dist/induce-bench.d.ts.map +1 -0
- package/dist/induce-bench.js +201 -0
- package/dist/induce-bench.js.map +1 -0
- package/dist/induce.d.ts +280 -0
- package/dist/induce.d.ts.map +1 -0
- package/dist/induce.js +353 -0
- package/dist/induce.js.map +1 -0
- package/dist/modify.d.ts +197 -0
- package/dist/modify.d.ts.map +1 -0
- package/dist/modify.js +253 -0
- package/dist/modify.js.map +1 -0
- package/dist/protein.d.ts.map +1 -1
- package/dist/protein.js +3 -1
- package/dist/protein.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -1
- package/dist/run.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +5 -3
- package/dist/tools.js.map +1 -1
- package/package.json +4 -4
- package/src/digest-tool.tsx +14 -5
- package/src/index.ts +6 -0
- package/src/induce-bench.tsx +406 -0
- package/src/induce.ts +448 -0
- package/src/modify.ts +350 -0
- package/src/protein.ts +3 -1
- package/src/run.ts +2 -2
- package/src/tools.tsx +4 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @biolibs/bionet-tools
|
|
2
2
|
|
|
3
|
-
The tools a lab uses at the bench, tied to its freezer: its sequences and their maps, PCR, a check digest with its gel,
|
|
3
|
+
The tools a lab uses at the bench, tied to its freezer: its sequences and their maps, PCR, a check digest with its gel, a ligation that joins the pieces back up, an induction that grows a strain to make the protein the whole thing was for, and a check on whether that protein will be modified into something that works. Sequences come in from the SnapGene, GenBank, EMBL and FASTA files a lab already has, with their features. 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
4
|
|
|
5
5
|
```
|
|
6
6
|
npm install @biolibs/bionet-tools @biolibs/bionet-panels @biolibs/bionet-react @biolibs/bionet-theme react
|
|
@@ -283,6 +283,83 @@ const run = digestRun(lab, { tube, enzymes: ["EcoRI"] }); // what to record, if
|
|
|
283
283
|
tube and notes which enzymes, what was expected and whether the gel showed it. Pieces can be kept
|
|
284
284
|
as tubes, each a part with the ends the enzymes left.
|
|
285
285
|
|
|
286
|
+
## Growing a culture to get the protein
|
|
287
|
+
|
|
288
|
+
A lab that stops at DNA has stopped one step short of what the DNA was for. An induction is the step
|
|
289
|
+
across: a culture of a strain that carries the construct is grown, fed something that turns the
|
|
290
|
+
promoter on, and a few hours later a lane of a polyacrylamide gel either has a band at the right mass
|
|
291
|
+
or it does not.
|
|
292
|
+
|
|
293
|
+
```ts
|
|
294
|
+
import { inductionCultures, inductionGenes, inductionRun, planInduction } from "@biolibs/bionet-tools";
|
|
295
|
+
|
|
296
|
+
inductionCultures(lab); // the cultures there are, the ones carrying something first
|
|
297
|
+
inductionGenes(lab, culture); // what that strain carries, and the coding sequences marked on each
|
|
298
|
+
|
|
299
|
+
const plan = planInduction(lab, { culture, gene, cds: "casein", cutSignal: true });
|
|
300
|
+
plan.kilodaltons; // what the band should run at
|
|
301
|
+
plan.bands[0].position; // where on the gel, beside plan.ladder
|
|
302
|
+
plan.checksum; // the identity the protein will have in the lab
|
|
303
|
+
|
|
304
|
+
const run = inductionRun(lab, { culture, gene, cds: "casein", inducer: "galactose", concentration: "2%" });
|
|
305
|
+
run.showed; // what to record if the band was there
|
|
306
|
+
run.nothing; // what to record if it was grown and nothing was at that mass
|
|
307
|
+
run.keep; // the protein to add as a part, and the tube of it
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Two things here are unlike every other tool in this package, and both are deliberate.
|
|
311
|
+
|
|
312
|
+
**Nothing that comes out is worked out from what went in.** A PCR's product is the stretch between the
|
|
313
|
+
primers and arithmetic gives it. A culture's product is whatever the cells chose to make, and no
|
|
314
|
+
sequence predicts the yield, the solubility or whether the thing folded. So what is computed is the
|
|
315
|
+
protein the gene *codes for* and the mass its band *should* run at. Whether the band is there is read
|
|
316
|
+
off a gel by a person, and is the one thing recorded. `inductionChecks` says when the gel chosen could
|
|
317
|
+
not answer the question at all — a band below what it separates runs off the front, one above it stays
|
|
318
|
+
in the well, and one that lands on a marker band cannot be told from it.
|
|
319
|
+
|
|
320
|
+
**The protein is not an output of the run.** A run's outputs are DNA — every device that reads the log
|
|
321
|
+
agrees on that, and an entry saying otherwise would be refused by the older ones. So an induction is
|
|
322
|
+
recorded as a run with no outputs that used some of a culture, the same shape a transformation has, and
|
|
323
|
+
the protein is added afterwards as a part in its own right. The run names it in its settings by the
|
|
324
|
+
checksum that part will have, which `inducedBy` reads back: so a device that was not there when it
|
|
325
|
+
happened arrives at the same answer from the log alone, without a new kind of entry.
|
|
326
|
+
|
|
327
|
+
## Whether the protein will actually work
|
|
328
|
+
|
|
329
|
+
A band of the right mass is not the same as a protein that does its job, and for a milk protein the
|
|
330
|
+
difference is the whole project. Casein builds a micelle — which is what makes it behave like cheese
|
|
331
|
+
rather than like dissolved protein — through clusters of phosphorylated serines binding calcium. A
|
|
332
|
+
host can make casein of exactly the right mass, giving exactly the right band, that will not do the
|
|
333
|
+
job, because the kinase that puts the phosphates on is one the host does not have.
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
import { comparedWithKnown, hostPhosphorylation, phosphoSites, phosphoWorking } from "@biolibs/bionet-tools";
|
|
337
|
+
|
|
338
|
+
const found = phosphoSites(casein.sequence);
|
|
339
|
+
found.sites.map((one) => [one.at, one.by, one.round]);
|
|
340
|
+
// [[30, "S-x-E", 3], [32, "S-x-E", 2], [33, "S-x-E", 1], [34, "S-x-E", 1], [50, "S-x-E", 1]]
|
|
341
|
+
|
|
342
|
+
comparedWithKnown(found.sites.map((one) => one.at), [30, 32, 33, 34, 50]).caught; // 1
|
|
343
|
+
hostPhosphorylation("Pichia pastoris GS115")?.secretoryKinase; // "not known"
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
Two things come back and they are different in kind, which is why they are worked out separately.
|
|
347
|
+
|
|
348
|
+
**The sites are a rule over the sequence.** The kinase of the secretory pathway reads Ser-x-Glu, and
|
|
349
|
+
once a serine is phosphorylated it carries the negative charge a glutamate does for the one two
|
|
350
|
+
residues before it — so the sites march backwards along a cluster, which is why casein's serines come
|
|
351
|
+
in runs. `round` says which pass found each, and `phosphoWorking` shows the rule and every pass.
|
|
352
|
+
|
|
353
|
+
Applied to bovine β-casein, that rule gives back exactly the five phosphoserines a curator recorded in
|
|
354
|
+
UniProt, and nothing else. A test asserts it, because that agreement is the only reason to believe the
|
|
355
|
+
rule on a sequence nobody has studied — a variant, or the same gene rewritten in another host's
|
|
356
|
+
codons. `comparedWithKnown` is how to make that check for any protein that has a record.
|
|
357
|
+
|
|
358
|
+
**Whether the host has the enzyme is not a rule.** `hostPhosphorylation` says what is generally held
|
|
359
|
+
about the usual expression hosts, says how firmly, and says plainly that it is a claim to go and
|
|
360
|
+
check — which a lab's own literature tools can now do. It is there to stop somebody discovering at the
|
|
361
|
+
end of a month that the protein was never going to be phosphorylated.
|
|
362
|
+
|
|
286
363
|
## The tool
|
|
287
364
|
|
|
288
365
|
```tsx
|
|
@@ -294,7 +371,7 @@ import { InstrumentTool, PcrTool } from "@biolibs/bionet-tools";
|
|
|
294
371
|
<PcrTool /> // or one tool on its own; DigestTool likewise
|
|
295
372
|
```
|
|
296
373
|
|
|
297
|
-
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
|
|
374
|
+
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`, digest and gel for a `gel-station`, a ligation for a `heat-block` and an induction for a `shaking-incubator`, 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.
|
|
298
375
|
|
|
299
376
|
The tools' own descriptions explain their terms on hover, with a picture, through
|
|
300
377
|
[`@biolibs/glossary-react`](../glossary-react). Import its `glossary.css` once as well.
|
package/dist/digest-tool.d.ts
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import type { Band } from "@biolibs/gel";
|
|
2
2
|
/**
|
|
3
|
-
* A gel, drawn: a
|
|
3
|
+
* A gel, drawn: a marker in one lane and the sample in the next.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
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
|
|
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"}
|
package/dist/digest-tool.js
CHANGED
|
@@ -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
|
|
16
|
+
* A gel, drawn: a marker in one lane and the sample in the next.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
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
|
|
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.
|
package/dist/digest-tool.js.map
CHANGED
|
@@ -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,OAAO,CACL,wBACE,eAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI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,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/index.d.ts
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
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
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
|
|
19
22
|
* - `verify-bench.tsx` — checking a construct against the design at a desk, saying what was not covered
|
|
20
23
|
* - `verify.ts` — a sequencing read against the design it was meant to be, and what each difference costs
|
|
21
24
|
* - `codons.ts` — a gene rewritten in a host's codons, from usage counted over that host's own genes
|
|
@@ -50,6 +53,9 @@ export * from "./digest-tool.js";
|
|
|
50
53
|
export * from "./pcr-working.js";
|
|
51
54
|
export * from "./digest-working.js";
|
|
52
55
|
export * from "./protein.js";
|
|
56
|
+
export * from "./induce.js";
|
|
57
|
+
export * from "./modify.js";
|
|
58
|
+
export * from "./induce-bench.js";
|
|
53
59
|
export * from "./verify.js";
|
|
54
60
|
export * from "./verify-bench.js";
|
|
55
61
|
export * from "./codons.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
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
|
@@ -16,6 +16,9 @@
|
|
|
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
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
|
|
19
22
|
* - `verify-bench.tsx` — checking a construct against the design at a desk, saying what was not covered
|
|
20
23
|
* - `verify.ts` — a sequencing read against the design it was meant to be, and what each difference costs
|
|
21
24
|
* - `codons.ts` — a gene rewritten in a host's codons, from usage counted over that host's own genes
|
|
@@ -50,6 +53,9 @@ export * from "./digest-tool.js";
|
|
|
50
53
|
export * from "./pcr-working.js";
|
|
51
54
|
export * from "./digest-working.js";
|
|
52
55
|
export * from "./protein.js";
|
|
56
|
+
export * from "./induce.js";
|
|
57
|
+
export * from "./modify.js";
|
|
58
|
+
export * from "./induce-bench.js";
|
|
53
59
|
export * from "./verify.js";
|
|
54
60
|
export * from "./verify-bench.js";
|
|
55
61
|
export * from "./codons.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","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"}
|
|
@@ -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,wFAAwF;AACxF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtC,yCAAyC;IACzC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAC1C,iCAAiC;IACjC,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE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ime";
|
|
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
|