@sjcrh/proteinpaint-server 2.58.0-0 → 2.58.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.58.0-0",
3
+ "version": "2.58.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",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@sjcrh/augen": "2.46.0",
64
- "@sjcrh/proteinpaint-rust": "2.58.0-0",
64
+ "@sjcrh/proteinpaint-rust": "2.58.0",
65
65
  "better-sqlite3": "^9.4.1",
66
66
  "body-parser": "^1.15.2",
67
67
  "canvas": "~2.11.2",
@@ -46,7 +46,6 @@ async function run_genesetOverrepresentation_analysis(q, genomes) {
46
46
  if (line.startsWith("pathway_p_values:")) {
47
47
  result = JSON.parse(line.replace("pathway_p_values:", ""));
48
48
  } else {
49
- console.log(line);
50
49
  }
51
50
  }
52
51
  return result;
@@ -7,6 +7,19 @@ const api = {
7
7
  return async (req, res) => {
8
8
  try {
9
9
  const health = await getStat(genomes);
10
+ const q = req.query;
11
+ if (q.dslabel) {
12
+ for (const gn in genomes) {
13
+ const ds = genomes[gn]?.datasets?.[q.dslabel];
14
+ if (!ds?.getHealth)
15
+ continue;
16
+ if (!health.byDataset)
17
+ health.byDataset = {};
18
+ if (!health.byDataset[q.dslabel])
19
+ health.byDataset[q.dslabel] = {};
20
+ health.byDataset[q.dslabel][gn] = ds.getHealth(ds);
21
+ }
22
+ }
10
23
  res.send(health);
11
24
  } catch (e) {
12
25
  res.send({ status: "error", error: e.message || e });
@@ -32,7 +32,7 @@ function init({ genomes }) {
32
32
  if (!ds)
33
33
  throw "invalid dataset name";
34
34
  if (ds.__gdc && !ds.__gdc.doneCaching)
35
- throw "The server has not finished caching the case IDs: try again in ~2 minutes";
35
+ throw "The server has not finished caching the case IDs: try again in about 2 minutes.";
36
36
  if (q.dataType == dtgeneexpression) {
37
37
  if (!ds.queries?.geneExpression)
38
38
  throw "no geneExpression data on this dataset";
@@ -110,7 +110,7 @@ function gdcValidateQuery(ds, genome) {
110
110
  return serverconfig.features.gdcGenes;
111
111
  }
112
112
  if (!ds.__gdc.doneCaching)
113
- throw "The server has not finished caching the case IDs: try again in ~2 minutes";
113
+ throw "The server has not finished caching the case IDs: try again in about 2 minutes.";
114
114
  const caseLst = await gdcGetCasesWithExpressionDataFromCohort(q, ds);
115
115
  if (caseLst.length == 0) {
116
116
  return [];