@sjcrh/proteinpaint-server 2.170.21 → 2.170.25
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 +1 -1
- package/routes/termdb.boxplot.js +7 -7
- package/routes/termdb.sampleScatter.js +8 -8
- package/src/app.js +19 -16
package/package.json
CHANGED
package/routes/termdb.boxplot.js
CHANGED
|
@@ -22,14 +22,14 @@ const api = {
|
|
|
22
22
|
function init({ genomes }) {
|
|
23
23
|
return async (req, res) => {
|
|
24
24
|
const q = req.query;
|
|
25
|
-
const genome = genomes[q.genome];
|
|
26
|
-
if (!genome) throw new Error("invalid genome name");
|
|
27
|
-
const ds = genome.datasets?.[q.dslabel];
|
|
28
|
-
if (!ds) throw new Error("invalid ds");
|
|
29
|
-
const terms = [q.tw];
|
|
30
|
-
if (q.overlayTw) terms.push(q.overlayTw);
|
|
31
|
-
if (q.divideTw) terms.push(q.divideTw);
|
|
32
25
|
try {
|
|
26
|
+
const genome = genomes[q.genome];
|
|
27
|
+
if (!genome) throw new Error("invalid genome name");
|
|
28
|
+
const ds = genome.datasets?.[q.dslabel];
|
|
29
|
+
if (!ds) throw new Error("invalid dslabel");
|
|
30
|
+
const terms = [q.tw];
|
|
31
|
+
if (q.overlayTw) terms.push(q.overlayTw);
|
|
32
|
+
if (q.divideTw) terms.push(q.divideTw);
|
|
33
33
|
const data = await getData(
|
|
34
34
|
{ filter: q.filter, filter0: q.filter0, terms, __protected__: q.__protected__, __abortSignal: q.__abortSignal },
|
|
35
35
|
ds
|
|
@@ -23,15 +23,15 @@ const api = {
|
|
|
23
23
|
const refColor = "#F5F5DC";
|
|
24
24
|
function init({ genomes }) {
|
|
25
25
|
return async function(req, res) {
|
|
26
|
-
const q = req.query;
|
|
27
|
-
if (!q.genome || !q.dslabel) {
|
|
28
|
-
throw new Error("Genome and dataset label are required for termdb/sampleScatter request.");
|
|
29
|
-
}
|
|
30
|
-
const g = genomes[q.genome];
|
|
31
|
-
const ds = g.datasets[q.dslabel];
|
|
32
|
-
if (q.singleCellPlot)
|
|
33
|
-
return getSingleCellScatter(req, res, ds);
|
|
34
26
|
try {
|
|
27
|
+
const q = req.query;
|
|
28
|
+
if (!q.genome || !q.dslabel) {
|
|
29
|
+
throw new Error("Genome and dataset label are required for termdb/sampleScatter request.");
|
|
30
|
+
}
|
|
31
|
+
const g = genomes[q.genome];
|
|
32
|
+
const ds = g.datasets[q.dslabel];
|
|
33
|
+
if (q.singleCellPlot)
|
|
34
|
+
return getSingleCellScatter(req, res, ds);
|
|
35
35
|
let refSamples = [], cohortSamples;
|
|
36
36
|
const terms = [];
|
|
37
37
|
if (q.colorTW) terms.push(q.colorTW);
|