@sjcrh/proteinpaint-server 2.170.1 → 2.171.0
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/package.json +5 -5
- package/routes/aiProjectAdmin.js +1 -0
- package/routes/grin2.js +8 -16
- package/routes/termdb.config.js +2 -1
- package/src/app.js +73 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.171.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "a genomics visualization tool for exploring a cohort's genotype and phenotype data",
|
|
6
6
|
"main": "src/app.js",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@sjcrh/augen": "2.143.0",
|
|
65
|
-
"@sjcrh/proteinpaint-python": "2.
|
|
65
|
+
"@sjcrh/proteinpaint-python": "2.171.0-0",
|
|
66
66
|
"@sjcrh/proteinpaint-r": "2.152.1-0",
|
|
67
|
-
"@sjcrh/proteinpaint-rust": "2.
|
|
68
|
-
"@sjcrh/proteinpaint-shared": "2.
|
|
69
|
-
"@sjcrh/proteinpaint-types": "2.
|
|
67
|
+
"@sjcrh/proteinpaint-rust": "2.171.0",
|
|
68
|
+
"@sjcrh/proteinpaint-shared": "2.171.0-0",
|
|
69
|
+
"@sjcrh/proteinpaint-types": "2.171.0",
|
|
70
70
|
"@types/express": "^5.0.0",
|
|
71
71
|
"@types/express-session": "^1.18.1",
|
|
72
72
|
"better-sqlite3": "^12.4.1",
|
package/routes/aiProjectAdmin.js
CHANGED
|
@@ -61,6 +61,7 @@ function init({ genomes }) {
|
|
|
61
61
|
} else if (query.for === "filterImages") {
|
|
62
62
|
const q = ds.cohort.termdb.q;
|
|
63
63
|
const data = await q.getFilteredImages(query.project.filter);
|
|
64
|
+
data.selectedImages = await ds.queries?.WSImages?.selectWSIImages();
|
|
64
65
|
res.status(200).send({
|
|
65
66
|
status: "ok",
|
|
66
67
|
data
|
package/routes/grin2.js
CHANGED
|
@@ -6,16 +6,7 @@ import { run_rust } from "@sjcrh/proteinpaint-rust";
|
|
|
6
6
|
import { mayLog } from "#src/helpers.ts";
|
|
7
7
|
import { get_samples } from "#src/termdb.sql.js";
|
|
8
8
|
import { read_file, file_is_readable } from "#src/utils.js";
|
|
9
|
-
import {
|
|
10
|
-
dtsnvindel,
|
|
11
|
-
dtcnv,
|
|
12
|
-
dtfusionrna,
|
|
13
|
-
dtsv,
|
|
14
|
-
dt2lesion,
|
|
15
|
-
optionToDt,
|
|
16
|
-
formatElapsedTime,
|
|
17
|
-
MANHATTAN_LOG_QVALUE_CUTOFF
|
|
18
|
-
} from "#shared";
|
|
9
|
+
import { dtsnvindel, dtcnv, dtfusionrna, dtsv, dt2lesion, optionToDt, formatElapsedTime } from "#shared";
|
|
19
10
|
import crypto from "crypto";
|
|
20
11
|
const MAX_LESIONS_PER_TYPE = serverconfig.features.grin2maxLesionPerType || 11e4;
|
|
21
12
|
const api = {
|
|
@@ -115,9 +106,6 @@ async function runGrin2(g, ds, request) {
|
|
|
115
106
|
lesionTypeMap: buildLesionTypeMap(availableDataTypes)
|
|
116
107
|
};
|
|
117
108
|
for (const c in g.majorchr) {
|
|
118
|
-
if (ds.queries.singleSampleMutation.discoPlot?.skipChrM) {
|
|
119
|
-
if (c.toLowerCase() == "chrm") continue;
|
|
120
|
-
}
|
|
121
109
|
pyInput.chromosomelist[c] = g.majorchr[c];
|
|
122
110
|
}
|
|
123
111
|
const grin2AnalysisStart = Date.now();
|
|
@@ -141,7 +129,9 @@ async function runGrin2(g, ds, request) {
|
|
|
141
129
|
png_dot_radius: request.pngDotRadius,
|
|
142
130
|
lesion_type_colors: request.lesionTypeColors,
|
|
143
131
|
q_value_threshold: request.qValueThreshold,
|
|
144
|
-
|
|
132
|
+
max_capped_points: request.maxCappedPoints,
|
|
133
|
+
hard_cap: request.hardCap,
|
|
134
|
+
bin_size: request.binSize
|
|
145
135
|
};
|
|
146
136
|
const manhattanPlotStart = Date.now();
|
|
147
137
|
const rsResult = await run_rust("manhattan_plot", JSON.stringify(rustInput));
|
|
@@ -214,12 +204,14 @@ async function processSampleData(samples, ds, request, tracker) {
|
|
|
214
204
|
await file_is_readable(filepath);
|
|
215
205
|
const mlst = JSON.parse(await read_file(filepath));
|
|
216
206
|
const { sampleLesions, contributedTypes } = await processSampleMlst(sample.name, mlst, request, tracker);
|
|
217
|
-
|
|
207
|
+
const skipChrM = ds.queries.singleSampleMutation.discoPlot?.skipChrM;
|
|
208
|
+
const filteredLesions = skipChrM ? sampleLesions.filter((lesion) => lesion[1].toLowerCase() !== "chrm") : sampleLesions;
|
|
209
|
+
lesions.push(...filteredLesions);
|
|
218
210
|
for (const type of contributedTypes) {
|
|
219
211
|
samplesPerType.get(type)?.add(sample.name);
|
|
220
212
|
}
|
|
221
213
|
processingSummary.processedSamples += 1;
|
|
222
|
-
processingSummary.totalLesions +=
|
|
214
|
+
processingSummary.totalLesions += filteredLesions.length;
|
|
223
215
|
if (allTypesCapped(tracker)) {
|
|
224
216
|
const remaining = samples.length - 1 - i;
|
|
225
217
|
if (remaining > 0) processingSummary.unprocessedSamples += remaining;
|
package/routes/termdb.config.js
CHANGED
|
@@ -143,7 +143,8 @@ function addNonDictionaryQueries(c, ds, genome) {
|
|
|
143
143
|
// some of the stuff here are to provide user-selectable choices
|
|
144
144
|
// e.g. computing methods, info fields, populations.
|
|
145
145
|
details: q.snvindel.details,
|
|
146
|
-
populations: q.snvindel.populations
|
|
146
|
+
populations: q.snvindel.populations,
|
|
147
|
+
mafFilter: q.snvindel.mafFilter
|
|
147
148
|
};
|
|
148
149
|
if (q.snvindel.byisoform?.processTwsInOneQuery) q2.snvindel.byisoform = { processTwsInOneQuery: true };
|
|
149
150
|
}
|