@sjcrh/proteinpaint-server 2.170.6 → 2.170.9

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.170.6",
3
+ "version": "2.170.9",
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,8 +65,8 @@
65
65
  "@sjcrh/proteinpaint-python": "2.169.0",
66
66
  "@sjcrh/proteinpaint-r": "2.152.1-0",
67
67
  "@sjcrh/proteinpaint-rust": "2.170.0",
68
- "@sjcrh/proteinpaint-shared": "2.170.6",
69
- "@sjcrh/proteinpaint-types": "2.170.6",
68
+ "@sjcrh/proteinpaint-shared": "2.170.9",
69
+ "@sjcrh/proteinpaint-types": "2.170.9-57f94bf9a.0",
70
70
  "@types/express": "^5.0.0",
71
71
  "@types/express-session": "^1.18.1",
72
72
  "better-sqlite3": "^12.4.1",
@@ -30,7 +30,10 @@ function init({ genomes }) {
30
30
  if (q.overlayTw) terms.push(q.overlayTw);
31
31
  if (q.divideTw) terms.push(q.divideTw);
32
32
  try {
33
- const data = await getData({ filter: q.filter, filter0: q.filter0, terms, __protected__: q.__protected__ }, ds);
33
+ const data = await getData(
34
+ { filter: q.filter, filter0: q.filter0, terms, __protected__: q.__protected__, __abortSignal: q.__abortSignal },
35
+ ds
36
+ );
34
37
  if (data.error) throw new Error(data.error);
35
38
  const { absMin, absMax, bins, charts, uncomputableValues, descrStats, outlierMin, outlierMax } = await processData(data, q);
36
39
  const returnData = {
@@ -42,7 +42,8 @@ async function trigger_getcategories(q, res, tdb, ds) {
42
42
  // optional, from mds3 mayAddGetCategoryArgs()
43
43
  rglst: q.rglst,
44
44
  // optional, from mds3 mayAddGetCategoryArgs()
45
- __protected__: q.__protected__
45
+ __protected__: q.__protected__,
46
+ __abortSignal: q.__abortSignal
46
47
  };
47
48
  const data = await getData(arg, ds);
48
49
  if (data.error) throw data.error;
@@ -62,6 +62,7 @@ async function getResult(q, ds) {
62
62
  if (q.dataType == TermTypes.GENE_EXPRESSION) {
63
63
  _q = JSON.parse(JSON.stringify(q));
64
64
  _q.forClusteringAnalysis = true;
65
+ _q.__abortSignal = q.__abortSignal;
65
66
  }
66
67
  let term2sample2value, byTermId, bySampleId, skippedSexChrGenes;
67
68
  if (q.dataType == NUMERIC_DICTIONARY_TERM) {
@@ -37,14 +37,20 @@ function init({ genomes }) {
37
37
  }
38
38
  async function trigger_getDescrStats(q, ds) {
39
39
  const data = await getData(
40
- { filter: q.filter, filter0: q.filter0, terms: [q.tw], __protected__: q.__protected__ },
40
+ {
41
+ filter: q.filter,
42
+ filter0: q.filter0,
43
+ terms: [q.tw],
44
+ __protected__: q.__protected__,
45
+ __abortSignal: q.__abortSignal
46
+ },
41
47
  ds
42
48
  );
43
49
  if (data.error) throw data.error;
44
50
  const values = [];
45
51
  for (const key in data.samples) {
46
52
  const sample = data.samples[key];
47
- const v = sample[q.tw.$id];
53
+ const v = sample[q.tw.$id || ""];
48
54
  if (!v && v !== 0) {
49
55
  continue;
50
56
  }
@@ -40,14 +40,14 @@ function init({ genomes }) {
40
40
  if (q.scaleDotTW) terms.push(q.scaleDotTW);
41
41
  if (q.coordTWs) for (const tw of q.coordTWs) terms.push(tw);
42
42
  const data = await getData(
43
- { filter: q.filter, filter0: q.filter0, terms, __protected__: q.__protected__ },
43
+ { filter: q.filter, filter0: q.filter0, terms, __protected__: q.__protected__, __abortSignal: q.__abortSignal },
44
44
  ds,
45
45
  true
46
46
  // FIXME 3rd arg hardcoded to true
47
47
  );
48
48
  if (data.error) throw new Error(data.error);
49
49
  let result;
50
- if (q.coordTWs.length > 0) {
50
+ if (q.coordTWs && q.coordTWs.length > 0) {
51
51
  const tmp = await getSampleCoordinatesByTerms(req, q, ds, data);
52
52
  cohortSamples = tmp[0];
53
53
  } else {
@@ -52,7 +52,8 @@ async function getViolin(q, ds) {
52
52
  filter: q.filter,
53
53
  filter0: q.filter0,
54
54
  currentGeneNames: q.currentGeneNames,
55
- __protected__: q.__protected__
55
+ __protected__: q.__protected__,
56
+ __abortSignal: q.__abortSignal
56
57
  },
57
58
  ds
58
59
  );
File without changes