@sjcrh/proteinpaint-server 2.81.2 → 2.81.4-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 +1 -1
- package/routes/termdb.cluster.js +6 -0
- package/routes/termdb.topVariablyExpressedGenes.js +1 -2
- package/src/app.js +152 -142
package/package.json
CHANGED
package/routes/termdb.cluster.js
CHANGED
|
@@ -37,6 +37,12 @@ function init({ genomes }) {
|
|
|
37
37
|
if (q.dataType == TermTypes.GENE_EXPRESSION || q.dataType == TermTypes.METABOLITE_INTENSITY) {
|
|
38
38
|
if (!ds.queries?.[q.dataType])
|
|
39
39
|
throw `no ${q.dataType} data on this dataset`;
|
|
40
|
+
if (!q.terms)
|
|
41
|
+
throw `missing gene list`;
|
|
42
|
+
if (!Array.isArray(q.terms))
|
|
43
|
+
throw `gene list is not an array`;
|
|
44
|
+
if (q.terms.length < 3)
|
|
45
|
+
throw `A minimum of three genes is required for clustering. Please refresh this page to clear this error.`;
|
|
40
46
|
result = await getResult(q, ds);
|
|
41
47
|
} else {
|
|
42
48
|
throw "unknown q.dataType " + q.dataType;
|
|
@@ -3,7 +3,6 @@ import serverconfig from "#src/serverconfig.js";
|
|
|
3
3
|
import { get_samples } from "#src/termdb.sql.js";
|
|
4
4
|
import { makeFilter } from "#src/mds3.gdc.js";
|
|
5
5
|
import { cachedFetch } from "#src/utils.js";
|
|
6
|
-
import { resolve } from "url";
|
|
7
6
|
const api = {
|
|
8
7
|
endpoint: "termdb/topVariablyExpressedGenes",
|
|
9
8
|
methods: {
|
|
@@ -182,7 +181,7 @@ function gdcValidateQuery(ds, genome) {
|
|
|
182
181
|
throw "The server has not finished caching the case IDs: try again in about 2 minutes.";
|
|
183
182
|
}
|
|
184
183
|
const { host, headers } = ds.getHostHeaders(q);
|
|
185
|
-
const url =
|
|
184
|
+
const url = `${host.geneExp}/gene_expression/gene_selection`;
|
|
186
185
|
try {
|
|
187
186
|
const response = await cachedFetch(
|
|
188
187
|
url,
|