@sjcrh/proteinpaint-server 2.132.1-4 → 2.133.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/package.json +4 -4
- package/routes/gdc.grin2.run.js +9 -8
- package/src/app.js +17 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.1",
|
|
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",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@sjcrh/augen": "2.121.0",
|
|
64
|
-
"@sjcrh/proteinpaint-python": "2.
|
|
64
|
+
"@sjcrh/proteinpaint-python": "2.133.0",
|
|
65
65
|
"@sjcrh/proteinpaint-r": "2.130.0",
|
|
66
|
-
"@sjcrh/proteinpaint-rust": "2.
|
|
66
|
+
"@sjcrh/proteinpaint-rust": "2.133.0",
|
|
67
67
|
"@sjcrh/proteinpaint-shared": "2.132.1-2",
|
|
68
|
-
"@sjcrh/proteinpaint-types": "2.
|
|
68
|
+
"@sjcrh/proteinpaint-types": "2.133.0",
|
|
69
69
|
"@types/express": "^5.0.0",
|
|
70
70
|
"@types/express-session": "^1.18.1",
|
|
71
71
|
"better-sqlite3": "^9.4.1",
|
package/routes/gdc.grin2.run.js
CHANGED
|
@@ -2,7 +2,6 @@ import { runGRIN2Payload } from "#types/checkers";
|
|
|
2
2
|
import { stream_rust } from "@sjcrh/proteinpaint-rust";
|
|
3
3
|
import serverconfig from "#src/serverconfig.js";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { formatElapsedTime } from "@sjcrh/proteinpaint-shared/time.js";
|
|
6
5
|
import { run_python } from "@sjcrh/proteinpaint-python";
|
|
7
6
|
const api = {
|
|
8
7
|
endpoint: "gdc/runGRIN2",
|
|
@@ -154,8 +153,9 @@ function init({ genomes }) {
|
|
|
154
153
|
}
|
|
155
154
|
}
|
|
156
155
|
console.log("[GRIN2] Rust execution completed");
|
|
157
|
-
const downloadTime =
|
|
158
|
-
|
|
156
|
+
const downloadTime = Date.now() - downloadStartTime;
|
|
157
|
+
const downloadTimeToPrint = Math.round(downloadTime / 1e3);
|
|
158
|
+
console.log(`[GRIN2] Rust processing took ${downloadTimeToPrint}`);
|
|
159
159
|
const rustResult = parseJsonlOutput(rustOutput);
|
|
160
160
|
if (!rustResult) {
|
|
161
161
|
throw new Error("Failed to process MAF files: No result from Rust");
|
|
@@ -199,8 +199,9 @@ function init({ genomes }) {
|
|
|
199
199
|
}
|
|
200
200
|
console.log("[GRIN2] python execution completed");
|
|
201
201
|
console.log(`[GRIN2] Python stderr: ${pyResult.stderr}`);
|
|
202
|
-
const grin2AnalysisTime =
|
|
203
|
-
|
|
202
|
+
const grin2AnalysisTime = Date.now() - grin2AnalysisStart;
|
|
203
|
+
const grin2AnalysisTimeToPrint = Math.round(grin2AnalysisTime / 1e3);
|
|
204
|
+
console.log(`[GRIN2] Python processing took ${grin2AnalysisTimeToPrint}`);
|
|
204
205
|
let resultData;
|
|
205
206
|
try {
|
|
206
207
|
resultData = JSON.parse(pyResult);
|
|
@@ -208,7 +209,7 @@ function init({ genomes }) {
|
|
|
208
209
|
const pngImg = resultData.png[0];
|
|
209
210
|
const topGeneTable = resultData.topGeneTable || null;
|
|
210
211
|
const analysisStats = parsedRustResult.summary || {};
|
|
211
|
-
const totalProcessTime =
|
|
212
|
+
const totalProcessTime = Math.round((downloadTime + grin2AnalysisTime) / 1e3);
|
|
212
213
|
console.log("[GRIN2] Total GRIN2 processing time:", totalProcessTime);
|
|
213
214
|
return res.json({
|
|
214
215
|
pngImg,
|
|
@@ -216,8 +217,8 @@ function init({ genomes }) {
|
|
|
216
217
|
rustResult: parsedRustResult,
|
|
217
218
|
analysisStats,
|
|
218
219
|
timing: {
|
|
219
|
-
rustProcessingTime:
|
|
220
|
-
grin2ProcessingTime:
|
|
220
|
+
rustProcessingTime: downloadTimeToPrint,
|
|
221
|
+
grin2ProcessingTime: grin2AnalysisTimeToPrint,
|
|
221
222
|
totalTime: totalProcessTime
|
|
222
223
|
},
|
|
223
224
|
status: "success"
|