@sjcrh/proteinpaint-shared 2.167.0 → 2.170.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-shared",
3
- "version": "2.167.0",
3
+ "version": "2.170.0",
4
4
  "description": "ProteinPaint code that is shared between server and client-side workspaces",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/common.js CHANGED
@@ -1323,9 +1323,7 @@ const dtTerms_temp = [
1323
1323
  isleaf: true,
1324
1324
  type: 'dtsnvindel',
1325
1325
  dt: dtsnvindel,
1326
- values: Object.fromEntries(
1327
- mutationClasses.filter(key => key != 'Blank').map(key => [key, { label: mclass[key].label }])
1328
- )
1326
+ values: {}
1329
1327
  },
1330
1328
  {
1331
1329
  id: 'cnv',
@@ -1335,7 +1333,7 @@ const dtTerms_temp = [
1335
1333
  isleaf: true,
1336
1334
  type: 'dtcnv',
1337
1335
  dt: dtcnv,
1338
- values: Object.fromEntries([...CNVClasses, 'WT'].map(key => [key, { label: mclass[key].label }]))
1336
+ values: {}
1339
1337
  },
1340
1338
  {
1341
1339
  id: 'fusion',
@@ -1345,7 +1343,7 @@ const dtTerms_temp = [
1345
1343
  isleaf: true,
1346
1344
  type: 'dtfusion',
1347
1345
  dt: dtfusionrna,
1348
- values: Object.fromEntries([mclassfusionrna, 'WT'].map(key => [key, { label: mclass[key].label }]))
1346
+ values: {}
1349
1347
  },
1350
1348
  {
1351
1349
  id: 'sv',
@@ -1355,7 +1353,7 @@ const dtTerms_temp = [
1355
1353
  isleaf: true,
1356
1354
  type: 'dtsv',
1357
1355
  dt: dtsv,
1358
- values: Object.fromEntries([mclasssv, 'WT'].map(key => [key, { label: mclass[key].label }]))
1356
+ values: {}
1359
1357
  }
1360
1358
  ]
1361
1359
  // add origin annotations to dt terms
@@ -161,8 +161,13 @@ export async function memFetch(url, init, opts = {}) {
161
161
  fetch(url, init).then(async r => {
162
162
  const response = await processResponse(r)
163
163
  if (!r.ok) {
164
- console.log(response)
165
- throw 'memFetch error ' + r.status
164
+ console.trace(response)
165
+ throw (
166
+ 'memFetch error ' +
167
+ r.status +
168
+ ': ' +
169
+ (typeof response == 'object' ? response.message || response.error : response)
170
+ )
166
171
  }
167
172
  // to-do: support opt.freeze to enforce deep freeze of data.json()
168
173
  dataCache.set(dataKey, response)
package/src/index.js CHANGED
@@ -9,6 +9,7 @@ export * from './filter.js'
9
9
  export * from './hash.js'
10
10
  export * from './helpers.js'
11
11
  export * from './joinUrl.js'
12
+ export * from './manhattan.js'
12
13
  export * from './mds3tk.js'
13
14
  export * from './roundValue.js'
14
15
  export * from './termdb.bins.js'
@@ -0,0 +1,3 @@
1
+ // Contains shared constants for Manhattan plots
2
+ // This constant defines the log cutoff for q-values in Manhattan plots before scaling the y-axis.
3
+ export const MANHATTAN_LOG_QVALUE_CUTOFF = 40
@@ -20,7 +20,8 @@ export const graphableTypes = new Set([
20
20
  TermTypes.METABOLITE_INTENSITY,
21
21
  TermTypes.SINGLECELL_GENE_EXPRESSION,
22
22
  TermTypes.SINGLECELL_CELLTYPE,
23
- TermTypes.SNP
23
+ TermTypes.SNP,
24
+ TermTypes.TERM_COLLECTION
24
25
  ])
25
26
 
26
27
  /*