oncoprintjs 5.0.3 → 6.0.1
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/README.md +34 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +14746 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +14760 -0
- package/dist/index.js.map +1 -0
- package/dist/js/CachedProperty.d.ts +10 -10
- package/dist/js/binarysearch.d.ts +1 -1
- package/dist/js/bucketsort.d.ts +16 -16
- package/dist/js/clustering.d.ts +14 -14
- package/dist/js/extractrgba.d.ts +4 -4
- package/dist/js/haselementsininterval.d.ts +1 -1
- package/dist/js/heatmapcolors.d.ts +5 -4
- package/dist/js/makesvgelement.d.ts +1 -1
- package/dist/js/modelutils.d.ts +7 -7
- package/dist/js/oncoprint.d.ts +168 -170
- package/dist/js/oncoprintheaderview.d.ts +23 -22
- package/dist/js/oncoprintlabelview.d.ts +79 -78
- package/dist/js/oncoprintlegendrenderer.d.ts +32 -31
- package/dist/js/oncoprintminimapview.d.ts +69 -68
- package/dist/js/oncoprintmodel.d.ts +403 -398
- package/dist/js/oncoprintruleset.d.ts +176 -177
- package/dist/js/oncoprintshape.d.ts +67 -67
- package/dist/js/oncoprintshapetosvg.d.ts +2 -2
- package/dist/js/oncoprintshapetovertexes.d.ts +5 -5
- package/dist/js/oncoprinttooltip.d.ts +23 -22
- package/dist/js/oncoprinttrackinfoview.d.ts +40 -39
- package/dist/js/oncoprinttrackoptionsview.d.ts +58 -57
- package/dist/js/oncoprintwebglcellview.d.ts +168 -167
- package/dist/js/oncoprintzoomslider.d.ts +28 -27
- package/dist/js/polyfill.d.ts +4 -4
- package/dist/js/precomputedcomparator.d.ts +13 -13
- package/dist/js/shaders.d.ts +2 -2
- package/dist/js/svgfactory.d.ts +24 -23
- package/dist/js/utils.d.ts +16 -16
- package/dist/js/workers/clustering-worker.d.ts +19 -20
- package/dist/test/gradientCategoricalRuleset.spec.d.ts +1 -1
- package/dist/test/monolith.spec.d.ts +1 -1
- package/jest.config.ts +2 -0
- package/package.json +20 -26
- package/rollup.config.ts +14 -0
- package/rules/geneticrules.ts +344 -305
- package/server.js +11 -0
- package/src/img/menudots.svg +9 -9
- package/src/img/zoomtofit.svg +12 -12
- package/src/index.tsx +13 -0
- package/src/js/CachedProperty.ts +6 -7
- package/src/js/binarysearch.ts +8 -3
- package/src/js/bucketsort.ts +89 -47
- package/src/js/clustering.ts +22 -10
- package/src/js/extractrgba.ts +16 -12
- package/src/js/haselementsininterval.ts +8 -4
- package/src/js/heatmapcolors.ts +515 -515
- package/src/js/main.js +1 -1
- package/src/js/makesvgelement.ts +2 -2
- package/src/js/modelutils.ts +11 -8
- package/src/js/oncoprint.ts +706 -385
- package/src/js/oncoprintheaderview.ts +165 -125
- package/src/js/oncoprintlabelview.ts +388 -170
- package/src/js/oncoprintlegendrenderer.ts +203 -72
- package/src/js/oncoprintminimapview.ts +965 -423
- package/src/js/oncoprintmodel.ts +905 -532
- package/src/js/oncoprintruleset.ts +694 -379
- package/src/js/oncoprintshape.ts +240 -97
- package/src/js/oncoprintshapetosvg.ts +77 -26
- package/src/js/oncoprintshapetovertexes.ts +153 -48
- package/src/js/oncoprinttooltip.ts +58 -27
- package/src/js/oncoprinttrackinfoview.ts +115 -59
- package/src/js/oncoprinttrackoptionsview.ts +354 -187
- package/src/js/oncoprintwebglcellview.ts +951 -415
- package/src/js/oncoprintzoomslider.ts +172 -107
- package/src/js/polyfill.ts +7 -3
- package/src/js/precomputedcomparator.ts +133 -50
- package/src/js/shaders.ts +2 -4
- package/src/js/svgfactory.ts +128 -73
- package/src/js/utils.ts +51 -31
- package/src/js/workers/clustering-worker.ts +50 -42
- package/src/test/gradientCategoricalRuleset.spec.ts +55 -38
- package/src/test/monolith.spec.ts +718 -285
- package/test/generate_data.py +108 -0
- package/test/glyphmap-data.js +1041 -0
- package/test/heatmap-data.js +1027 -0
- package/test/index.html +21 -0
- package/test/oncoprint-glyphmap.js +79 -0
- package/test/oncoprint-heatmap.js +123 -0
- package/tsconfig.json +4 -10
- package/tsconfig.test.json +11 -0
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/oncoprintjs.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -105
- package/dist/.gitkeep +0 -0
- package/dist/js/minimaputils.d.ts +0 -0
- package/dist/oncoprint.bundle.js +0 -44313
- package/jest.config.js +0 -12
- package/src/js/minimaputils.ts +0 -0
- package/typings/custom.d.ts +0 -7
- package/typings/missing.d.ts +0 -7
- package/webpack.config.js +0 -43
package/rules/geneticrules.ts
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import * as $ from
|
|
1
|
+
import * as $ from 'jquery';
|
|
2
2
|
import {
|
|
3
3
|
GeneticAlterationRuleParams,
|
|
4
4
|
IGeneticAlterationRuleSetParams,
|
|
5
5
|
RuleSetParams,
|
|
6
|
-
RuleSetType
|
|
7
|
-
} from
|
|
8
|
-
import {shallowExtend} from
|
|
6
|
+
RuleSetType,
|
|
7
|
+
} from '../src/js/oncoprintruleset';
|
|
8
|
+
import { shallowExtend } from '../src/js/utils';
|
|
9
9
|
|
|
10
10
|
export const MUT_COLOR_MISSENSE = '#008000';
|
|
11
11
|
export const MUT_COLOR_MISSENSE_PASSENGER = '#53D400';
|
|
12
12
|
export const MUT_COLOR_INFRAME = '#993404';
|
|
13
13
|
export const MUT_COLOR_INFRAME_PASSENGER = '#a68028';
|
|
14
|
-
export const MUT_COLOR_TRUNC =
|
|
14
|
+
export const MUT_COLOR_TRUNC = '#000000';
|
|
15
15
|
export const MUT_COLOR_TRUNC_PASSENGER = '#708090';
|
|
16
16
|
export const MUT_COLOR_FUSION = '#8B00C9';
|
|
17
17
|
export const MUT_COLOR_PROMOTER = '#00B7CE';
|
|
18
|
-
export const MUT_COLOR_OTHER = '#cf58bc'
|
|
18
|
+
export const MUT_COLOR_OTHER = '#cf58bc'; //'#cfb537';
|
|
19
19
|
|
|
20
|
-
export const MRNA_COLOR_HIGH =
|
|
21
|
-
export const MRNA_COLOR_LOW =
|
|
20
|
+
export const MRNA_COLOR_HIGH = '#ff9999';
|
|
21
|
+
export const MRNA_COLOR_LOW = '#6699cc';
|
|
22
22
|
export const MUT_COLOR_GERMLINE = '#FFFFFF';
|
|
23
23
|
|
|
24
|
-
export const PROT_COLOR_HIGH =
|
|
25
|
-
export const PROT_COLOR_LOW =
|
|
24
|
+
export const PROT_COLOR_HIGH = '#ff3df8';
|
|
25
|
+
export const PROT_COLOR_LOW = '#00E1FF';
|
|
26
26
|
|
|
27
|
-
export const CNA_COLOR_AMP =
|
|
28
|
-
export const CNA_COLOR_GAIN =
|
|
29
|
-
export const CNA_COLOR_HETLOSS =
|
|
30
|
-
export const CNA_COLOR_HOMDEL =
|
|
31
|
-
|
|
32
|
-
export const DEFAULT_GREY = "#BEBEBE";
|
|
27
|
+
export const CNA_COLOR_AMP = '#ff0000';
|
|
28
|
+
export const CNA_COLOR_GAIN = '#ffb6c1';
|
|
29
|
+
export const CNA_COLOR_HETLOSS = '#8fd8d8';
|
|
30
|
+
export const CNA_COLOR_HOMDEL = '#0000ff';
|
|
33
31
|
|
|
32
|
+
export const DEFAULT_GREY = '#BEBEBE';
|
|
34
33
|
|
|
35
34
|
const MUTATION_LEGEND_ORDER = 0;
|
|
36
35
|
const FUSION_LEGEND_ORDER = 1;
|
|
@@ -45,431 +44,471 @@ const PROT_HIGH_LEGEND_ORDER = 31;
|
|
|
45
44
|
const PROT_LOW_LEGEND_ORDER = 32;
|
|
46
45
|
|
|
47
46
|
enum ShapeId {
|
|
48
|
-
defaultGrayRectangle=
|
|
47
|
+
defaultGrayRectangle = 'defaultGrayRectangle',
|
|
49
48
|
|
|
50
|
-
ampRectangle=
|
|
51
|
-
gainRectangle=
|
|
52
|
-
homdelRectangle=
|
|
53
|
-
hetlossRectangle=
|
|
49
|
+
ampRectangle = 'ampRectangle',
|
|
50
|
+
gainRectangle = 'gainRectangle',
|
|
51
|
+
homdelRectangle = 'homdelRectangle',
|
|
52
|
+
hetlossRectangle = 'hetlossRectangle',
|
|
54
53
|
|
|
55
|
-
mrnaHighRectangle=
|
|
56
|
-
mrnaLowRectangle=
|
|
54
|
+
mrnaHighRectangle = 'mrnaHighRectangle',
|
|
55
|
+
mrnaLowRectangle = 'mrnaLowRectangle',
|
|
57
56
|
|
|
58
|
-
protHighRectangle=
|
|
59
|
-
protLowRectangle=
|
|
57
|
+
protHighRectangle = 'protHighRectangle',
|
|
58
|
+
protLowRectangle = 'protLowRectangle',
|
|
60
59
|
|
|
61
|
-
fusionRectangle=
|
|
60
|
+
fusionRectangle = 'fusionRectangle',
|
|
62
61
|
|
|
63
|
-
germlineRectangle=
|
|
62
|
+
germlineRectangle = 'germlineRectangle',
|
|
64
63
|
|
|
65
|
-
missenseMutationDriverRectangle=
|
|
66
|
-
missenseMutationVUSRectangle=
|
|
67
|
-
otherMutationRectangle=
|
|
68
|
-
promoterMutationRectangle=
|
|
69
|
-
truncatingMutationDriverRectangle=
|
|
70
|
-
truncatingMutationVUSRectangle=
|
|
71
|
-
inframeMutationDriverRectangle=
|
|
72
|
-
inframeMutationVUSRectangle=
|
|
64
|
+
missenseMutationDriverRectangle = 'missenseMutationDriverRectangle',
|
|
65
|
+
missenseMutationVUSRectangle = 'missenseMutationVUSRectangle',
|
|
66
|
+
otherMutationRectangle = 'otherMutationRectangle',
|
|
67
|
+
promoterMutationRectangle = 'promoterMutationRectangle',
|
|
68
|
+
truncatingMutationDriverRectangle = 'truncatingMutationDriverRectangle',
|
|
69
|
+
truncatingMutationVUSRectangle = 'truncatingMutationVUSRectangle',
|
|
70
|
+
inframeMutationDriverRectangle = 'inframeMutationDriverRectangle',
|
|
71
|
+
inframeMutationVUSRectangle = 'inframeMutationVUSRectangle',
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
const shapeBank = {
|
|
76
75
|
[ShapeId.defaultGrayRectangle]: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
type: 'rectangle',
|
|
77
|
+
fill: DEFAULT_GREY,
|
|
78
|
+
z: 1,
|
|
80
79
|
},
|
|
81
80
|
[ShapeId.ampRectangle]: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
type: 'rectangle',
|
|
82
|
+
fill: CNA_COLOR_AMP,
|
|
83
|
+
x: 0,
|
|
84
|
+
y: 0,
|
|
85
|
+
width: 100,
|
|
86
|
+
height: 100,
|
|
87
|
+
z: 2,
|
|
89
88
|
},
|
|
90
89
|
[ShapeId.gainRectangle]: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
type: 'rectangle',
|
|
91
|
+
fill: CNA_COLOR_GAIN,
|
|
92
|
+
x: 0,
|
|
93
|
+
y: 0,
|
|
94
|
+
width: 100,
|
|
95
|
+
height: 100,
|
|
96
|
+
z: 2,
|
|
98
97
|
},
|
|
99
|
-
[ShapeId.homdelRectangle]:{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
[ShapeId.homdelRectangle]: {
|
|
99
|
+
type: 'rectangle',
|
|
100
|
+
fill: CNA_COLOR_HOMDEL,
|
|
101
|
+
x: 0,
|
|
102
|
+
y: 0,
|
|
103
|
+
width: 100,
|
|
104
|
+
height: 100,
|
|
105
|
+
z: 2,
|
|
107
106
|
},
|
|
108
|
-
[ShapeId.hetlossRectangle]:{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
[ShapeId.hetlossRectangle]: {
|
|
108
|
+
type: 'rectangle',
|
|
109
|
+
fill: CNA_COLOR_HETLOSS,
|
|
110
|
+
x: 0,
|
|
111
|
+
y: 0,
|
|
112
|
+
width: 100,
|
|
113
|
+
height: 100,
|
|
114
|
+
z: 2,
|
|
116
115
|
},
|
|
117
|
-
[ShapeId.mrnaHighRectangle]:{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
[ShapeId.mrnaHighRectangle]: {
|
|
117
|
+
type: 'rectangle',
|
|
118
|
+
fill: 'rgba(0, 0, 0, 0)',
|
|
119
|
+
stroke: MRNA_COLOR_HIGH,
|
|
121
120
|
'stroke-width': 2,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
x: 0,
|
|
122
|
+
y: 0,
|
|
123
|
+
width: 100,
|
|
124
|
+
height: 100,
|
|
125
|
+
z: 3,
|
|
127
126
|
},
|
|
128
|
-
[ShapeId.mrnaLowRectangle]:{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
[ShapeId.mrnaLowRectangle]: {
|
|
128
|
+
type: 'rectangle',
|
|
129
|
+
fill: 'rgba(0, 0, 0, 0)',
|
|
130
|
+
stroke: MRNA_COLOR_LOW,
|
|
132
131
|
'stroke-width': 2,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
x: 0,
|
|
133
|
+
y: 0,
|
|
134
|
+
width: 100,
|
|
135
|
+
height: 100,
|
|
136
|
+
z: 3,
|
|
138
137
|
},
|
|
139
|
-
[ShapeId.protHighRectangle]:{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
[ShapeId.protHighRectangle]: {
|
|
139
|
+
type: 'rectangle',
|
|
140
|
+
fill: PROT_COLOR_HIGH,
|
|
141
|
+
x: 0,
|
|
142
|
+
y: 0,
|
|
143
|
+
width: 100,
|
|
144
|
+
height: 20,
|
|
145
|
+
z: 4,
|
|
147
146
|
},
|
|
148
|
-
[ShapeId.protLowRectangle]:{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
[ShapeId.protLowRectangle]: {
|
|
148
|
+
type: 'rectangle',
|
|
149
|
+
fill: PROT_COLOR_LOW,
|
|
150
|
+
x: 0,
|
|
151
|
+
y: 80,
|
|
152
|
+
width: 100,
|
|
153
|
+
height: 20,
|
|
154
|
+
z: 4,
|
|
156
155
|
},
|
|
157
|
-
[ShapeId.fusionRectangle]:{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
[ShapeId.fusionRectangle]: {
|
|
157
|
+
type: 'rectangle',
|
|
158
|
+
fill: MUT_COLOR_FUSION,
|
|
159
|
+
x: 0,
|
|
160
|
+
y: 20,
|
|
161
|
+
width: 100,
|
|
162
|
+
height: 60,
|
|
163
|
+
z: 5,
|
|
165
164
|
},
|
|
166
|
-
[ShapeId.germlineRectangle]:{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
[ShapeId.germlineRectangle]: {
|
|
166
|
+
type: 'rectangle',
|
|
167
|
+
fill: MUT_COLOR_GERMLINE,
|
|
168
|
+
x: 0,
|
|
169
|
+
y: 46,
|
|
170
|
+
width: 100,
|
|
171
|
+
height: 8,
|
|
172
|
+
z: 7,
|
|
174
173
|
},
|
|
175
|
-
[ShapeId.missenseMutationDriverRectangle]:{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
174
|
+
[ShapeId.missenseMutationDriverRectangle]: {
|
|
175
|
+
type: 'rectangle',
|
|
176
|
+
fill: MUT_COLOR_MISSENSE,
|
|
177
|
+
x: 0,
|
|
178
|
+
y: 33.33,
|
|
179
|
+
width: 100,
|
|
180
|
+
height: 33.33,
|
|
181
|
+
z: 6,
|
|
183
182
|
},
|
|
184
|
-
[ShapeId.missenseMutationVUSRectangle]:{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
183
|
+
[ShapeId.missenseMutationVUSRectangle]: {
|
|
184
|
+
type: 'rectangle',
|
|
185
|
+
fill: MUT_COLOR_MISSENSE_PASSENGER,
|
|
186
|
+
x: 0,
|
|
187
|
+
y: 33.33,
|
|
188
|
+
width: 100,
|
|
189
|
+
height: 33.33,
|
|
190
|
+
z: 6,
|
|
192
191
|
},
|
|
193
|
-
[ShapeId.otherMutationRectangle]:{
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
192
|
+
[ShapeId.otherMutationRectangle]: {
|
|
193
|
+
type: 'rectangle',
|
|
194
|
+
fill: MUT_COLOR_OTHER,
|
|
195
|
+
x: 0,
|
|
196
|
+
y: 33.33,
|
|
197
|
+
width: 100,
|
|
198
|
+
height: 33.33,
|
|
199
|
+
z: 6,
|
|
201
200
|
},
|
|
202
|
-
[ShapeId.promoterMutationRectangle]:{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
[ShapeId.promoterMutationRectangle]: {
|
|
202
|
+
type: 'rectangle',
|
|
203
|
+
fill: MUT_COLOR_PROMOTER,
|
|
204
|
+
x: 0,
|
|
205
|
+
y: 33.33,
|
|
206
|
+
width: 100,
|
|
207
|
+
height: 33.33,
|
|
208
|
+
z: 6,
|
|
210
209
|
},
|
|
211
|
-
[ShapeId.truncatingMutationDriverRectangle]:{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
210
|
+
[ShapeId.truncatingMutationDriverRectangle]: {
|
|
211
|
+
type: 'rectangle',
|
|
212
|
+
fill: MUT_COLOR_TRUNC,
|
|
213
|
+
x: 0,
|
|
214
|
+
y: 33.33,
|
|
215
|
+
width: 100,
|
|
216
|
+
height: 33.33,
|
|
217
|
+
z: 6,
|
|
219
218
|
},
|
|
220
|
-
[ShapeId.truncatingMutationVUSRectangle]:{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
[ShapeId.truncatingMutationVUSRectangle]: {
|
|
220
|
+
type: 'rectangle',
|
|
221
|
+
fill: MUT_COLOR_TRUNC_PASSENGER,
|
|
222
|
+
x: 0,
|
|
223
|
+
y: 33.33,
|
|
224
|
+
width: 100,
|
|
225
|
+
height: 33.33,
|
|
226
|
+
z: 6,
|
|
228
227
|
},
|
|
229
|
-
[ShapeId.inframeMutationDriverRectangle]:{
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
[ShapeId.inframeMutationDriverRectangle]: {
|
|
229
|
+
type: 'rectangle',
|
|
230
|
+
fill: MUT_COLOR_INFRAME,
|
|
231
|
+
x: 0,
|
|
232
|
+
y: 33.33,
|
|
233
|
+
width: 100,
|
|
234
|
+
height: 33.33,
|
|
235
|
+
z: 6,
|
|
236
|
+
},
|
|
237
|
+
[ShapeId.inframeMutationVUSRectangle]: {
|
|
238
|
+
type: 'rectangle',
|
|
239
|
+
fill: MUT_COLOR_INFRAME_PASSENGER,
|
|
240
|
+
x: 0,
|
|
241
|
+
y: 33.33,
|
|
242
|
+
width: 100,
|
|
243
|
+
height: 33.33,
|
|
244
|
+
z: 6,
|
|
237
245
|
},
|
|
238
|
-
[ShapeId.inframeMutationVUSRectangle]:{
|
|
239
|
-
'type': 'rectangle',
|
|
240
|
-
'fill': MUT_COLOR_INFRAME_PASSENGER,
|
|
241
|
-
'x': 0,
|
|
242
|
-
'y': 33.33,
|
|
243
|
-
'width': 100,
|
|
244
|
-
'height': 33.33,
|
|
245
|
-
'z': 6,
|
|
246
|
-
}
|
|
247
246
|
};
|
|
248
247
|
|
|
249
|
-
const non_mutation_rule_params:GeneticAlterationRuleParams = {
|
|
248
|
+
const non_mutation_rule_params: GeneticAlterationRuleParams = {
|
|
250
249
|
// Default: gray rectangle
|
|
251
250
|
always: {
|
|
252
251
|
shapes: [shapeBank[ShapeId.defaultGrayRectangle]],
|
|
253
|
-
legend_label:
|
|
254
|
-
legend_order: Number.POSITIVE_INFINITY // put at the end always
|
|
252
|
+
legend_label: 'No alterations',
|
|
253
|
+
legend_order: Number.POSITIVE_INFINITY, // put at the end always
|
|
255
254
|
},
|
|
256
|
-
conditional:{
|
|
255
|
+
conditional: {
|
|
257
256
|
// Copy number alteration
|
|
258
|
-
|
|
257
|
+
disp_cna: {
|
|
259
258
|
// Red rectangle for amplification
|
|
260
|
-
|
|
259
|
+
amp: {
|
|
261
260
|
shapes: [shapeBank[ShapeId.ampRectangle]],
|
|
262
261
|
legend_label: 'Amplification',
|
|
263
|
-
legend_order: AMP_LEGEND_ORDER
|
|
262
|
+
legend_order: AMP_LEGEND_ORDER,
|
|
264
263
|
},
|
|
265
264
|
// Light red rectangle for gain
|
|
266
|
-
|
|
265
|
+
gain: {
|
|
267
266
|
shapes: [shapeBank[ShapeId.gainRectangle]],
|
|
268
267
|
legend_label: 'Gain',
|
|
269
|
-
legend_order: GAIN_LEGEND_ORDER
|
|
268
|
+
legend_order: GAIN_LEGEND_ORDER,
|
|
270
269
|
},
|
|
271
270
|
// Blue rectangle for deep deletion
|
|
272
|
-
|
|
271
|
+
homdel: {
|
|
273
272
|
shapes: [shapeBank[ShapeId.homdelRectangle]],
|
|
274
273
|
legend_label: 'Deep Deletion',
|
|
275
|
-
legend_order: HOMDEL_LEGEND_ORDER
|
|
274
|
+
legend_order: HOMDEL_LEGEND_ORDER,
|
|
276
275
|
},
|
|
277
276
|
// Light blue rectangle for shallow deletion
|
|
278
|
-
|
|
277
|
+
hetloss: {
|
|
279
278
|
shapes: [shapeBank[ShapeId.hetlossRectangle]],
|
|
280
279
|
legend_label: 'Shallow Deletion',
|
|
281
|
-
legend_order: HETLOSS_LEGEND_ORDER
|
|
282
|
-
}
|
|
280
|
+
legend_order: HETLOSS_LEGEND_ORDER,
|
|
281
|
+
},
|
|
283
282
|
},
|
|
284
283
|
// mRNA regulation
|
|
285
|
-
|
|
284
|
+
disp_mrna: {
|
|
286
285
|
// Light red outline for High
|
|
287
|
-
|
|
286
|
+
high: {
|
|
288
287
|
shapes: [shapeBank[ShapeId.mrnaHighRectangle]],
|
|
289
288
|
legend_label: 'mRNA High',
|
|
290
|
-
legend_order: MRNA_HIGH_LEGEND_ORDER
|
|
289
|
+
legend_order: MRNA_HIGH_LEGEND_ORDER,
|
|
291
290
|
},
|
|
292
291
|
// Light blue outline for downregulation
|
|
293
|
-
|
|
292
|
+
low: {
|
|
294
293
|
shapes: [shapeBank[ShapeId.mrnaLowRectangle]],
|
|
295
294
|
legend_label: 'mRNA Low',
|
|
296
|
-
legend_order: MRNA_LOW_LEGEND_ORDER
|
|
295
|
+
legend_order: MRNA_LOW_LEGEND_ORDER,
|
|
297
296
|
},
|
|
298
297
|
},
|
|
299
298
|
// protein expression regulation
|
|
300
|
-
|
|
299
|
+
disp_prot: {
|
|
301
300
|
// small up arrow for upregulated
|
|
302
|
-
|
|
301
|
+
high: {
|
|
303
302
|
shapes: [shapeBank[ShapeId.protHighRectangle]],
|
|
304
303
|
legend_label: 'Protein High',
|
|
305
|
-
legend_order: PROT_HIGH_LEGEND_ORDER
|
|
304
|
+
legend_order: PROT_HIGH_LEGEND_ORDER,
|
|
306
305
|
},
|
|
307
306
|
// small down arrow for upregulated
|
|
308
|
-
|
|
307
|
+
low: {
|
|
309
308
|
shapes: [shapeBank[ShapeId.protLowRectangle]],
|
|
310
309
|
legend_label: 'Protein Low',
|
|
311
|
-
legend_order: PROT_LOW_LEGEND_ORDER
|
|
312
|
-
}
|
|
310
|
+
legend_order: PROT_LOW_LEGEND_ORDER,
|
|
311
|
+
},
|
|
313
312
|
},
|
|
314
313
|
// fusion
|
|
315
|
-
|
|
314
|
+
disp_fusion: {
|
|
316
315
|
// tall inset purple rectangle for fusion
|
|
317
|
-
|
|
316
|
+
true: {
|
|
318
317
|
shapes: [shapeBank[ShapeId.fusionRectangle]],
|
|
319
318
|
legend_label: 'Fusion',
|
|
320
|
-
legend_order: FUSION_LEGEND_ORDER
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
319
|
+
legend_order: FUSION_LEGEND_ORDER,
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
324
323
|
};
|
|
325
324
|
|
|
326
325
|
export const germline_rule_params = {
|
|
327
326
|
// germline
|
|
328
|
-
|
|
327
|
+
disp_germ: {
|
|
329
328
|
// white stripe in the middle
|
|
330
|
-
|
|
331
|
-
shapes: [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
329
|
+
true: {
|
|
330
|
+
shapes: [
|
|
331
|
+
{
|
|
332
|
+
type: 'rectangle',
|
|
333
|
+
fill: MUT_COLOR_GERMLINE,
|
|
334
|
+
x: 0,
|
|
335
|
+
y: 46,
|
|
336
|
+
width: 100,
|
|
337
|
+
height: 8,
|
|
338
|
+
z: 7,
|
|
339
|
+
},
|
|
340
|
+
],
|
|
340
341
|
legend_label: 'Germline Mutation',
|
|
341
|
-
legend_order: GERMLINE_LEGEND_ORDER
|
|
342
|
-
}
|
|
343
|
-
}
|
|
342
|
+
legend_order: GERMLINE_LEGEND_ORDER,
|
|
343
|
+
},
|
|
344
|
+
},
|
|
344
345
|
};
|
|
345
346
|
|
|
346
|
-
const base_genetic_rule_set_params:Partial<IGeneticAlterationRuleSetParams> = {
|
|
347
|
+
const base_genetic_rule_set_params: Partial<IGeneticAlterationRuleSetParams> = {
|
|
347
348
|
type: RuleSetType.GENE,
|
|
348
349
|
legend_label: 'Genetic Alteration',
|
|
349
350
|
na_legend_label: 'Not profiled',
|
|
350
|
-
legend_base_color: DEFAULT_GREY
|
|
351
|
+
legend_base_color: DEFAULT_GREY,
|
|
351
352
|
};
|
|
352
353
|
|
|
353
|
-
export const genetic_rule_set_same_color_for_all_no_recurrence:IGeneticAlterationRuleSetParams =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
export const genetic_rule_set_same_color_for_all_no_recurrence: IGeneticAlterationRuleSetParams = shallowExtend(
|
|
355
|
+
base_genetic_rule_set_params,
|
|
356
|
+
{
|
|
357
|
+
rule_params: {
|
|
358
|
+
always: non_mutation_rule_params.always,
|
|
357
359
|
conditional: shallowExtend(non_mutation_rule_params.conditional, {
|
|
358
|
-
|
|
360
|
+
disp_mut: {
|
|
359
361
|
'trunc,inframe,missense,promoter,other,trunc_rec,inframe_rec,missense_rec,promoter_rec,other_rec': {
|
|
360
|
-
shapes: [
|
|
362
|
+
shapes: [
|
|
363
|
+
shapeBank[ShapeId.missenseMutationDriverRectangle],
|
|
364
|
+
],
|
|
361
365
|
legend_label: 'Mutation',
|
|
362
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
} as GeneticAlterationRuleParams[
|
|
366
|
-
}
|
|
367
|
-
}
|
|
366
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
} as GeneticAlterationRuleParams['conditional']),
|
|
370
|
+
},
|
|
371
|
+
}
|
|
372
|
+
) as IGeneticAlterationRuleSetParams;
|
|
368
373
|
|
|
369
|
-
export const genetic_rule_set_same_color_for_all_recurrence:IGeneticAlterationRuleSetParams =
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
374
|
+
export const genetic_rule_set_same_color_for_all_recurrence: IGeneticAlterationRuleSetParams = shallowExtend(
|
|
375
|
+
base_genetic_rule_set_params,
|
|
376
|
+
{
|
|
377
|
+
rule_params: {
|
|
378
|
+
always: non_mutation_rule_params.always,
|
|
373
379
|
conditional: shallowExtend(non_mutation_rule_params.conditional, {
|
|
374
|
-
|
|
380
|
+
disp_mut: {
|
|
375
381
|
'missense_rec,inframe_rec,trunc_rec,promoter_rec,other_rec': {
|
|
376
|
-
shapes: [
|
|
382
|
+
shapes: [
|
|
383
|
+
shapeBank[ShapeId.missenseMutationDriverRectangle],
|
|
384
|
+
],
|
|
377
385
|
legend_label: 'Mutation (putative driver)',
|
|
378
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
386
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
379
387
|
},
|
|
380
388
|
'missense,inframe,trunc,promoter,other': {
|
|
381
|
-
shapes: [
|
|
389
|
+
shapes: [
|
|
390
|
+
shapeBank[ShapeId.missenseMutationVUSRectangle],
|
|
391
|
+
],
|
|
382
392
|
legend_label: 'Mutation (unknown significance)',
|
|
383
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
393
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
384
394
|
},
|
|
385
395
|
},
|
|
386
|
-
} as GeneticAlterationRuleParams[
|
|
387
|
-
}
|
|
388
|
-
}
|
|
396
|
+
} as GeneticAlterationRuleParams['conditional']),
|
|
397
|
+
},
|
|
398
|
+
}
|
|
399
|
+
) as IGeneticAlterationRuleSetParams;
|
|
389
400
|
|
|
390
|
-
export const genetic_rule_set_different_colors_no_recurrence:IGeneticAlterationRuleSetParams =
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
401
|
+
export const genetic_rule_set_different_colors_no_recurrence: IGeneticAlterationRuleSetParams = shallowExtend(
|
|
402
|
+
base_genetic_rule_set_params,
|
|
403
|
+
{
|
|
404
|
+
rule_params: {
|
|
405
|
+
always: non_mutation_rule_params.always,
|
|
406
|
+
conditional: shallowExtend(non_mutation_rule_params.conditional, {
|
|
407
|
+
disp_mut: {
|
|
408
|
+
'other,other_rec': {
|
|
397
409
|
shapes: [shapeBank[ShapeId.otherMutationRectangle]],
|
|
398
410
|
legend_label: 'Other Mutation',
|
|
399
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
411
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
400
412
|
},
|
|
401
413
|
'promoter,promoter_rec': {
|
|
402
414
|
shapes: [shapeBank[ShapeId.promoterMutationRectangle]],
|
|
403
415
|
legend_label: 'Promoter Mutation',
|
|
404
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
416
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
405
417
|
},
|
|
406
418
|
'trunc,trunc_rec': {
|
|
407
|
-
shapes: [
|
|
419
|
+
shapes: [
|
|
420
|
+
shapeBank[
|
|
421
|
+
ShapeId.truncatingMutationDriverRectangle
|
|
422
|
+
],
|
|
423
|
+
],
|
|
408
424
|
legend_label: 'Truncating Mutation',
|
|
409
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
425
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
410
426
|
},
|
|
411
427
|
'inframe,inframe_rec': {
|
|
412
|
-
shapes: [
|
|
428
|
+
shapes: [
|
|
429
|
+
shapeBank[ShapeId.inframeMutationDriverRectangle],
|
|
430
|
+
],
|
|
413
431
|
legend_label: 'Inframe Mutation',
|
|
414
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
432
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
415
433
|
},
|
|
416
434
|
'missense,missense_rec': {
|
|
417
|
-
shapes: [
|
|
435
|
+
shapes: [
|
|
436
|
+
shapeBank[ShapeId.missenseMutationDriverRectangle],
|
|
437
|
+
],
|
|
418
438
|
legend_label: 'Missense Mutation',
|
|
419
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
439
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
420
440
|
},
|
|
421
|
-
}
|
|
422
|
-
} as GeneticAlterationRuleParams[
|
|
423
|
-
}
|
|
424
|
-
}
|
|
441
|
+
},
|
|
442
|
+
} as GeneticAlterationRuleParams['conditional']),
|
|
443
|
+
},
|
|
444
|
+
}
|
|
445
|
+
) as IGeneticAlterationRuleSetParams;
|
|
425
446
|
|
|
426
|
-
export const genetic_rule_set_different_colors_recurrence:IGeneticAlterationRuleSetParams =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
447
|
+
export const genetic_rule_set_different_colors_recurrence: IGeneticAlterationRuleSetParams = shallowExtend(
|
|
448
|
+
base_genetic_rule_set_params,
|
|
449
|
+
{
|
|
450
|
+
rule_params: {
|
|
451
|
+
always: non_mutation_rule_params.always,
|
|
430
452
|
conditional: shallowExtend(non_mutation_rule_params.conditional, {
|
|
431
|
-
|
|
432
|
-
'other,other_rec':{
|
|
453
|
+
disp_mut: {
|
|
454
|
+
'other,other_rec': {
|
|
433
455
|
shapes: [shapeBank[ShapeId.otherMutationRectangle]],
|
|
434
456
|
legend_label: 'Other Mutation',
|
|
435
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
457
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
436
458
|
},
|
|
437
459
|
'promoter,promoter_rec': {
|
|
438
460
|
shapes: [shapeBank[ShapeId.promoterMutationRectangle]],
|
|
439
461
|
legend_label: 'Promoter Mutation',
|
|
440
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
462
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
441
463
|
},
|
|
442
|
-
|
|
443
|
-
shapes: [
|
|
464
|
+
trunc_rec: {
|
|
465
|
+
shapes: [
|
|
466
|
+
shapeBank[
|
|
467
|
+
ShapeId.truncatingMutationDriverRectangle
|
|
468
|
+
],
|
|
469
|
+
],
|
|
444
470
|
legend_label: 'Truncating Mutation (putative driver)',
|
|
445
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
471
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
446
472
|
},
|
|
447
|
-
|
|
448
|
-
shapes: [
|
|
449
|
-
|
|
450
|
-
|
|
473
|
+
trunc: {
|
|
474
|
+
shapes: [
|
|
475
|
+
shapeBank[ShapeId.truncatingMutationVUSRectangle],
|
|
476
|
+
],
|
|
477
|
+
legend_label:
|
|
478
|
+
'Truncating Mutation (unknown significance)',
|
|
479
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
451
480
|
},
|
|
452
|
-
|
|
453
|
-
shapes: [
|
|
481
|
+
inframe_rec: {
|
|
482
|
+
shapes: [
|
|
483
|
+
shapeBank[ShapeId.inframeMutationDriverRectangle],
|
|
484
|
+
],
|
|
454
485
|
legend_label: 'Inframe Mutation (putative driver)',
|
|
455
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
486
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
456
487
|
},
|
|
457
|
-
|
|
458
|
-
shapes: [
|
|
488
|
+
inframe: {
|
|
489
|
+
shapes: [
|
|
490
|
+
shapeBank[ShapeId.inframeMutationVUSRectangle],
|
|
491
|
+
],
|
|
459
492
|
legend_label: 'Inframe Mutation (unknown significance)',
|
|
460
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
493
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
461
494
|
},
|
|
462
|
-
|
|
463
|
-
shapes: [
|
|
495
|
+
missense_rec: {
|
|
496
|
+
shapes: [
|
|
497
|
+
shapeBank[ShapeId.missenseMutationDriverRectangle],
|
|
498
|
+
],
|
|
464
499
|
legend_label: 'Missense Mutation (putative driver)',
|
|
465
|
-
legend_order: MUTATION_LEGEND_ORDER
|
|
500
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
466
501
|
},
|
|
467
|
-
|
|
468
|
-
shapes: [
|
|
469
|
-
|
|
470
|
-
|
|
502
|
+
missense: {
|
|
503
|
+
shapes: [
|
|
504
|
+
shapeBank[ShapeId.missenseMutationVUSRectangle],
|
|
505
|
+
],
|
|
506
|
+
legend_label:
|
|
507
|
+
'Missense Mutation (unknown significance)',
|
|
508
|
+
legend_order: MUTATION_LEGEND_ORDER,
|
|
471
509
|
},
|
|
472
|
-
}
|
|
473
|
-
} as GeneticAlterationRuleParams[
|
|
474
|
-
}
|
|
475
|
-
}
|
|
510
|
+
},
|
|
511
|
+
} as GeneticAlterationRuleParams['conditional']),
|
|
512
|
+
},
|
|
513
|
+
}
|
|
514
|
+
) as IGeneticAlterationRuleSetParams;
|