@sjcrh/proteinpaint-shared 2.182.1 → 2.185.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.182.1",
3
+ "version": "2.185.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",
@@ -152,6 +152,18 @@ export function isUsableTerm(term, _usecase, termdbConfig, ds) {
152
152
  if (!term.isleaf) uses.add("branch")
153
153
  }
154
154
  return uses
155
+
156
+ case "numericDictTermCluster":
157
+ if (!usecase.detail?.exclude?.includes(term.id)) {
158
+ if (isNumericTerm(term)) {
159
+ uses.add("plot")
160
+ }
161
+ if (hasNumericChild(child_types)) {
162
+ uses.add("branch")
163
+ }
164
+ }
165
+ return uses
166
+
155
167
  case "termCollections":
156
168
  if (usecase.detail?.termIds?.includes(term.id)) uses.add("plot")
157
169
  if (usecase.detail?.branchIds?.includes(term.id)) uses.add("branch")
package/src/terms.js CHANGED
@@ -62,6 +62,7 @@ const dtTermTypes = new Set(dtTerms.map((t) => t.type))
62
62
  for (const dtTermType of dtTermTypes) {
63
63
  TermTypes[dtTermType.toUpperCase()] = dtTermType
64
64
  }
65
+ const NUMERIC_DICTIONARY_TERM = "numericDictTerm"
65
66
  const TermTypes2Dt = {
66
67
  [GENE_EXPRESSION]: dtgeneexpression,
67
68
  [SSGSEA]: dtssgsea,
@@ -249,6 +250,7 @@ const typeMap = {
249
250
  snplocus: "SNP Locus",
250
251
  snp: "SNP",
251
252
  snplst: "SNP List",
253
+ numericDictTerm: "Numeric Dictionary Term",
252
254
  termCollection: "Term Collection",
253
255
  }
254
256
  function termType2label(type) {
@@ -300,6 +302,7 @@ export {
300
302
  ISOFORM_EXPRESSION,
301
303
  METABOLITE_INTENSITY,
302
304
  MULTIVALUE,
305
+ NUMERIC_DICTIONARY_TERM,
303
306
  NumericModes,
304
307
  PROTEOME_ABUNDANCE,
305
308
  ROOT_SAMPLE_TYPE,