@sjcrh/proteinpaint-server 2.87.1 → 2.88.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 +2 -2
- package/routes/termdb.config.js +0 -1
- package/routes/termdb.singlecellSamples.js +8 -3
- package/src/app.js +441 -442
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.88.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
|
"@sjcrh/augen": "2.87.0",
|
|
62
62
|
"@sjcrh/proteinpaint-rust": "2.84.0",
|
|
63
63
|
"@sjcrh/proteinpaint-shared": "2.87.1",
|
|
64
|
-
"@sjcrh/proteinpaint-types": "2.
|
|
64
|
+
"@sjcrh/proteinpaint-types": "2.88.0",
|
|
65
65
|
"better-sqlite3": "^9.4.1",
|
|
66
66
|
"body-parser": "^1.15.2",
|
|
67
67
|
"canvas": "~2.11.2",
|
package/routes/termdb.config.js
CHANGED
|
@@ -44,7 +44,6 @@ function make(q, res, ds, genome) {
|
|
|
44
44
|
selectCohort: tdb.selectCohort,
|
|
45
45
|
// optional
|
|
46
46
|
supportedChartTypes: tdb.q?.getSupportedChartTypes(auth),
|
|
47
|
-
hiddenChartTypes: ds.cohort.hiddenChartTypes,
|
|
48
47
|
renamedChartTypes: ds.cohort.renamedChartTypes,
|
|
49
48
|
allowedTermTypes: getAllowedTermTypes(ds),
|
|
50
49
|
termMatch2geneSet: tdb.termMatch2geneSet,
|
|
@@ -2,6 +2,7 @@ import fs from "fs";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { read_file } from "#src/utils.js";
|
|
4
4
|
import run_R from "#src/run_R.js";
|
|
5
|
+
import { joinUrl } from "#src/helpers.ts";
|
|
5
6
|
import { run_rust } from "@sjcrh/proteinpaint-rust";
|
|
6
7
|
import serverconfig from "#src/serverconfig.js";
|
|
7
8
|
import { termdbSingleCellSamplesPayload } from "#types/checkers";
|
|
@@ -228,15 +229,19 @@ function gdc_validateGeneExpression(G, ds, genome) {
|
|
|
228
229
|
try {
|
|
229
230
|
const uuid = ds.__gdc.map2caseid.get(q.sample.sID);
|
|
230
231
|
const fileid = q.sample.eID;
|
|
232
|
+
const hdf5id = ds.__gdc.scrnaAnalysis2hdf5.get(fileid);
|
|
233
|
+
if (!hdf5id)
|
|
234
|
+
throw "cannot map eID to hdf5 id";
|
|
231
235
|
const aliasLst = genome.genedb.getAliasByName.all(q.gene);
|
|
232
236
|
const gencodeId = aliasLst.find((a) => a?.alias.toUpperCase().startsWith("ENSG"))?.alias;
|
|
237
|
+
if (!gencodeId)
|
|
238
|
+
throw "cannot map gene symbol to GENCODE";
|
|
233
239
|
const body = {
|
|
234
|
-
case_id: uuid,
|
|
235
240
|
gene_ids: [gencodeId],
|
|
236
|
-
file_id:
|
|
241
|
+
file_id: hdf5id
|
|
237
242
|
};
|
|
238
243
|
const { host } = ds.getHostHeaders(q);
|
|
239
|
-
const out = await ky.post(
|
|
244
|
+
const out = await ky.post(joinUrl(host.rest, "scrna_seq/gene_expression"), { timeout: false, json: body }).json();
|
|
240
245
|
const result = out.data[0].cells;
|
|
241
246
|
const data = {};
|
|
242
247
|
for (const r of result) {
|