@biolibs/bionet-tools 0.1.10 → 0.1.11
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 +60 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/ordering.d.ts +147 -0
- package/dist/ordering.d.ts.map +1 -0
- package/dist/ordering.js +203 -0
- package/dist/ordering.js.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -1
- package/dist/tools.js.map +1 -1
- package/dist/work.d.ts +18 -0
- package/dist/work.d.ts.map +1 -0
- package/dist/work.js +145 -0
- package/dist/work.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +4 -0
- package/src/ordering.ts +301 -0
- package/src/tools.tsx +4 -1
- package/src/work.tsx +277 -0
- package/tools.css +11 -0
package/README.md
CHANGED
|
@@ -360,6 +360,66 @@ about the usual expression hosts, says how firmly, and says plainly that it is a
|
|
|
360
360
|
check — which a lab's own literature tools can now do. It is there to stop somebody discovering at the
|
|
361
361
|
end of a month that the protein was never going to be phosphorylated.
|
|
362
362
|
|
|
363
|
+
## Several proposals read as one piece of work
|
|
364
|
+
|
|
365
|
+
A proposal is one run. Nothing in the log says that eleven of them are one build, or which comes
|
|
366
|
+
first — and until this, nothing read them as anything but eleven unrelated cards spread over four
|
|
367
|
+
tabs, in whatever order they happened to be made.
|
|
368
|
+
|
|
369
|
+
But the order is not missing from the data. It is simply never followed. A proposal says what it
|
|
370
|
+
expects to make, each thing with the checksum that would be its identity; another says what it
|
|
371
|
+
needs, and may name a part there is no tube of yet by that same checksum. Where one expects what
|
|
372
|
+
another needs, the first has to happen first.
|
|
373
|
+
|
|
374
|
+
```ts
|
|
375
|
+
import { planOfWork, saysWork } from "@biolibs/bionet-tools";
|
|
376
|
+
|
|
377
|
+
const work = planOfWork(lab);
|
|
378
|
+
saysWork(work);
|
|
379
|
+
// ["4 steps are proposed, in 2 pieces of work.", "2 steps could be carried out now.", …]
|
|
380
|
+
|
|
381
|
+
work.ready.map((one) => one.plan.kind); // what somebody could go and do now
|
|
382
|
+
work.toGet; // what has to be ordered before any of it can start
|
|
383
|
+
work.threads.map((one) => one.name); // ["pWren-CSN2", "a terminator cassette"]
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
```tsx
|
|
387
|
+
import { WorkToDo } from "@biolibs/bionet-tools";
|
|
388
|
+
|
|
389
|
+
<WorkToDo onOpen={(plan) => goToTheToolFor(plan.kind)} />
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Three things are worth knowing about it.
|
|
393
|
+
|
|
394
|
+
**Which project it is for is filed, not derived.** The order is a fact about molecules and is worked
|
|
395
|
+
out; which work belongs together is a decision and is not. Four caseins are four chains in one
|
|
396
|
+
project, and two unrelated projects are also chains — nothing can tell them apart by looking at what
|
|
397
|
+
they make. So `planOfWork` groups by the `project` field on each plan, and anything nobody filed goes
|
|
398
|
+
under `Not filed` rather than being lumped in with somebody else's.
|
|
399
|
+
|
|
400
|
+
```ts
|
|
401
|
+
work.projects.map((one) => [one.name, one.ready.length]);
|
|
402
|
+
// [["Bioprinting", 0], ["Real Vegan Cheese", 2], ["Not filed", 1]]
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**Nothing else is declared, so nothing can drift.** The order is derived, not asserted. There is no new
|
|
406
|
+
kind of entry, nothing an older device has to understand, and no way for a stated order and the real
|
|
407
|
+
one to disagree.
|
|
408
|
+
|
|
409
|
+
**A chain never crosses into another.** A piece of work is every step joined to every other by what
|
|
410
|
+
they make and need, so a step can only ever wait on one in its own chain. That is what lets the
|
|
411
|
+
steps be numbered within a chain rather than across the lot, and a test asserts it.
|
|
412
|
+
|
|
413
|
+
**The chain stops at a transformation.** What a transformation makes is alive, so it has no checksum
|
|
414
|
+
for a later proposal to point at, and the culture an induction would use does not exist until
|
|
415
|
+
somebody has grown it. The work up to putting a construct into a host can be proposed as one chain;
|
|
416
|
+
what follows is proposed afresh once there is something growing. That is a real limit, and it is
|
|
417
|
+
said in the panel rather than left to be discovered.
|
|
418
|
+
|
|
419
|
+
One thing has to be done for a chain to be possible at all: **a proposal may only name a part the
|
|
420
|
+
lab knows of**, so what an earlier step would make has to be added with `addPart` — no tube, just
|
|
421
|
+
the sequence under a name — before a later step can say it needs it.
|
|
422
|
+
|
|
363
423
|
## The tool
|
|
364
424
|
|
|
365
425
|
```tsx
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
* - `primer-working.ts` — the working behind a design: the melting temperature's sum, the GC count, the bases that pair
|
|
39
39
|
* - `primer-bench.tsx` — designing primers at a desk: the panel, and the template with the pair marked on it for a scene
|
|
40
40
|
* - `plans.tsx` — runs that have been proposed, at the tool that would carry them out
|
|
41
|
+
* - `ordering.ts` — those proposals read as one piece of work: what order, what can start, what is waiting
|
|
42
|
+
* - `work.tsx` — that work drawn: the chains, in order, with what has to be got first
|
|
41
43
|
* - `tools.tsx` — getting to one: from an instrument, or from a list of them all
|
|
42
44
|
*
|
|
43
45
|
* The tools are drawn with the styles of `@biolibs/bionet-panels` and belong inside its `LabWindow`.
|
|
@@ -71,6 +73,8 @@ export * from "./working.js";
|
|
|
71
73
|
export * from "./map.js";
|
|
72
74
|
export * from "./sequences-tool.js";
|
|
73
75
|
export * from "./plans.js";
|
|
76
|
+
export * from "./ordering.js";
|
|
77
|
+
export * from "./work.js";
|
|
74
78
|
export * from "./tools.js";
|
|
75
79
|
export * from "./pcr-bench.js";
|
|
76
80
|
export * from "./primer-design.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;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,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,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
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
* - `primer-working.ts` — the working behind a design: the melting temperature's sum, the GC count, the bases that pair
|
|
39
39
|
* - `primer-bench.tsx` — designing primers at a desk: the panel, and the template with the pair marked on it for a scene
|
|
40
40
|
* - `plans.tsx` — runs that have been proposed, at the tool that would carry them out
|
|
41
|
+
* - `ordering.ts` — those proposals read as one piece of work: what order, what can start, what is waiting
|
|
42
|
+
* - `work.tsx` — that work drawn: the chains, in order, with what has to be got first
|
|
41
43
|
* - `tools.tsx` — getting to one: from an instrument, or from a list of them all
|
|
42
44
|
*
|
|
43
45
|
* The tools are drawn with the styles of `@biolibs/bionet-panels` and belong inside its `LabWindow`.
|
|
@@ -71,6 +73,8 @@ export * from "./working.js";
|
|
|
71
73
|
export * from "./map.js";
|
|
72
74
|
export * from "./sequences-tool.js";
|
|
73
75
|
export * from "./plans.js";
|
|
76
|
+
export * from "./ordering.js";
|
|
77
|
+
export * from "./work.js";
|
|
74
78
|
export * from "./tools.js";
|
|
75
79
|
export * from "./pcr-bench.js";
|
|
76
80
|
export * from "./primer-design.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;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,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The order a lab's open proposals have to be carried out in, worked out from what each one makes
|
|
3
|
+
* and what each one needs.
|
|
4
|
+
*
|
|
5
|
+
* A proposal is one run. Nothing in the log says that eleven of them are one piece of work, or which
|
|
6
|
+
* comes first, and until now nothing read them as anything but eleven unrelated cards. But the order
|
|
7
|
+
* is not missing from the data — it is simply never followed. A plan says what it `expects` to make,
|
|
8
|
+
* each thing with the checksum that would be its identity; another plan says what it needs, and may
|
|
9
|
+
* name a part there is no tube of yet by that same checksum. Where one plan expects what another
|
|
10
|
+
* needs, the first has to happen first. That is a fact about the molecules, not a declaration
|
|
11
|
+
* somebody made, and it is true whether or not anybody wrote it down.
|
|
12
|
+
*
|
|
13
|
+
* So this derives the order rather than adding a way to assert one. No new kind of entry, nothing an
|
|
14
|
+
* older device has to understand, and no way for the stated order and the real one to disagree.
|
|
15
|
+
*
|
|
16
|
+
* **Where the chain stops, and why.** It stops at a transformation. What a transformation makes is
|
|
17
|
+
* alive, so it has no checksum to point at: a strain is this lab's own, known by an ID, and the
|
|
18
|
+
* culture that would be an induction's input does not exist until somebody has grown it. A plan
|
|
19
|
+
* cannot name a tube that is not there. So the work up to and including putting a construct into a
|
|
20
|
+
* host can be proposed as one chain, and what follows it has to be proposed afresh once there is
|
|
21
|
+
* something growing. That is a real limit and it is said here rather than hidden: a plan that
|
|
22
|
+
* claimed to run past it would be claiming to name something nothing can name yet.
|
|
23
|
+
*/
|
|
24
|
+
import type { ItemState, PlanState } from "@biolibs/bionet";
|
|
25
|
+
/** As much of a lab as the ordering reads. */
|
|
26
|
+
export interface OrderingLab {
|
|
27
|
+
plans: readonly PlanState[];
|
|
28
|
+
items: readonly ItemState[];
|
|
29
|
+
}
|
|
30
|
+
/** Why a step cannot be carried out yet, or `null` if it can. */
|
|
31
|
+
export type Holding = {
|
|
32
|
+
why: "a step before it";
|
|
33
|
+
steps: string[];
|
|
34
|
+
} | {
|
|
35
|
+
why: "something nobody is making";
|
|
36
|
+
parts: string[];
|
|
37
|
+
} | {
|
|
38
|
+
why: "a tube that has run short";
|
|
39
|
+
tubes: string[];
|
|
40
|
+
};
|
|
41
|
+
/** One step: a proposal, where it sits in the order, and what stands in its way. */
|
|
42
|
+
export interface Step {
|
|
43
|
+
/** The proposal itself. */
|
|
44
|
+
plan: PlanState;
|
|
45
|
+
/** The plans that have to be carried out before it, by ID. */
|
|
46
|
+
after: string[];
|
|
47
|
+
/** How deep it is: 0 for a step with nothing before it. */
|
|
48
|
+
depth: number;
|
|
49
|
+
/** What stands in its way, or `null` if it could be done now. */
|
|
50
|
+
held: Holding | null;
|
|
51
|
+
/** The checksums it would make. */
|
|
52
|
+
makes: string[];
|
|
53
|
+
}
|
|
54
|
+
/** The field a plan is filed under, unless a lab uses another word for it. */
|
|
55
|
+
export declare const FILED_UNDER = "project";
|
|
56
|
+
/** What a piece of work with no project is called. */
|
|
57
|
+
export declare const UNFILED = "Not filed";
|
|
58
|
+
/** One chain of steps that leads to one thing. */
|
|
59
|
+
export interface Thread {
|
|
60
|
+
/** What to call it: what it ends by making. */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Its steps, in an order that can be carried out. */
|
|
63
|
+
steps: Step[];
|
|
64
|
+
/** What it ends with: what it makes that nothing else in it consumes. */
|
|
65
|
+
ends: {
|
|
66
|
+
checksum: string;
|
|
67
|
+
name: string;
|
|
68
|
+
}[];
|
|
69
|
+
/** Whether every step of it could be carried out as things stand. */
|
|
70
|
+
clear: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Everything on in one project. */
|
|
73
|
+
export interface Project {
|
|
74
|
+
/** What it is called, as somebody filed it. */
|
|
75
|
+
name: string;
|
|
76
|
+
/** Whether anybody actually filed it, or it is the heap of what nobody did. */
|
|
77
|
+
filed: boolean;
|
|
78
|
+
/** Its chains. */
|
|
79
|
+
threads: Thread[];
|
|
80
|
+
/** Its steps, in one order that works. */
|
|
81
|
+
order: Step[];
|
|
82
|
+
/** The ones that could be carried out now. */
|
|
83
|
+
ready: Step[];
|
|
84
|
+
}
|
|
85
|
+
/** The open proposals, read as work to be done. */
|
|
86
|
+
export interface PlanOfWork {
|
|
87
|
+
/**
|
|
88
|
+
* What is on, by project.
|
|
89
|
+
*
|
|
90
|
+
* A chain is not a project and cannot be: four caseins are four chains in one project, and two
|
|
91
|
+
* unrelated projects are also chains. Which work belongs together is a thing people decide, so it
|
|
92
|
+
* is filed rather than derived, and a plan nobody filed is in `Not filed` rather than silently
|
|
93
|
+
* lumped in with somebody else's.
|
|
94
|
+
*/
|
|
95
|
+
projects: Project[];
|
|
96
|
+
/** The chains, each leading to one thing. A lab building four proteins has four. */
|
|
97
|
+
threads: Thread[];
|
|
98
|
+
/** Every open step, in one order that works. */
|
|
99
|
+
order: Step[];
|
|
100
|
+
/** The steps that could be carried out now. */
|
|
101
|
+
ready: Step[];
|
|
102
|
+
/** The steps that could not, and what each is waiting on. */
|
|
103
|
+
held: Step[];
|
|
104
|
+
/**
|
|
105
|
+
* Plans that need something nothing makes and no tube holds: what has to be ordered or
|
|
106
|
+
* synthesised before any of this can start, by checksum.
|
|
107
|
+
*/
|
|
108
|
+
toGet: {
|
|
109
|
+
checksum: string;
|
|
110
|
+
name: string;
|
|
111
|
+
forSteps: string[];
|
|
112
|
+
}[];
|
|
113
|
+
/** Plans that somehow depend on each other in a circle, by ID. Empty, unless something is wrong. */
|
|
114
|
+
tangled: string[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The open proposals, read as work: what order they go in, what can start now, what is waiting.
|
|
118
|
+
*
|
|
119
|
+
* @param lab - The lab, with its plans and its tubes.
|
|
120
|
+
* @returns The work, in threads and in one order.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* import { planOfWork } from "@biolibs/bionet-tools";
|
|
125
|
+
*
|
|
126
|
+
* const work = planOfWork(lab);
|
|
127
|
+
* work.ready.map((one) => one.plan.kind); // what somebody could go and do now
|
|
128
|
+
* work.toGet; // what has to be ordered before any of it
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export declare function planOfWork(lab: OrderingLab): PlanOfWork;
|
|
132
|
+
/**
|
|
133
|
+
* The work said in a sentence or two, for somebody who wants to know where things stand.
|
|
134
|
+
*
|
|
135
|
+
* @param work - What `planOfWork` gave.
|
|
136
|
+
* @returns A line for each thing worth saying. Empty if nothing is proposed.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* import { planOfWork, saysWork } from "@biolibs/bionet-tools";
|
|
141
|
+
*
|
|
142
|
+
* saysWork(planOfWork(lab));
|
|
143
|
+
* // ["Eleven steps are proposed, in four pieces of work.", "Three could be done now.", …]
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
export declare function saysWork(work: PlanOfWork): string[];
|
|
147
|
+
//# sourceMappingURL=ordering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ordering.d.ts","sourceRoot":"","sources":["../src/ordering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5D,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,KAAK,EAAE,SAAS,SAAS,EAAE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C;IAC9C,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,oFAAoF;IACpF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gDAAgD;IAChD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,+CAA+C;IAC/C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,6DAA6D;IAC7D,IAAI,EAAE,IAAI,EAAE,CAAC;IACb;;;OAGG;IACH,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAChE,oGAAoG;IACpG,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,CAmIvD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,CAuBnD"}
|
package/dist/ordering.js
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/** The field a plan is filed under, unless a lab uses another word for it. */
|
|
2
|
+
export const FILED_UNDER = "project";
|
|
3
|
+
/** What a piece of work with no project is called. */
|
|
4
|
+
export const UNFILED = "Not filed";
|
|
5
|
+
/** Whether the lab holds a tube of a part that has anything in it. */
|
|
6
|
+
const holds = (lab, checksum) => lab.items.some((one) => one.part === checksum && !one.retired && one.amount > 0);
|
|
7
|
+
/**
|
|
8
|
+
* The open proposals, read as work: what order they go in, what can start now, what is waiting.
|
|
9
|
+
*
|
|
10
|
+
* @param lab - The lab, with its plans and its tubes.
|
|
11
|
+
* @returns The work, in threads and in one order.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { planOfWork } from "@biolibs/bionet-tools";
|
|
16
|
+
*
|
|
17
|
+
* const work = planOfWork(lab);
|
|
18
|
+
* work.ready.map((one) => one.plan.kind); // what somebody could go and do now
|
|
19
|
+
* work.toGet; // what has to be ordered before any of it
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export function planOfWork(lab) {
|
|
23
|
+
const open = lab.plans.filter((one) => one.settled === null);
|
|
24
|
+
const byId = new Map(open.map((one) => [one.plan, one]));
|
|
25
|
+
// What each open plan would make, and who would make each thing.
|
|
26
|
+
const makers = new Map();
|
|
27
|
+
for (const plan of open) {
|
|
28
|
+
for (const expected of plan.expects)
|
|
29
|
+
makers.set(expected.checksum, [...(makers.get(expected.checksum) ?? []), plan.plan]);
|
|
30
|
+
}
|
|
31
|
+
const nameOf = (checksum) => open.flatMap((one) => one.expects).find((one) => one.checksum === checksum)?.name ?? checksum.slice(0, 12);
|
|
32
|
+
/** What each plan waits on, and what it needs that nothing is making. */
|
|
33
|
+
const after = new Map();
|
|
34
|
+
const missing = new Map();
|
|
35
|
+
for (const plan of open) {
|
|
36
|
+
const waits = [];
|
|
37
|
+
const nowhere = [];
|
|
38
|
+
for (const input of plan.inputs) {
|
|
39
|
+
if (input.part === undefined)
|
|
40
|
+
continue;
|
|
41
|
+
// A plan names a part rather than a tube when there was no tube of it when it was proposed.
|
|
42
|
+
// There may be one now, and that is a fact about the lab, not about the plan.
|
|
43
|
+
if (holds(lab, input.part))
|
|
44
|
+
continue;
|
|
45
|
+
const made = (makers.get(input.part) ?? []).filter((one) => one !== plan.plan);
|
|
46
|
+
if (made.length > 0)
|
|
47
|
+
waits.push(...made);
|
|
48
|
+
else
|
|
49
|
+
nowhere.push(input.part);
|
|
50
|
+
}
|
|
51
|
+
after.set(plan.plan, [...new Set(waits)]);
|
|
52
|
+
missing.set(plan.plan, [...new Set(nowhere)]);
|
|
53
|
+
}
|
|
54
|
+
// The order: a step comes after everything it waits on. Kahn's algorithm, which also finds a
|
|
55
|
+
// circle if the proposals somehow make one.
|
|
56
|
+
const left = new Set(open.map((one) => one.plan));
|
|
57
|
+
const depth = new Map();
|
|
58
|
+
const order = [];
|
|
59
|
+
for (let guard = 0; left.size > 0 && guard <= open.length; guard += 1) {
|
|
60
|
+
const free = [...left].filter((id) => (after.get(id) ?? []).every((before) => !left.has(before)));
|
|
61
|
+
if (free.length === 0)
|
|
62
|
+
break;
|
|
63
|
+
// In the order they were proposed, so that two steps that could both go now keep their order.
|
|
64
|
+
free.sort((a, b) => open.findIndex((one) => one.plan === a) - open.findIndex((one) => one.plan === b));
|
|
65
|
+
for (const id of free) {
|
|
66
|
+
depth.set(id, Math.max(0, ...(after.get(id) ?? []).map((before) => (depth.get(before) ?? 0) + 1)));
|
|
67
|
+
order.push(id);
|
|
68
|
+
left.delete(id);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const tangled = [...left];
|
|
72
|
+
const stepOf = (id) => {
|
|
73
|
+
const plan = byId.get(id);
|
|
74
|
+
const waits = (after.get(id) ?? []).filter((one) => byId.has(one));
|
|
75
|
+
const nowhere = missing.get(id) ?? [];
|
|
76
|
+
const held = waits.length > 0 ? { why: "a step before it", steps: waits }
|
|
77
|
+
: nowhere.length > 0 ? { why: "something nobody is making", parts: nowhere }
|
|
78
|
+
: plan.wanting.length > 0 ? { why: "a tube that has run short", tubes: [...plan.wanting] }
|
|
79
|
+
: null;
|
|
80
|
+
return { plan, after: waits, depth: depth.get(id) ?? 0, held, makes: plan.expects.map((one) => one.checksum) };
|
|
81
|
+
};
|
|
82
|
+
const steps = order.map(stepOf);
|
|
83
|
+
const tangledSteps = tangled.map(stepOf);
|
|
84
|
+
// A thread is a set of steps joined by what they make and need: a lab building four proteins has
|
|
85
|
+
// four of them, and they are four separate pieces of work however they were proposed.
|
|
86
|
+
const where = new Map();
|
|
87
|
+
const threads = [];
|
|
88
|
+
const join = (id, into) => {
|
|
89
|
+
const was = where.get(id);
|
|
90
|
+
if (was === into)
|
|
91
|
+
return;
|
|
92
|
+
if (was === undefined) {
|
|
93
|
+
where.set(id, into);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// Two threads met, so they were one thread: everything in the older joins the newer.
|
|
97
|
+
for (const [each, at] of where)
|
|
98
|
+
if (at === was)
|
|
99
|
+
where.set(each, into);
|
|
100
|
+
};
|
|
101
|
+
for (const step of steps) {
|
|
102
|
+
const joined = [step.plan.plan, ...step.after].map((id) => where.get(id)).find((at) => at !== undefined);
|
|
103
|
+
const at = joined ?? threads.push([]) - 1;
|
|
104
|
+
join(step.plan.plan, at);
|
|
105
|
+
for (const before of step.after)
|
|
106
|
+
join(before, at);
|
|
107
|
+
}
|
|
108
|
+
for (const step of steps)
|
|
109
|
+
threads[where.get(step.plan.plan)].push(step);
|
|
110
|
+
const made = new Set(steps.flatMap((one) => one.makes));
|
|
111
|
+
const woven = threads.filter((one) => one.length > 0).map((one) => {
|
|
112
|
+
const inside = new Set(one.flatMap((step) => step.makes));
|
|
113
|
+
const needed = new Set(one.flatMap((step) => step.plan.inputs.flatMap((input) => (input.part === undefined ? [] : [input.part]))));
|
|
114
|
+
// What it ends with is what it makes that nothing in it then uses.
|
|
115
|
+
let ends = [...inside].filter((checksum) => !needed.has(checksum)).map((checksum) => ({ checksum, name: nameOf(checksum) }));
|
|
116
|
+
// Unless there is no such thing, which happens whenever a chain finishes with a transformation:
|
|
117
|
+
// every molecule it made went into the host, and what came out is alive and has no checksum to
|
|
118
|
+
// be named by. The last thing that can be named is then what the chain is known by.
|
|
119
|
+
if (ends.length === 0) {
|
|
120
|
+
const last = [...one].reverse().find((step) => step.makes.length > 0);
|
|
121
|
+
ends = (last?.makes ?? []).map((checksum) => ({ checksum, name: nameOf(checksum) }));
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
// A chain is known by what it is for, which is the last thing it makes.
|
|
125
|
+
name: ends.map((each) => each.name).join(" and ") || `${one.length} ${one.length === 1 ? "step" : "steps"}`,
|
|
126
|
+
steps: one, ends, clear: one.every((step) => step.held === null || step.held.why === "a step before it"),
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
const toGet = new Map();
|
|
130
|
+
for (const step of [...steps, ...tangledSteps]) {
|
|
131
|
+
for (const checksum of missing.get(step.plan.plan) ?? [])
|
|
132
|
+
toGet.set(checksum, [...(toGet.get(checksum) ?? []), step.plan.plan]);
|
|
133
|
+
}
|
|
134
|
+
// Filed, not derived: which chains belong to one project is somebody's decision.
|
|
135
|
+
const filedAs = (step) => {
|
|
136
|
+
const said = step.plan.fields[FILED_UNDER];
|
|
137
|
+
return typeof said === "string" && said.trim() !== "" ? said.trim() : UNFILED;
|
|
138
|
+
};
|
|
139
|
+
const byProject = new Map();
|
|
140
|
+
for (const step of steps)
|
|
141
|
+
byProject.set(filedAs(step), [...(byProject.get(filedAs(step)) ?? []), step]);
|
|
142
|
+
const projects = [...byProject].map(([name, own]) => ({
|
|
143
|
+
name, filed: name !== UNFILED,
|
|
144
|
+
// A chain belongs to a project if any of its steps was filed under it. A chain whose steps were
|
|
145
|
+
// filed differently is shown under each, since the steps really are in both and saying
|
|
146
|
+
// otherwise would hide work from one of them.
|
|
147
|
+
threads: woven.filter((thread) => thread.steps.some((step) => filedAs(step) === name)),
|
|
148
|
+
order: own, ready: own.filter((step) => step.held === null),
|
|
149
|
+
// What nobody filed goes last: it is a heap, not a project.
|
|
150
|
+
})).sort((a, b) => Number(a.name === UNFILED) - Number(b.name === UNFILED) || a.name.localeCompare(b.name));
|
|
151
|
+
return {
|
|
152
|
+
projects, threads: woven, order: steps,
|
|
153
|
+
ready: steps.filter((one) => one.held === null),
|
|
154
|
+
held: steps.filter((one) => one.held !== null),
|
|
155
|
+
toGet: [...toGet].map(([checksum, forSteps]) => ({ checksum, name: made.has(checksum) ? nameOf(checksum) : checksum.slice(0, 12), forSteps })),
|
|
156
|
+
tangled,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The work said in a sentence or two, for somebody who wants to know where things stand.
|
|
161
|
+
*
|
|
162
|
+
* @param work - What `planOfWork` gave.
|
|
163
|
+
* @returns A line for each thing worth saying. Empty if nothing is proposed.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```ts
|
|
167
|
+
* import { planOfWork, saysWork } from "@biolibs/bionet-tools";
|
|
168
|
+
*
|
|
169
|
+
* saysWork(planOfWork(lab));
|
|
170
|
+
* // ["Eleven steps are proposed, in four pieces of work.", "Three could be done now.", …]
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
export function saysWork(work) {
|
|
174
|
+
if (work.order.length === 0 && work.tangled.length === 0)
|
|
175
|
+
return [];
|
|
176
|
+
const count = (many, one, more) => `${many} ${many === 1 ? one : more}`;
|
|
177
|
+
const filed = work.projects.filter((one) => one.filed);
|
|
178
|
+
const said = [
|
|
179
|
+
`${count(work.order.length, "step is", "steps are")} proposed, in ${count(work.threads.length, "piece", "pieces")} of work`
|
|
180
|
+
+ (filed.length === 0 ? "." : `, across ${count(filed.length, "project", "projects")}: ${filed.map((one) => one.name).join(", ")}.`),
|
|
181
|
+
];
|
|
182
|
+
const loose = work.projects.find((one) => !one.filed);
|
|
183
|
+
if (loose !== undefined && filed.length > 0) {
|
|
184
|
+
said.push(`${count(loose.order.length, "step is", "steps are")} filed under no project.`);
|
|
185
|
+
}
|
|
186
|
+
if (work.ready.length > 0)
|
|
187
|
+
said.push(`${count(work.ready.length, "step", "steps")} could be carried out now.`);
|
|
188
|
+
else if (work.order.length > 0)
|
|
189
|
+
said.push("Nothing can be carried out yet.");
|
|
190
|
+
const waiting = work.held.filter((one) => one.held?.why === "a step before it").length;
|
|
191
|
+
if (waiting > 0)
|
|
192
|
+
said.push(`${count(waiting, "step is", "steps are")} waiting on a step before it.`);
|
|
193
|
+
if (work.toGet.length > 0) {
|
|
194
|
+
said.push(`${count(work.toGet.length, "part has", "parts have")} to be ordered or made first: nothing proposed makes ${work.toGet.length === 1 ? "it" : "them"}, and there is no tube.`);
|
|
195
|
+
}
|
|
196
|
+
const short = work.held.filter((one) => one.held?.why === "a tube that has run short").length;
|
|
197
|
+
if (short > 0)
|
|
198
|
+
said.push(`${count(short, "step counts", "steps count")} on a tube that has been retired or run short.`);
|
|
199
|
+
if (work.tangled.length > 0)
|
|
200
|
+
said.push(`${count(work.tangled.length, "step", "steps")} depend on each other in a circle and cannot be ordered.`);
|
|
201
|
+
return said;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=ordering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ordering.js","sourceRoot":"","sources":["../src/ordering.ts"],"names":[],"mappings":"AAmDA,8EAA8E;AAC9E,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAErC,sDAAsD;AACtD,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC;AAwDnC,sEAAsE;AACtE,MAAM,KAAK,GAAG,CAAC,GAAgB,EAAE,QAAgB,EAAW,EAAE,CAC5D,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAEnF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CAAC,GAAgB;IACzC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAEzD,iEAAiE;IACjE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC3C,KAAK,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AC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,yBAAyB,CAAC,CAAC;IAC3L,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,2BAA2B,CAAC,CAAC,MAAM,CAAC;IAC9F,IAAI,KAAK,GAAG,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,CAAC,gDAAgD,CAAC,CAAC;IACxH,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,0DAA0D,CAAC,CAAC;IACjJ,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,OAAO,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5D,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQjE,qGAAqG;AACrG,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAElF,gCAAgC;AAChC,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAA0F,CAAC;AAUrJ;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sCAiBvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,KAAa,EAAE,KAAU,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,KAAK,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAA;CAAE,sCAqB5M"}
|
package/dist/tools.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/** Getting to a tool: from the instrument it is used at, or from a list of them all. */
|
|
4
|
-
import { useState } from "react";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
5
|
import { useLab } from "@biolibs/bionet-react";
|
|
6
6
|
import { DigestTool } from "./digest-tool.js";
|
|
7
7
|
import { InductionTool } from "./induce-bench.js";
|
|
@@ -50,6 +50,9 @@ export function InstrumentTool({ place, onDone }) {
|
|
|
50
50
|
export function Tools({ tool: first = "pcr", views = {} }) {
|
|
51
51
|
const lab = useLab()?.lab;
|
|
52
52
|
const [tool, setTool] = useState(first);
|
|
53
|
+
// Followed rather than read once, so that something elsewhere in the window — a list of the work
|
|
54
|
+
// to be done, say — can send somebody to the tool that would carry a step out.
|
|
55
|
+
useEffect(() => { setTool(first); }, [first]);
|
|
53
56
|
if (lab === null || lab === undefined)
|
|
54
57
|
return null;
|
|
55
58
|
const shown = views[tool];
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":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gB,GAAG,KAAK,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAG,IAAI,IAArI,GAAG,CAA4I,CAC7J,CAAC,GACE,EACL,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAC,SAAS,KAAG,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG;gBACpN,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAC,UAAU,IAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI;oBAClE,CAAC,CAAC,KAAC,IAAI,IAAY,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,IAAtD,IAAI,CAAsD,CAAC,IACtE,CACP,CAAC;AACJ,CAAC"}
|
package/dist/work.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Step } from "./ordering.js";
|
|
2
|
+
/**
|
|
3
|
+
* The lab's open proposals as one piece of work: in order, in chains, with what can start now.
|
|
4
|
+
*
|
|
5
|
+
* @param props - `onOpen`, if given, offers a way to go to the tool that would carry a step out,
|
|
6
|
+
* and is handed the proposal.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { WorkToDo } from "@biolibs/bionet-tools";
|
|
11
|
+
*
|
|
12
|
+
* <WorkToDo onOpen={(plan) => goToTool(plan.kind)} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function WorkToDo({ onOpen }?: {
|
|
16
|
+
onOpen?: (plan: Step["plan"]) => void;
|
|
17
|
+
}): import("react").JSX.Element | null;
|
|
18
|
+
//# sourceMappingURL=work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../src/work.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAA4D,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAQpG;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;CAAO,sCA+OlF"}
|