@sjcrh/proteinpaint-server 2.120.2-0 → 2.121.1-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/burden.js +0 -4
- package/routes/genesetEnrichment.js +9 -2
- package/routes/termdb.topMutatedGenes.js +1 -1
- package/routes/termdb.violin.js +0 -1
- package/src/app.js +191 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.121.1-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",
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"typescript": "^5.6.3"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@sjcrh/augen": "2.
|
|
68
|
+
"@sjcrh/augen": "2.121.0",
|
|
69
69
|
"@sjcrh/proteinpaint-python": "2.118.0",
|
|
70
|
-
"@sjcrh/proteinpaint-rust": "2.
|
|
71
|
-
"@sjcrh/proteinpaint-shared": "2.
|
|
72
|
-
"@sjcrh/proteinpaint-types": "2.
|
|
70
|
+
"@sjcrh/proteinpaint-rust": "2.121.0",
|
|
71
|
+
"@sjcrh/proteinpaint-shared": "2.121.0",
|
|
72
|
+
"@sjcrh/proteinpaint-types": "2.121.0",
|
|
73
73
|
"@types/express": "^5.0.0",
|
|
74
74
|
"@types/express-session": "^1.18.1",
|
|
75
75
|
"better-sqlite3": "^9.4.1",
|
package/routes/burden.js
CHANGED
|
@@ -15,7 +15,6 @@ const api = {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
const MAXBOOTNUM = 20;
|
|
19
18
|
function init({ genomes }) {
|
|
20
19
|
return async function handler(req, res) {
|
|
21
20
|
try {
|
|
@@ -124,9 +123,6 @@ async function compute95ci(result, cumburden) {
|
|
|
124
123
|
}
|
|
125
124
|
await cumburden.db.connection.prepare(`UPDATE estimates SET ci95=? WHERE id=?`).run(JSON.stringify(result.ci95), result.id);
|
|
126
125
|
}
|
|
127
|
-
function sortNumericValue(a, b) {
|
|
128
|
-
return a < b ? -1 : 1;
|
|
129
|
-
}
|
|
130
126
|
function formatPayload(estimates) {
|
|
131
127
|
const rawKeys = Object.keys(estimates["1"]).filter((k) => k.startsWith("["));
|
|
132
128
|
const renamedKeys = rawKeys.map((k) => `burden${k.split(",")[0].slice(1)}`);
|
|
@@ -4,6 +4,7 @@ import path from "path";
|
|
|
4
4
|
import serverconfig from "#src/serverconfig.js";
|
|
5
5
|
import { run_python } from "@sjcrh/proteinpaint-python";
|
|
6
6
|
import { mayLog } from "#src/helpers.ts";
|
|
7
|
+
import { DeleteCacheFiles } from "#src/DeleteCacheFiles.ts";
|
|
7
8
|
const api = {
|
|
8
9
|
endpoint: "genesetEnrichment",
|
|
9
10
|
methods: {
|
|
@@ -47,13 +48,19 @@ function init({ genomes }) {
|
|
|
47
48
|
async function run_genesetEnrichment_analysis(q, genomes) {
|
|
48
49
|
if (!genomes[q.genome].termdbs)
|
|
49
50
|
throw "termdb database is not available for " + q.genome;
|
|
51
|
+
const cache = new DeleteCacheFiles({
|
|
52
|
+
cachedir: serverconfig.cachedir_gsea,
|
|
53
|
+
fileExtensions: [".pkl"],
|
|
54
|
+
maxSize: 1e6
|
|
55
|
+
});
|
|
56
|
+
await cache.mayResetCacheCheckTimeout(cache.checkWait);
|
|
50
57
|
const genesetenrichment_input = {
|
|
51
58
|
genes: q.genes,
|
|
52
59
|
fold_change: q.fold_change,
|
|
53
60
|
db: genomes[q.genome].termdbs.msigdb.cohort.db.connection.name,
|
|
54
61
|
// For now msigdb has been added, but later databases other than msigdb may be used
|
|
55
62
|
geneset_group: q.geneSetGroup,
|
|
56
|
-
cachedir: serverconfig.
|
|
63
|
+
cachedir: serverconfig.cachedir_gsea,
|
|
57
64
|
geneset_name: q.geneset_name,
|
|
58
65
|
pickle_file: q.pickle_file,
|
|
59
66
|
num_permutations: q.num_permutations,
|
|
@@ -78,7 +85,7 @@ async function run_genesetEnrichment_analysis(q, genomes) {
|
|
|
78
85
|
if (data_found)
|
|
79
86
|
return result;
|
|
80
87
|
if (image_found)
|
|
81
|
-
return path.join(serverconfig.
|
|
88
|
+
return path.join(serverconfig.cachedir_gsea, result.image_file);
|
|
82
89
|
throw "data or image not found in gsea output; this should not happen";
|
|
83
90
|
}
|
|
84
91
|
export {
|
package/routes/termdb.violin.js
CHANGED
|
@@ -10,7 +10,6 @@ import { numericBins, parseValues } from "./termdb.boxplot.ts";
|
|
|
10
10
|
import serverconfig from "../src/serverconfig.js";
|
|
11
11
|
import run_R from "../src/run_R.js";
|
|
12
12
|
import path from "path";
|
|
13
|
-
const minSampleSize = 5;
|
|
14
13
|
const api = {
|
|
15
14
|
endpoint: "termdb/violin",
|
|
16
15
|
methods: {
|