@sjcrh/proteinpaint-server 2.86.0 → 2.87.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.
Files changed (48) hide show
  1. package/package.json +6 -10
  2. package/routes/_template_.js +1 -1
  3. package/routes/brainImaging.js +2 -9
  4. package/routes/burden.js +1 -1
  5. package/routes/dataset.js +1 -1
  6. package/routes/dsdata.js +1 -1
  7. package/routes/dzimages.js +1 -1
  8. package/routes/gdc.maf.js +2 -2
  9. package/routes/gdc.mafBuild.js +2 -2
  10. package/routes/gdc.topMutatedGenes.js +1 -1
  11. package/routes/genelookup.js +1 -1
  12. package/routes/genesetEnrichment.js +5 -3
  13. package/routes/genesetOverrepresentation.js +1 -1
  14. package/routes/healthcheck.js +1 -1
  15. package/routes/hicdata.js +1 -1
  16. package/routes/hicgenome.js +1 -1
  17. package/routes/hicstat.js +1 -1
  18. package/routes/isoformlst.js +1 -1
  19. package/routes/ntseq.js +1 -1
  20. package/routes/pdomain.js +1 -1
  21. package/routes/sampledzimages.js +1 -1
  22. package/routes/samplewsimages.js +1 -1
  23. package/routes/snp.js +1 -1
  24. package/routes/termdb.DE.js +1 -1
  25. package/routes/termdb.boxplot.js +22 -15
  26. package/routes/termdb.categories.js +1 -1
  27. package/routes/termdb.cluster.js +1 -1
  28. package/routes/termdb.cohort.summary.js +1 -1
  29. package/routes/termdb.cohorts.js +1 -1
  30. package/routes/termdb.descrstats.js +1 -1
  31. package/routes/termdb.numericcategories.js +1 -1
  32. package/routes/termdb.percentile.js +1 -1
  33. package/routes/termdb.rootterm.js +1 -1
  34. package/routes/termdb.sampleImages.js +1 -1
  35. package/routes/termdb.singleSampleMutation.js +1 -1
  36. package/routes/termdb.singlecellDEgenes.js +1 -1
  37. package/routes/termdb.singlecellData.js +1 -1
  38. package/routes/termdb.singlecellSamples.js +5 -5
  39. package/routes/termdb.termchildren.js +1 -1
  40. package/routes/termdb.termsbyids.js +1 -1
  41. package/routes/termdb.topTermsByType.js +1 -1
  42. package/routes/termdb.topVariablyExpressedGenes.js +1 -1
  43. package/routes/termdb.violin.js +1 -1
  44. package/routes/tileserver.js +1 -1
  45. package/routes/wsimages.js +1 -1
  46. package/src/app.js +217 -185
  47. package/utils/gsea.py +13 -3
  48. package/utils/plotBrainImaging.py +92 -53
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.86.0",
3
+ "version": "2.87.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",
@@ -8,7 +8,7 @@
8
8
  "bin": "start.js",
9
9
  "imports": {
10
10
  "#types": "@sjcrh/proteinpaint-types",
11
- "#types/*": "@sjcrh/proteinpaint-types/*",
11
+ "#types/checkers": "@sjcrh/proteinpaint-types/checkers",
12
12
  "#shared/*": "@sjcrh/proteinpaint-shared/*",
13
13
  "#src/*": "./src/*",
14
14
  "#routes/*": "./routes/*"
@@ -55,17 +55,13 @@
55
55
  "ts-node": "^10.9.1",
56
56
  "ts-patch": "^3.0.2",
57
57
  "tsx": "^4.7.1",
58
- "typedoc": "^0.26.11",
59
- "typedoc-plugin-missing-exports": "^3.0.0",
60
- "typedoc-plugin-replace-text": "^4.0.0",
61
- "typescript": "^5.6.3",
62
- "typia": "^4.1.14"
58
+ "typescript": "^5.6.3"
63
59
  },
64
60
  "dependencies": {
65
- "@sjcrh/augen": "2.86.0",
61
+ "@sjcrh/augen": "2.87.0",
66
62
  "@sjcrh/proteinpaint-rust": "2.84.0",
67
- "@sjcrh/proteinpaint-shared": "2.86.0",
68
- "@sjcrh/proteinpaint-types": "2.86.0",
63
+ "@sjcrh/proteinpaint-shared": "2.87.0",
64
+ "@sjcrh/proteinpaint-types": "2.87.0",
69
65
  "better-sqlite3": "^9.4.1",
70
66
  "body-parser": "^1.15.2",
71
67
  "canvas": "~2.11.2",
@@ -1,4 +1,4 @@
1
- import { snpPayload } from "#types";
1
+ import { snpPayload } from "#types/checkers";
2
2
  const api = {
3
3
  // route endpoint
4
4
  // - no need for trailing slash
@@ -1,6 +1,6 @@
1
1
  import path from "path";
2
2
  import serverconfig from "#src/serverconfig.js";
3
- import { brainImagingPayload } from "#types";
3
+ import { brainImagingPayload } from "#types/checkers";
4
4
  import { spawn } from "child_process";
5
5
  import { getData } from "../src/termdb.matrix.js";
6
6
  import { isNumericTerm } from "@sjcrh/proteinpaint-shared/terms.js";
@@ -134,14 +134,7 @@ async function getBrainImage(query, genomes, plane, index) {
134
134
  }
135
135
  async function generateBrainImage(refFile, plane, index, maxLength, filesJson) {
136
136
  return new Promise((resolve, reject) => {
137
- const cmd = [
138
- `${serverconfig.binpath}/../python/src/plotBrainImaging.py`,
139
- refFile,
140
- plane,
141
- index,
142
- maxLength,
143
- filesJson
144
- ];
137
+ const cmd = [`${serverconfig.binpath}/utils/plotBrainImaging.py`, refFile, plane, index, maxLength, filesJson];
145
138
  const ps = spawn(serverconfig.python, cmd);
146
139
  const imgData = [];
147
140
  ps.stdout.on("data", (data) => {
package/routes/burden.js CHANGED
@@ -1,4 +1,4 @@
1
- import { burdenPayload } from "#types";
1
+ import { burdenPayload } from "#types/checkers";
2
2
  import run_R from "#src/run_R.js";
3
3
  import path from "path";
4
4
  import serverconfig from "#src/serverconfig.js";
package/routes/dataset.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as mds2_init from "#src/mds2.init.js";
2
2
  import * as mds3_init from "#src/mds3.init.js";
3
3
  import * as common from "#shared/common.js";
4
- import { datasetPayload } from "#types";
4
+ import { datasetPayload } from "#types/checkers";
5
5
  const api = {
6
6
  endpoint: "getDataset",
7
7
  // should rename to simply 'dataset', method is based on HTTP method
package/routes/dsdata.js CHANGED
@@ -2,7 +2,7 @@ import path from "path";
2
2
  import { spawn } from "child_process";
3
3
  import serverconfig from "#src/serverconfig.js";
4
4
  import * as common from "#shared/common.js";
5
- import { dsDataPayload } from "#types";
5
+ import { dsDataPayload } from "#types/checkers";
6
6
  const api = {
7
7
  // route endpoint
8
8
  // - no need for trailing slash
@@ -1,7 +1,7 @@
1
1
  import path from "path";
2
2
  import serverconfig from "#src/serverconfig.js";
3
3
  import { illegalpath } from "#src/utils.js";
4
- import { dzImagesPayload } from "#types";
4
+ import { dzImagesPayload } from "#types/checkers";
5
5
  const api = {
6
6
  endpoint: `dzimages/:sampleId`,
7
7
  methods: {
package/routes/gdc.maf.js CHANGED
@@ -1,4 +1,4 @@
1
- import { gdcMafPayload } from "#types";
1
+ import { gdcMafPayload } from "#types/checkers";
2
2
  import path from "path";
3
3
  import got from "got";
4
4
  import serverconfig from "#src/serverconfig.js";
@@ -72,7 +72,7 @@ async function listMafFiles(q, ds) {
72
72
  let re;
73
73
  try {
74
74
  re = JSON.parse(response.body);
75
- } catch (e) {
75
+ } catch (_) {
76
76
  throw "invalid JSON from " + api.endpoint;
77
77
  }
78
78
  if (!Number.isInteger(re.data?.pagination?.total))
@@ -2,7 +2,7 @@ import got from "got";
2
2
  import path from "path";
3
3
  import { run_rust_stream } from "@sjcrh/proteinpaint-rust";
4
4
  import serverconfig from "#src/serverconfig.js";
5
- import { gdcMafPayload } from "#types";
5
+ import { gdcMafPayload } from "#types/checkers";
6
6
  import { maxTotalSizeCompressed } from "./gdc.maf.ts";
7
7
  const api = {
8
8
  endpoint: "gdc/mafBuild",
@@ -80,7 +80,7 @@ async function getFileLstUnderSizeLimit(lst, host, headers) {
80
80
  let re;
81
81
  try {
82
82
  re = JSON.parse(response.body);
83
- } catch (e) {
83
+ } catch (_) {
84
84
  throw "invalid json from getFileLstUnderSizeLimit";
85
85
  }
86
86
  if (!Array.isArray(re.data?.hits))
@@ -1,4 +1,4 @@
1
- import { gdcTopMutatedGenePayload } from "#types";
1
+ import { gdcTopMutatedGenePayload } from "#types/checkers";
2
2
  import { mclasscnvgain, mclasscnvloss, dtsnvindel } from "#shared/common.js";
3
3
  import ky from "ky";
4
4
  const api = {
@@ -1,5 +1,5 @@
1
1
  import { getResult } from "#src/gene.js";
2
- import { geneLookupPayload } from "#types";
2
+ import { geneLookupPayload } from "#types/checkers";
3
3
  const api = {
4
4
  endpoint: "genelookup",
5
5
  methods: {
@@ -1,4 +1,4 @@
1
- import { genesetEnrichmentPayload } from "#types";
1
+ import { genesetEnrichmentPayload } from "#types/checkers";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
  import { spawn } from "child_process";
@@ -55,7 +55,9 @@ async function run_genesetEnrichment_analysis(q, genomes) {
55
55
  geneset_group: q.geneSetGroup,
56
56
  cachedir: serverconfig.cachedir,
57
57
  geneset_name: q.geneset_name,
58
- pickle_file: q.pickle_file
58
+ pickle_file: q.pickle_file,
59
+ genedb: path.join(serverconfig.tpmasterdir, genomes[q.genome].genedb.dbfile),
60
+ filter_non_coding_genes: q.filter_non_coding_genes
59
61
  };
60
62
  const gsea_output = await run_gsea(
61
63
  `${serverconfig.binpath}/utils/gsea.py`,
@@ -88,7 +90,7 @@ async function run_genesetEnrichment_analysis(q, genomes) {
88
90
  async function run_gsea(path2, data) {
89
91
  try {
90
92
  await fs.promises.stat(path2);
91
- } catch (e) {
93
+ } catch (_) {
92
94
  throw `${path2} does not exist`;
93
95
  }
94
96
  return new Promise((resolve, reject) => {
@@ -1,4 +1,4 @@
1
- import { genesetOverrepresentationPayload } from "#types";
1
+ import { genesetOverrepresentationPayload } from "#types/checkers";
2
2
  import { run_rust } from "@sjcrh/proteinpaint-rust";
3
3
  import serverconfig from "#src/serverconfig.js";
4
4
  import path from "path";
@@ -1,5 +1,5 @@
1
1
  import { getStat } from "#src/health.ts";
2
- import { healthcheckPayload } from "#types";
2
+ import { healthcheckPayload } from "#types/checkers";
3
3
  const api = {
4
4
  endpoint: "healthcheck",
5
5
  methods: {
package/routes/hicdata.js CHANGED
@@ -1,4 +1,4 @@
1
- import { hicdataPayload } from "#types";
1
+ import { hicdataPayload } from "#types/checkers";
2
2
  import { fileurl } from "#src/utils.js";
3
3
  import { spawn } from "child_process";
4
4
  import readline from "readline";
@@ -1,4 +1,4 @@
1
- import { hicGenomePayload } from "#types";
1
+ import { hicGenomePayload } from "#types/checkers";
2
2
  import { fileurl } from "#src/utils.js";
3
3
  import { spawn } from "child_process";
4
4
  import readline from "readline";
package/routes/hicstat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { fileurl, file_is_readable } from "#src/utils.js";
2
2
  import { do_hicstat } from "#src/hicstat.ts";
3
- import { hicstatPayload } from "#types";
3
+ import { hicstatPayload } from "#types/checkers";
4
4
  const api = {
5
5
  endpoint: "hicstat",
6
6
  methods: {
@@ -1,4 +1,4 @@
1
- import { isoformlstPayload } from "#types";
1
+ import { isoformlstPayload } from "#types/checkers";
2
2
  const api = {
3
3
  // route endpoint
4
4
  // - no need for trailing slash
package/routes/ntseq.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ntseqPayload } from "#types";
1
+ import { ntseqPayload } from "#types/checkers";
2
2
  import { get_fasta } from "#src/utils.js";
3
3
  const api = {
4
4
  endpoint: "ntseq",
package/routes/pdomain.js CHANGED
@@ -1,4 +1,4 @@
1
- import { pdomainPayload } from "#types";
1
+ import { pdomainPayload } from "#types/checkers";
2
2
  const api = {
3
3
  // route endpoint
4
4
  // - no need for trailing slash
@@ -1,7 +1,7 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import serverconfig from "#src/serverconfig.js";
4
- import { dzImagesPayload } from "#types";
4
+ import { dzImagesPayload } from "#types/checkers";
5
5
  const api = {
6
6
  endpoint: "sampledzimages",
7
7
  methods: {
@@ -1,4 +1,4 @@
1
- import { sampleWSImagesPayload } from "#types";
1
+ import { sampleWSImagesPayload } from "#types/checkers";
2
2
  const api = {
3
3
  endpoint: "samplewsimages",
4
4
  methods: {
package/routes/snp.js CHANGED
@@ -1,4 +1,4 @@
1
- import { snpPayload } from "#types";
1
+ import { snpPayload } from "#types/checkers";
2
2
  import * as utils from "#src/utils.js";
3
3
  const api = {
4
4
  // route endpoint
@@ -1,5 +1,5 @@
1
1
  import path from "path";
2
- import { diffExpPayload } from "#types";
2
+ import { diffExpPayload } from "#types/checkers";
3
3
  import { run_rust } from "@sjcrh/proteinpaint-rust";
4
4
  import { get_ds_tdb } from "../src/termdb.js";
5
5
  import run_R from "../src/run_R.js";
@@ -1,4 +1,4 @@
1
- import { boxplotPayload } from "#types";
1
+ import { boxplotPayload } from "#types/checkers";
2
2
  import { getData } from "../src/termdb.matrix.js";
3
3
  import { boxplot_getvalue } from "../src/utils.js";
4
4
  import { sortKey2values } from "../src/termdb.violin.js";
@@ -71,7 +71,7 @@ function init({ genomes }) {
71
71
  }
72
72
  }
73
73
  const plots = [];
74
- let absMin = null, absMax = null, maxLabelLgth = null;
74
+ let absMin = null, absMax = null;
75
75
  for (const [key, values] of sortKey2values(data, key2values, overlayTerm)) {
76
76
  const sortedValues = values.sort((a, b) => a - b);
77
77
  if (absMin === null || sortedValues[0] < absMin)
@@ -87,26 +87,23 @@ function init({ genomes }) {
87
87
  throw "boxplot_getvalue failed [termdb.boxplot init()]";
88
88
  const descrStats = setDescrStats(boxplot, sortedValues);
89
89
  const _plot = {
90
- // values,
91
90
  boxplot,
92
91
  descrStats
93
92
  };
94
93
  if (overlayTerm) {
95
94
  const _key = overlayTerm?.term?.values?.[key]?.label || key;
96
95
  const plotLabel = `${_key}, n=${values.length}`;
97
- if (maxLabelLgth === null || plotLabel.length > maxLabelLgth)
98
- maxLabelLgth = plotLabel.length;
96
+ const overlayBins = numericBins(overlayTerm, data);
99
97
  const plot = Object.assign(_plot, {
100
98
  color: overlayTerm?.term?.values?.[key]?.color || null,
101
99
  key: _key,
100
+ overlayBins: overlayBins.has(key) ? overlayBins.get(key) : null,
102
101
  seriesId: key
103
102
  });
104
103
  plot.boxplot.label = plotLabel;
105
104
  plots.push(plot);
106
105
  } else {
107
106
  const plotLabel = `${sampleType}, n=${values.length}`;
108
- if (maxLabelLgth === null || plotLabel.length > maxLabelLgth)
109
- maxLabelLgth = plotLabel.length;
110
107
  const plot = Object.assign(_plot, {
111
108
  key: sampleType
112
109
  });
@@ -114,16 +111,15 @@ function init({ genomes }) {
114
111
  plots.push(plot);
115
112
  }
116
113
  }
117
- if (absMin == null || absMax == null || maxLabelLgth == null)
118
- throw "absMin, absMax, or maxLabelLgth is null [termdb.boxplot init()]";
114
+ if (absMin == null || absMax == null)
115
+ throw "absMin or absMax is null [termdb.boxplot init()]";
119
116
  if (q.tw.term?.values)
120
- setUncomputablePlots(q.tw, plots);
117
+ setHiddenPlots(q.tw, plots);
121
118
  if (overlayTerm && overlayTerm.term?.values)
122
- setUncomputablePlots(overlayTerm, plots);
119
+ setHiddenPlots(overlayTerm, plots);
123
120
  const returnData = {
124
121
  absMin,
125
122
  absMax,
126
- maxLabelLgth,
127
123
  plots,
128
124
  uncomputableValues: setUncomputableValues(uncomputableValues)
129
125
  };
@@ -135,11 +131,18 @@ function init({ genomes }) {
135
131
  }
136
132
  };
137
133
  }
138
- function setUncomputablePlots(term, plots) {
139
- for (const v of Object.values(term.term.values)) {
134
+ function setHiddenPlots(term, plots) {
135
+ for (const v of Object.values(term.term?.values)) {
140
136
  const plot = plots.find((p) => p.key === v.label);
141
137
  if (plot)
142
- plot.uncomputable = v.uncomputable;
138
+ plot.isHidden = v?.uncomputable;
139
+ }
140
+ if (term.q?.hiddenValues) {
141
+ for (const key of Object.keys(term.q.hiddenValues)) {
142
+ const plot = plots.find((p) => p.key === key);
143
+ if (plot)
144
+ plot.isHidden = true;
145
+ }
143
146
  }
144
147
  return plots;
145
148
  }
@@ -171,6 +174,10 @@ function setUncomputableValues(values) {
171
174
  } else
172
175
  return null;
173
176
  }
177
+ function numericBins(overlayTerm, data) {
178
+ const overlayBins = data.refs.byTermId[overlayTerm?.term?.id]?.bins ?? [];
179
+ return new Map(overlayBins.map((bin) => [bin.label, bin]));
180
+ }
174
181
  export {
175
182
  api
176
183
  };
@@ -1,4 +1,4 @@
1
- import { termdbCategoriesPayload } from "#types";
1
+ import { termdbCategoriesPayload } from "#types/checkers";
2
2
  import { getOrderedLabels } from "#src/termdb.barchart.js";
3
3
  import { getData } from "#src/termdb.matrix.js";
4
4
  const api = {
@@ -1,6 +1,6 @@
1
1
  import path from "path";
2
2
  import run_R from "#src/run_R.js";
3
- import { termdbClusterPayload } from "#types";
3
+ import { termdbClusterPayload } from "#types/checkers";
4
4
  import * as utils from "#src/utils.js";
5
5
  import serverconfig from "#src/serverconfig.js";
6
6
  import { gdc_validate_query_geneExpression } from "#src/mds3.gdc.js";
@@ -1,4 +1,4 @@
1
- import { termdbCohortSummaryPayload } from "#types";
1
+ import { termdbCohortSummaryPayload } from "#types/checkers";
2
2
  import { get_ds_tdb } from "#src/termdb.js";
3
3
  import { mayCopyFromCookie } from "#src/utils.js";
4
4
  const api = {
@@ -1,4 +1,4 @@
1
- import { termdbCohortsPayload } from "#types";
1
+ import { termdbCohortsPayload } from "#types/checkers";
2
2
  import { get_ds_tdb } from "#src/termdb.js";
3
3
  import { mayCopyFromCookie } from "#src/utils.js";
4
4
  const api = {
@@ -1,4 +1,4 @@
1
- import { descrStatsPayload } from "#types";
1
+ import { descrStatsPayload } from "#types/checkers";
2
2
  import Summarystats from "#shared/descriptive.stats.js";
3
3
  import { getData } from "#src/termdb.matrix.js";
4
4
  const api = {
@@ -1,4 +1,4 @@
1
- import { numericCategoriesPayload } from "#types";
1
+ import { numericCategoriesPayload } from "#types/checkers";
2
2
  import * as termdbsql from "#src/termdb.sql.js";
3
3
  const api = {
4
4
  endpoint: "termdb/numericcategories",
@@ -1,4 +1,4 @@
1
- import { percentilePayload } from "#types";
1
+ import { percentilePayload } from "#types/checkers";
2
2
  import * as termdbsql from "#src/termdb.sql.js";
3
3
  import computePercentile from "#shared/compute.percentile.js";
4
4
  const api = {
@@ -1,4 +1,4 @@
1
- import { rootTermPayload } from "#types";
1
+ import { rootTermPayload } from "#types/checkers";
2
2
  import { get_ds_tdb } from "#src/termdb.js";
3
3
  const api = {
4
4
  endpoint: "termdb/rootterm",
@@ -1,4 +1,4 @@
1
- import { termdbSampleImagesPayload } from "#types";
1
+ import { termdbSampleImagesPayload } from "#types/checkers";
2
2
  import path from "path";
3
3
  import fs from "fs";
4
4
  import serverconfig from "#src/serverconfig.js";
@@ -2,7 +2,7 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import { read_file } from "#src/utils.js";
4
4
  import serverconfig from "#src/serverconfig.js";
5
- import { termdbSingleSampleMutationPayload } from "#types";
5
+ import { termdbSingleSampleMutationPayload } from "#types/checkers";
6
6
  import { gdcValidate_query_singleSampleMutation } from "#src/mds3.gdc.js";
7
7
  const api = {
8
8
  endpoint: "termdb/singleSampleMutation",
@@ -1,4 +1,4 @@
1
- import { termdbSingleCellDEgenesPayload } from "#types";
1
+ import { termdbSingleCellDEgenesPayload } from "#types/checkers";
2
2
  import { gdc_validate_query_singleCell_DEgenes } from "#src/mds3.gdc.js";
3
3
  const api = {
4
4
  endpoint: "termdb/singlecellDEgenes",
@@ -1,4 +1,4 @@
1
- import { termdbSingleCellDataPayload } from "#types";
1
+ import { termdbSingleCellDataPayload } from "#types/checkers";
2
2
  const api = {
3
3
  endpoint: "termdb/singlecellData",
4
4
  methods: {
@@ -4,7 +4,7 @@ import { read_file } from "#src/utils.js";
4
4
  import run_R from "#src/run_R.js";
5
5
  import { run_rust } from "@sjcrh/proteinpaint-rust";
6
6
  import serverconfig from "#src/serverconfig.js";
7
- import { termdbSingleCellSamplesPayload } from "#types";
7
+ import { termdbSingleCellSamplesPayload } from "#types/checkers";
8
8
  import { validate_query_singleCell_DEgenes } from "./termdb.singlecellDEgenes.ts";
9
9
  import { gdc_validate_query_singleCell_samples, gdc_validate_query_singleCell_data } from "#src/mds3.gdc.js";
10
10
  import ky from "ky";
@@ -179,7 +179,7 @@ function validateGeneExpressionNative(G) {
179
179
  const rdsfile = path.join(serverconfig.tpmasterdir, G.folder, (q.sample.eID || q.sample.sID) + ".rds");
180
180
  try {
181
181
  await fs.promises.stat(rdsfile);
182
- } catch (e) {
182
+ } catch (_) {
183
183
  return {};
184
184
  }
185
185
  let out;
@@ -187,7 +187,7 @@ function validateGeneExpressionNative(G) {
187
187
  out = JSON.parse(
188
188
  await run_R(path.join(serverconfig.binpath, "utils", "getGeneFromMatrix.R"), null, [rdsfile, q.gene])
189
189
  );
190
- } catch (e) {
190
+ } catch (_) {
191
191
  return {};
192
192
  }
193
193
  console.log("out:", out);
@@ -198,7 +198,7 @@ function validateGeneExpressionNative(G) {
198
198
  const rdsfile = path.join(serverconfig.tpmasterdir, G.folder, (q.sample.eID || q.sample.sID) + ".h5");
199
199
  try {
200
200
  await fs.promises.stat(rdsfile);
201
- } catch (e) {
201
+ } catch (_) {
202
202
  return {};
203
203
  }
204
204
  const read_hdf5_input_type = { gene: q.gene, hdf5_file: rdsfile };
@@ -215,7 +215,7 @@ function validateGeneExpressionNative(G) {
215
215
  console.log(line);
216
216
  }
217
217
  }
218
- } catch (e) {
218
+ } catch (_) {
219
219
  return {};
220
220
  }
221
221
  return out;
@@ -1,4 +1,4 @@
1
- import { termChildrenPayload } from "#types";
1
+ import { termChildrenPayload } from "#types/checkers";
2
2
  import { copy_term, get_ds_tdb } from "#src/termdb.js";
3
3
  const api = {
4
4
  endpoint: "termdb/termchildren",
@@ -1,4 +1,4 @@
1
- import { termsByIdsPayload } from "#types";
1
+ import { termsByIdsPayload } from "#types/checkers";
2
2
  import { copy_term } from "#src/termdb.js";
3
3
  const api = {
4
4
  endpoint: "termdb/termsbyids",
@@ -1,4 +1,4 @@
1
- import { termdbTopTermsByTypePayload } from "#types";
1
+ import { termdbTopTermsByTypePayload } from "#types/checkers";
2
2
  import { run_rust } from "@sjcrh/proteinpaint-rust";
3
3
  import { get_samples } from "#src/termdb.sql.js";
4
4
  import { TermTypes } from "#shared/terms.js";
@@ -1,4 +1,4 @@
1
- import { termdbTopVariablyExpressedGenesPayload } from "#types";
1
+ import { termdbTopVariablyExpressedGenesPayload } from "#types/checkers";
2
2
  import { run_rust } from "@sjcrh/proteinpaint-rust";
3
3
  import serverconfig from "#src/serverconfig.js";
4
4
  import { get_samples } from "#src/termdb.sql.js";
@@ -1,4 +1,4 @@
1
- import { violinPayload } from "#types";
1
+ import { violinPayload } from "#types/checkers";
2
2
  import { trigger_getViolinPlotData } from "#src/termdb.violin.js";
3
3
  const api = {
4
4
  endpoint: "termdb/violin",
@@ -1,4 +1,4 @@
1
- import { tilePayload } from "#types";
1
+ import { tilePayload } from "#types/checkers";
2
2
  import ky from "ky";
3
3
  import serverconfig from "#src/serverconfig.js";
4
4
  const api = {
@@ -4,7 +4,7 @@ import path from "path";
4
4
  import serverconfig from "#src/serverconfig.js";
5
5
  import { CookieJar } from "tough-cookie";
6
6
  import { promisify } from "util";
7
- import { wsImagesPayload } from "#types";
7
+ import { wsImagesPayload } from "#types/checkers";
8
8
  const routePath = "wsimages";
9
9
  const api = {
10
10
  endpoint: `${routePath}`,