@sjcrh/proteinpaint-server 2.133.0 → 2.133.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.
- package/package.json +1 -1
- package/routes/gdc.grin2.run.js +3 -4
- package/src/app.js +8 -9
package/package.json
CHANGED
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",
|
|
@@ -155,7 +154,7 @@ function init({ genomes }) {
|
|
|
155
154
|
}
|
|
156
155
|
console.log("[GRIN2] Rust execution completed");
|
|
157
156
|
const downloadTime = Date.now() - downloadStartTime;
|
|
158
|
-
const downloadTimeToPrint =
|
|
157
|
+
const downloadTimeToPrint = Math.round(downloadTime / 1e3);
|
|
159
158
|
console.log(`[GRIN2] Rust processing took ${downloadTimeToPrint}`);
|
|
160
159
|
const rustResult = parseJsonlOutput(rustOutput);
|
|
161
160
|
if (!rustResult) {
|
|
@@ -201,7 +200,7 @@ function init({ genomes }) {
|
|
|
201
200
|
console.log("[GRIN2] python execution completed");
|
|
202
201
|
console.log(`[GRIN2] Python stderr: ${pyResult.stderr}`);
|
|
203
202
|
const grin2AnalysisTime = Date.now() - grin2AnalysisStart;
|
|
204
|
-
const grin2AnalysisTimeToPrint =
|
|
203
|
+
const grin2AnalysisTimeToPrint = Math.round(grin2AnalysisTime / 1e3);
|
|
205
204
|
console.log(`[GRIN2] Python processing took ${grin2AnalysisTimeToPrint}`);
|
|
206
205
|
let resultData;
|
|
207
206
|
try {
|
|
@@ -210,7 +209,7 @@ function init({ genomes }) {
|
|
|
210
209
|
const pngImg = resultData.png[0];
|
|
211
210
|
const topGeneTable = resultData.topGeneTable || null;
|
|
212
211
|
const analysisStats = parsedRustResult.summary || {};
|
|
213
|
-
const totalProcessTime =
|
|
212
|
+
const totalProcessTime = downloadTimeToPrint + grin2AnalysisTimeToPrint;
|
|
214
213
|
console.log("[GRIN2] Total GRIN2 processing time:", totalProcessTime);
|
|
215
214
|
return res.json({
|
|
216
215
|
pngImg,
|