@sjcrh/proteinpaint-server 2.81.6 → 2.82.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.81.6",
3
+ "version": "2.82.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",
@@ -43,7 +43,7 @@
43
43
  "@babel/preset-env": "^7.9.6",
44
44
  "@babel/preset-typescript": "^7.21.4",
45
45
  "@babel/register": "^7.14.5",
46
- "@sjcrh/proteinpaint-types": "2.81.5",
46
+ "@sjcrh/proteinpaint-types": "2.82.0",
47
47
  "@types/node": "^20.11.24",
48
48
  "@types/tough-cookie": "^4.0.5",
49
49
  "@typescript-eslint/eslint-plugin": "^5.60.0",
@@ -63,14 +63,15 @@ async function getBrainImage(query, genomes) {
63
63
  }
64
64
  return new Promise((resolve, reject) => {
65
65
  const filePaths = query.selectedSampleFileNames.map((file) => path.join(dirPath, file));
66
- const ps = spawn("python3", [
66
+ const cmd = [
67
67
  `${serverconfig.binpath}/../python/src/plotBrainImaging.py`,
68
68
  refFile,
69
69
  query.l,
70
70
  query.f,
71
71
  query.t,
72
72
  ...filePaths
73
- ]);
73
+ ];
74
+ const ps = spawn(serverconfig.python, cmd);
74
75
  const imgData = [];
75
76
  ps.stdout.on("data", (data) => {
76
77
  imgData.push(data);
@@ -131,7 +131,8 @@ function validateDataNative(D, ds) {
131
131
  }
132
132
  const colorColumn = plot.colorColumns.find((c) => c.name == q.colorBy?.[plot.name]) || plot.colorColumns[0];
133
133
  const lines = file2Lines[tsvfile];
134
- const cells = [];
134
+ const expCells = [];
135
+ const noExpCells = [];
135
136
  for (let i = 1; i < lines.length; i++) {
136
137
  const l = lines[i].split(" ");
137
138
  const cellId = lines.length > 3 ? l[0] : void 0, x = Number(l[plot.coordsColumns.x]), y = Number(l[plot.coordsColumns.y]);
@@ -144,13 +145,17 @@ function validateDataNative(D, ds) {
144
145
  if (geneExpMap) {
145
146
  if (geneExpMap[cellId] !== void 0) {
146
147
  cell.geneExp = geneExpMap[cellId];
148
+ expCells.push(cell);
149
+ } else {
150
+ noExpCells.push(cell);
147
151
  }
148
- }
149
- cells.push(cell);
152
+ } else
153
+ noExpCells.push(cell);
150
154
  }
151
155
  plots.push({
152
156
  name: plot.name,
153
- cells,
157
+ expCells,
158
+ noExpCells,
154
159
  colorColumns: plot.colorColumns.map((c) => c.name),
155
160
  colorBy: colorColumn?.name,
156
161
  colorMap: colorColumn?.colorMap