@biolibs/bionet-tools 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +183 -5
  2. package/dist/digest-bench.d.ts +76 -0
  3. package/dist/digest-bench.d.ts.map +1 -0
  4. package/dist/digest-bench.js +127 -0
  5. package/dist/digest-bench.js.map +1 -0
  6. package/dist/digest-tool.d.ts.map +1 -1
  7. package/dist/digest-tool.js +2 -1
  8. package/dist/digest-tool.js.map +1 -1
  9. package/dist/digest-working.d.ts +155 -0
  10. package/dist/digest-working.d.ts.map +1 -0
  11. package/dist/digest-working.js +216 -0
  12. package/dist/digest-working.js.map +1 -0
  13. package/dist/index.d.ts +24 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +24 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/ligate-bench.d.ts +92 -0
  18. package/dist/ligate-bench.d.ts.map +1 -0
  19. package/dist/ligate-bench.js +139 -0
  20. package/dist/ligate-bench.js.map +1 -0
  21. package/dist/ligate-working.d.ts +96 -0
  22. package/dist/ligate-working.d.ts.map +1 -0
  23. package/dist/ligate-working.js +145 -0
  24. package/dist/ligate-working.js.map +1 -0
  25. package/dist/ligate.d.ts +152 -0
  26. package/dist/ligate.d.ts.map +1 -0
  27. package/dist/ligate.js +161 -0
  28. package/dist/ligate.js.map +1 -0
  29. package/dist/map.d.ts +69 -0
  30. package/dist/map.d.ts.map +1 -0
  31. package/dist/map.js +80 -0
  32. package/dist/map.js.map +1 -0
  33. package/dist/pcr-bench.d.ts +103 -0
  34. package/dist/pcr-bench.d.ts.map +1 -0
  35. package/dist/pcr-bench.js +211 -0
  36. package/dist/pcr-bench.js.map +1 -0
  37. package/dist/pcr-scene.d.ts +249 -0
  38. package/dist/pcr-scene.d.ts.map +1 -0
  39. package/dist/pcr-scene.js +287 -0
  40. package/dist/pcr-scene.js.map +1 -0
  41. package/dist/pcr-tool.d.ts.map +1 -1
  42. package/dist/pcr-tool.js +2 -1
  43. package/dist/pcr-tool.js.map +1 -1
  44. package/dist/pcr-working.d.ts +126 -0
  45. package/dist/pcr-working.d.ts.map +1 -0
  46. package/dist/pcr-working.js +175 -0
  47. package/dist/pcr-working.js.map +1 -0
  48. package/dist/run.d.ts +103 -5
  49. package/dist/run.d.ts.map +1 -1
  50. package/dist/run.js +132 -12
  51. package/dist/run.js.map +1 -1
  52. package/dist/sequence-file.d.ts +108 -0
  53. package/dist/sequence-file.d.ts.map +1 -0
  54. package/dist/sequence-file.js +145 -0
  55. package/dist/sequence-file.js.map +1 -0
  56. package/dist/sequences-tool.d.ts +13 -0
  57. package/dist/sequences-tool.d.ts.map +1 -0
  58. package/dist/sequences-tool.js +61 -0
  59. package/dist/sequences-tool.js.map +1 -0
  60. package/dist/tools.d.ts +7 -3
  61. package/dist/tools.d.ts.map +1 -1
  62. package/dist/tools.js +11 -5
  63. package/dist/tools.js.map +1 -1
  64. package/dist/working.d.ts +58 -0
  65. package/dist/working.d.ts.map +1 -0
  66. package/dist/working.js +55 -0
  67. package/dist/working.js.map +1 -0
  68. package/package.json +6 -2
  69. package/src/digest-bench.tsx +307 -0
  70. package/src/digest-tool.tsx +2 -1
  71. package/src/digest-working.ts +288 -0
  72. package/src/index.ts +24 -0
  73. package/src/ligate-bench.tsx +293 -0
  74. package/src/ligate-working.ts +182 -0
  75. package/src/ligate.ts +243 -0
  76. package/src/map.tsx +170 -0
  77. package/src/pcr-bench.tsx +403 -0
  78. package/src/pcr-scene.ts +410 -0
  79. package/src/pcr-tool.tsx +2 -1
  80. package/src/pcr-working.ts +228 -0
  81. package/src/run.ts +186 -14
  82. package/src/sequence-file.ts +172 -0
  83. package/src/sequences-tool.tsx +109 -0
  84. package/src/tools.tsx +15 -9
  85. package/src/working.tsx +96 -0
  86. package/tools.css +82 -0
package/dist/ligate.js ADDED
@@ -0,0 +1,161 @@
1
+ import { ligationAssembly } from "@biolibs/assembly2";
2
+ import { Dseq } from "@biolibs/dseq";
3
+ import { Dseqrecord } from "@biolibs/dseqrecord";
4
+ const clean = (bases) => bases.replace(/\s+/g, "").toUpperCase();
5
+ const PAIR = { A: "T", T: "A", G: "C", C: "G", N: "N" };
6
+ const flipBases = (bases) => [...bases].reverse().map((base) => PAIR[base] ?? "N").join("");
7
+ /**
8
+ * A piece as a molecule with its ends.
9
+ *
10
+ * @param piece - The piece.
11
+ * @returns The molecule, with the unpaired bases at each end left unpaired.
12
+ * @throws If that is not a sequence, or the ends are longer than the piece.
13
+ */
14
+ export function pieceRecord(piece) {
15
+ const bases = clean(piece.sequence);
16
+ const { left, right } = piece.ends;
17
+ if (Math.abs(left) + Math.abs(right) >= bases.length)
18
+ throw new Error("The ends are longer than the piece.");
19
+ return new Dseqrecord(Dseq.fromFullSequenceAndOverhangs(bases, -left, -right), false, undefined, piece.id, piece.name);
20
+ }
21
+ /**
22
+ * What a piece's two ends are made of.
23
+ *
24
+ * The number on a part says how many bases at that end are on one strand only. Which strand carries
25
+ * them is what makes it a 5′ or a 3′ overhang: at the left-hand end a 5′ overhang is on the top
26
+ * strand, and at the right-hand end it is on the bottom one.
27
+ *
28
+ * @param piece - The piece.
29
+ * @returns Its left and right ends, each with the unpaired bases as the strand carrying them reads them.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * import { endBases } from "@biolibs/bionet-tools";
34
+ *
35
+ * endBases({ id: "1", name: "insert", sequence: "AATTCGGGGGGGGGGGATC", ends: { left: 4, right: 4 } });
36
+ * // { left: { kind: "5′", bases: "AATT" }, right: { kind: "5′", bases: "GATC" } }
37
+ * ```
38
+ */
39
+ export function endBases(piece) {
40
+ const bases = clean(piece.sequence);
41
+ const { left, right } = piece.ends;
42
+ const blunt = { kind: "blunt", bases: "" };
43
+ return {
44
+ // A 5′ overhang on the left is the top strand's own first bases; a 3′ one is the bottom strand's,
45
+ // which read 5′ to 3′ the other way.
46
+ left: left === 0 ? blunt : left > 0 ? { kind: "5′", bases: bases.slice(0, left) } : { kind: "3′", bases: flipBases(bases.slice(0, -left)) },
47
+ // At the right-hand end it is the other way about: a 5′ overhang is the bottom strand's, read back.
48
+ right: right === 0 ? blunt : right > 0 ? { kind: "5′", bases: flipBases(bases.slice(-right)) } : { kind: "3′", bases: bases.slice(right) },
49
+ };
50
+ }
51
+ /**
52
+ * Whether one piece's right-hand end joins another's left-hand end.
53
+ *
54
+ * Ligase joins two ends when the unpaired bases of one pair with those of the other, which means
55
+ * the same kind of overhang, the same length, and bases that are each other's partners. Two blunt
56
+ * ends join with nothing in common, which is why a blunt ligation needs no matching at all and is
57
+ * the harder one to get.
58
+ *
59
+ * @param from - The end on the left of the join.
60
+ * @param to - The end on the right of it.
61
+ * @returns What the two share, or `null` if they do not fit.
62
+ */
63
+ export function endsFit(from, to) {
64
+ if (from.kind === "blunt" && to.kind === "blunt")
65
+ return { kind: "blunt", bases: "" };
66
+ if (from.kind === "blunt" || to.kind === "blunt" || from.kind !== to.kind)
67
+ return null;
68
+ // Both overhangs are written 5′ to 3′ on their own strand, so they fit when one is the other's partner.
69
+ return from.bases.length === to.bases.length && flipBases(from.bases) === to.bases ? { kind: from.kind, bases: from.bases } : null;
70
+ }
71
+ /** A feature turned round, for a piece that went in the other way. */
72
+ const flipFeature = (feature, length) => ({
73
+ ...feature, strand: (feature.strand === 0 ? 0 : -feature.strand),
74
+ parts: feature.parts.map((piece) => ({ start: length - piece.end, end: length - piece.start })).reverse(),
75
+ });
76
+ /**
77
+ * Work out what a ligation would make.
78
+ *
79
+ * @param pieces - The pieces in the tube.
80
+ * @param options - `blunt` allows two blunt ends to be joined; `linear` keeps the products that did
81
+ * not close into a circle, which are the background a bench usually ignores.
82
+ * @returns What it would make, and what is wrong if it would make nothing.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * import { planLigation } from "@biolibs/bionet-tools";
87
+ *
88
+ * const plan = planLigation([vector, insert]);
89
+ * plan.products[0].circular; // true
90
+ * plan.products[0].pieces.length; // 2
91
+ * plan.products[0].joins[0].bases; // "GATC"
92
+ * ```
93
+ */
94
+ export function planLigation(pieces, options = {}) {
95
+ const empty = { products: [] };
96
+ if (pieces.length === 0)
97
+ return { ...empty, problem: "Choose the pieces to join." };
98
+ let records;
99
+ try {
100
+ records = pieces.map((piece) => pieceRecord(piece));
101
+ }
102
+ catch {
103
+ return { ...empty, problem: "One of those is not a piece with ends a molecule of that length could have." };
104
+ }
105
+ let made = [];
106
+ try {
107
+ made = ligationAssembly(records, options.blunt === true, false, options.linear !== true);
108
+ }
109
+ catch {
110
+ return { ...empty, problem: "Those pieces could not be joined." };
111
+ }
112
+ const byId = new Map(pieces.map((piece) => [piece.id, piece]));
113
+ const products = made.flatMap((product) => {
114
+ const input = product.source?.input ?? [];
115
+ const order = input.map((one) => ({ piece: byId.get(String(one.sequence?.id ?? "")), flipped: one.reverseComplemented === true }));
116
+ if (order.some((one) => one.piece === undefined))
117
+ return [];
118
+ const sequence = String(product.seq).toUpperCase();
119
+ const length = product.length;
120
+ // Each piece keeps all of its bases except the ones it shares with the piece before it, which
121
+ // belong to the join. Walking that gives where each piece sits and where each join falls.
122
+ const joined = [];
123
+ const placed = [];
124
+ // Each piece keeps all of its bases except the ones it shares with the piece before it, which
125
+ // belong to the join. So a piece's own bases start where the piece before it ended, and the
126
+ // piece itself starts the length of the shared overhang earlier.
127
+ let ends = 0;
128
+ for (const [index, { piece, flipped }] of order.entries()) {
129
+ const bases = clean(piece.sequence);
130
+ const here = flipped ? { left: endBases(piece).right, right: endBases(piece).left } : endBases(piece);
131
+ const before = order[(index - 1 + order.length) % order.length];
132
+ const beforeEnds = endBases(before.piece);
133
+ const out = before.flipped ? beforeEnds.left : beforeEnds.right;
134
+ const fit = index === 0 && !product.circular ? null : endsFit(out, here.left);
135
+ const shared = index === 0 ? 0 : fit?.bases.length ?? 0;
136
+ const at = (((ends - shared) % length) + length) % length;
137
+ placed.push({ id: piece.id, name: piece.name, flipped, at, length: bases.length - shared });
138
+ if (fit !== null)
139
+ joined.push({ from: before.piece.id, to: piece.id, kind: fit.kind, bases: fit.bases, at });
140
+ ends += bases.length - shared;
141
+ }
142
+ const features = order.flatMap(({ piece, flipped }, index) => {
143
+ const bases = clean(piece.sequence);
144
+ const start = placed[index].at;
145
+ return (piece.features ?? []).map((feature) => (flipped ? flipFeature(feature, bases.length) : feature))
146
+ .map((feature) => ({
147
+ ...feature,
148
+ parts: feature.parts.map((part) => ({ start: (start + part.start) % length, end: ((start + part.end - 1) % length) + 1 })),
149
+ }))
150
+ .filter((feature) => feature.parts.every((part) => part.end > part.start && part.end <= length));
151
+ });
152
+ return [{ sequence, circular: product.circular, length, pieces: placed, joins: joined, features }];
153
+ });
154
+ products.sort((a, b) => Number(b.circular) - Number(a.circular) || a.length - b.length || a.sequence.localeCompare(b.sequence));
155
+ if (products.length === 0) {
156
+ return { ...empty, problem: pieces.length === 1 ? `${pieces[0].name}'s two ends do not fit each other, so it cannot close on itself.`
157
+ : "No two of those ends fit each other, so nothing would be joined." };
158
+ }
159
+ return { products, problem: null };
160
+ }
161
+ //# sourceMappingURL=ligate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ligate.js","sourceRoot":"","sources":["../src/ligate.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA0EjD,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,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE,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CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC;QACrG,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrG,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChI,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,IAAI,kEAAkE;gBACpI,CAAC,CAAC,kEAAkE,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACrC,CAAC"}
package/dist/map.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ /**
2
+ * A map of a sequence: a circle for a plasmid, a line for anything else, with what is marked on it.
3
+ *
4
+ * This is the picture a lab reads a construct by. Features are drawn as arrows in lanes so that
5
+ * ones that overlap can both be seen, places where something happens (an enzyme cuts, a primer's 3′
6
+ * end sits) are marked and named, and stretches worth pointing at, such as where a primer binds, are
7
+ * drawn on the backbone. The geometry is `@biolibs/seqmap`'s; this draws it.
8
+ */
9
+ import type { PartFeature } from "@biolibs/bionet";
10
+ /** A place on a sequence where something happens, with what to call it. */
11
+ export interface MapMark {
12
+ /** Where: the number of bases before it. */
13
+ at: number;
14
+ /** What to write beside it. */
15
+ label: string;
16
+ }
17
+ /** A stretch of a sequence to point at, such as where a primer binds. */
18
+ export interface MapSpan {
19
+ start: number;
20
+ end: number;
21
+ /** What to call it. */
22
+ label: string;
23
+ /** Which way it points, if it points: 1 rightwards or clockwise, -1 the other way. */
24
+ strand?: -1 | 0 | 1;
25
+ }
26
+ /** One drawable piece of a feature, with the lane it sits in. */
27
+ export interface MapPiece {
28
+ /** Which feature it is a piece of, by its place in the list. */
29
+ index: number;
30
+ feature: PartFeature;
31
+ start: number;
32
+ end: number;
33
+ /** Which end carries the arrowhead, if this piece is the feature's leading end. */
34
+ arrow: "start" | "end" | undefined;
35
+ /** The lane it is drawn in, 0 nearest the backbone. */
36
+ lane: number;
37
+ }
38
+ /**
39
+ * Every drawable piece of every feature, each in a lane where it overlaps nothing.
40
+ *
41
+ * @param features - What is marked on the sequence.
42
+ * @param length - How long the sequence is.
43
+ * @param circular - Whether it is a circle, in which case a piece that crosses the origin is drawn as two.
44
+ * @returns The pieces. At most five lanes are used; anything deeper shares the fifth.
45
+ */
46
+ export declare function mapPieces(features: readonly PartFeature[], length: number, circular: boolean): MapPiece[];
47
+ /**
48
+ * A sequence's map.
49
+ *
50
+ * @param props - `name`, `length` and `circular` say what it is a map of; `features` is what is
51
+ * marked on it; `marks` are places to name, such as where an enzyme cuts; `spans` are stretches to
52
+ * point at, such as where a primer binds.
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * import { SequenceMap } from "@biolibs/bionet-tools";
57
+ *
58
+ * <SequenceMap name="pUC19" length={2686} circular features={part.features} marks={[{ at: 396, label: "EcoRI" }]} />
59
+ * ```
60
+ */
61
+ export declare function SequenceMap({ name, length, circular, features, marks, spans }: {
62
+ name: string;
63
+ length: number;
64
+ circular: boolean;
65
+ features: readonly PartFeature[];
66
+ marks?: readonly MapMark[];
67
+ spans?: readonly MapSpan[];
68
+ }): import("react").JSX.Element;
69
+ //# sourceMappingURL=map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../src/map.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yEAAyE;AACzE,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB;AAED,iEAAiE;AACjE,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IACnC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,QAAQ,EAAE,CAWzG;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAU,EAAE,KAAU,EAAE,EAAE;IACxF,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3I,+BAuFA"}
package/dist/map.js ADDED
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { angleAt, blockPath, fractionAt, packLanes, polar, ringPath, splitAtOrigin, spreadApart, spreadAround, tickLabel, tickPositions, tickStep } from "@biolibs/seqmap";
3
+ import { featureTone } from "./sequence-file.js";
4
+ /**
5
+ * Every drawable piece of every feature, each in a lane where it overlaps nothing.
6
+ *
7
+ * @param features - What is marked on the sequence.
8
+ * @param length - How long the sequence is.
9
+ * @param circular - Whether it is a circle, in which case a piece that crosses the origin is drawn as two.
10
+ * @returns The pieces. At most five lanes are used; anything deeper shares the fifth.
11
+ */
12
+ export function mapPieces(features, length, circular) {
13
+ const pieces = features.flatMap((feature, index) => feature.parts
14
+ .filter((part) => part.end > part.start && part.end <= length)
15
+ .flatMap((part) => (circular ? splitAtOrigin(part, length) : [part]))
16
+ .map((part, at, all) => ({
17
+ index, feature, start: part.start, end: part.end,
18
+ // Only the piece at the feature's leading end carries the arrowhead.
19
+ arrow: feature.strand === 1 && at === all.length - 1 ? "end" : feature.strand === -1 && at === 0 ? "start" : undefined,
20
+ })));
21
+ const lanes = packLanes(pieces, Math.max(1, Math.round(length / 300)));
22
+ return pieces.map((piece, at) => ({ ...piece, lane: Math.min(lanes[at], 4) }));
23
+ }
24
+ const count = (value) => value.toLocaleString("en-US");
25
+ /**
26
+ * A sequence's map.
27
+ *
28
+ * @param props - `name`, `length` and `circular` say what it is a map of; `features` is what is
29
+ * marked on it; `marks` are places to name, such as where an enzyme cuts; `spans` are stretches to
30
+ * point at, such as where a primer binds.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * import { SequenceMap } from "@biolibs/bionet-tools";
35
+ *
36
+ * <SequenceMap name="pUC19" length={2686} circular features={part.features} marks={[{ at: 396, label: "EcoRI" }]} />
37
+ * ```
38
+ */
39
+ export function SequenceMap({ name, length, circular, features, marks = [], spans = [] }) {
40
+ const pieces = mapPieces(features, length, circular);
41
+ const says = `${circular ? "Circular" : "Linear"} map of ${name}, ${count(length)} base pairs. ${features.length === 0 ? "Nothing is marked on it." : `Marked on it: ${features.map((one) => one.label).join(", ")}.`}`
42
+ + `${marks.length === 0 ? "" : ` Marked places: ${marks.map((one) => `${one.label} at ${count(one.at)}`).join(", ")}.`}${spans.length === 0 ? "" : ` ${spans.map((one) => `${one.label} at ${count(one.start + 1)} to ${count(one.end)}`).join("; ")}.`}`;
43
+ const title = (piece) => `${piece.feature.label} (${piece.feature.type}), ${piece.feature.parts.map((part) => `${count(part.start + 1)}..${count(part.end)}`).join(", ")}`;
44
+ if (circular) {
45
+ const [size, radius] = [360, 118];
46
+ const c = size / 2;
47
+ const step = tickStep(length, 12);
48
+ // Names are pushed apart round the circle so that neighbouring places stay readable.
49
+ const angles = spreadAround(marks.map((mark) => angleAt(mark.at, length)), 0.14);
50
+ return (_jsxs("svg", { className: "seqmap", viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": says, children: [_jsx("circle", { cx: c, cy: c, r: radius, className: "backbone" }), tickPositions(length, step, true).map((position) => {
51
+ const [inner, outer] = [polar(c, c, radius - 4, angleAt(position, length)), polar(c, c, radius, angleAt(position, length))];
52
+ return _jsx("line", { x1: inner.x, y1: inner.y, x2: outer.x, y2: outer.y, className: "tick" }, position);
53
+ }), pieces.map((piece, at) => {
54
+ const outer = radius - 8 - piece.lane * 13;
55
+ return _jsx("path", { d: ringPath(c, c, outer - 10, outer, angleAt(piece.start, length), angleAt(piece.end, length), piece.arrow ?? null), className: `feature tone-${featureTone(piece.feature.type)}`, children: _jsx("title", { children: title(piece) }) }, at);
56
+ }), spans.map((span, at) => {
57
+ const wide = span.end - span.start > length / 40;
58
+ const label = polar(c, c, radius + (wide ? 21 : 19), angleAt((span.start + span.end) / 2, length));
59
+ const side = Math.sin(angleAt((span.start + span.end) / 2, length));
60
+ return (_jsxs("g", { children: [_jsx("path", { d: ringPath(c, c, radius + 3, radius + (wide ? 6 : 10), angleAt(span.start, length), angleAt(span.end, length), span.strand === 1 ? "end" : span.strand === -1 ? "start" : null), className: wide ? "span wide" : "span", children: _jsx("title", { children: span.label }) }), _jsx("text", { x: label.x, y: label.y + 3.5, textAnchor: side > 0.25 ? "start" : side < -0.25 ? "end" : "middle", className: "spanned", children: span.label })] }, at));
61
+ }), marks.map((mark, at) => {
62
+ const angle = angleAt(mark.at, length);
63
+ const [from, to, elbow, label] = [polar(c, c, radius - 3, angle), polar(c, c, radius + 12, angle), polar(c, c, radius + 22, angles[at]), polar(c, c, radius + 27, angles[at])];
64
+ const side = Math.sin(angles[at]);
65
+ return (_jsxs("g", { children: [_jsx("polyline", { points: `${from.x},${from.y} ${to.x},${to.y} ${elbow.x},${elbow.y}`, className: "mark" }), _jsx("text", { x: label.x, y: label.y + 3.5, textAnchor: side > 0.25 ? "start" : side < -0.25 ? "end" : "middle", className: "marked", children: mark.label })] }, at));
66
+ }), _jsx("text", { x: c, y: c - 3, textAnchor: "middle", className: "name", children: name.length > 22 ? `${name.slice(0, 21)}…` : name }), _jsxs("text", { x: c, y: c + 14, textAnchor: "middle", className: "length", children: [count(length), " bp"] })] }));
67
+ }
68
+ const [width, left] = [640, 24];
69
+ const across = width - 2 * left;
70
+ const lanes = Math.max(1, ...pieces.map((piece) => piece.lane + 1));
71
+ const axis = 30 + lanes * 16;
72
+ const x = (position) => left + fractionAt(position, length) * across;
73
+ const step = tickStep(length, 8);
74
+ const named = spreadApart(marks.map((mark) => x(mark.at)), 34, left, left + across);
75
+ return (_jsxs("svg", { className: "seqmap linear", viewBox: `0 0 ${width} ${axis + 46}`, role: "img", "aria-label": says, children: [pieces.map((piece, at) => {
76
+ const bottom = axis - 8 - piece.lane * 16;
77
+ return _jsx("path", { d: blockPath(x(piece.start), x(piece.end), bottom - 11, bottom, piece.arrow ?? null), className: `feature tone-${featureTone(piece.feature.type)}`, children: _jsx("title", { children: title(piece) }) }, at);
78
+ }), _jsx("line", { x1: left, x2: left + across, y1: axis, y2: axis, className: "backbone" }), spans.map((span, at) => (_jsxs("g", { children: [_jsx("path", { d: blockPath(x(span.start), x(span.end), axis - 4, axis + 4, span.strand === 1 ? "end" : span.strand === -1 ? "start" : null), className: "span", children: _jsx("title", { children: span.label }) }), _jsx("text", { x: (x(span.start) + x(span.end)) / 2, y: axis + 30, textAnchor: "middle", className: "spanned", children: span.label })] }, at))), tickPositions(length, step, false).map((position) => (_jsxs("g", { children: [_jsx("line", { x1: x(position), x2: x(position), y1: axis, y2: axis + 5, className: "tick" }), _jsx("text", { x: x(position), y: axis + 17, textAnchor: "middle", className: "length", children: tickLabel(position, step) })] }, position))), marks.map((mark, at) => (_jsxs("g", { children: [_jsx("polyline", { points: `${x(mark.at)},${axis - 2} ${x(mark.at)},${axis + 22} ${named[at]},${axis + 30}`, className: "mark" }), _jsx("text", { x: named[at], y: axis + 41, textAnchor: "middle", className: "marked", children: mark.label })] }, at))), _jsx("text", { x: left, y: 12, className: "name", children: name }), _jsxs("text", { x: left + across, y: 12, textAnchor: "end", className: "length", children: [count(length), " bp"] })] }));
79
+ }
80
+ //# sourceMappingURL=map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.js","sourceRoot":"","sources":["../src/map.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3K,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAiCjD;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,QAAgC,EAAE,MAAc,E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IAAI,GAAG,EAAE,EAAE,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,YAAE,IAAI,CAAC,KAAK,GAAQ,KAFvF,EAAE,CAGN,CACL,CAAC,EACF,eAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,EACpD,gBAAM,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,aAAE,KAAK,CAAC,MAAM,CAAC,WAAW,IACxF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * A PCR at the machine: everything beside the scene, and what the scene is told to show.
3
+ *
4
+ * It knows nothing of three dimensions. It holds what has been chosen and which view is showing,
5
+ * works out what the machine would show and what is in the tube, and hands those to whatever draws
6
+ * the instrument as plain data. The scene package's `InstrumentStage` takes them as they are.
7
+ *
8
+ * What is beside the scene keeps four things apart: what the **machine** shows, what is true of this
9
+ * **run**, the **checks** a careful operator would make, and, for somebody new, what is going on.
10
+ */
11
+ import { type ReactNode } from "react";
12
+ import { type DrawnMolecule } from "./sequence-file.js";
13
+ import { type PcrProgramme, type PcrStepName, type TubeLens, type TubeStrand } from "./pcr-scene.js";
14
+ /** The views of the machine, in the order a person meets them. */
15
+ export type BenchView = "machine" | "block" | "screen" | "tube" | "result";
16
+ /** What the scene is told to show. It is shaped to be spread onto `InstrumentStage`. */
17
+ export interface BenchStage {
18
+ model: "thermocycler";
19
+ name: string;
20
+ view: BenchView;
21
+ onView: (view: BenchView) => void;
22
+ screen: {
23
+ text: string;
24
+ lit?: boolean;
25
+ }[];
26
+ well?: {
27
+ row: number;
28
+ column: number;
29
+ };
30
+ tube?: {
31
+ length: number;
32
+ strands: TubeStrand[];
33
+ };
34
+ /** Lengths marked off under the strands, each with the subtraction that gives it. */
35
+ measures?: {
36
+ from: number;
37
+ to: number;
38
+ label: string;
39
+ }[];
40
+ /** What the run makes, to be drawn above the machine in the result view. */
41
+ molecule?: DrawnMolecule;
42
+ /** The real bases at the primer being looked at, for any moment of the step showing. */
43
+ lens?: (through: number) => (TubeLens & {
44
+ rows: [number, number];
45
+ }) | null;
46
+ legend: Partial<Record<TubeStrand["kind"], string>>;
47
+ /** How long the step showing should take to play, when the bench is setting the pace. */
48
+ seconds?: number;
49
+ /** Called when the step showing has finished playing. */
50
+ onPlayed: () => void;
51
+ }
52
+ /**
53
+ * A cycle's temperatures as a line, with a mark on the step it is at.
54
+ *
55
+ * @param props - `programme` is the programme; `step` is the step it is on.
56
+ */
57
+ export declare function TemperatureTrace({ programme, step }: {
58
+ programme: PcrProgramme;
59
+ step: PcrStepName;
60
+ }): import("react").JSX.Element;
61
+ /**
62
+ * How many strands of each kind there are, as bars.
63
+ *
64
+ * The bars are on a doubling scale, since the product doubles: each step along is twice as many.
65
+ *
66
+ * @param props - `counts` is how many there are; `cycles` is how many cycles the programme runs,
67
+ * which sets how long a full bar is.
68
+ */
69
+ export declare function StrandBars({ counts, cycles }: {
70
+ counts: {
71
+ template: number;
72
+ long: number;
73
+ product: number;
74
+ };
75
+ cycles: number;
76
+ }): import("react").JSX.Element;
77
+ /**
78
+ * A PCR at the machine.
79
+ *
80
+ * @param options - `instrument` is the thermocycler it is run on, if the lab has placed one;
81
+ * `onDone` adds a way to leave.
82
+ * @returns `stage`, to spread onto whatever draws the instrument, and `panel`, to put beside it.
83
+ *
84
+ * @example
85
+ * ```tsx
86
+ * import { usePcrBench } from "@biolibs/bionet-tools";
87
+ *
88
+ * const bench = usePcrBench({ instrument });
89
+ * // InstrumentStage is the scene package's; anything that draws an instrument from this data will do.
90
+ * <InstrumentStage {...bench.stage}>{bench.panel}</InstrumentStage>
91
+ * ```
92
+ */
93
+ export declare function usePcrBench({ instrument, onDone }?: {
94
+ instrument?: {
95
+ id: string;
96
+ name: string;
97
+ } | null;
98
+ onDone?: () => void;
99
+ }): {
100
+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