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
|
@@ -1,177 +1,176 @@
|
|
|
1
|
-
import { ComputedShapeParams, ShapeParams } from
|
|
2
|
-
import { Omit } from
|
|
3
|
-
import { ActiveRules, ColumnProp, Datum, RuleSetId } from
|
|
4
|
-
export declare type RuleSetParams = ILinearInterpRuleSetParams | ICategoricalRuleSetParams | IGradientRuleSetParams | IBarRuleSetParams | IStackedBarRuleSetParams | IGradientAndCategoricalRuleSetParams | IGeneticAlterationRuleSetParams;
|
|
5
|
-
interface IGeneralRuleSetParams {
|
|
6
|
-
type?: RuleSetType;
|
|
7
|
-
legend_label?: string;
|
|
8
|
-
legend_base_color?: RGBAColor;
|
|
9
|
-
exclude_from_legend?: boolean;
|
|
10
|
-
na_z?: number;
|
|
11
|
-
na_legend_label?: string;
|
|
12
|
-
na_shapes?: ShapeParams[];
|
|
13
|
-
}
|
|
14
|
-
interface ILinearInterpRuleSetParams extends IGeneralRuleSetParams {
|
|
15
|
-
log_scale?: boolean;
|
|
16
|
-
value_key: string;
|
|
17
|
-
value_range: [number, number];
|
|
18
|
-
}
|
|
19
|
-
export interface ICategoricalRuleSetParams extends IGeneralRuleSetParams {
|
|
20
|
-
type: RuleSetType.CATEGORICAL;
|
|
21
|
-
category_key: string;
|
|
22
|
-
category_to_color?: {
|
|
23
|
-
[category: string]: RGBAColor;
|
|
24
|
-
};
|
|
25
|
-
universal_rule_categories?: {
|
|
26
|
-
[category: string]: any;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export interface IGradientRuleSetParams extends ILinearInterpRuleSetParams {
|
|
30
|
-
type: RuleSetType.GRADIENT;
|
|
31
|
-
colors?: RGBAColor[];
|
|
32
|
-
colormap_name?: string;
|
|
33
|
-
value_stop_points: number[];
|
|
34
|
-
null_color?: RGBAColor;
|
|
35
|
-
null_legend_label?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface IGradientAndCategoricalRuleSetParams extends IGeneralRuleSetParams {
|
|
38
|
-
type: RuleSetType.GRADIENT_AND_CATEGORICAL;
|
|
39
|
-
colors?: RGBAColor[];
|
|
40
|
-
colormap_name?: string;
|
|
41
|
-
value_stop_points: number[];
|
|
42
|
-
null_color?: RGBAColor;
|
|
43
|
-
log_scale?: boolean;
|
|
44
|
-
value_key: string;
|
|
45
|
-
value_range: [number, number];
|
|
46
|
-
category_key: string;
|
|
47
|
-
category_to_color?: {
|
|
48
|
-
[category: string]: RGBAColor;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export interface IBarRuleSetParams extends ILinearInterpRuleSetParams {
|
|
52
|
-
type: RuleSetType.BAR;
|
|
53
|
-
fill?: RGBAColor;
|
|
54
|
-
negative_fill?: RGBAColor;
|
|
55
|
-
}
|
|
56
|
-
export interface IStackedBarRuleSetParams extends IGeneralRuleSetParams {
|
|
57
|
-
type: RuleSetType.STACKED_BAR;
|
|
58
|
-
value_key: string;
|
|
59
|
-
categories: string[];
|
|
60
|
-
fills?: RGBAColor[];
|
|
61
|
-
}
|
|
62
|
-
export interface IGeneticAlterationRuleSetParams extends IGeneralRuleSetParams {
|
|
63
|
-
type: RuleSetType.GENE;
|
|
64
|
-
rule_params: GeneticAlterationRuleParams;
|
|
65
|
-
}
|
|
66
|
-
declare type GeneticAlterationSingleRuleParams = {
|
|
67
|
-
shapes: ShapeParams[];
|
|
68
|
-
legend_label: string;
|
|
69
|
-
exclude_from_legend?: boolean;
|
|
70
|
-
legend_order?: number;
|
|
71
|
-
};
|
|
72
|
-
export declare type GeneticAlterationRuleParams = {
|
|
73
|
-
always?: GeneticAlterationSingleRuleParams;
|
|
74
|
-
conditional: {
|
|
75
|
-
[datumKey: string]: {
|
|
76
|
-
[commaSeparatedDatumValues: string]: GeneticAlterationSingleRuleParams;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export declare type RGBAColor = [number, number, number, number];
|
|
81
|
-
declare type RuleParams = {
|
|
82
|
-
shapes: ShapeParams[];
|
|
83
|
-
legend_label?: string;
|
|
84
|
-
exclude_from_legend?: boolean;
|
|
85
|
-
legend_config?: RuleLegendConfig;
|
|
86
|
-
legend_order?: number;
|
|
87
|
-
legend_base_color?: RGBAColor;
|
|
88
|
-
};
|
|
89
|
-
declare type RuleLegendConfig = {
|
|
90
|
-
type:
|
|
91
|
-
target: any;
|
|
92
|
-
} | {
|
|
93
|
-
type:
|
|
94
|
-
range: [number, number];
|
|
95
|
-
range_type: LinearInterpRangeType;
|
|
96
|
-
positive_color: RGBAColor;
|
|
97
|
-
negative_color: RGBAColor;
|
|
98
|
-
interpFn: (val: number) => number;
|
|
99
|
-
} |
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
export declare type
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
static
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
protected
|
|
126
|
-
protected
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
private
|
|
147
|
-
private
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
export
|
|
177
|
-
export {};
|
|
1
|
+
import { ComputedShapeParams, ShapeParams } from './oncoprintshape';
|
|
2
|
+
import { Omit } from './utils';
|
|
3
|
+
import { ActiveRules, ColumnProp, Datum, RuleSetId } from './oncoprintmodel';
|
|
4
|
+
export declare type RuleSetParams = ILinearInterpRuleSetParams | ICategoricalRuleSetParams | IGradientRuleSetParams | IBarRuleSetParams | IStackedBarRuleSetParams | IGradientAndCategoricalRuleSetParams | IGeneticAlterationRuleSetParams;
|
|
5
|
+
interface IGeneralRuleSetParams {
|
|
6
|
+
type?: RuleSetType;
|
|
7
|
+
legend_label?: string;
|
|
8
|
+
legend_base_color?: RGBAColor;
|
|
9
|
+
exclude_from_legend?: boolean;
|
|
10
|
+
na_z?: number;
|
|
11
|
+
na_legend_label?: string;
|
|
12
|
+
na_shapes?: ShapeParams[];
|
|
13
|
+
}
|
|
14
|
+
interface ILinearInterpRuleSetParams extends IGeneralRuleSetParams {
|
|
15
|
+
log_scale?: boolean;
|
|
16
|
+
value_key: string;
|
|
17
|
+
value_range: [number, number];
|
|
18
|
+
}
|
|
19
|
+
export interface ICategoricalRuleSetParams extends IGeneralRuleSetParams {
|
|
20
|
+
type: RuleSetType.CATEGORICAL;
|
|
21
|
+
category_key: string;
|
|
22
|
+
category_to_color?: {
|
|
23
|
+
[category: string]: RGBAColor;
|
|
24
|
+
};
|
|
25
|
+
universal_rule_categories?: {
|
|
26
|
+
[category: string]: any;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface IGradientRuleSetParams extends ILinearInterpRuleSetParams {
|
|
30
|
+
type: RuleSetType.GRADIENT;
|
|
31
|
+
colors?: RGBAColor[];
|
|
32
|
+
colormap_name?: string;
|
|
33
|
+
value_stop_points: number[];
|
|
34
|
+
null_color?: RGBAColor;
|
|
35
|
+
null_legend_label?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IGradientAndCategoricalRuleSetParams extends IGeneralRuleSetParams {
|
|
38
|
+
type: RuleSetType.GRADIENT_AND_CATEGORICAL;
|
|
39
|
+
colors?: RGBAColor[];
|
|
40
|
+
colormap_name?: string;
|
|
41
|
+
value_stop_points: number[];
|
|
42
|
+
null_color?: RGBAColor;
|
|
43
|
+
log_scale?: boolean;
|
|
44
|
+
value_key: string;
|
|
45
|
+
value_range: [number, number];
|
|
46
|
+
category_key: string;
|
|
47
|
+
category_to_color?: {
|
|
48
|
+
[category: string]: RGBAColor;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface IBarRuleSetParams extends ILinearInterpRuleSetParams {
|
|
52
|
+
type: RuleSetType.BAR;
|
|
53
|
+
fill?: RGBAColor;
|
|
54
|
+
negative_fill?: RGBAColor;
|
|
55
|
+
}
|
|
56
|
+
export interface IStackedBarRuleSetParams extends IGeneralRuleSetParams {
|
|
57
|
+
type: RuleSetType.STACKED_BAR;
|
|
58
|
+
value_key: string;
|
|
59
|
+
categories: string[];
|
|
60
|
+
fills?: RGBAColor[];
|
|
61
|
+
}
|
|
62
|
+
export interface IGeneticAlterationRuleSetParams extends IGeneralRuleSetParams {
|
|
63
|
+
type: RuleSetType.GENE;
|
|
64
|
+
rule_params: GeneticAlterationRuleParams;
|
|
65
|
+
}
|
|
66
|
+
declare type GeneticAlterationSingleRuleParams = {
|
|
67
|
+
shapes: ShapeParams[];
|
|
68
|
+
legend_label: string;
|
|
69
|
+
exclude_from_legend?: boolean;
|
|
70
|
+
legend_order?: number;
|
|
71
|
+
};
|
|
72
|
+
export declare type GeneticAlterationRuleParams = {
|
|
73
|
+
always?: GeneticAlterationSingleRuleParams;
|
|
74
|
+
conditional: {
|
|
75
|
+
[datumKey: string]: {
|
|
76
|
+
[commaSeparatedDatumValues: string]: GeneticAlterationSingleRuleParams;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare type RGBAColor = [number, number, number, number];
|
|
81
|
+
declare type RuleParams = {
|
|
82
|
+
shapes: ShapeParams[];
|
|
83
|
+
legend_label?: string;
|
|
84
|
+
exclude_from_legend?: boolean;
|
|
85
|
+
legend_config?: RuleLegendConfig;
|
|
86
|
+
legend_order?: number;
|
|
87
|
+
legend_base_color?: RGBAColor;
|
|
88
|
+
};
|
|
89
|
+
declare type RuleLegendConfig = {
|
|
90
|
+
type: 'rule';
|
|
91
|
+
target: any;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'number';
|
|
94
|
+
range: [number, number];
|
|
95
|
+
range_type: LinearInterpRangeType;
|
|
96
|
+
positive_color: RGBAColor;
|
|
97
|
+
negative_color: RGBAColor;
|
|
98
|
+
interpFn: (val: number) => number;
|
|
99
|
+
} | {
|
|
100
|
+
type: 'gradient';
|
|
101
|
+
range: [number, number];
|
|
102
|
+
colorFn: (val: number) => RGBAColor;
|
|
103
|
+
};
|
|
104
|
+
export declare enum RuleSetType {
|
|
105
|
+
CATEGORICAL = "categorical",
|
|
106
|
+
GRADIENT = "gradient",
|
|
107
|
+
GRADIENT_AND_CATEGORICAL = "gradient+categorical",
|
|
108
|
+
BAR = "bar",
|
|
109
|
+
STACKED_BAR = "stacked_bar",
|
|
110
|
+
GENE = "gene"
|
|
111
|
+
}
|
|
112
|
+
export declare type RuleId = number;
|
|
113
|
+
export declare type RuleWithId = {
|
|
114
|
+
id: RuleId;
|
|
115
|
+
rule: Rule;
|
|
116
|
+
};
|
|
117
|
+
export declare class RuleSet {
|
|
118
|
+
static getRuleSetId: () => number;
|
|
119
|
+
static getRuleId: () => number;
|
|
120
|
+
rule_set_id: RuleSetId;
|
|
121
|
+
legend_label?: string;
|
|
122
|
+
protected legend_base_color?: RGBAColor;
|
|
123
|
+
exclude_from_legend?: boolean;
|
|
124
|
+
protected active_rule_ids: ActiveRules;
|
|
125
|
+
protected rules_with_id: RuleWithId[];
|
|
126
|
+
protected universal_rule?: RuleWithId;
|
|
127
|
+
constructor(params: Omit<RuleSetParams, 'type'>);
|
|
128
|
+
getLegendLabel(): string;
|
|
129
|
+
getRuleSetId(): number;
|
|
130
|
+
addRules(list_of_params: RuleParams[]): number[];
|
|
131
|
+
_addRule(params: RuleParams, rule_id?: RuleId): number;
|
|
132
|
+
setUniversalRule(r: RuleWithId): void;
|
|
133
|
+
removeRule(rule_id: RuleId): void;
|
|
134
|
+
getRuleWithId(rule_id: RuleId): RuleWithId;
|
|
135
|
+
isExcludedFromLegend(): boolean;
|
|
136
|
+
getRule(rule_id: RuleId): Rule;
|
|
137
|
+
getRecentlyUsedRules(): Rule[];
|
|
138
|
+
applyRulesToDatum(rules_with_id: RuleWithId[], datum: Datum, cell_width: number, cell_height: number): ComputedShapeParams[];
|
|
139
|
+
getSpecificRulesForDatum(datum?: Datum): RuleWithId[];
|
|
140
|
+
getUniversalRule(): RuleWithId;
|
|
141
|
+
getUniversalShapes(cell_width: number, cell_height: number): ComputedShapeParams[];
|
|
142
|
+
getSpecificShapesForDatum(data: Datum[], cell_width: number, cell_height: number, out_active_rules?: ActiveRules | undefined, data_id_key?: string & keyof Datum, important_ids?: ColumnProp<boolean>): ComputedShapeParams[][];
|
|
143
|
+
}
|
|
144
|
+
declare class LookupRuleSet extends RuleSet {
|
|
145
|
+
private lookup_map_by_key_and_value;
|
|
146
|
+
private lookup_map_by_key;
|
|
147
|
+
private rule_id_to_conditions;
|
|
148
|
+
getSpecificRulesForDatum(datum?: Datum): RuleWithId[];
|
|
149
|
+
private indexRuleForLookup;
|
|
150
|
+
addRule(condition_key: string, condition_value: any, params: RuleParams): number;
|
|
151
|
+
linkExistingRule(condition_key: string, condition_value: string, existing_rule_id: RuleId): void;
|
|
152
|
+
removeRule(rule_id: RuleId): void;
|
|
153
|
+
}
|
|
154
|
+
export declare enum LinearInterpRangeType {
|
|
155
|
+
ALL = "ALL",
|
|
156
|
+
NON_NEGATIVE = "NON_NEGATIVE",
|
|
157
|
+
NON_POSITIVE = "NON_POSITIVE"
|
|
158
|
+
}
|
|
159
|
+
export declare class GeneticAlterationRuleSet extends LookupRuleSet {
|
|
160
|
+
constructor(params: IGeneticAlterationRuleSetParams);
|
|
161
|
+
private addRulesFromParams;
|
|
162
|
+
}
|
|
163
|
+
export declare class Rule {
|
|
164
|
+
private shapes;
|
|
165
|
+
legend_label: string;
|
|
166
|
+
legend_base_color?: RGBAColor;
|
|
167
|
+
exclude_from_legend?: boolean;
|
|
168
|
+
private legend_config?;
|
|
169
|
+
legend_order?: number;
|
|
170
|
+
constructor(params: RuleParams);
|
|
171
|
+
getLegendConfig(): RuleLegendConfig;
|
|
172
|
+
apply(d: Datum, cell_width: number, cell_height: number): ComputedShapeParams[];
|
|
173
|
+
isExcludedFromLegend(): boolean;
|
|
174
|
+
}
|
|
175
|
+
export default function (params: RuleSetParams): RuleSet;
|
|
176
|
+
export {};
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { Datum } from
|
|
2
|
-
import { RGBAColor } from
|
|
3
|
-
declare type StringParameter =
|
|
4
|
-
declare type PercentNumberParameter =
|
|
5
|
-
declare type PlainNumberParameter =
|
|
6
|
-
declare type RGBAParameter =
|
|
7
|
-
declare type NumberParameter = PercentNumberParameter | PlainNumberParameter;
|
|
8
|
-
declare type Parameter = StringParameter | NumberParameter | RGBAParameter;
|
|
9
|
-
declare type StringParamFunction = (d: Datum) => string;
|
|
10
|
-
declare type NumberParamFunction = (d: Datum) => number;
|
|
11
|
-
declare type RGBAParamFunction = (d: Datum) => RGBAColor;
|
|
12
|
-
export declare type ShapeParams = {
|
|
13
|
-
[x in StringParameter]?: string | StringParamFunction;
|
|
14
|
-
} & {
|
|
15
|
-
[x in NumberParameter]?: number | NumberParamFunction;
|
|
16
|
-
} & {
|
|
17
|
-
[x in RGBAParameter]?: RGBAColor | RGBAParamFunction;
|
|
18
|
-
};
|
|
19
|
-
export declare type ComputedShapeParams = {
|
|
20
|
-
[x in StringParameter]?: string;
|
|
21
|
-
} & {
|
|
22
|
-
[x in NumberParameter]?: number;
|
|
23
|
-
} & {
|
|
24
|
-
[x in RGBAParameter]?: RGBAColor;
|
|
25
|
-
};
|
|
26
|
-
export declare class Shape {
|
|
27
|
-
private params;
|
|
28
|
-
private static cache;
|
|
29
|
-
private params_with_type;
|
|
30
|
-
private onlyDependsOnWidthAndHeight;
|
|
31
|
-
private instanceCache;
|
|
32
|
-
constructor(params: ShapeParams);
|
|
33
|
-
static hashComputedShape(computed_params: ComputedShapeParams, z_index?: number | string): string;
|
|
34
|
-
private static getCachedShape;
|
|
35
|
-
getRequiredParameters(): Parameter[];
|
|
36
|
-
completeWithDefaults(): void;
|
|
37
|
-
markParameterTypes(): void;
|
|
38
|
-
getComputedParams(d: Datum, base_width: number, base_height: number): ComputedShapeParams;
|
|
39
|
-
}
|
|
40
|
-
declare type SpecificComputedShapeParams<ShapeParamType> = {
|
|
41
|
-
[x in ShapeParamType & StringParameter]: string;
|
|
42
|
-
} & {
|
|
43
|
-
[x in ShapeParamType & NumberParameter]: number;
|
|
44
|
-
} & {
|
|
45
|
-
[x in ShapeParamType & RGBAParameter]: RGBAColor;
|
|
46
|
-
};
|
|
47
|
-
declare type RectangleParameter =
|
|
48
|
-
export declare type ComputedRectangleParams = SpecificComputedShapeParams<RectangleParameter>;
|
|
49
|
-
export declare class Rectangle extends Shape {
|
|
50
|
-
getRequiredParameters(): RectangleParameter[];
|
|
51
|
-
}
|
|
52
|
-
declare type TriangleParameter =
|
|
53
|
-
export declare type ComputedTriangleParams = SpecificComputedShapeParams<TriangleParameter>;
|
|
54
|
-
export declare class Triangle extends Shape {
|
|
55
|
-
getRequiredParameters(): TriangleParameter[];
|
|
56
|
-
}
|
|
57
|
-
export declare type EllipseParameter =
|
|
58
|
-
export declare type ComputedEllipseParams = SpecificComputedShapeParams<EllipseParameter>;
|
|
59
|
-
export declare class Ellipse extends Shape {
|
|
60
|
-
getRequiredParameters(): EllipseParameter[];
|
|
61
|
-
}
|
|
62
|
-
export declare type LineParameter =
|
|
63
|
-
export declare type ComputedLineParams = SpecificComputedShapeParams<LineParameter>;
|
|
64
|
-
export declare class Line extends Shape {
|
|
65
|
-
getRequiredParameters(): LineParameter[];
|
|
66
|
-
}
|
|
67
|
-
export {};
|
|
1
|
+
import { Datum } from './oncoprintmodel';
|
|
2
|
+
import { RGBAColor } from './oncoprintruleset';
|
|
3
|
+
declare type StringParameter = 'type';
|
|
4
|
+
declare type PercentNumberParameter = 'width' | 'height' | 'x' | 'y' | 'x1' | 'x2' | 'x3' | 'y1' | 'y2' | 'y3';
|
|
5
|
+
declare type PlainNumberParameter = 'z' | 'stroke-width' | 'stroke-opacity';
|
|
6
|
+
declare type RGBAParameter = 'stroke' | 'fill';
|
|
7
|
+
declare type NumberParameter = PercentNumberParameter | PlainNumberParameter;
|
|
8
|
+
declare type Parameter = StringParameter | NumberParameter | RGBAParameter;
|
|
9
|
+
declare type StringParamFunction = (d: Datum) => string;
|
|
10
|
+
declare type NumberParamFunction = (d: Datum) => number;
|
|
11
|
+
declare type RGBAParamFunction = (d: Datum) => RGBAColor;
|
|
12
|
+
export declare type ShapeParams = {
|
|
13
|
+
[x in StringParameter]?: string | StringParamFunction;
|
|
14
|
+
} & {
|
|
15
|
+
[x in NumberParameter]?: number | NumberParamFunction;
|
|
16
|
+
} & {
|
|
17
|
+
[x in RGBAParameter]?: RGBAColor | RGBAParamFunction;
|
|
18
|
+
};
|
|
19
|
+
export declare type ComputedShapeParams = {
|
|
20
|
+
[x in StringParameter]?: string;
|
|
21
|
+
} & {
|
|
22
|
+
[x in NumberParameter]?: number;
|
|
23
|
+
} & {
|
|
24
|
+
[x in RGBAParameter]?: RGBAColor;
|
|
25
|
+
};
|
|
26
|
+
export declare class Shape {
|
|
27
|
+
private params;
|
|
28
|
+
private static cache;
|
|
29
|
+
private params_with_type;
|
|
30
|
+
private onlyDependsOnWidthAndHeight;
|
|
31
|
+
private instanceCache;
|
|
32
|
+
constructor(params: ShapeParams);
|
|
33
|
+
static hashComputedShape(computed_params: ComputedShapeParams, z_index?: number | string): string;
|
|
34
|
+
private static getCachedShape;
|
|
35
|
+
getRequiredParameters(): Parameter[];
|
|
36
|
+
completeWithDefaults(): void;
|
|
37
|
+
markParameterTypes(): void;
|
|
38
|
+
getComputedParams(d: Datum, base_width: number, base_height: number): ComputedShapeParams;
|
|
39
|
+
}
|
|
40
|
+
declare type SpecificComputedShapeParams<ShapeParamType> = {
|
|
41
|
+
[x in ShapeParamType & StringParameter]: string;
|
|
42
|
+
} & {
|
|
43
|
+
[x in ShapeParamType & NumberParameter]: number;
|
|
44
|
+
} & {
|
|
45
|
+
[x in ShapeParamType & RGBAParameter]: RGBAColor;
|
|
46
|
+
};
|
|
47
|
+
declare type RectangleParameter = 'width' | 'height' | 'x' | 'y' | 'z' | 'stroke' | 'stroke-width' | 'fill';
|
|
48
|
+
export declare type ComputedRectangleParams = SpecificComputedShapeParams<RectangleParameter>;
|
|
49
|
+
export declare class Rectangle extends Shape {
|
|
50
|
+
getRequiredParameters(): RectangleParameter[];
|
|
51
|
+
}
|
|
52
|
+
declare type TriangleParameter = 'x1' | 'x2' | 'x3' | 'y1' | 'y2' | 'y3' | 'z' | 'stroke' | 'stroke-width' | 'fill';
|
|
53
|
+
export declare type ComputedTriangleParams = SpecificComputedShapeParams<TriangleParameter>;
|
|
54
|
+
export declare class Triangle extends Shape {
|
|
55
|
+
getRequiredParameters(): TriangleParameter[];
|
|
56
|
+
}
|
|
57
|
+
export declare type EllipseParameter = 'width' | 'height' | 'x' | 'y' | 'z' | 'stroke' | 'stroke-width' | 'fill';
|
|
58
|
+
export declare type ComputedEllipseParams = SpecificComputedShapeParams<EllipseParameter>;
|
|
59
|
+
export declare class Ellipse extends Shape {
|
|
60
|
+
getRequiredParameters(): EllipseParameter[];
|
|
61
|
+
}
|
|
62
|
+
export declare type LineParameter = 'x1' | 'y1' | 'x2' | 'y2' | 'z' | 'stroke' | 'stroke-width';
|
|
63
|
+
export declare type ComputedLineParams = SpecificComputedShapeParams<LineParameter>;
|
|
64
|
+
export declare class Line extends Shape {
|
|
65
|
+
getRequiredParameters(): LineParameter[];
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ComputedShapeParams } from
|
|
2
|
-
export default function shapeToSVG(oncoprint_shape_computed_params: ComputedShapeParams, offset_x: number, offset_y: number): SVGElement;
|
|
1
|
+
import { ComputedShapeParams } from './oncoprintshape';
|
|
2
|
+
export default function shapeToSVG(oncoprint_shape_computed_params: ComputedShapeParams, offset_x: number, offset_y: number): SVGElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComputedShapeParams } from
|
|
2
|
-
declare type AddVertexCallback = (vertex: [number, number, number], color: [number, number, number, number]) => void;
|
|
3
|
-
export default function (oncoprint_shape_computed_params: ComputedShapeParams, z_index: number, addVertex: AddVertexCallback): void;
|
|
4
|
-
export declare function getNumWebGLVertexes(shape: ComputedShapeParams): number;
|
|
5
|
-
export {};
|
|
1
|
+
import { ComputedShapeParams } from './oncoprintshape';
|
|
2
|
+
declare type AddVertexCallback = (vertex: [number, number, number], color: [number, number, number, number]) => void;
|
|
3
|
+
export default function (oncoprint_shape_computed_params: ComputedShapeParams, z_index: number, addVertex: AddVertexCallback): void;
|
|
4
|
+
export declare function getNumWebGLVertexes(shape: ComputedShapeParams): number;
|
|
5
|
+
export {};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
/// <reference types="jquery" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
private $
|
|
8
|
-
private
|
|
9
|
-
private
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
/// <reference types="jstree" />
|
|
3
|
+
export declare type OncoprintTooltipParams = {
|
|
4
|
+
noselect?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default class OncoprintToolTip {
|
|
7
|
+
private $container;
|
|
8
|
+
private $div;
|
|
9
|
+
private hide_timeout_id;
|
|
10
|
+
private show_timeout_id;
|
|
11
|
+
center: boolean;
|
|
12
|
+
private shown;
|
|
13
|
+
constructor($container: JQuery, params?: OncoprintTooltipParams);
|
|
14
|
+
show(wait: number | undefined, viewport_x: number, viewport_y: number, $contents: JQuery, fade?: boolean): void;
|
|
15
|
+
private doShow;
|
|
16
|
+
private doHide;
|
|
17
|
+
private cancelScheduledShow;
|
|
18
|
+
private cancelScheduledHide;
|
|
19
|
+
showIfNotAlreadyGoingTo(wait: number | undefined, viewport_x: number, viewport_y: number, $contents: JQuery): void;
|
|
20
|
+
hideIfNotAlreadyGoingTo(wait?: number): void;
|
|
21
|
+
hide(wait?: number): void;
|
|
22
|
+
fadeIn(wait: number | undefined, viewport_x: number, viewport_y: number, $contents: JQuery): void;
|
|
23
|
+
}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
/// <reference types="jquery" />
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private $
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
/// <reference types="jstree" />
|
|
3
|
+
import OncoprintToolTip from './oncoprinttooltip';
|
|
4
|
+
import OncoprintModel from './oncoprintmodel';
|
|
5
|
+
export default class OncoprintTrackInfoView {
|
|
6
|
+
private $div;
|
|
7
|
+
private tooltip;
|
|
8
|
+
private $ctr;
|
|
9
|
+
private $text_ctr;
|
|
10
|
+
private base_font_size;
|
|
11
|
+
private font_family;
|
|
12
|
+
private font_weight;
|
|
13
|
+
private width;
|
|
14
|
+
private $label_elts;
|
|
15
|
+
private rendering_suppressed;
|
|
16
|
+
private minimum_track_height;
|
|
17
|
+
constructor($div: JQuery, tooltip: OncoprintToolTip);
|
|
18
|
+
private destroyLabelElts;
|
|
19
|
+
private renderAllInfo;
|
|
20
|
+
private scroll;
|
|
21
|
+
private resize;
|
|
22
|
+
getFontSize(): number;
|
|
23
|
+
getWidth(): number;
|
|
24
|
+
addTracks(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
25
|
+
moveTrack(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
26
|
+
setTrackGroupOrder(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
27
|
+
removeTrack(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
28
|
+
setTrackInfo(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
29
|
+
setTrackGroupHeader(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
30
|
+
setScroll(model: OncoprintModel): void;
|
|
31
|
+
setHorzScroll(model: OncoprintModel): void;
|
|
32
|
+
setVertScroll(model: OncoprintModel): void;
|
|
33
|
+
setZoom(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
34
|
+
setViewport(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
35
|
+
setVertZoom(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
36
|
+
suppressRendering(): void;
|
|
37
|
+
releaseRendering(model: OncoprintModel, getCellViewHeight: () => number): void;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
toSVGGroup(model: OncoprintModel, offset_x: number, offset_y: number): SVGGElement;
|
|
40
|
+
}
|