@sjcrh/proteinpaint-server 2.91.1-1 → 2.92.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.91.1-1",
3
+ "version": "2.92.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",
@@ -80,8 +80,8 @@ async function run_DE(param, ds) {
80
80
  const cases_string = group1names.map((i) => i).join(",");
81
81
  const controls_string = group2names.map((i) => i).join(",");
82
82
  const expression_input = {
83
- case: cases_string,
84
- control: controls_string,
83
+ case: controls_string,
84
+ control: cases_string,
85
85
  data_type: "do_DE",
86
86
  input_file: q.file,
87
87
  min_count: param.min_count,
@@ -92,11 +92,15 @@ async function run_DE(param, ds) {
92
92
  let result;
93
93
  if (group1names.length <= sample_size_limit && group2names.length <= sample_size_limit || param.method == "edgeR") {
94
94
  const time1 = (/* @__PURE__ */ new Date()).valueOf();
95
- result = JSON.parse(
96
- await run_R(path.join(serverconfig.binpath, "utils", "edge.R"), JSON.stringify(expression_input))
97
- );
95
+ const r_output = await run_R(path.join(serverconfig.binpath, "utils", "edge.R"), JSON.stringify(expression_input));
98
96
  const time2 = (/* @__PURE__ */ new Date()).valueOf();
99
97
  console.log("Time taken to run edgeR:", time2 - time1, "ms");
98
+ for (const line of r_output.split("\n")) {
99
+ if (line.startsWith("adjusted_p_values:")) {
100
+ result = JSON.parse(line.replace("adjusted_p_values:", ""));
101
+ } else {
102
+ }
103
+ }
100
104
  param.method = "edgeR";
101
105
  } else if (param.method == "wilcoxon") {
102
106
  const time1 = (/* @__PURE__ */ new Date()).valueOf();
@@ -254,7 +254,7 @@ function gdc_validateGeneExpression(G, ds, genome) {
254
254
  } catch (e) {
255
255
  if (e.stack)
256
256
  console.log(e.stack);
257
- return { error: e.message || e };
257
+ return { error: "GDC scRNAseq gene expression request failed with error: " + (e.message || e) };
258
258
  }
259
259
  };
260
260
  }