@biolibs/gel 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +365 -2
- package/dist/bands.d.ts +87 -0
- package/dist/bands.d.ts.map +1 -0
- package/dist/bands.js +128 -0
- package/dist/bands.js.map +1 -0
- package/dist/fragments.d.ts +32 -0
- package/dist/fragments.d.ts.map +1 -0
- package/dist/fragments.js +60 -0
- package/dist/fragments.js.map +1 -0
- package/dist/gels.d.ts +62 -0
- package/dist/gels.d.ts.map +1 -0
- package/dist/gels.js +42 -0
- package/dist/gels.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/ladders.d.ts +33 -0
- package/dist/ladders.d.ts.map +1 -0
- package/dist/ladders.js +33 -0
- package/dist/ladders.js.map +1 -0
- package/dist/protein.d.ts +104 -0
- package/dist/protein.d.ts.map +1 -0
- package/dist/protein.js +103 -0
- package/dist/protein.js.map +1 -0
- package/package.json +46 -4
- package/src/bands.ts +149 -0
- package/src/fragments.ts +60 -0
- package/src/gels.ts +76 -0
- package/src/index.ts +33 -0
- package/src/ladders.ts +44 -0
- package/src/protein.ts +131 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fragment sizes from cut positions, so a digest can be loaded onto a gel without pulling in an enzyme library.
|
|
3
|
+
*
|
|
4
|
+
* Positions are 0-based offsets into the sequence, counted as boundaries between bases: a cut at `n` separates the
|
|
5
|
+
* base at index `n - 1` from the base at index `n`. This is the half-open convention used across biolibs, so a cut
|
|
6
|
+
* list is directly usable as slice boundaries. (Biopython's `RestrictionType.search` returns 1-based positions;
|
|
7
|
+
* subtract one from each before passing them here.)
|
|
8
|
+
*/
|
|
9
|
+
import { ValueError } from "@biolibs/core";
|
|
10
|
+
/**
|
|
11
|
+
* The lengths of the pieces a set of cuts divides a sequence into.
|
|
12
|
+
*
|
|
13
|
+
* A linear sequence with `n` cuts falls into `n + 1` pieces, including the two uncut ends. A circular sequence with
|
|
14
|
+
* `n` cuts falls into `n` pieces, one of which spans the origin; an uncut circle stays whole.
|
|
15
|
+
*
|
|
16
|
+
* @param length - Sequence length in bases.
|
|
17
|
+
* @param topology - `"linear"` or `"circular"`.
|
|
18
|
+
* @param cuts - 0-based cut positions, in any order. Duplicates count once, since two enzymes cutting the same
|
|
19
|
+
* bond produce one break.
|
|
20
|
+
* @returns The piece lengths, largest first. Cuts at 0 or at `length` on a linear sequence are the existing ends and
|
|
21
|
+
* add no piece; zero-length pieces are never returned.
|
|
22
|
+
* @throws {@link ValueError} for a negative or non-integer length, or a cut outside `[0, length]`.
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* fragmentSizes(1000, "linear", [100, 400]); // [600, 300, 100]
|
|
26
|
+
* fragmentSizes(1000, "circular", [100, 400]); // [700, 300]
|
|
27
|
+
* fragmentSizes(1000, "circular", []); // [1000]
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export function fragmentSizes(length, topology, cuts) {
|
|
31
|
+
if (!Number.isInteger(length) || length < 0)
|
|
32
|
+
throw new ValueError(`sequence length must be a non-negative integer, got ${length}`);
|
|
33
|
+
for (const cut of cuts) {
|
|
34
|
+
if (!Number.isInteger(cut) || cut < 0 || cut > length)
|
|
35
|
+
throw new ValueError(`cut position ${cut} is outside a sequence of ${length} bases`);
|
|
36
|
+
}
|
|
37
|
+
const ordered = [...new Set(cuts)].sort((a, b) => a - b);
|
|
38
|
+
if (length === 0)
|
|
39
|
+
return [];
|
|
40
|
+
if (ordered.length === 0)
|
|
41
|
+
return [length];
|
|
42
|
+
const sizes = [];
|
|
43
|
+
if (topology === "linear") {
|
|
44
|
+
// The two ends are pieces too: from the start to the first cut, and from the last cut to the end.
|
|
45
|
+
let previous = 0;
|
|
46
|
+
for (const cut of ordered) {
|
|
47
|
+
sizes.push(cut - previous);
|
|
48
|
+
previous = cut;
|
|
49
|
+
}
|
|
50
|
+
sizes.push(length - previous);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// On a circle every piece runs from one cut to the next, and the last wraps through the origin.
|
|
54
|
+
for (let i = 0; i < ordered.length - 1; i++)
|
|
55
|
+
sizes.push(ordered[i + 1] - ordered[i]);
|
|
56
|
+
sizes.push(length - ordered[ordered.length - 1] + ordered[0]);
|
|
57
|
+
}
|
|
58
|
+
return sizes.filter((size) => size > 0).sort((a, b) => b - a);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=fragments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragments.js","sourceRoot":"","sources":["../src/fragments.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,QAAkB,EAAE,IAAuB;IACvF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,uDAAuD,MAAM,EAAE,CAAC,CAAC;IACnI,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,MAAM;YAAE,MAAM,IAAI,UAAU,CAAC,gBAAgB,GAAG,6BAA6B,MAAM,QAAQ,CAAC,CAAC;IAC9I,CAAC;IAED,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,kGAAkG;QAClG,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC;YAC3B,QAAQ,GAAG,GAAG,CAAC;QACjB,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,gGAAgG;QAChG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC;QACvF,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/gels.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agarose gel types and the size range each one separates.
|
|
3
|
+
*
|
|
4
|
+
* The percentages and ranges are the conventional working figures for agarose in TAE buffer, as printed in supplier
|
|
5
|
+
* guides: a low-percentage gel spreads large fragments out and runs small ones off the bottom together, a
|
|
6
|
+
* high-percentage gel does the reverse. They describe which fragments a gel would *tell apart*, and are not
|
|
7
|
+
* measurements of migration distance — a real gel depends on buffer, voltage, run time and the dye used.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The range of sizes a gel separates, whatever is being run on it.
|
|
11
|
+
*
|
|
12
|
+
* It is this and not a kind of gel because the arithmetic of a band's position is the same
|
|
13
|
+
* arithmetic either way: the two ends bracket the range over which the log-linear model in
|
|
14
|
+
* {@link bandPosition} holds, and the unit they are in is whatever the gel sorts by — base pairs for
|
|
15
|
+
* DNA on agarose, kilodaltons for protein on acrylamide.
|
|
16
|
+
*/
|
|
17
|
+
export interface Resolving {
|
|
18
|
+
/** The largest the gel still separates. */
|
|
19
|
+
largest: number;
|
|
20
|
+
/** The smallest the gel still separates. */
|
|
21
|
+
smallest: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* One agarose concentration and the fragment sizes it resolves.
|
|
25
|
+
*
|
|
26
|
+
* `largest` and `smallest` bracket the range over which the log-linear model in {@link bandPosition} holds. Outside
|
|
27
|
+
* it, fragments still migrate but are not separated: above `largest` they stay bunched near the wells, below
|
|
28
|
+
* `smallest` they run off together at the front.
|
|
29
|
+
*/
|
|
30
|
+
export interface GelType extends Resolving {
|
|
31
|
+
/** Short identifier, e.g. `"1.0"`. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Agarose concentration as a percentage (w/v). */
|
|
34
|
+
percent: number;
|
|
35
|
+
/** Largest fragment, in base pairs, the gel still separates. */
|
|
36
|
+
largest: number;
|
|
37
|
+
/** Smallest fragment, in base pairs, the gel still separates. */
|
|
38
|
+
smallest: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The four agarose concentrations in common use, from the one that resolves the largest fragments to the one that
|
|
42
|
+
* resolves the smallest.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* GELS.find((g) => g.percent === 1)?.largest; // 10000
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const GELS: readonly GelType[];
|
|
50
|
+
/**
|
|
51
|
+
* Look a gel up by its {@link GelType.id}.
|
|
52
|
+
*
|
|
53
|
+
* @param id - An id from {@link GELS}, e.g. `"1.5"`.
|
|
54
|
+
* @returns The matching gel.
|
|
55
|
+
* @throws {@link ValueError} if no gel has that id.
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* gelById("2.0").smallest; // 50
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function gelById(id: string): GelType;
|
|
62
|
+
//# sourceMappingURL=gels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gels.d.ts","sourceRoot":"","sources":["../src/gels.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACxC,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,EAAE,SAAS,OAAO,EAKlC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAI3C"}
|
package/dist/gels.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agarose gel types and the size range each one separates.
|
|
3
|
+
*
|
|
4
|
+
* The percentages and ranges are the conventional working figures for agarose in TAE buffer, as printed in supplier
|
|
5
|
+
* guides: a low-percentage gel spreads large fragments out and runs small ones off the bottom together, a
|
|
6
|
+
* high-percentage gel does the reverse. They describe which fragments a gel would *tell apart*, and are not
|
|
7
|
+
* measurements of migration distance — a real gel depends on buffer, voltage, run time and the dye used.
|
|
8
|
+
*/
|
|
9
|
+
import { ValueError } from "@biolibs/core";
|
|
10
|
+
/**
|
|
11
|
+
* The four agarose concentrations in common use, from the one that resolves the largest fragments to the one that
|
|
12
|
+
* resolves the smallest.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* GELS.find((g) => g.percent === 1)?.largest; // 10000
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const GELS = [
|
|
20
|
+
{ id: "0.8", percent: 0.8, largest: 15000, smallest: 500 },
|
|
21
|
+
{ id: "1.0", percent: 1.0, largest: 10000, smallest: 250 },
|
|
22
|
+
{ id: "1.5", percent: 1.5, largest: 4000, smallest: 100 },
|
|
23
|
+
{ id: "2.0", percent: 2.0, largest: 2000, smallest: 50 },
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Look a gel up by its {@link GelType.id}.
|
|
27
|
+
*
|
|
28
|
+
* @param id - An id from {@link GELS}, e.g. `"1.5"`.
|
|
29
|
+
* @returns The matching gel.
|
|
30
|
+
* @throws {@link ValueError} if no gel has that id.
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* gelById("2.0").smallest; // 50
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export function gelById(id) {
|
|
37
|
+
const gel = GELS.find((g) => g.id === id);
|
|
38
|
+
if (!gel)
|
|
39
|
+
throw new ValueError(`unknown gel '${id}'; known gels are ${GELS.map((g) => g.id).join(", ")}`);
|
|
40
|
+
return gel;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=gels.js.map
|
package/dist/gels.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gels.js","sourceRoot":"","sources":["../src/gels.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmC3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC1D,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC1D,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;IACzD,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;CACzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,OAAO,CAAC,EAAU;IAChC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1C,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,UAAU,CAAC,gBAAgB,EAAE,qBAAqB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1G,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* `@biolibs/gel`: a virtual agarose gel — where DNA fragments of a given size would run, and which of them a gel
|
|
4
|
+
* would tell apart.
|
|
5
|
+
*
|
|
6
|
+
* There is no Biopython counterpart; this is the data behind the gel photograph that tools such as SnapGene and
|
|
7
|
+
* Benchling draw beside a digest. Migration follows the standard log-linear approximation over the range a gel
|
|
8
|
+
* resolves, described in `bands.ts`. The figures are conventional working values for agarose in TAE, enough to show
|
|
9
|
+
* which fragments would be distinguishable, not measurements of a particular rig.
|
|
10
|
+
*
|
|
11
|
+
* - `gels.ts`: `Resolving`, `GelType`, `GELS`, `gelById` — agarose concentrations and their resolving ranges
|
|
12
|
+
* - `ladders.ts`: `Ladder`, `LADDERS`, `ladderById` — size markers
|
|
13
|
+
* - `bands.ts`: `bandPosition`, `resolves`, `Band`, `bandsOf`, `ladderBands` — fragment sizes to visible bands
|
|
14
|
+
* - `fragments.ts`: `Topology`, `fragmentSizes` — cut positions to fragment lengths
|
|
15
|
+
* - `protein.ts`: `ProteinGel`, `PROTEIN_GELS`, `PROTEIN_LADDERS`, `proteinBands` — the same, for protein on acrylamide
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { bandsOf, fragmentSizes, gelById } from "@biolibs/gel";
|
|
20
|
+
*
|
|
21
|
+
* const gel = gelById("1.0");
|
|
22
|
+
* const sizes = fragmentSizes(2686, "circular", [395, 1230]); // pUC19 cut twice
|
|
23
|
+
* for (const band of bandsOf(sizes, gel)) {
|
|
24
|
+
* console.log(`${band.size} bp at ${(band.position * 100).toFixed(0)}% down the gel`);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export * from "./gels.js";
|
|
29
|
+
export * from "./ladders.js";
|
|
30
|
+
export * from "./bands.js";
|
|
31
|
+
export * from "./fragments.js";
|
|
32
|
+
export * from "./protein.js";
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* `@biolibs/gel`: a virtual agarose gel — where DNA fragments of a given size would run, and which of them a gel
|
|
4
|
+
* would tell apart.
|
|
5
|
+
*
|
|
6
|
+
* There is no Biopython counterpart; this is the data behind the gel photograph that tools such as SnapGene and
|
|
7
|
+
* Benchling draw beside a digest. Migration follows the standard log-linear approximation over the range a gel
|
|
8
|
+
* resolves, described in `bands.ts`. The figures are conventional working values for agarose in TAE, enough to show
|
|
9
|
+
* which fragments would be distinguishable, not measurements of a particular rig.
|
|
10
|
+
*
|
|
11
|
+
* - `gels.ts`: `Resolving`, `GelType`, `GELS`, `gelById` — agarose concentrations and their resolving ranges
|
|
12
|
+
* - `ladders.ts`: `Ladder`, `LADDERS`, `ladderById` — size markers
|
|
13
|
+
* - `bands.ts`: `bandPosition`, `resolves`, `Band`, `bandsOf`, `ladderBands` — fragment sizes to visible bands
|
|
14
|
+
* - `fragments.ts`: `Topology`, `fragmentSizes` — cut positions to fragment lengths
|
|
15
|
+
* - `protein.ts`: `ProteinGel`, `PROTEIN_GELS`, `PROTEIN_LADDERS`, `proteinBands` — the same, for protein on acrylamide
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { bandsOf, fragmentSizes, gelById } from "@biolibs/gel";
|
|
20
|
+
*
|
|
21
|
+
* const gel = gelById("1.0");
|
|
22
|
+
* const sizes = fragmentSizes(2686, "circular", [395, 1230]); // pUC19 cut twice
|
|
23
|
+
* for (const band of bandsOf(sizes, gel)) {
|
|
24
|
+
* console.log(`${band.size} bp at ${(band.position * 100).toFixed(0)}% down the gel`);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export * from "./gels.js";
|
|
29
|
+
export * from "./ladders.js";
|
|
30
|
+
export * from "./bands.js";
|
|
31
|
+
export * from "./fragments.js";
|
|
32
|
+
export * from "./protein.js";
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Size markers (ladders) run alongside a sample so band sizes can be read off.
|
|
3
|
+
*
|
|
4
|
+
* The two ladders here are the generic 1 kb and 100 bp sets sold by every supplier. Their band sizes are the
|
|
5
|
+
* nominal ones printed on the tube.
|
|
6
|
+
*/
|
|
7
|
+
/** A set of marker bands of known size. */
|
|
8
|
+
export interface Ladder {
|
|
9
|
+
/** Short identifier, e.g. `"1kb"`. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Display name. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Band sizes in base pairs, largest first. */
|
|
14
|
+
sizes: readonly number[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The generic 1 kb and 100 bp ladders.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* LADDERS[0]!.sizes[0]; // 10000
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const LADDERS: readonly Ladder[];
|
|
25
|
+
/**
|
|
26
|
+
* Look a ladder up by its {@link Ladder.id}.
|
|
27
|
+
*
|
|
28
|
+
* @param id - An id from {@link LADDERS}, e.g. `"100bp"`.
|
|
29
|
+
* @returns The matching ladder.
|
|
30
|
+
* @throws {@link ValueError} if no ladder has that id.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ladderById(id: string): Ladder;
|
|
33
|
+
//# sourceMappingURL=ladders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ladders.d.ts","sourceRoot":"","sources":["../src/ladders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,2CAA2C;AAC3C,MAAM,WAAW,MAAM;IACrB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,MAAM,EAGpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI7C"}
|
package/dist/ladders.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Size markers (ladders) run alongside a sample so band sizes can be read off.
|
|
3
|
+
*
|
|
4
|
+
* The two ladders here are the generic 1 kb and 100 bp sets sold by every supplier. Their band sizes are the
|
|
5
|
+
* nominal ones printed on the tube.
|
|
6
|
+
*/
|
|
7
|
+
import { ValueError } from "@biolibs/core";
|
|
8
|
+
/**
|
|
9
|
+
* The generic 1 kb and 100 bp ladders.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* LADDERS[0]!.sizes[0]; // 10000
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const LADDERS = [
|
|
17
|
+
{ id: "1kb", name: "1 kb ladder", sizes: [10000, 8000, 6000, 5000, 4000, 3000, 2000, 1500, 1000, 500] },
|
|
18
|
+
{ id: "100bp", name: "100 bp ladder", sizes: [1500, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100] },
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* Look a ladder up by its {@link Ladder.id}.
|
|
22
|
+
*
|
|
23
|
+
* @param id - An id from {@link LADDERS}, e.g. `"100bp"`.
|
|
24
|
+
* @returns The matching ladder.
|
|
25
|
+
* @throws {@link ValueError} if no ladder has that id.
|
|
26
|
+
*/
|
|
27
|
+
export function ladderById(id) {
|
|
28
|
+
const ladder = LADDERS.find((l) => l.id === id);
|
|
29
|
+
if (!ladder)
|
|
30
|
+
throw new ValueError(`unknown ladder '${id}'; known ladders are ${LADDERS.map((l) => l.id).join(", ")}`);
|
|
31
|
+
return ladder;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=ladders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ladders.js","sourceRoot":"","sources":["../src/ladders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAsB;IACxC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE;IACvG,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE;CACzG,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,EAAU;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,UAAU,CAAC,mBAAmB,EAAE,wBAAwB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Polyacrylamide gels for protein, and the markers run beside them.
|
|
3
|
+
*
|
|
4
|
+
* A protein gel is read the same way an agarose one is, and for the same reason: a mesh holds large
|
|
5
|
+
* molecules back more than small ones, so over the range a gel resolves the distance run is close to
|
|
6
|
+
* a straight line against the logarithm of size. The one difference is what is being measured.
|
|
7
|
+
* Agarose sorts DNA by length in base pairs; SDS-PAGE sorts protein by mass in kilodaltons, because
|
|
8
|
+
* the detergent coats every chain with much the same charge per unit mass and undoes its shape, so
|
|
9
|
+
* what is left to tell two proteins apart is how big they are. That is why {@link bandPosition} and
|
|
10
|
+
* {@link bandsOf} are the functions used here too: they take a resolving range, not a kind of gel.
|
|
11
|
+
*
|
|
12
|
+
* The percentages and ranges are the conventional working figures printed in supplier guides for
|
|
13
|
+
* SDS-PAGE in Tris-glycine. They say which proteins a gel would *tell apart*, and are not
|
|
14
|
+
* measurements. Two things to keep in mind when reading a real gel against them: a prestained
|
|
15
|
+
* marker's bands are calibrated against unstained standards and run a little off their printed
|
|
16
|
+
* weights, and a protein that is glycosylated, or that has not been fully reduced, runs at a size
|
|
17
|
+
* that is not the mass its sequence comes to.
|
|
18
|
+
*/
|
|
19
|
+
import { type Band } from "./bands.js";
|
|
20
|
+
/** One acrylamide concentration and the protein sizes it resolves, in kilodaltons. */
|
|
21
|
+
export interface ProteinGel {
|
|
22
|
+
/** Short identifier, e.g. `"12"`. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Acrylamide concentration as a percentage (w/v). */
|
|
25
|
+
percent: number;
|
|
26
|
+
/** Largest protein, in kilodaltons, the gel still separates. */
|
|
27
|
+
largest: number;
|
|
28
|
+
/** Smallest protein, in kilodaltons, the gel still separates. */
|
|
29
|
+
smallest: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The four acrylamide concentrations in common use, from the one that resolves the largest proteins
|
|
33
|
+
* to the one that resolves the smallest.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* PROTEIN_GELS.find((g) => g.percent === 12)?.largest; // 100
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const PROTEIN_GELS: readonly ProteinGel[];
|
|
41
|
+
/**
|
|
42
|
+
* Look a protein gel up by its {@link ProteinGel.id}.
|
|
43
|
+
*
|
|
44
|
+
* @param id - An id from {@link PROTEIN_GELS}, e.g. `"12"`.
|
|
45
|
+
* @returns The matching gel.
|
|
46
|
+
* @throws {@link ValueError} if no protein gel has that id.
|
|
47
|
+
*/
|
|
48
|
+
export declare function proteinGelById(id: string): ProteinGel;
|
|
49
|
+
/** A set of protein marker bands of known mass. */
|
|
50
|
+
export interface ProteinLadder {
|
|
51
|
+
/** Short identifier, e.g. `"broad"`. */
|
|
52
|
+
id: string;
|
|
53
|
+
/** Display name. */
|
|
54
|
+
name: string;
|
|
55
|
+
/** Band masses in kilodaltons, largest first. */
|
|
56
|
+
sizes: readonly number[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The generic broad-range and low-range protein markers.
|
|
60
|
+
*
|
|
61
|
+
* These are the nominal weights printed on the tube. A prestained marker runs a little off them,
|
|
62
|
+
* which is why a band is read against the marker in the lane beside it rather than off a distance.
|
|
63
|
+
*/
|
|
64
|
+
export declare const PROTEIN_LADDERS: readonly ProteinLadder[];
|
|
65
|
+
/**
|
|
66
|
+
* Look a protein marker up by its {@link ProteinLadder.id}.
|
|
67
|
+
*
|
|
68
|
+
* @param id - An id from {@link PROTEIN_LADDERS}, e.g. `"broad"`.
|
|
69
|
+
* @returns The matching marker.
|
|
70
|
+
* @throws {@link ValueError} if no marker has that id.
|
|
71
|
+
*/
|
|
72
|
+
export declare function proteinLadderById(id: string): ProteinLadder;
|
|
73
|
+
/**
|
|
74
|
+
* How far down a protein gel a band of a given mass runs, as a fraction of the way from the wells to
|
|
75
|
+
* the front.
|
|
76
|
+
*
|
|
77
|
+
* @param kilodaltons - The protein's mass.
|
|
78
|
+
* @param gel - The gel being run.
|
|
79
|
+
* @returns 0 at the wells, 1 at the front, clamped outside the range the gel separates.
|
|
80
|
+
* @throws {@link ValueError} for a mass that is not a positive finite number.
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* proteinBandPosition(100, proteinGelById("12")); // 0 — at the top of what 12% separates
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare const proteinBandPosition: (kilodaltons: number, gel: ProteinGel) => number;
|
|
87
|
+
/**
|
|
88
|
+
* The bands a lane of protein would show.
|
|
89
|
+
*
|
|
90
|
+
* @param kilodaltons - The masses in the lane, in any order.
|
|
91
|
+
* @param gel - The gel being run.
|
|
92
|
+
* @param tolerance - Relative difference below which two proteins run as one band.
|
|
93
|
+
* @returns The bands, heaviest first. {@link Band.size} and {@link Band.sizes} are in kilodaltons.
|
|
94
|
+
*/
|
|
95
|
+
export declare const proteinBands: (kilodaltons: readonly number[], gel: ProteinGel, tolerance?: number) => Band[];
|
|
96
|
+
/**
|
|
97
|
+
* The bands a protein marker would show, as a lane of single known masses.
|
|
98
|
+
*
|
|
99
|
+
* @param sizes - The marker's band masses, in kilodaltons.
|
|
100
|
+
* @param gel - The gel being run.
|
|
101
|
+
* @returns One band per marker, heaviest first.
|
|
102
|
+
*/
|
|
103
|
+
export declare const proteinLadderBands: (sizes: readonly number[], gel: ProteinGel) => Band[];
|
|
104
|
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S,MAAM,EAAE,EAAE,KAAK,UAAU,KAAG,IAAI,EAA6B,CAAC"}
|
package/dist/protein.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Polyacrylamide gels for protein, and the markers run beside them.
|
|
3
|
+
*
|
|
4
|
+
* A protein gel is read the same way an agarose one is, and for the same reason: a mesh holds large
|
|
5
|
+
* molecules back more than small ones, so over the range a gel resolves the distance run is close to
|
|
6
|
+
* a straight line against the logarithm of size. The one difference is what is being measured.
|
|
7
|
+
* Agarose sorts DNA by length in base pairs; SDS-PAGE sorts protein by mass in kilodaltons, because
|
|
8
|
+
* the detergent coats every chain with much the same charge per unit mass and undoes its shape, so
|
|
9
|
+
* what is left to tell two proteins apart is how big they are. That is why {@link bandPosition} and
|
|
10
|
+
* {@link bandsOf} are the functions used here too: they take a resolving range, not a kind of gel.
|
|
11
|
+
*
|
|
12
|
+
* The percentages and ranges are the conventional working figures printed in supplier guides for
|
|
13
|
+
* SDS-PAGE in Tris-glycine. They say which proteins a gel would *tell apart*, and are not
|
|
14
|
+
* measurements. Two things to keep in mind when reading a real gel against them: a prestained
|
|
15
|
+
* marker's bands are calibrated against unstained standards and run a little off their printed
|
|
16
|
+
* weights, and a protein that is glycosylated, or that has not been fully reduced, runs at a size
|
|
17
|
+
* that is not the mass its sequence comes to.
|
|
18
|
+
*/
|
|
19
|
+
import { ValueError } from "@biolibs/core";
|
|
20
|
+
import { bandPosition, bandsOf, ladderBands } from "./bands.js";
|
|
21
|
+
/**
|
|
22
|
+
* The four acrylamide concentrations in common use, from the one that resolves the largest proteins
|
|
23
|
+
* to the one that resolves the smallest.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* PROTEIN_GELS.find((g) => g.percent === 12)?.largest; // 100
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export const PROTEIN_GELS = [
|
|
31
|
+
{ id: "7.5", percent: 7.5, largest: 200, smallest: 40 },
|
|
32
|
+
{ id: "10", percent: 10, largest: 150, smallest: 20 },
|
|
33
|
+
{ id: "12", percent: 12, largest: 100, smallest: 10 },
|
|
34
|
+
{ id: "15", percent: 15, largest: 60, smallest: 5 },
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* Look a protein gel up by its {@link ProteinGel.id}.
|
|
38
|
+
*
|
|
39
|
+
* @param id - An id from {@link PROTEIN_GELS}, e.g. `"12"`.
|
|
40
|
+
* @returns The matching gel.
|
|
41
|
+
* @throws {@link ValueError} if no protein gel has that id.
|
|
42
|
+
*/
|
|
43
|
+
export function proteinGelById(id) {
|
|
44
|
+
const gel = PROTEIN_GELS.find((one) => one.id === id);
|
|
45
|
+
if (!gel)
|
|
46
|
+
throw new ValueError(`unknown protein gel '${id}'; known protein gels are ${PROTEIN_GELS.map((one) => one.id).join(", ")}`);
|
|
47
|
+
return gel;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The generic broad-range and low-range protein markers.
|
|
51
|
+
*
|
|
52
|
+
* These are the nominal weights printed on the tube. A prestained marker runs a little off them,
|
|
53
|
+
* which is why a band is read against the marker in the lane beside it rather than off a distance.
|
|
54
|
+
*/
|
|
55
|
+
export const PROTEIN_LADDERS = [
|
|
56
|
+
{ id: "broad", name: "Broad-range marker", sizes: [250, 150, 100, 75, 50, 37, 25, 20, 15, 10] },
|
|
57
|
+
{ id: "low", name: "Low-range marker", sizes: [100, 75, 50, 37, 25, 20, 15, 10] },
|
|
58
|
+
];
|
|
59
|
+
/**
|
|
60
|
+
* Look a protein marker up by its {@link ProteinLadder.id}.
|
|
61
|
+
*
|
|
62
|
+
* @param id - An id from {@link PROTEIN_LADDERS}, e.g. `"broad"`.
|
|
63
|
+
* @returns The matching marker.
|
|
64
|
+
* @throws {@link ValueError} if no marker has that id.
|
|
65
|
+
*/
|
|
66
|
+
export function proteinLadderById(id) {
|
|
67
|
+
const ladder = PROTEIN_LADDERS.find((one) => one.id === id);
|
|
68
|
+
if (!ladder)
|
|
69
|
+
throw new ValueError(`unknown protein ladder '${id}'; known protein ladders are ${PROTEIN_LADDERS.map((one) => one.id).join(", ")}`);
|
|
70
|
+
return ladder;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* How far down a protein gel a band of a given mass runs, as a fraction of the way from the wells to
|
|
74
|
+
* the front.
|
|
75
|
+
*
|
|
76
|
+
* @param kilodaltons - The protein's mass.
|
|
77
|
+
* @param gel - The gel being run.
|
|
78
|
+
* @returns 0 at the wells, 1 at the front, clamped outside the range the gel separates.
|
|
79
|
+
* @throws {@link ValueError} for a mass that is not a positive finite number.
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* proteinBandPosition(100, proteinGelById("12")); // 0 — at the top of what 12% separates
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export const proteinBandPosition = (kilodaltons, gel) => bandPosition(kilodaltons, gel);
|
|
86
|
+
/**
|
|
87
|
+
* The bands a lane of protein would show.
|
|
88
|
+
*
|
|
89
|
+
* @param kilodaltons - The masses in the lane, in any order.
|
|
90
|
+
* @param gel - The gel being run.
|
|
91
|
+
* @param tolerance - Relative difference below which two proteins run as one band.
|
|
92
|
+
* @returns The bands, heaviest first. {@link Band.size} and {@link Band.sizes} are in kilodaltons.
|
|
93
|
+
*/
|
|
94
|
+
export const proteinBands = (kilodaltons, gel, tolerance) => bandsOf(kilodaltons, gel, tolerance);
|
|
95
|
+
/**
|
|
96
|
+
* The bands a protein marker would show, as a lane of single known masses.
|
|
97
|
+
*
|
|
98
|
+
* @param sizes - The marker's band masses, in kilodaltons.
|
|
99
|
+
* @param gel - The gel being run.
|
|
100
|
+
* @returns One band per marker, heaviest first.
|
|
101
|
+
*/
|
|
102
|
+
export const proteinLadderBands = (sizes, gel) => ladderBands(sizes, gel);
|
|
103
|
+
//# sourceMappingURL=protein.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protein.js","sourceRoot":"","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 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
+
"bugs": {
|
|
3
|
+
"url": "https://github.com/matthewlovestocode/biolibs/issues"
|
|
4
|
+
},
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@biolibs/core": "^1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"description": "Virtual agarose gel electrophoresis: where DNA fragments of a given size run, ladders, and which bands a gel resolves",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=20"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"src"
|
|
21
|
+
],
|
|
22
|
+
"homepage": "https://github.com/matthewlovestocode/biolibs/tree/main/packages/gel#readme",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"bioinformatics",
|
|
25
|
+
"biology",
|
|
26
|
+
"dna",
|
|
27
|
+
"typescript",
|
|
28
|
+
"agarose",
|
|
29
|
+
"gel-electrophoresis",
|
|
30
|
+
"ladder",
|
|
31
|
+
"fragment",
|
|
32
|
+
"virtual-gel"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"main": "dist/index.js",
|
|
2
36
|
"name": "@biolibs/gel",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/matthewlovestocode/biolibs.git",
|
|
43
|
+
"directory": "packages/gel"
|
|
44
|
+
},
|
|
45
|
+
"type": "module",
|
|
46
|
+
"types": "dist/index.d.ts",
|
|
47
|
+
"version": "1.0.1"
|
|
48
|
+
}
|