@sjcrh/proteinpaint-shared 2.137.3 → 2.138.3-7
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/src/common.js +4 -2
- package/src/termdb.usecase.js +1 -0
- package/src/terms.js +10 -3
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -29,7 +29,8 @@ export const TermTypeGroups = {
|
|
|
29
29
|
MUTATION_SIGNATURE: 'Mutation Signature',
|
|
30
30
|
SNP: 'SNP Genotype',
|
|
31
31
|
SNP_LIST: 'SNP List',
|
|
32
|
-
SNP_LOCUS: 'SNP Locus'
|
|
32
|
+
SNP_LOCUS: 'SNP Locus',
|
|
33
|
+
SSGSEA: 'Geneset Expression'
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export const defaultcolor = rgb('#8AB1D4').darker()
|
|
@@ -61,7 +62,8 @@ export const dtnloss = 8
|
|
|
61
62
|
export const dtcloss = 9
|
|
62
63
|
export const dtloh = 10
|
|
63
64
|
export const dtmetaboliteintensity = 11
|
|
64
|
-
|
|
65
|
+
export const dtssgsea = 12
|
|
66
|
+
// add new dt value here. !!!DO NOT change value of existing dt!!!
|
|
65
67
|
|
|
66
68
|
export const dt2label = {
|
|
67
69
|
[dtsnvindel]: 'SNV/indel',
|
package/src/termdb.usecase.js
CHANGED
package/src/terms.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dtgeneexpression, dtmetaboliteintensity, TermTypeGroups, dtTerms } from './common.js'
|
|
1
|
+
import { dtgeneexpression, dtssgsea, dtmetaboliteintensity, TermTypeGroups, dtTerms } from './common.js'
|
|
2
2
|
import { roundValueAuto } from './roundValue.js'
|
|
3
3
|
|
|
4
4
|
// moved TermTypeGroups to `server/src/common.js`, so now has to re-export
|
|
@@ -26,6 +26,7 @@ export const NumericModes = {
|
|
|
26
26
|
export const TermTypes = {
|
|
27
27
|
GENE_VARIANT: 'geneVariant',
|
|
28
28
|
GENE_EXPRESSION: 'geneExpression',
|
|
29
|
+
SSGSEA: 'ssGSEA',
|
|
29
30
|
CATEGORICAL: 'categorical',
|
|
30
31
|
INTEGER: 'integer',
|
|
31
32
|
FLOAT: 'float',
|
|
@@ -50,11 +51,11 @@ export const NUMERIC_DICTIONARY_TERM = 'numericDictTerm'
|
|
|
50
51
|
|
|
51
52
|
export const TermTypes2Dt = {
|
|
52
53
|
[TermTypes.GENE_EXPRESSION]: dtgeneexpression,
|
|
54
|
+
[TermTypes.SSGSEA]: dtssgsea,
|
|
53
55
|
[TermTypes.METABOLITE_INTENSITY]: dtmetaboliteintensity
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
//
|
|
57
|
-
//Depending on the dataset types and the use case only certain term type groups/tabs are allowed
|
|
58
|
+
// maps term type to group (as is shown as toggles in search ui)
|
|
58
59
|
export const typeGroup = {
|
|
59
60
|
[TermTypes.CATEGORICAL]: TermTypeGroups.DICTIONARY_VARIABLES,
|
|
60
61
|
[TermTypes.CONDITION]: TermTypeGroups.DICTIONARY_VARIABLES,
|
|
@@ -67,6 +68,7 @@ export const typeGroup = {
|
|
|
67
68
|
[TermTypes.SNP_LIST]: TermTypeGroups.SNP_LIST,
|
|
68
69
|
[TermTypes.SNP_LOCUS]: TermTypeGroups.SNP_LOCUS,
|
|
69
70
|
[TermTypes.GENE_EXPRESSION]: TermTypeGroups.GENE_EXPRESSION,
|
|
71
|
+
[TermTypes.SSGSEA]: TermTypeGroups.SSGSEA,
|
|
70
72
|
[TermTypes.METABOLITE_INTENSITY]: TermTypeGroups.METABOLITE_INTENSITY
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -75,6 +77,7 @@ const nonDictTypes = new Set([
|
|
|
75
77
|
TermTypes.SNP_LIST,
|
|
76
78
|
TermTypes.SNP_LOCUS,
|
|
77
79
|
TermTypes.GENE_EXPRESSION,
|
|
80
|
+
TermTypes.SSGSEA,
|
|
78
81
|
TermTypes.GENE_VARIANT,
|
|
79
82
|
TermTypes.METABOLITE_INTENSITY,
|
|
80
83
|
TermTypes.SINGLECELL_GENE_EXPRESSION,
|
|
@@ -88,6 +91,7 @@ export const numericTypes = new Set([
|
|
|
88
91
|
TermTypes.INTEGER,
|
|
89
92
|
TermTypes.FLOAT,
|
|
90
93
|
TermTypes.GENE_EXPRESSION,
|
|
94
|
+
TermTypes.SSGSEA,
|
|
91
95
|
TermTypes.METABOLITE_INTENSITY,
|
|
92
96
|
TermTypes.SINGLECELL_GENE_EXPRESSION,
|
|
93
97
|
TermTypes.DATE
|
|
@@ -131,6 +135,8 @@ export function equals(t1, t2) {
|
|
|
131
135
|
switch (t1.type) {
|
|
132
136
|
case TermTypes.GENE_EXPRESSION:
|
|
133
137
|
return t1.gene == t2.gene
|
|
138
|
+
case TermTypes.SSGSEA:
|
|
139
|
+
return t1.id == t2.id
|
|
134
140
|
case TermTypes.METABOLITE_INTENSITY:
|
|
135
141
|
return t1.name == t2.name
|
|
136
142
|
case TermTypes.GENE_VARIANT:
|
|
@@ -207,6 +213,7 @@ const typeMap = {
|
|
|
207
213
|
float: 'Numerical',
|
|
208
214
|
integer: 'Numerical',
|
|
209
215
|
geneExpression: 'Gene Expression',
|
|
216
|
+
ssGSEA: 'Geneset Expression',
|
|
210
217
|
geneVariant: 'Gene Variant',
|
|
211
218
|
metaboliteIntensity: 'Metabolite Intensity',
|
|
212
219
|
multiValue: 'Multi Value',
|