@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.
- package/README.md +79 -2
- package/dist/assembly-bench.d.ts +62 -0
- package/dist/assembly-bench.d.ts.map +1 -0
- package/dist/assembly-bench.js +114 -0
- package/dist/assembly-bench.js.map +1 -0
- package/dist/assembly-design.d.ts +119 -0
- package/dist/assembly-design.d.ts.map +1 -0
- package/dist/assembly-design.js +157 -0
- package/dist/assembly-design.js.map +1 -0
- package/dist/codon-bench.d.ts +51 -0
- package/dist/codon-bench.d.ts.map +1 -0
- package/dist/codon-bench.js +93 -0
- package/dist/codon-bench.js.map +1 -0
- package/dist/codons.d.ts +126 -0
- package/dist/codons.d.ts.map +1 -0
- package/dist/codons.js +287 -0
- package/dist/codons.js.map +1 -0
- 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/digest.d.ts +14 -0
- package/dist/digest.d.ts.map +1 -1
- package/dist/digest.js +18 -0
- package/dist/digest.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -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/pcr-tool.js +1 -1
- package/dist/pcr-tool.js.map +1 -1
- package/dist/plans.d.ts.map +1 -1
- package/dist/plans.js +4 -1
- package/dist/plans.js.map +1 -1
- package/dist/primer-bench.js +1 -1
- package/dist/primer-bench.js.map +1 -1
- package/dist/protein.d.ts +106 -0
- package/dist/protein.d.ts.map +1 -0
- package/dist/protein.js +160 -0
- package/dist/protein.js.map +1 -0
- package/dist/run.d.ts +13 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +20 -5
- package/dist/run.js.map +1 -1
- package/dist/sequences-tool.js +1 -1
- package/dist/sequences-tool.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +12 -6
- package/dist/tools.js.map +1 -1
- package/dist/verify-bench.d.ts +48 -0
- package/dist/verify-bench.d.ts.map +1 -0
- package/dist/verify-bench.js +77 -0
- package/dist/verify-bench.js.map +1 -0
- package/dist/verify.d.ts +138 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +263 -0
- package/dist/verify.js.map +1 -0
- package/package.json +6 -4
- package/src/assembly-bench.tsx +232 -0
- package/src/assembly-design.ts +219 -0
- package/src/codon-bench.tsx +189 -0
- package/src/codons.ts +339 -0
- package/src/digest-tool.tsx +14 -5
- package/src/digest.ts +19 -0
- package/src/index.ts +20 -0
- package/src/induce-bench.tsx +406 -0
- package/src/induce.ts +448 -0
- package/src/modify.ts +350 -0
- package/src/pcr-tool.tsx +1 -1
- package/src/plans.tsx +4 -1
- package/src/primer-bench.tsx +1 -1
- package/src/protein.ts +206 -0
- package/src/run.ts +22 -6
- package/src/sequences-tool.tsx +1 -1
- package/src/tools.tsx +11 -5
- package/src/verify-bench.tsx +161 -0
- package/src/verify.ts +310 -0
- package/tools.css +13 -0
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,wFAAwF;AACxF,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO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AAC,SAAS,gBAAY,OAAO,YAC9D,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAC1B,iBAAkB,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,mBAAgB,GAAG,KAAK,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAG,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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checking a construct against the design, at a desk.
|
|
3
|
+
*
|
|
4
|
+
* Every other tool here proposes. This one confirms, and the thing it has to be careful about is
|
|
5
|
+
* the opposite of theirs: not to say more than it has checked. A read covers the stretch its primer
|
|
6
|
+
* reached and no more, so what it covers is said before what it found, and the rest is called
|
|
7
|
+
* unchecked rather than passed.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode } from "react";
|
|
10
|
+
/** What a host is handed to draw beside the panel. */
|
|
11
|
+
export interface VerifyDesk {
|
|
12
|
+
/** The tube of the design, to look at, if the lab has one that has been put somewhere. */
|
|
13
|
+
focus: {
|
|
14
|
+
place: string;
|
|
15
|
+
item: string;
|
|
16
|
+
} | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Checking a read against one of the lab's parts.
|
|
20
|
+
*
|
|
21
|
+
* @param options - `start` says what to open on, for a tour or a link.
|
|
22
|
+
* @returns `panel`, the tool itself, and `desk`, what a scene beside it should look at.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { useVerifyBench } from "@biolibs/bionet-tools";
|
|
27
|
+
*
|
|
28
|
+
* const bench = useVerifyBench();
|
|
29
|
+
* <LabView lab={lab} wide beside={bench.panel} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function useVerifyBench({ start }?: {
|
|
33
|
+
/** What to show: the design and the read. Followed whenever it changes. */
|
|
34
|
+
start?: {
|
|
35
|
+
design?: string;
|
|
36
|
+
read?: string;
|
|
37
|
+
};
|
|
38
|
+
}): {
|
|
39
|
+
panel: ReactNode;
|
|
40
|
+
desk: VerifyDesk;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The checking tool on its own, for a lab that has not drawn its room.
|
|
44
|
+
*
|
|
45
|
+
* @param props - `start` says what to open on.
|
|
46
|
+
*/
|
|
47
|
+
export declare function VerifyTool(props: Parameters<typeof useVerifyBench>[0]): import("react").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=verify-bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-bench.d.ts","sourceRoot":"","sources":["../src/verify-bench.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASrE,sDAAsD;AACtD,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,GAAE;IACxC,2EAA2E;IAC3E,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC,GAAG;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CA6G9C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,+BAErE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Checking a construct against the design, at a desk.
|
|
5
|
+
*
|
|
6
|
+
* Every other tool here proposes. This one confirms, and the thing it has to be careful about is
|
|
7
|
+
* the opposite of theirs: not to say more than it has checked. A read covers the stretch its primer
|
|
8
|
+
* reached and no more, so what it covers is said before what it found, and the rest is called
|
|
9
|
+
* unchecked rather than passed.
|
|
10
|
+
*/
|
|
11
|
+
import { useEffect, useMemo, useState } from "react";
|
|
12
|
+
import { useAct, useLab } from "@biolibs/bionet-react";
|
|
13
|
+
import { Glossed } from "@biolibs/glossary-react";
|
|
14
|
+
import { SequenceMap } from "./map.js";
|
|
15
|
+
import { checkRead, saysDifference, verifyRun, verifyWorking } from "./verify.js";
|
|
16
|
+
import { ShowWorking } from "./working.js";
|
|
17
|
+
const count = (value) => value.toLocaleString("en-US");
|
|
18
|
+
/**
|
|
19
|
+
* Checking a read against one of the lab's parts.
|
|
20
|
+
*
|
|
21
|
+
* @param options - `start` says what to open on, for a tour or a link.
|
|
22
|
+
* @returns `panel`, the tool itself, and `desk`, what a scene beside it should look at.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { useVerifyBench } from "@biolibs/bionet-tools";
|
|
27
|
+
*
|
|
28
|
+
* const bench = useVerifyBench();
|
|
29
|
+
* <LabView lab={lab} wide beside={bench.panel} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function useVerifyBench({ start } = {}) {
|
|
33
|
+
const lab = useLab()?.lab;
|
|
34
|
+
const act = useAct();
|
|
35
|
+
const [design, setDesign] = useState(start?.design ?? "");
|
|
36
|
+
const [read, setRead] = useState(start?.read ?? "");
|
|
37
|
+
const [primer, setPrimer] = useState("");
|
|
38
|
+
const [busy, setBusy] = useState(false);
|
|
39
|
+
const [said, setSaid] = useState(null);
|
|
40
|
+
const asked = JSON.stringify(start ?? null);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (start === undefined)
|
|
43
|
+
return;
|
|
44
|
+
if (start.design !== undefined)
|
|
45
|
+
setDesign(start.design);
|
|
46
|
+
if (start.read !== undefined)
|
|
47
|
+
setRead(start.read);
|
|
48
|
+
}, [asked]);
|
|
49
|
+
// A read is of DNA; a protein is not something to compare bases against.
|
|
50
|
+
const dna = useMemo(() => (lab?.parts ?? []).filter((one) => one.kind !== "protein"), [lab?.parts]);
|
|
51
|
+
const part = dna.find((one) => one.checksum === design);
|
|
52
|
+
const checked = useMemo(() => (part === undefined || read.trim() === "" ? null : checkRead(part, read)), [part, read]);
|
|
53
|
+
const working = useMemo(() => (checked === null || checked.problem !== null || part === undefined ? [] : verifyWorking(checked, part)), [checked, part]);
|
|
54
|
+
const tubes = useMemo(() => (lab?.items ?? []).filter((one) => one.part === design && !one.retired), [lab?.items, design]);
|
|
55
|
+
const held = tubes.find((one) => one.where !== null);
|
|
56
|
+
const desk = { focus: held?.where == null ? null : { place: held.where.place, item: held.item } };
|
|
57
|
+
const record = async () => {
|
|
58
|
+
const tube = tubes[0];
|
|
59
|
+
if (checked === null || checked.problem !== null || tube === undefined)
|
|
60
|
+
return;
|
|
61
|
+
setBusy(true);
|
|
62
|
+
const answer = await act("recordRun", verifyRun(checked, { tube: tube.item, primer }));
|
|
63
|
+
setBusy(false);
|
|
64
|
+
setSaid(answer.ok ? `Recorded: the check is in the lab's history, and ${checked.matches ? "it matched" : "it did not match"}.` : answer.error);
|
|
65
|
+
};
|
|
66
|
+
const panel = lab === null || lab === undefined ? null : (_jsxs("div", { className: "bionet verify", children: [_jsxs("section", { className: "card", children: [_jsx("h2", { children: "Check a construct" }), _jsx("p", { className: "small", children: _jsx(Glossed, { text: "Sequencing reads the bases of a piece of DNA, one read covering a few hundred bases from where its primer sat." }) }), _jsx("p", { className: "dim small", children: "Paste what came back from the facility and it is compared with the design, base by base. Either strand will do. What the read does not reach is not checked, and is said so rather than passed." }), dna.length === 0 ? _jsx("p", { className: "empty", children: "The lab has no DNA to check against." }) : (_jsxs("fieldset", { disabled: busy, className: "stack", children: [_jsxs("label", { children: ["It was supposed to be", _jsxs("select", { value: design, onChange: (event) => { setDesign(event.target.value); setSaid(null); }, "aria-label": "The design", children: [_jsx("option", { value: "", children: "Choose a part\u2026" }), dna.map((one) => _jsxs("option", { value: one.checksum, children: [one.name, " \u00B7 ", count(one.length), " bp"] }, one.checksum))] })] }), _jsxs("label", { children: ["The read", _jsx("textarea", { value: read, onChange: (event) => { setRead(event.target.value); setSaid(null); }, rows: 5, spellCheck: false, placeholder: "Paste the bases that came back", "aria-label": "The read" })] }), _jsxs("label", { children: ["Read from which primer", _jsx("input", { value: primer, onChange: (event) => setPrimer(event.target.value), maxLength: 200, placeholder: "optional", "aria-label": "The primer it was read from" })] })] }))] }), checked !== null && checked.problem !== null && _jsx("p", { className: "trouble", role: "status", children: checked.problem }), checked !== null && checked.problem === null && part !== undefined && (_jsxs(_Fragment, { children: [_jsxs("section", { className: "card", children: [_jsx("h2", { children: checked.matches ? "It is the design" : "It is not the design" }), _jsx("p", { className: "voice", children: "What was read" }), checked.covers === null ? _jsx("p", { className: "trouble small", children: "The read does not line up against this part anywhere. It may be a read of something else." }) : (_jsxs(_Fragment, { children: [_jsxs("p", { className: "small", children: ["Bases ", count(checked.covers.from), "\u2013", count(checked.covers.to), " of ", count(part.length), ", which is ", Math.round(checked.covered * 100), "% of it.", checked.reversed && _jsx(_Fragment, { children: " The read was turned round to line up, which is only which primer it came off." })] }), _jsx(SequenceMap, { name: part.name, length: part.length, circular: part.circular, features: part.features, spans: [{ start: checked.covers.from - 1, end: checked.covers.to, label: "read", strand: 0 }], marks: checked.differences.slice(0, 40).map((one) => ({ at: one.at - 1, label: one.kind === "substitution" ? `${one.was}→${one.now}` : one.kind })) })] })), _jsx("p", { className: "voice", children: "What was found" }), checked.matches ? _jsx("p", { className: "small good", children: "Every base the read covers is the base the design has." }) : (_jsxs("p", { className: checked.changesProtein ? "small attention" : "small", children: [count(checked.differences.length), " ", checked.differences.length === 1 ? "difference" : "differences", checked.changesProtein ? ", and at least one changes a protein." : ", none of which changes a protein."] })), checked.differences.length > 0 && (_jsx("ul", { className: "checks", children: checked.differences.slice(0, 15).map((one) => (_jsx("li", { className: one.protein !== null && one.protein.kind !== "silent" ? "stop" : "look", children: saysDifference(one) }, `${one.at} ${one.kind}`))) })), checked.differences.length > 15 && _jsxs("p", { className: "dim small", children: ["and ", count(checked.differences.length - 15), " more."] }), checked.warnings.length > 0 && _jsx("ul", { className: "checks", children: checked.warnings.map((one) => _jsx("li", { className: "look", children: one }, one)) }), tubes.length > 0 && (_jsxs("fieldset", { disabled: busy, className: "row", children: [_jsx("button", { type: "button", onClick: () => void record(), children: "Record the check" }), _jsxs("span", { className: "dim small", children: ["A run against ", part.name, ", using a little of its tube."] })] })), said !== null && _jsx("p", { className: "small", role: "status", children: said })] }), _jsxs("section", { className: "card", children: [_jsx("h2", { children: "The working" }), working.map((one) => _jsx(ShowWorking, { working: one }, one.of))] })] }))] }));
|
|
67
|
+
return { panel, desk };
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The checking tool on its own, for a lab that has not drawn its room.
|
|
71
|
+
*
|
|
72
|
+
* @param props - `start` says what to open on.
|
|
73
|
+
*/
|
|
74
|
+
export function VerifyTool(props) {
|
|
75
|
+
return _jsx(_Fragment, { children: useVerifyBench(props).panel });
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=verify-bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-bench.js","sourceRoot":"","sources":["../src/verify-bench.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAQvE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,KAGlC,EAAE;IACJ,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,GAAG,CAAC;IAC1B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,C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AE,GAAG,EAAE,CAAC,KAAK,MAAM,EAAE,iCAA2B,EAC7E,gBAAM,SAAS,EAAC,WAAW,+BAAgB,IAAI,CAAC,IAAI,qCAAqC,IAChF,CACZ,EACA,IAAI,KAAK,IAAI,IAAI,YAAG,SAAS,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,YAAE,IAAI,GAAK,IACvD,EAEV,mBAAS,SAAS,EAAC,MAAM,aACvB,uCAAoB,EACnB,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAC,WAAW,IAAc,OAAO,EAAE,GAAG,IAApB,GAAG,CAAC,EAAE,CAAkB,CAAC,IACzD,IACT,CACJ,IACG,CACP,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAA2C;IACpE,OAAO,4BAAG,cAAc,CAAC,KAAK,CAAC,CAAC,KAAK,GAAI,CAAC;AAC5C,CAAC"}
|
package/dist/verify.d.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { PartFeature } from "@biolibs/bionet";
|
|
2
|
+
import type { Working } from "./pcr-working.js";
|
|
3
|
+
/** What kind of difference it is. */
|
|
4
|
+
export type DifferenceKind = "substitution" | "insertion" | "deletion";
|
|
5
|
+
/** What a difference does to a protein. */
|
|
6
|
+
export type ProteinEffect =
|
|
7
|
+
/** The amino acid is unchanged. */
|
|
8
|
+
{
|
|
9
|
+
kind: "silent";
|
|
10
|
+
codon: number;
|
|
11
|
+
aminoAcid: string;
|
|
12
|
+
}
|
|
13
|
+
/** One amino acid becomes another. */
|
|
14
|
+
| {
|
|
15
|
+
kind: "missense";
|
|
16
|
+
codon: number;
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
}
|
|
20
|
+
/** It makes a stop codon, so everything after it is lost. */
|
|
21
|
+
| {
|
|
22
|
+
kind: "nonsense";
|
|
23
|
+
codon: number;
|
|
24
|
+
from: string;
|
|
25
|
+
}
|
|
26
|
+
/** Bases are gained or lost in a multiple of three: amino acids come or go, the rest reads on. */
|
|
27
|
+
| {
|
|
28
|
+
kind: "in frame";
|
|
29
|
+
codon: number;
|
|
30
|
+
by: number;
|
|
31
|
+
}
|
|
32
|
+
/** Bases are gained or lost out of step, so everything after is read wrong. */
|
|
33
|
+
| {
|
|
34
|
+
kind: "frameshift";
|
|
35
|
+
codon: number;
|
|
36
|
+
by: number;
|
|
37
|
+
}
|
|
38
|
+
/** It falls in a coding sequence this does not work out, such as one in several pieces. */
|
|
39
|
+
| {
|
|
40
|
+
kind: "not worked out";
|
|
41
|
+
codon: number;
|
|
42
|
+
why: string;
|
|
43
|
+
};
|
|
44
|
+
/** One place the read differs from the design. */
|
|
45
|
+
export interface Difference {
|
|
46
|
+
/** Where on the design, counting from 1. For an insertion, the base it comes after. */
|
|
47
|
+
at: number;
|
|
48
|
+
kind: DifferenceKind;
|
|
49
|
+
/** What the design has there. Empty for an insertion. */
|
|
50
|
+
was: string;
|
|
51
|
+
/** What the read has there. Empty for a deletion. */
|
|
52
|
+
now: string;
|
|
53
|
+
/** What is marked on the design at that place. */
|
|
54
|
+
inside: {
|
|
55
|
+
label: string;
|
|
56
|
+
type: string;
|
|
57
|
+
}[];
|
|
58
|
+
/** What it does to the protein, for a difference in a coding sequence. */
|
|
59
|
+
protein: ProteinEffect | null;
|
|
60
|
+
}
|
|
61
|
+
/** What came of checking a read against a design. */
|
|
62
|
+
export interface Verification {
|
|
63
|
+
/** Whether the read had to be turned round to line up, which is not a fault. */
|
|
64
|
+
reversed: boolean;
|
|
65
|
+
/** The stretch of the design the read covers, counting from 1, or `null` if it lines up nowhere. */
|
|
66
|
+
covers: {
|
|
67
|
+
from: number;
|
|
68
|
+
to: number;
|
|
69
|
+
bases: number;
|
|
70
|
+
} | null;
|
|
71
|
+
/** How much of the design that stretch is, from 0 to 1. */
|
|
72
|
+
covered: number;
|
|
73
|
+
/** How much of the covered stretch matches, from 0 to 1. */
|
|
74
|
+
identity: number;
|
|
75
|
+
/** Every place they differ, in order along the design. */
|
|
76
|
+
differences: Difference[];
|
|
77
|
+
/** Whether the read is the design over everything it covers. */
|
|
78
|
+
matches: boolean;
|
|
79
|
+
/** Whether anything found would change a protein. */
|
|
80
|
+
changesProtein: boolean;
|
|
81
|
+
/** Anything a careful person would look at. */
|
|
82
|
+
warnings: string[];
|
|
83
|
+
/** Why it could not be checked, or `null`. */
|
|
84
|
+
problem: string | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check a sequencing read against the design it was supposed to be.
|
|
88
|
+
*
|
|
89
|
+
* @param design - The construct as designed: its bases and what is marked on it.
|
|
90
|
+
* @param read - The read, as bases. Either strand.
|
|
91
|
+
* @param options - `least` is how much of the read has to line up for the check to mean anything,
|
|
92
|
+
* as a fraction, 0.5 unless said.
|
|
93
|
+
* @returns What matched, what did not, and what each difference costs.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { checkRead } from "@biolibs/bionet-tools";
|
|
98
|
+
*
|
|
99
|
+
* const checked = checkRead({ sequence: designed, features }, fromTheFacility);
|
|
100
|
+
* checked.matches; // whether it is what was designed, over what the read covers
|
|
101
|
+
* checked.differences; // each one, where on the design, and what it does to the protein
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export declare function checkRead(design: {
|
|
105
|
+
sequence: string;
|
|
106
|
+
features?: readonly PartFeature[];
|
|
107
|
+
}, read: string, options?: {
|
|
108
|
+
least?: number;
|
|
109
|
+
}): Verification;
|
|
110
|
+
/** A difference, said in a line. */
|
|
111
|
+
export declare function saysDifference(one: Difference): string;
|
|
112
|
+
/**
|
|
113
|
+
* The working behind a check: what was compared, and what was found.
|
|
114
|
+
*
|
|
115
|
+
* @param checked - What came of checking.
|
|
116
|
+
* @param design - How long the design is, for saying how much was covered.
|
|
117
|
+
* @returns One working for the comparison and one for what it costs.
|
|
118
|
+
*/
|
|
119
|
+
export declare function verifyWorking(checked: Verification, design: {
|
|
120
|
+
sequence: string;
|
|
121
|
+
}): Working[];
|
|
122
|
+
/**
|
|
123
|
+
* A check as a run the lab would record.
|
|
124
|
+
*
|
|
125
|
+
* It uses up some of the tube that was sent and makes nothing. Whether it worked is whether the
|
|
126
|
+
* read is the design, which is what the check says, so the outcome is not a separate judgement.
|
|
127
|
+
*
|
|
128
|
+
* @param checked - What came of checking.
|
|
129
|
+
* @param choice - The tube that was sequenced, how much went, and what to say about it.
|
|
130
|
+
* @returns What to hand to the lab's `recordRun`, or `null` if there is nothing to record.
|
|
131
|
+
*/
|
|
132
|
+
export declare function verifyRun(checked: Verification, choice: {
|
|
133
|
+
tube: string;
|
|
134
|
+
used?: number;
|
|
135
|
+
primer?: string | null;
|
|
136
|
+
note?: string | null;
|
|
137
|
+
}): Record<string, unknown> | null;
|
|
138
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC;AAEvE,2CAA2C;AAC3C,MAAM,MAAM,aAAa;AACvB,mCAAmC;AACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AACtD,sCAAsC;GACpC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAC/D,6DAA6D;GAC3D;IAAE,IAAI,E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OAAO,CAAC;IACjB,qDAAqD;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAkDD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAC7E,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,YAAY,CAiFxE;AAED,oCAAoC;AACpC,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAYtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,EAAE,CA2B5F;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAetK"}
|
package/dist/verify.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checking that what came back is what was designed.
|
|
3
|
+
*
|
|
4
|
+
* Everything else in this package proposes. This is the one that confirms: a sequencing read
|
|
5
|
+
* against the construct it was supposed to be, difference by difference, with what each difference
|
|
6
|
+
* does to the protein. It is the check that stands between a plasmid map and a plasmid.
|
|
7
|
+
*
|
|
8
|
+
* Three things it does that a plain alignment does not.
|
|
9
|
+
*
|
|
10
|
+
* - **It tries both strands.** A read comes off whichever end the primer sat at, and a read that is
|
|
11
|
+
* simply the other way round is not a construct that is wrong.
|
|
12
|
+
* - **It says where on the design**, not where in the alignment, so a difference can be looked up on
|
|
13
|
+
* the map and found.
|
|
14
|
+
* - **It says what the difference costs.** A changed base that leaves the amino acid alone is a
|
|
15
|
+
* nuisance; one that makes a stop codon is a dead construct; one base missing is a frameshift and
|
|
16
|
+
* everything after it is wrong. Those are not the same finding and are not reported as if they were.
|
|
17
|
+
*
|
|
18
|
+
* One thing it cannot do, and does not pretend to: a base gained or lost inside a run of the same
|
|
19
|
+
* base has no single place it could have happened, since deleting any of them gives the same read.
|
|
20
|
+
* The earliest is reported. What was gained or lost, and what it costs, are right either way; only
|
|
21
|
+
* the position inside the run is a choice the alignment made.
|
|
22
|
+
*/
|
|
23
|
+
import { PairwiseAligner } from "@biolibs/align";
|
|
24
|
+
import { translate } from "@biolibs/seq";
|
|
25
|
+
import { CODON } from "./codons.js";
|
|
26
|
+
const clean = (bases) => bases.replace(/\s+/g, "").toUpperCase();
|
|
27
|
+
const PAIR = { A: "T", T: "A", G: "C", C: "G", N: "N" };
|
|
28
|
+
const flip = (bases) => [...bases].reverse().map((one) => PAIR[one] ?? "N").join("");
|
|
29
|
+
/** An aligner that finds where a read sits on a design, rather than forcing the two end to end. */
|
|
30
|
+
function reader() {
|
|
31
|
+
const aligner = new PairwiseAligner();
|
|
32
|
+
aligner.mode = "local";
|
|
33
|
+
aligner.match = 2;
|
|
34
|
+
aligner.mismatch = -3;
|
|
35
|
+
aligner.openGapScore = -5;
|
|
36
|
+
aligner.extendGapScore = -2;
|
|
37
|
+
return aligner;
|
|
38
|
+
}
|
|
39
|
+
/** The coding sequences a difference can be read against: one piece, so the frame is plain. */
|
|
40
|
+
const codingAt = (features, at) => features.filter((one) => /^cds$/i.test(one.type) && one.parts.some((piece) => at >= piece.start && at < piece.end));
|
|
41
|
+
/**
|
|
42
|
+
* What one changed base does to the protein of a coding sequence.
|
|
43
|
+
*
|
|
44
|
+
* @param design - The design's bases.
|
|
45
|
+
* @param cds - The coding sequence it falls in.
|
|
46
|
+
* @param at - Where the change is, counting from 0.
|
|
47
|
+
* @param now - What the read has there.
|
|
48
|
+
* @returns What it does, said as one of the kinds.
|
|
49
|
+
*/
|
|
50
|
+
function effectOf(design, cds, at, now) {
|
|
51
|
+
const piece = cds.parts[0];
|
|
52
|
+
if (cds.parts.length > 1)
|
|
53
|
+
return { kind: "not worked out", codon: 0, why: `${cds.label} is marked in ${cds.parts.length} pieces, so the reading frame across it is not worked out here` };
|
|
54
|
+
const bases = design.slice(piece.start, piece.end);
|
|
55
|
+
const forward = cds.strand !== -1;
|
|
56
|
+
// On the other strand the coding sequence runs the other way, and so do its codons.
|
|
57
|
+
const offset = forward ? at - piece.start : piece.end - 1 - at;
|
|
58
|
+
const coding = forward ? bases : flip(bases);
|
|
59
|
+
const codon = Math.floor(offset / CODON);
|
|
60
|
+
const start = codon * CODON;
|
|
61
|
+
const was = coding.slice(start, start + CODON);
|
|
62
|
+
if (was.length < CODON)
|
|
63
|
+
return { kind: "not worked out", codon: codon + 1, why: `${cds.label} does not end on a whole codon` };
|
|
64
|
+
const changed = `${was.slice(0, offset - start)}${forward ? now : (PAIR[now] ?? "N")}${was.slice(offset - start + 1)}`;
|
|
65
|
+
const before = String(translate(was));
|
|
66
|
+
const after = String(translate(changed));
|
|
67
|
+
if (before === after)
|
|
68
|
+
return { kind: "silent", codon: codon + 1, aminoAcid: before };
|
|
69
|
+
if (after === "*")
|
|
70
|
+
return { kind: "nonsense", codon: codon + 1, from: before };
|
|
71
|
+
return { kind: "missense", codon: codon + 1, from: before, to: after };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check a sequencing read against the design it was supposed to be.
|
|
75
|
+
*
|
|
76
|
+
* @param design - The construct as designed: its bases and what is marked on it.
|
|
77
|
+
* @param read - The read, as bases. Either strand.
|
|
78
|
+
* @param options - `least` is how much of the read has to line up for the check to mean anything,
|
|
79
|
+
* as a fraction, 0.5 unless said.
|
|
80
|
+
* @returns What matched, what did not, and what each difference costs.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* import { checkRead } from "@biolibs/bionet-tools";
|
|
85
|
+
*
|
|
86
|
+
* const checked = checkRead({ sequence: designed, features }, fromTheFacility);
|
|
87
|
+
* checked.matches; // whether it is what was designed, over what the read covers
|
|
88
|
+
* checked.differences; // each one, where on the design, and what it does to the protein
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export function checkRead(design, read, options = {}) {
|
|
92
|
+
const nothing = (problem) => ({ reversed: false, covers: null, covered: 0, identity: 0, differences: [], matches: false, changesProtein: false, warnings: [], problem });
|
|
93
|
+
const bases = clean(design.sequence);
|
|
94
|
+
const given = clean(read);
|
|
95
|
+
if (bases.length === 0)
|
|
96
|
+
return nothing("There is nothing to check against.");
|
|
97
|
+
if (given.length === 0)
|
|
98
|
+
return nothing("There is no read to check.");
|
|
99
|
+
if (!/^[ACGTN]+$/.test(bases))
|
|
100
|
+
return nothing("The design has bases that are not A, C, G, T or N.");
|
|
101
|
+
if (!/^[ACGTN]+$/.test(given))
|
|
102
|
+
return nothing("The read has bases that are not A, C, G, T or N. A base call that could not be made is N.");
|
|
103
|
+
const aligner = reader();
|
|
104
|
+
// A read comes off whichever end its primer sat at, so both ways round are tried and the better kept.
|
|
105
|
+
const turned = flip(given);
|
|
106
|
+
const forward = aligner.score(bases, given);
|
|
107
|
+
const backward = aligner.score(bases, turned);
|
|
108
|
+
const reversed = backward > forward;
|
|
109
|
+
const query = reversed ? turned : given;
|
|
110
|
+
const [best] = aligner.align(bases, query);
|
|
111
|
+
if (best === undefined)
|
|
112
|
+
return nothing("The read does not line up against the design at all.");
|
|
113
|
+
const [onDesign, onRead] = best.indices;
|
|
114
|
+
const warnings = [];
|
|
115
|
+
const differences = [];
|
|
116
|
+
const features = design.features ?? [];
|
|
117
|
+
/** Gather a run of gaps into one difference rather than reporting each base of it. */
|
|
118
|
+
let run = null;
|
|
119
|
+
const settle = () => {
|
|
120
|
+
if (run === null)
|
|
121
|
+
return;
|
|
122
|
+
const at = run.at;
|
|
123
|
+
const inside = features.filter((one) => one.parts.some((piece) => at - 1 >= piece.start && at - 1 < piece.end)).map((one) => ({ label: one.label, type: one.type }));
|
|
124
|
+
const cds = codingAt(features, at - 1)[0];
|
|
125
|
+
const by = run.kind === "insertion" ? run.now.length : -run.was.length;
|
|
126
|
+
const protein = cds === undefined ? null
|
|
127
|
+
: cds.parts.length > 1 ? { kind: "not worked out", codon: 0, why: `${cds.label} is marked in ${cds.parts.length} pieces, so the reading frame across it is not worked out here` }
|
|
128
|
+
: { kind: Math.abs(by) % CODON === 0 ? "in frame" : "frameshift", codon: Math.floor((at - 1 - cds.parts[0].start) / CODON) + 1, by };
|
|
129
|
+
differences.push({ at, kind: run.kind, was: run.was, now: run.now, inside, protein });
|
|
130
|
+
run = null;
|
|
131
|
+
};
|
|
132
|
+
let matched = 0;
|
|
133
|
+
let from = Number.POSITIVE_INFINITY;
|
|
134
|
+
let to = 0;
|
|
135
|
+
for (let column = 0; column < onDesign.length; column++) {
|
|
136
|
+
const d = onDesign[column];
|
|
137
|
+
const q = onRead[column];
|
|
138
|
+
if (d >= 0) {
|
|
139
|
+
from = Math.min(from, d + 1);
|
|
140
|
+
to = Math.max(to, d + 1);
|
|
141
|
+
}
|
|
142
|
+
if (d >= 0 && q >= 0) {
|
|
143
|
+
settle();
|
|
144
|
+
if (bases[d] === query[q]) {
|
|
145
|
+
matched += 1;
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const at = d + 1;
|
|
149
|
+
const inside = features.filter((one) => one.parts.some((piece) => d >= piece.start && d < piece.end)).map((one) => ({ label: one.label, type: one.type }));
|
|
150
|
+
const cds = codingAt(features, d)[0];
|
|
151
|
+
differences.push({ at, kind: "substitution", was: bases[d], now: query[q], inside, protein: cds === undefined ? null : effectOf(bases, cds, d, query[q]) });
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
// A gap on one side or the other: bases the read is missing, or bases it has over.
|
|
155
|
+
const kind = d < 0 ? "insertion" : "deletion";
|
|
156
|
+
const at = d < 0 ? Math.max(1, to) : d + 1;
|
|
157
|
+
if (run === null || run.kind !== kind) {
|
|
158
|
+
settle();
|
|
159
|
+
run = { kind, at, was: "", now: "" };
|
|
160
|
+
}
|
|
161
|
+
if (d < 0)
|
|
162
|
+
run.now += query[q];
|
|
163
|
+
else
|
|
164
|
+
run.was += bases[d];
|
|
165
|
+
}
|
|
166
|
+
settle();
|
|
167
|
+
const covers = to === 0 ? null : { from, to, bases: to - from + 1 };
|
|
168
|
+
const span = covers === null ? 0 : covers.bases;
|
|
169
|
+
const identity = span === 0 ? 0 : matched / span;
|
|
170
|
+
const least = options.least ?? 0.5;
|
|
171
|
+
if (given.length > 0 && span / given.length < least) {
|
|
172
|
+
warnings.push(`Only ${Math.round((span / given.length) * 100)}% of the read lines up against the design, so this says little. It may be a read of something else.`);
|
|
173
|
+
}
|
|
174
|
+
if (given.includes("N"))
|
|
175
|
+
warnings.push(`The read has ${[...given].filter((one) => one === "N").length} bases that could not be called, which are not counted as differences.`);
|
|
176
|
+
if (covers !== null && covers.bases < bases.length) {
|
|
177
|
+
warnings.push(`The read covers ${covers.from}–${covers.to} of ${bases.length} bases. The rest of the design is unchecked.`);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
reversed, covers, covered: covers === null ? 0 : covers.bases / bases.length, identity,
|
|
181
|
+
differences, matches: differences.length === 0 && covers !== null,
|
|
182
|
+
changesProtein: differences.some((one) => one.protein !== null && one.protein.kind !== "silent"),
|
|
183
|
+
warnings, problem: null,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/** A difference, said in a line. */
|
|
187
|
+
export function saysDifference(one) {
|
|
188
|
+
const where = `at ${one.at.toLocaleString("en-US")}`;
|
|
189
|
+
const what = one.kind === "substitution" ? `${one.was} became ${one.now}`
|
|
190
|
+
: one.kind === "deletion" ? `${one.was.length} ${one.was.length === 1 ? "base" : "bases"} missing (${one.was})`
|
|
191
|
+
: `${one.now.length} ${one.now.length === 1 ? "base" : "bases"} over (${one.now})`;
|
|
192
|
+
const effect = one.protein === null ? ""
|
|
193
|
+
: one.protein.kind === "silent" ? `, which leaves ${one.protein.aminoAcid} at codon ${one.protein.codon} alone`
|
|
194
|
+
: one.protein.kind === "missense" ? `, which makes codon ${one.protein.codon} ${one.protein.from} into ${one.protein.to}`
|
|
195
|
+
: one.protein.kind === "nonsense" ? `, which makes codon ${one.protein.codon} a stop, so everything after it is lost`
|
|
196
|
+
: one.protein.kind === "frameshift" ? `, which shifts the frame from codon ${one.protein.codon} on, so the rest is read wrong`
|
|
197
|
+
: one.protein.kind === "in frame" ? `, which adds or removes whole codons from codon ${one.protein.codon}` : `, ${one.protein.why}`;
|
|
198
|
+
return `${where}: ${what}${effect}`;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The working behind a check: what was compared, and what was found.
|
|
202
|
+
*
|
|
203
|
+
* @param checked - What came of checking.
|
|
204
|
+
* @param design - How long the design is, for saying how much was covered.
|
|
205
|
+
* @returns One working for the comparison and one for what it costs.
|
|
206
|
+
*/
|
|
207
|
+
export function verifyWorking(checked, design) {
|
|
208
|
+
if (checked.problem !== null)
|
|
209
|
+
return [];
|
|
210
|
+
const count = (value) => value.toLocaleString("en-US");
|
|
211
|
+
const span = checked.covers;
|
|
212
|
+
return [
|
|
213
|
+
{
|
|
214
|
+
of: "the comparison",
|
|
215
|
+
comes: span === null ? "the read lines up nowhere on the design" : `${Math.round(checked.identity * 1000) / 10}% the same over ${count(span.bases)} bases`,
|
|
216
|
+
kind: "exact",
|
|
217
|
+
steps: [
|
|
218
|
+
`the design is ${count(clean(design.sequence).length)} bases`,
|
|
219
|
+
...(checked.reversed ? ["the read was turned round to line up, which is only which end its primer sat at"] : ["the read lines up as it was given"]),
|
|
220
|
+
...(span === null ? [] : [`it covers ${count(span.from)}–${count(span.to)}, which is ${Math.round(checked.covered * 100)}% of the design`]),
|
|
221
|
+
`${count(checked.differences.length)} ${checked.differences.length === 1 ? "place differs" : "places differ"}`,
|
|
222
|
+
"what is outside that stretch was not read and is not checked",
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
of: "what it costs",
|
|
227
|
+
comes: checked.matches ? "nothing: it is the design over everything the read covers"
|
|
228
|
+
: checked.changesProtein ? "a protein is changed" : "the differences leave the proteins alone",
|
|
229
|
+
kind: "exact",
|
|
230
|
+
steps: checked.differences.length === 0
|
|
231
|
+
? ["every base the read covers is the base the design has"]
|
|
232
|
+
: checked.differences.slice(0, 8).map((one) => saysDifference(one)).concat(checked.differences.length > 8 ? [`and ${count(checked.differences.length - 8)} more`] : []),
|
|
233
|
+
},
|
|
234
|
+
];
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* A check as a run the lab would record.
|
|
238
|
+
*
|
|
239
|
+
* It uses up some of the tube that was sent and makes nothing. Whether it worked is whether the
|
|
240
|
+
* read is the design, which is what the check says, so the outcome is not a separate judgement.
|
|
241
|
+
*
|
|
242
|
+
* @param checked - What came of checking.
|
|
243
|
+
* @param choice - The tube that was sequenced, how much went, and what to say about it.
|
|
244
|
+
* @returns What to hand to the lab's `recordRun`, or `null` if there is nothing to record.
|
|
245
|
+
*/
|
|
246
|
+
export function verifyRun(checked, choice) {
|
|
247
|
+
if (checked.problem !== null || checked.covers === null)
|
|
248
|
+
return null;
|
|
249
|
+
return {
|
|
250
|
+
kind: "sequencing", instrument: null,
|
|
251
|
+
inputs: [{ item: choice.tube, amount: Math.max(0, Math.round(choice.used ?? 1)), role: "sequenced" }],
|
|
252
|
+
outputs: [],
|
|
253
|
+
settings: {
|
|
254
|
+
covered: `${checked.covers.from}-${checked.covers.to}`,
|
|
255
|
+
identity: Math.round(checked.identity * 1000) / 10,
|
|
256
|
+
differences: checked.differences.length,
|
|
257
|
+
...(choice.primer === undefined || choice.primer === null || choice.primer.trim() === "" ? {} : { primer: choice.primer.trim() }),
|
|
258
|
+
},
|
|
259
|
+
outcome: checked.matches ? "worked" : "failed",
|
|
260
|
+
note: choice.note ?? (checked.matches ? null : checked.differences.slice(0, 3).map(saysDifference).join("; ")),
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA0DpC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AACjF,MAAM,IAAI,GAAqC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;AAC1F,MAAM,IAAI,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAErG,mGAAmG;AACnG,SAAS,MAAM;IACb,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;IACtC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC;IACvB,OAAO,CAAC,KAAK,GAAG,CA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}
|
package/package.json
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
"url": "https://github.com/matthewlovestocode/biolibs/issues"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
+
"@biolibs/align": "^1.0.0",
|
|
6
7
|
"@biolibs/assembly2": "^1.0.0",
|
|
7
|
-
"@biolibs/bionet": "^1.
|
|
8
|
+
"@biolibs/bionet": "^1.8.1",
|
|
8
9
|
"@biolibs/bionet-panels": "^0.3.3",
|
|
9
10
|
"@biolibs/bionet-react": "^0.2.0",
|
|
11
|
+
"@biolibs/cloning": "^1.0.1",
|
|
10
12
|
"@biolibs/dseq": "^1.0.0",
|
|
11
13
|
"@biolibs/dseqrecord": "^1.1.1",
|
|
12
|
-
"@biolibs/gel": "^1.0.
|
|
13
|
-
"@biolibs/glossary-react": "^0.1.
|
|
14
|
+
"@biolibs/gel": "^1.0.1",
|
|
15
|
+
"@biolibs/glossary-react": "^0.1.3",
|
|
14
16
|
"@biolibs/pcr": "^1.0.0",
|
|
15
17
|
"@biolibs/restriction": "^1.0.0",
|
|
16
18
|
"@biolibs/seq": "^1.0.0",
|
|
@@ -63,5 +65,5 @@
|
|
|
63
65
|
],
|
|
64
66
|
"type": "module",
|
|
65
67
|
"types": "dist/index.d.ts",
|
|
66
|
-
"version": "0.1.
|
|
68
|
+
"version": "0.1.10"
|
|
67
69
|
}
|