@biolibs/bionet-tools 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -2
- package/dist/digest-tool.d.ts +12 -3
- package/dist/digest-tool.d.ts.map +1 -1
- package/dist/digest-tool.js +10 -4
- package/dist/digest-tool.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/induce-bench.d.ts +91 -0
- package/dist/induce-bench.d.ts.map +1 -0
- package/dist/induce-bench.js +201 -0
- package/dist/induce-bench.js.map +1 -0
- package/dist/induce.d.ts +280 -0
- package/dist/induce.d.ts.map +1 -0
- package/dist/induce.js +353 -0
- package/dist/induce.js.map +1 -0
- package/dist/modify.d.ts +197 -0
- package/dist/modify.d.ts.map +1 -0
- package/dist/modify.js +253 -0
- package/dist/modify.js.map +1 -0
- package/dist/protein.d.ts.map +1 -1
- package/dist/protein.js +3 -1
- package/dist/protein.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -1
- package/dist/run.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +5 -3
- package/dist/tools.js.map +1 -1
- package/package.json +4 -4
- package/src/digest-tool.tsx +14 -5
- package/src/index.ts +6 -0
- package/src/induce-bench.tsx +406 -0
- package/src/induce.ts +448 -0
- package/src/modify.ts +350 -0
- package/src/protein.ts +3 -1
- package/src/run.ts +2 -2
- package/src/tools.tsx +4 -2
package/dist/induce.js
ADDED
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Growing a strain and making it express what was put into it, and the gel that shows whether it did.
|
|
3
|
+
*
|
|
4
|
+
* This is the step the rest of the lab's tools lead up to. A gene is found, copied, cut, joined into
|
|
5
|
+
* a construct, checked and put into a host, and all of that is still only DNA: a promise about a
|
|
6
|
+
* protein that nobody has yet seen. An induction is where the promise is kept or is not. The flask
|
|
7
|
+
* is fed something that turns the promoter on, it shakes for a few hours, and then a lane of a
|
|
8
|
+
* polyacrylamide gel either has a band at the right mass or it does not.
|
|
9
|
+
*
|
|
10
|
+
* Two things about this are worth being plain about, because they are what makes an induction
|
|
11
|
+
* different from every other tool here.
|
|
12
|
+
*
|
|
13
|
+
* - **Nothing that comes out is worked out from what went in.** A PCR's product is the stretch
|
|
14
|
+
* between the primers, and arithmetic gives it. A culture's product is whatever the cells chose to
|
|
15
|
+
* make, and no sequence predicts the yield, the solubility, or whether the thing folded. So what
|
|
16
|
+
* is computed here is only the protein the gene *codes for* and the mass its band *should* run at.
|
|
17
|
+
* Whether that band is there is read off a gel by a person, and is the one thing recorded.
|
|
18
|
+
* - **The protein is not an output of the run.** A run's outputs are DNA, every device that reads
|
|
19
|
+
* the log agrees on that, and an entry that said otherwise would be refused by the ones that are
|
|
20
|
+
* older. So an induction is recorded as a run with no outputs that used some of a culture — the
|
|
21
|
+
* same shape a transformation has — and the protein is added afterwards as a part in its own
|
|
22
|
+
* right. The run says in its settings which protein it was expected to make, by the checksum that
|
|
23
|
+
* protein will have, which is how the two are tied together without a new kind of entry.
|
|
24
|
+
*/
|
|
25
|
+
import { partChecksum } from "@biolibs/bionet";
|
|
26
|
+
import { amountOf, whereWords } from "@biolibs/bionet-panels";
|
|
27
|
+
import { PROTEIN_LADDERS, proteinBands, proteinGelById, proteinLadderById } from "@biolibs/gel";
|
|
28
|
+
import { proteinFacts, proteinWorking, translateGene } from "./protein.js";
|
|
29
|
+
/** What a run that grew a culture and made it express something is called, for the lab's record. */
|
|
30
|
+
export const INDUCTION = "induction";
|
|
31
|
+
/** The gel an induction is checked on unless somebody says otherwise: 12% acrylamide. */
|
|
32
|
+
export const USUAL_PROTEIN_GEL = "12";
|
|
33
|
+
/** The marker run beside it unless the operator picks one: `markerFor` chooses to suit the gel. */
|
|
34
|
+
export const USUAL_PROTEIN_LADDER = "";
|
|
35
|
+
/** A dalton is a gram per mole; a gel is read in thousands of them. */
|
|
36
|
+
export const DA_PER_KDA = 1_000;
|
|
37
|
+
/**
|
|
38
|
+
* The marker to run beside a gel, unless somebody says otherwise: the one with most of its bands
|
|
39
|
+
* inside what that gel separates.
|
|
40
|
+
*
|
|
41
|
+
* A marker is chosen to suit the gel, the way a person does it. A broad-range marker on a 12% gel
|
|
42
|
+
* puts its 250, 150 and 100 kDa bands all in the well, where they are one smudge and no use for
|
|
43
|
+
* reading anything off.
|
|
44
|
+
*
|
|
45
|
+
* @param gel - The gel.
|
|
46
|
+
* @returns The marker.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { markerFor, proteinGelById } from "@biolibs/bionet-tools";
|
|
51
|
+
*
|
|
52
|
+
* markerFor(proteinGelById("12")).id; // "low" — a broad-range marker's top three sit in the well
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export function markerFor(gel) {
|
|
56
|
+
const inside = (marker) => marker.sizes.filter((one) => one <= gel.largest && one >= gel.smallest).length;
|
|
57
|
+
return [...PROTEIN_LADDERS].sort((a, b) => inside(b) - inside(a) || (a.sizes.length - inside(a)) - (b.sizes.length - inside(b)))[0];
|
|
58
|
+
}
|
|
59
|
+
const whole = (value, usual) => value === undefined || !Number.isSafeInteger(value) || value < 0 ? usual : value;
|
|
60
|
+
/**
|
|
61
|
+
* The cultures a lab could grow and induce: every culture with something in it.
|
|
62
|
+
*
|
|
63
|
+
* A tube of DNA is not offered, however much of it there is. Expression is something cells do.
|
|
64
|
+
*
|
|
65
|
+
* @param lab - The lab.
|
|
66
|
+
* @returns The cultures to offer, the ones of a strain that carries something first, since those
|
|
67
|
+
* are the ones there is anything to express in.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import { inductionCultures } from "@biolibs/bionet-tools";
|
|
72
|
+
*
|
|
73
|
+
* const cultures = inductionCultures(lab);
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export function inductionCultures(lab) {
|
|
77
|
+
const found = [];
|
|
78
|
+
for (const item of lab.items) {
|
|
79
|
+
if (item.part !== null || item.retired || item.amount <= 0)
|
|
80
|
+
continue;
|
|
81
|
+
const strain = lab.strains.find((one) => one.strain === item.strain);
|
|
82
|
+
if (strain === undefined)
|
|
83
|
+
continue;
|
|
84
|
+
found.push({ item: item.item, strain, label: `${strain.name} · ${amountOf(item)} · ${whereWords(item, lab.places)}` });
|
|
85
|
+
}
|
|
86
|
+
return found.sort((a, b) => b.strain.carries.length - a.strain.carries.length);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* What a culture's strain carries that there is any point inducing.
|
|
90
|
+
*
|
|
91
|
+
* A strain carries parts, and a part is DNA; a protein the lab happens to hold is not something to
|
|
92
|
+
* express. What is marked on each is read for coding sequences, since a construct usually carries
|
|
93
|
+
* more than a gene — a promoter, a marker, an origin — and it is the gene that is being asked for.
|
|
94
|
+
*
|
|
95
|
+
* @param lab - The lab.
|
|
96
|
+
* @param culture - The culture's tube ID.
|
|
97
|
+
* @returns What could be expressed, and the coding sequences marked on each.
|
|
98
|
+
*/
|
|
99
|
+
export function inductionGenes(lab, culture) {
|
|
100
|
+
const item = lab.items.find((one) => one.item === culture);
|
|
101
|
+
const strain = item === undefined ? undefined : lab.strains.find((one) => one.strain === item.strain);
|
|
102
|
+
if (strain === undefined)
|
|
103
|
+
return [];
|
|
104
|
+
return strain.carries.flatMap((checksum) => {
|
|
105
|
+
const part = lab.parts.find((one) => one.checksum === checksum);
|
|
106
|
+
if (part === undefined || part.kind === "protein")
|
|
107
|
+
return [];
|
|
108
|
+
const coding = part.features.filter((one) => /^cds$/i.test(one.type) && one.parts.length === 1)
|
|
109
|
+
.sort((a, b) => (b.parts[0].end - b.parts[0].start) - (a.parts[0].end - a.parts[0].start))
|
|
110
|
+
.map((one) => one.label);
|
|
111
|
+
return [{ part, coding }];
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* What an induction would be expected to give: the protein, and where its band should run.
|
|
116
|
+
*
|
|
117
|
+
* @param lab - The lab.
|
|
118
|
+
* @param choice - The culture, the gene, and the gel to read it on.
|
|
119
|
+
* @returns The protein, its mass, and the gel it should show.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* import { planInduction } from "@biolibs/bionet-tools";
|
|
124
|
+
*
|
|
125
|
+
* const plan = planInduction(lab, { culture, gene, cds: "casein", cutSignal: true });
|
|
126
|
+
* plan.kilodaltons; // what the band should run at
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export function planInduction(lab, choice) {
|
|
130
|
+
let gel;
|
|
131
|
+
try {
|
|
132
|
+
gel = proteinGelById(choice.gel ?? USUAL_PROTEIN_GEL);
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
gel = proteinGelById(USUAL_PROTEIN_GEL);
|
|
136
|
+
}
|
|
137
|
+
// Chosen to suit the gel unless the operator has named one, since a marker whose bands all sit in
|
|
138
|
+
// the well is a marker nothing can be read against.
|
|
139
|
+
let marker = markerFor(gel);
|
|
140
|
+
if (choice.ladder !== undefined) {
|
|
141
|
+
try {
|
|
142
|
+
marker = proteinLadderById(choice.ladder);
|
|
143
|
+
}
|
|
144
|
+
catch { /* the one that suits the gel */ }
|
|
145
|
+
}
|
|
146
|
+
const ladder = proteinBands(marker.sizes, gel).map((one) => ({ ...one, intensity: 1 }));
|
|
147
|
+
const empty = (problem, strain = null, gene = null) => ({ strain, gene, made: null, facts: null, checksum: null, kilodaltons: null, bands: [], ladder, gel, ladderName: marker.name, problem });
|
|
148
|
+
const item = lab.items.find((one) => one.item === choice.culture);
|
|
149
|
+
if (item === undefined || item.part !== null)
|
|
150
|
+
return empty("An induction grows a culture of a strain. Choose one of the lab's cultures.");
|
|
151
|
+
const strain = lab.strains.find((one) => one.strain === item.strain);
|
|
152
|
+
if (strain === undefined)
|
|
153
|
+
return empty("The lab no longer lists the strain this is a culture of.");
|
|
154
|
+
if (choice.gene === "")
|
|
155
|
+
return empty(strain.carries.length === 0
|
|
156
|
+
? `Nothing has been put into ${strain.name}, so there is nothing in it to express.`
|
|
157
|
+
: "Choose which of the things the strain carries to express.", strain);
|
|
158
|
+
if (!strain.carries.includes(choice.gene))
|
|
159
|
+
return empty(`${strain.name} does not carry that part, so inducing it would not make that protein.`, strain);
|
|
160
|
+
const gene = lab.parts.find((one) => one.checksum === choice.gene);
|
|
161
|
+
if (gene === undefined)
|
|
162
|
+
return empty("The lab no longer lists that part.", strain);
|
|
163
|
+
if (gene.kind === "protein")
|
|
164
|
+
return empty(`${gene.name} is a protein. What is expressed is a gene.`, strain, gene);
|
|
165
|
+
const made = translateGene(gene, { ...(choice.cds === undefined || choice.cds === "" ? {} : { cds: choice.cds }), ...(choice.cutSignal === true ? { cutSignal: true } : {}) });
|
|
166
|
+
if (made.problem !== null)
|
|
167
|
+
return empty(made.problem, strain, gene);
|
|
168
|
+
const facts = proteinFacts(made.protein);
|
|
169
|
+
const kilodaltons = facts === null ? null : facts.weight / DA_PER_KDA;
|
|
170
|
+
// A gene read in the wrong frame, or a broken one, gives a chain with a stop in the middle. That
|
|
171
|
+
// is not something there can be a tube of, so it has no checksum and nothing offers to keep it —
|
|
172
|
+
// but it is still shown, with the warnings that say what is wrong, because that is the finding.
|
|
173
|
+
const keepable = /^[ACDEFGHIKLMNPQRSTVWYBXZJUO]+$/i.test(made.protein);
|
|
174
|
+
return {
|
|
175
|
+
strain, gene, made, facts,
|
|
176
|
+
checksum: keepable ? partChecksum({ sequence: made.protein, kind: "protein" }) : null,
|
|
177
|
+
kilodaltons,
|
|
178
|
+
bands: kilodaltons === null ? [] : proteinBands([kilodaltons], gel),
|
|
179
|
+
ladder, gel, ladderName: marker.name, problem: null,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Work a choice out into an induction: what to record, and the protein to keep.
|
|
184
|
+
*
|
|
185
|
+
* What is recorded is a run that used some of a culture and made no molecule, because a run's
|
|
186
|
+
* outputs are DNA and what this makes is not. The protein it was expected to make is named in the
|
|
187
|
+
* run's settings by the checksum it will have, so that the run and the part can be put back together
|
|
188
|
+
* afterwards by anybody reading the log, including a device that was not here.
|
|
189
|
+
*
|
|
190
|
+
* @param lab - The lab.
|
|
191
|
+
* @param choice - The culture, the gene, how it was set up, and what to call what comes out.
|
|
192
|
+
* @returns What it would give, what to record either way, and the protein to add if it worked.
|
|
193
|
+
*/
|
|
194
|
+
export function inductionRun(lab, choice) {
|
|
195
|
+
const plan = planInduction(lab, choice);
|
|
196
|
+
const item = lab.items.find((one) => one.item === choice.culture);
|
|
197
|
+
if (item === undefined || item.part !== null)
|
|
198
|
+
return { plan, keep: null, showed: null, nothing: null };
|
|
199
|
+
const typed = choice.name?.trim() ?? "";
|
|
200
|
+
const name = (typed !== "" ? typed
|
|
201
|
+
: plan.made === null || plan.gene === null ? "a protein"
|
|
202
|
+
: `${plan.made.signal === null ? "" : "mature "}${choice.cds !== undefined && choice.cds !== "" ? choice.cds : plan.gene.name}`).slice(0, 200);
|
|
203
|
+
const inducer = choice.inducer?.trim() ?? "";
|
|
204
|
+
const concentration = choice.concentration?.trim() ?? "";
|
|
205
|
+
const record = {
|
|
206
|
+
kind: INDUCTION, instrument: choice.instrument ?? null,
|
|
207
|
+
inputs: [{ item: choice.culture, amount: whole(choice.used, 1), role: "culture" }],
|
|
208
|
+
outputs: [],
|
|
209
|
+
settings: {
|
|
210
|
+
...(inducer === "" ? {} : { inducer: inducer.slice(0, 200) }),
|
|
211
|
+
...(concentration === "" ? {} : { at: concentration.slice(0, 200) }),
|
|
212
|
+
...(Number.isSafeInteger(choice.celsius) ? { celsius: choice.celsius } : {}),
|
|
213
|
+
...(Number.isSafeInteger(choice.rpm) ? { rpm: choice.rpm } : {}),
|
|
214
|
+
...(Number.isSafeInteger(choice.hours) ? { hours: choice.hours } : {}),
|
|
215
|
+
...(plan.gene === null ? {} : { gene: plan.gene.name.slice(0, 200), gene_part: plan.gene.checksum }),
|
|
216
|
+
// Which stretch was read, and whether the signal peptide came off, because the protein's mass
|
|
217
|
+
// depends on both and a name does not say either.
|
|
218
|
+
...(choice.cds === undefined || choice.cds === "" ? {} : { cds: choice.cds.slice(0, 200) }),
|
|
219
|
+
...(choice.cutSignal === true ? { signal_cut: plan.made?.signal === null ? "none marked" : "yes" } : {}),
|
|
220
|
+
// Written as text, not as a number: an entry carries only whole numbers, and a mass to one
|
|
221
|
+
// decimal place is what a gel is read to. Rounding it to a whole kDa would lose a small protein.
|
|
222
|
+
...(plan.kilodaltons === null ? {} : { expected_kda: (Math.round(plan.kilodaltons * 10) / 10).toFixed(1) }),
|
|
223
|
+
// The protein is added as a part of its own, so this is what ties the two together.
|
|
224
|
+
...(plan.checksum === null ? {} : { made: plan.checksum }),
|
|
225
|
+
gel: `${plan.gel.percent}%`,
|
|
226
|
+
},
|
|
227
|
+
note: choice.note ?? null,
|
|
228
|
+
};
|
|
229
|
+
const keep = plan.made === null || plan.checksum === null || plan.made.protein === "" ? null : {
|
|
230
|
+
name, sequence: plan.made.protein, kind: "protein",
|
|
231
|
+
amount: whole(choice.amount, 1), unit: choice.unit === undefined ? "mL" : choice.unit, checksum: plan.checksum,
|
|
232
|
+
};
|
|
233
|
+
return {
|
|
234
|
+
plan, keep,
|
|
235
|
+
showed: keep === null ? null : { ...record, outcome: "worked" },
|
|
236
|
+
nothing: { ...record, outcome: "failed" },
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* What a careful operator would ask of an induction before running it.
|
|
241
|
+
*
|
|
242
|
+
* None of this is about the protein being wrong. It is about the gel being unable to answer the
|
|
243
|
+
* question: a band smaller than the gel separates runs off the front, one larger stays in the well,
|
|
244
|
+
* and one that lands on a marker band cannot be told from it. A protein that the sequence says is
|
|
245
|
+
* unstable is worth knowing about before a day is spent on it.
|
|
246
|
+
*
|
|
247
|
+
* @param plan - The induction as worked out.
|
|
248
|
+
* @returns What to say, the ones worth stopping for first.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```ts
|
|
252
|
+
* import { inductionChecks, planInduction } from "@biolibs/bionet-tools";
|
|
253
|
+
*
|
|
254
|
+
* inductionChecks(planInduction(lab, choice)).filter((one) => one.weight === "stop");
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
export function inductionChecks(plan) {
|
|
258
|
+
const checks = [];
|
|
259
|
+
const kda = plan.kilodaltons;
|
|
260
|
+
const round = (value) => `${Math.round(value * 10) / 10} kDa`;
|
|
261
|
+
if (kda !== null) {
|
|
262
|
+
if (kda < plan.gel.smallest) {
|
|
263
|
+
checks.push({ weight: "stop", says: `${round(kda)} is smaller than ${plan.gel.percent}% acrylamide separates, so the band would run off the front or be too faint to see. A higher percentage would hold it.`, because: `${round(kda)} < ${plan.gel.smallest} kDa` });
|
|
264
|
+
}
|
|
265
|
+
else if (kda > plan.gel.largest) {
|
|
266
|
+
checks.push({ weight: "stop", says: `${round(kda)} is larger than ${plan.gel.percent}% acrylamide separates, so the band would stay at the well. A lower percentage would spread it.`, because: `${round(kda)} > ${plan.gel.largest} kDa` });
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
// A band within a few per cent of a marker band is a band nobody can report having seen.
|
|
270
|
+
const near = plan.ladder.find((one) => Math.abs(one.size - kda) <= kda * 0.06);
|
|
271
|
+
if (near !== undefined) {
|
|
272
|
+
checks.push({ weight: "look", says: `${round(kda)} is close to the marker's ${near.size} kDa band, so the two would be hard to tell apart. A marker whose bands fall elsewhere, or a lane of uninduced cells to compare against, would settle it.`, because: `${round(kda)} ≈ ${near.size} kDa` });
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (plan.made !== null) {
|
|
277
|
+
for (const warning of plan.made.warnings)
|
|
278
|
+
checks.push({ weight: "look", says: warning, because: "read from the gene" });
|
|
279
|
+
if (plan.made.signal !== null) {
|
|
280
|
+
checks.push({ weight: "look", says: `${plan.made.signal.label} was taken off, so this is the mass of what the cells let out. What is still inside them is ${plan.made.signal.peptide.length} amino acids longer and runs higher.`, because: "signal peptide cut" });
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (plan.facts !== null && plan.facts.instability > 40) {
|
|
284
|
+
checks.push({ weight: "look", says: `The sequence puts the instability index at ${plan.facts.instability.toFixed(1)}, and over 40 is reckoned unstable in a tube. Keep it cold and run the gel the same day.`, because: `instability ${plan.facts.instability.toFixed(1)} > 40` });
|
|
285
|
+
}
|
|
286
|
+
return checks.sort((a, b) => Number(b.weight === "stop") - Number(a.weight === "stop"));
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* The working behind an induction: the protein, and where its band should run.
|
|
290
|
+
*
|
|
291
|
+
* The first of these is the translation and what the sequence says about the protein, which is
|
|
292
|
+
* `proteinWorking`'s. The last is the one thing added here, and it is the one that has to be read
|
|
293
|
+
* carefully: a position on a gel is an estimate from a straight-line rule, and a mass is read
|
|
294
|
+
* against the marker beside it and never off a distance.
|
|
295
|
+
*
|
|
296
|
+
* @param plan - The induction as worked out.
|
|
297
|
+
* @returns The workings, in the order to read them. Empty if there is nothing to expect.
|
|
298
|
+
*/
|
|
299
|
+
export function inductionWorking(plan) {
|
|
300
|
+
if (plan.made === null)
|
|
301
|
+
return [];
|
|
302
|
+
const out = [...proteinWorking(plan.made, plan.facts)];
|
|
303
|
+
const kda = plan.kilodaltons;
|
|
304
|
+
if (kda !== null) {
|
|
305
|
+
const [high, low, own] = [Math.log10(plan.gel.largest), Math.log10(plan.gel.smallest), Math.log10(kda)];
|
|
306
|
+
const round = (value) => value.toFixed(2);
|
|
307
|
+
const position = plan.bands[0]?.position ?? 0;
|
|
308
|
+
const inside = kda <= plan.gel.largest && kda >= plan.gel.smallest;
|
|
309
|
+
out.push({
|
|
310
|
+
of: `where ${Math.round(kda * 10) / 10} kDa runs on ${plan.gel.percent}% acrylamide`,
|
|
311
|
+
comes: `${Math.round(position * 100)}% of the way down`, kind: "estimate",
|
|
312
|
+
steps: [
|
|
313
|
+
`${Math.round(plan.facts.weight)} Da is ${Math.round(kda * 10) / 10} kDa, which is what a protein gel is read in.`,
|
|
314
|
+
`This gel separates ${plan.gel.largest} kDa, which barely leaves the well, down to ${plan.gel.smallest} kDa, which reaches the front.`,
|
|
315
|
+
`Distance goes with the logarithm of mass: log₁₀ ${plan.gel.largest} = ${round(high)}, log₁₀ ${plan.gel.smallest} = ${round(low)}, log₁₀ ${Math.round(kda * 10) / 10} = ${round(own)}.`,
|
|
316
|
+
inside ? `So it is (${round(high)} − ${round(own)}) ÷ (${round(high)} − ${round(low)}) = ${round(position)} of the way down, beside the marker's ${plan.ladder.filter((one) => one.size >= kda).at(-1)?.size ?? plan.gel.largest} kDa band.`
|
|
317
|
+
: `${Math.round(kda * 10) / 10} kDa is ${kda > plan.gel.largest ? "larger" : "smaller"} than this gel separates, so it is drawn at the ${kda > plan.gel.largest ? "well" : "front"}.`,
|
|
318
|
+
],
|
|
319
|
+
rests: "SDS coats a protein with much the same charge for every unit of mass and undoes its shape, so what is left to sort chains by is size, and over a gel's working range the distance is close to a straight line against the logarithm of mass. It is an approximation. A marker's bands are themselves calibrated and run a little off their printed weights, and a protein that is glycosylated or not fully reduced runs at a size that is not the mass its sequence comes to. Read a band against the marker in the lane beside it, never off a distance.",
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return out;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Which of a lab's parts came out of an induction, as the runs themselves say.
|
|
326
|
+
*
|
|
327
|
+
* A protein part is added apart from the run that made it, so the tie between them is the checksum
|
|
328
|
+
* the run recorded in its settings. Reading it back this way means a device that was not there when
|
|
329
|
+
* it happened arrives at the same answer from the log alone.
|
|
330
|
+
*
|
|
331
|
+
* @param lab - The lab, with its runs.
|
|
332
|
+
* @param checksum - The protein's checksum.
|
|
333
|
+
* @returns The IDs of the runs that said they would make it, in the order they were recorded.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* import { inducedBy } from "@biolibs/bionet-tools";
|
|
338
|
+
*
|
|
339
|
+
* inducedBy(lab, protein.checksum); // ["…"], or [] for a protein nobody grew here
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
export function inducedBy(lab, checksum) {
|
|
343
|
+
return lab.runs.filter((one) => one.kind === INDUCTION && one.outcome === "worked" && one.settings["made"] === checksum).map((one) => one.run);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Whether a part looks like one an induction made: a protein, with a run that says it made it.
|
|
347
|
+
*
|
|
348
|
+
* @param lab - The lab, with its runs.
|
|
349
|
+
* @param part - The part.
|
|
350
|
+
* @returns Whether some induction in the lab's record was expected to make it.
|
|
351
|
+
*/
|
|
352
|
+
export const wasInduced = (lab, part) => part.kind === "protein" && inducedBy(lab, part.checksum).length > 0;
|
|
353
|
+
//# sourceMappingURL=induce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"induce.js","sourceRoot":"","sources":["../src/induce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,YAAY,EAAoC,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAkD,MAAM,cAAc,CAAC;AAChJ,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAsC,MAAM,cAAc,CAAC;AAI/G,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAErC,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,mGAAmG;AACnG,MAAM,CAAC,MAAM,oBAAoB,GA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SAAS,mDAAmD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GAAG;aAC7L;YACD,KAAK,EAAE,4hBAA4hB;SACpiB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,SAAS,CAAC,GAA6H,EAC7H,QAAgB;IACxC,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACjJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAoC,EAAE,IAA0C,EAAW,EAAE,CACtH,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
|
package/dist/modify.d.ts
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which residues of a protein would be phosphorylated, and whether the host would do it.
|
|
3
|
+
*
|
|
4
|
+
* This exists because of the gap between a band and a protein. The induction tool can tell a lab it
|
|
5
|
+
* will get a 24 kDa band; it cannot tell the lab that the band will be the right mass and the wrong
|
|
6
|
+
* thing. For casein that is the whole question. Casein builds a micelle — which is what makes it
|
|
7
|
+
* behave like cheese rather than like dissolved protein — by binding calcium through clusters of
|
|
8
|
+
* phosphorylated serines. A casein that was made but not phosphorylated weighs almost the same,
|
|
9
|
+
* runs almost in the same place, and will not do the job.
|
|
10
|
+
*
|
|
11
|
+
* So two separate things are worked out here, and they are kept separate because one is arithmetic
|
|
12
|
+
* and the other is not.
|
|
13
|
+
*
|
|
14
|
+
* - **Which residues carry the motif.** This is a rule over the sequence and nothing more. The
|
|
15
|
+
* secretory-pathway kinase that phosphorylates milk proteins recognises Ser-x-Glu, and once a
|
|
16
|
+
* serine is phosphorylated it acts like a glutamate for the one two residues before it, so the
|
|
17
|
+
* sites march backwards along a cluster. That hierarchy is why casein's serines come in runs.
|
|
18
|
+
* {@link phosphoSites} applies it, says which round each site was found in, and shows the working.
|
|
19
|
+
* - **Whether the host has the enzyme.** This is not arithmetic, and nothing here pretends it is.
|
|
20
|
+
* {@link hostPhosphorylation} says what is generally held about the usual expression hosts, how
|
|
21
|
+
* firmly, and says plainly that it is a claim to check — which the lab's own literature tools can
|
|
22
|
+
* now do.
|
|
23
|
+
*
|
|
24
|
+
* A motif is a prediction. Where a curated record exists, as it does for the caseins in UniProt,
|
|
25
|
+
* {@link comparedWithKnown} says which predictions it confirms and which it does not, and that
|
|
26
|
+
* comparison is worth far more than either on its own.
|
|
27
|
+
*/
|
|
28
|
+
import type { Working } from "./pcr-working.js";
|
|
29
|
+
/** One rule for recognising a site. */
|
|
30
|
+
export interface PhosphoMotif {
|
|
31
|
+
/** What to call it. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** The kinase family that uses it. */
|
|
34
|
+
kinase: string;
|
|
35
|
+
/** The rule, written as people write it. */
|
|
36
|
+
pattern: string;
|
|
37
|
+
/** Which residues it can act on. */
|
|
38
|
+
acts: string;
|
|
39
|
+
/** What it is for, in a sentence. */
|
|
40
|
+
about: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The rules applied, in the order they are applied.
|
|
44
|
+
*
|
|
45
|
+
* Only two, and deliberately only two. These are the acidophilic motifs — the ones that read a
|
|
46
|
+
* negative charge two or three residues along — and they are the ones that matter for a secreted
|
|
47
|
+
* milk protein. A kinase whose rule is a structure rather than a few residues cannot be found by
|
|
48
|
+
* looking at a sequence, and nothing here claims otherwise.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PHOSPHO_MOTIFS: readonly PhosphoMotif[];
|
|
51
|
+
/** One residue that would be phosphorylated, and why. */
|
|
52
|
+
export interface PhosphoSite {
|
|
53
|
+
/** Where it is, counting from 1. */
|
|
54
|
+
at: number;
|
|
55
|
+
/** The residue, as a letter. */
|
|
56
|
+
residue: string;
|
|
57
|
+
/** The rule that found it, by name. */
|
|
58
|
+
by: string;
|
|
59
|
+
/** The kinase family that rule belongs to. */
|
|
60
|
+
kinase: string;
|
|
61
|
+
/** The residues either side of it, as they are written. */
|
|
62
|
+
context: string;
|
|
63
|
+
/**
|
|
64
|
+
* Which round found it. Round 1 is the motif read off the sequence as it stands. A later round is
|
|
65
|
+
* a site that only became one because a site found in the round before gave it the charge it
|
|
66
|
+
* needed — which is how a cluster of phosphoserines builds backwards along a chain.
|
|
67
|
+
*/
|
|
68
|
+
round: number;
|
|
69
|
+
/** What made it a site, said for a person. */
|
|
70
|
+
because: string;
|
|
71
|
+
/**
|
|
72
|
+
* Any other rule that also matches this residue.
|
|
73
|
+
*
|
|
74
|
+
* A serine can carry more than one motif, and which one is reported first depends only on the
|
|
75
|
+
* order the rules are tried in. Saying "this is a CK2 site" when it is equally the secretory
|
|
76
|
+
* kinase's would be an accident of that order presented as a finding, so the others are listed.
|
|
77
|
+
*/
|
|
78
|
+
alsoBy: {
|
|
79
|
+
name: string;
|
|
80
|
+
kinase: string;
|
|
81
|
+
because: string;
|
|
82
|
+
}[];
|
|
83
|
+
}
|
|
84
|
+
/** What was worked out about a protein. */
|
|
85
|
+
export interface Phosphorylation {
|
|
86
|
+
/** The sites, in order along the chain. */
|
|
87
|
+
sites: PhosphoSite[];
|
|
88
|
+
/** How many rounds found something. A further round, which found nothing, is what ended it. */
|
|
89
|
+
rounds: number;
|
|
90
|
+
/** Why there is nothing to say, or `null` if there is. */
|
|
91
|
+
problem: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The residues of a protein that carry a phosphorylation motif.
|
|
95
|
+
*
|
|
96
|
+
* The rules are applied in rounds. In the first, each is read off the sequence as it stands. In
|
|
97
|
+
* each round after, a serine whose +2 residue is a site found already counts too, because a
|
|
98
|
+
* phosphoserine carries the negative charge the kinase was reading for. That is repeated until a
|
|
99
|
+
* round finds nothing, which is what builds the runs of phosphoserines a casein has.
|
|
100
|
+
*
|
|
101
|
+
* @param protein - The amino acids, in one letter each.
|
|
102
|
+
* @param options - `motifs` are the rules to apply, {@link PHOSPHO_MOTIFS} if not given; `prime`
|
|
103
|
+
* turns off the later rounds, leaving only what the bare sequence says.
|
|
104
|
+
* @returns The sites, and how many rounds it took.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* import { phosphoSites } from "@biolibs/bionet-tools";
|
|
109
|
+
*
|
|
110
|
+
* const found = phosphoSites(casein.sequence);
|
|
111
|
+
* found.sites.filter((one) => one.round > 1); // the ones a neighbour made possible
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare function phosphoSites(protein: string, options?: {
|
|
115
|
+
motifs?: readonly PhosphoMotif[];
|
|
116
|
+
prime?: boolean;
|
|
117
|
+
}): Phosphorylation;
|
|
118
|
+
/** How a predicted set of sites stands against a curated one. */
|
|
119
|
+
export interface Compared {
|
|
120
|
+
/** Sites that were predicted and are recorded: the ones to trust. */
|
|
121
|
+
confirmed: number[];
|
|
122
|
+
/** Sites that are recorded and were not predicted: the rule missed them. */
|
|
123
|
+
missed: number[];
|
|
124
|
+
/** Sites that were predicted and are not recorded: they may be wrong, or merely unstudied. */
|
|
125
|
+
onlyPredicted: number[];
|
|
126
|
+
/** What fraction of the recorded sites the rule found. */
|
|
127
|
+
caught: number;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* How a prediction stands against what somebody has actually recorded.
|
|
131
|
+
*
|
|
132
|
+
* This is the honest way to use a motif. A rule over a sequence says what could be phosphorylated;
|
|
133
|
+
* a curated record says what somebody saw. Where both exist, how well they agree is the measure of
|
|
134
|
+
* whether to believe the rule anywhere else — on a variant, say, or on a gene that has been
|
|
135
|
+
* rewritten in another host's codons.
|
|
136
|
+
*
|
|
137
|
+
* @param predicted - Where the rule said, counting from 1.
|
|
138
|
+
* @param known - Where a record says, counting from 1 on the same sequence.
|
|
139
|
+
* @returns What agrees, what was missed, and what is predicted alone.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { comparedWithKnown, phosphoSites } from "@biolibs/bionet-tools";
|
|
144
|
+
*
|
|
145
|
+
* const found = phosphoSites(casein.sequence);
|
|
146
|
+
* comparedWithKnown(found.sites.map((one) => one.at), [30, 32, 33, 34, 50]).caught; // 1
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export declare function comparedWithKnown(predicted: readonly number[], known: readonly number[]): Compared;
|
|
150
|
+
/** What is held about whether a host phosphorylates a secreted protein this way. */
|
|
151
|
+
export interface HostKinases {
|
|
152
|
+
/** The organism, as it would be written. */
|
|
153
|
+
host: string;
|
|
154
|
+
/** Whether it is held to have the secretory-pathway kinase, and whether it has CK2. */
|
|
155
|
+
secretoryKinase: "yes" | "no" | "not known";
|
|
156
|
+
casein2: boolean;
|
|
157
|
+
/** What is held, in a sentence or two. */
|
|
158
|
+
says: string;
|
|
159
|
+
/** How firmly: something long settled, something reported, or something to go and check. */
|
|
160
|
+
standing: "well established" | "reported" | "check";
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* What is generally held about the usual expression hosts.
|
|
164
|
+
*
|
|
165
|
+
* Everything here is a claim about biology and not something computed, which is why it carries a
|
|
166
|
+
* `standing` and why the answer tells a reader to check it. It rots: a homologue nobody had found
|
|
167
|
+
* when this was written may have been found since, and a host engineered to carry the kinase is now
|
|
168
|
+
* a thing people build. What it is for is to stop a lab discovering at the end of a month that the
|
|
169
|
+
* protein it made was never going to be phosphorylated — and then to point at the literature, which
|
|
170
|
+
* the lab's own tools can now read.
|
|
171
|
+
*/
|
|
172
|
+
export declare const HOST_KINASES: readonly HostKinases[];
|
|
173
|
+
/**
|
|
174
|
+
* What is held about one host.
|
|
175
|
+
*
|
|
176
|
+
* @param host - What it is, as the lab writes it. Matched loosely, so `Pichia pastoris GS115` finds
|
|
177
|
+
* the entry for the species under its current name.
|
|
178
|
+
* @returns What is held, or `null` for a host nothing here knows about, which is not the same as a
|
|
179
|
+
* host that does not do it.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```ts
|
|
183
|
+
* import { hostPhosphorylation } from "@biolibs/bionet-tools";
|
|
184
|
+
*
|
|
185
|
+
* hostPhosphorylation("Saccharomyces cerevisiae W303")?.secretoryKinase; // "not known"
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
export declare function hostPhosphorylation(host: string): HostKinases | null;
|
|
189
|
+
/**
|
|
190
|
+
* The working behind what was found: the rule, the rounds, and what it rests on.
|
|
191
|
+
*
|
|
192
|
+
* @param found - What {@link phosphoSites} gave.
|
|
193
|
+
* @param host - What is held about the host, if a host was named.
|
|
194
|
+
* @returns The workings, in the order to read them.
|
|
195
|
+
*/
|
|
196
|
+
export declare function phosphoWorking(found: Phosphorylation, host?: HostKinases | null): Working[];
|
|
197
|
+
//# sourceMappingURL=modify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modify.d.ts","sourceRoot":"","sources":["../src/modify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;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