@sjcrh/proteinpaint-server 2.73.0 → 2.74.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.
@@ -191,7 +191,13 @@ var termdb_test_default = {
191
191
  src: "native",
192
192
  file: "files/hg38/TermdbTest/TermdbTest.fpkm.matrix.gz"
193
193
  },
194
- topVariablyExpressedGenes: { src: "native" }
194
+ topVariablyExpressedGenes: {
195
+ src: "native"
196
+ },
197
+ WSImages: {
198
+ type: "H&E",
199
+ imageBySampleFolder: "hg38-test/TermdbTest/wsimages"
200
+ }
195
201
  },
196
202
  assayAvailability: {
197
203
  // term used below must be annotated on samples rather than patients(root). otherwise matrix will pull wrong samples for geneVariant term
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.73.0",
3
+ "version": "2.74.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,7 +62,7 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@sjcrh/augen": "2.46.0",
65
- "@sjcrh/proteinpaint-rust": "2.73.0",
65
+ "@sjcrh/proteinpaint-rust": "2.74.0",
66
66
  "better-sqlite3": "^9.4.1",
67
67
  "body-parser": "^1.15.2",
68
68
  "canvas": "~2.11.2",
@@ -1,4 +1,6 @@
1
1
  import { run_rust } from "@sjcrh/proteinpaint-rust";
2
+ import serverconfig from "#src/serverconfig.js";
3
+ import path from "path";
2
4
  const api = {
3
5
  endpoint: "genesetOverrepresentation",
4
6
  methods: {
@@ -31,14 +33,17 @@ function init({ genomes }) {
31
33
  async function run_genesetOverrepresentation_analysis(q, genomes) {
32
34
  if (!genomes[q.genome].termdbs)
33
35
  throw "termdb database is not available for " + q.genome;
34
- const gene_overrepresentation_input = {
36
+ const gene_overrepresentation_input_type = {
35
37
  sample_genes: q.sample_genes,
36
- background_genes: q.background_genes,
37
- db: genomes[q.genome].termdbs.msigdb.cohort.db.connection.name,
38
- gene_set_group: q.geneSetGroup
38
+ msigdb: genomes[q.genome].termdbs.msigdb.cohort.db.connection.name,
39
+ gene_set_group: q.geneSetGroup,
40
+ genedb: path.join(serverconfig.tpmasterdir, genomes[q.genome].genedb.dbfile)
39
41
  };
42
+ if (q.background_genes) {
43
+ gene_overrepresentation_input_type.background_genes = q.background_genes;
44
+ }
40
45
  const time1 = (/* @__PURE__ */ new Date()).valueOf();
41
- const rust_output = await run_rust("genesetORA", JSON.stringify(gene_overrepresentation_input));
46
+ const rust_output = await run_rust("genesetORA", JSON.stringify(gene_overrepresentation_input_type));
42
47
  const time2 = (/* @__PURE__ */ new Date()).valueOf();
43
48
  console.log("Time taken to run rust gene over representation pipeline:", time2 - time1, "ms");
44
49
  let result;
package/routes/genomes.js CHANGED
@@ -85,7 +85,8 @@ function clientcopy_genome(genomename, genomes) {
85
85
  minorchr: g.minorchr,
86
86
  tracks: g.tracks,
87
87
  hicenzymefragment: g.hicenzymefragment,
88
- datasets: {}
88
+ datasets: {},
89
+ hideOnClient: g.hideOnClient
89
90
  };
90
91
  if (g.termdbs) {
91
92
  g2.termdbs = {};
@@ -78,6 +78,8 @@ function make(q, res, ds, genome) {
78
78
  c.logscaleBase2 = tdb.logscaleBase2;
79
79
  if (tdb.useCasesExcluded)
80
80
  c.useCasesExcluded = tdb.useCasesExcluded;
81
+ if (tdb.excludedTermtypeByTarget)
82
+ c.excludedTermtypeByTarget = tdb.excludedTermtypeByTarget;
81
83
  if (ds.assayAvailability)
82
84
  c.assayAvailability = ds.assayAvailability;
83
85
  if (ds.customTwQByType)
@@ -171,7 +173,7 @@ function addNonDictionaryQueries(c, ds, genome) {
171
173
  delete q2.singleSampleGenomeQuantification[k].folder;
172
174
  }
173
175
  }
174
- if (q.NIdata) {
176
+ if (q.NIdata && serverconfig.features.showBrainImaging) {
175
177
  q2.NIdata = {};
176
178
  for (const k in q.NIdata) {
177
179
  q2.NIdata[k] = JSON.parse(JSON.stringify(q.NIdata[k]));
@@ -11,10 +11,10 @@ const api = {
11
11
  get: {
12
12
  init,
13
13
  request: {
14
- typeId: "any"
14
+ typeId: "GetWSImagesRequest"
15
15
  },
16
16
  response: {
17
- typeId: "any"
17
+ typeId: "GetWSImagesResponse"
18
18
  }
19
19
  },
20
20
  post: {
@@ -26,16 +26,17 @@ const api = {
26
26
  function init({ genomes }) {
27
27
  return async (req, res) => {
28
28
  try {
29
- const g = genomes[req.query.genome];
29
+ const query = req.query;
30
+ const g = genomes[query.genome];
30
31
  if (!g)
31
32
  throw "invalid genome name";
32
- const ds = g.datasets[req.query.dslabel];
33
+ const ds = g.datasets[query.dslabel];
33
34
  if (!ds)
34
35
  throw "invalid dataset name";
35
- const sampleId = req.query.sampleId;
36
+ const sampleId = query.sampleId;
36
37
  if (!sampleId)
37
38
  throw "invalid sampleId";
38
- const wsimage = req.query.wsimage;
39
+ const wsimage = query.wsimage;
39
40
  if (!wsimage)
40
41
  throw "invalid wsimage";
41
42
  const cookieJar = new CookieJar();