@sjcrh/proteinpaint-server 2.121.0 → 2.122.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/dataset/termdb.test.js +13 -1
- package/package.json +2 -2
- package/routes/genesetEnrichment.js +9 -2
- package/src/app.js +203 -81
package/dataset/termdb.test.js
CHANGED
|
@@ -13,7 +13,19 @@ function termdb_test_default() {
|
|
|
13
13
|
version: "?",
|
|
14
14
|
link: "testLink"
|
|
15
15
|
},
|
|
16
|
-
additionalInfo: "<a href=testLink>Tutorial</a> <a href=testLink>Get help</a>"
|
|
16
|
+
additionalInfo: "<a href=testLink>Tutorial</a> <a href=testLink>Get help</a>",
|
|
17
|
+
activeItems: {
|
|
18
|
+
items: [
|
|
19
|
+
{
|
|
20
|
+
title: "Demo Active Item Plot Button",
|
|
21
|
+
plot: {
|
|
22
|
+
chartType: "summary",
|
|
23
|
+
term: { id: "agedx" },
|
|
24
|
+
term2: { id: "sex" }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
17
29
|
}
|
|
18
30
|
}
|
|
19
31
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.122.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",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@sjcrh/augen": "2.121.0",
|
|
69
69
|
"@sjcrh/proteinpaint-python": "2.118.0",
|
|
70
|
-
"@sjcrh/proteinpaint-rust": "2.
|
|
70
|
+
"@sjcrh/proteinpaint-rust": "2.122.0",
|
|
71
71
|
"@sjcrh/proteinpaint-shared": "2.121.0",
|
|
72
72
|
"@sjcrh/proteinpaint-types": "2.121.0",
|
|
73
73
|
"@types/express": "^5.0.0",
|
|
@@ -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 {
|