@jbrowse/plugin-hic 2.11.0 → 2.11.2
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/dist/HicAdapter/index.d.ts +1 -2
- package/dist/HicAdapter/index.js +3 -2
- package/dist/HicRenderer/index.d.ts +1 -2
- package/dist/HicRenderer/index.js +3 -2
- package/dist/HicTrack/index.d.ts +1 -2
- package/dist/HicTrack/index.js +3 -2
- package/dist/LinearHicDisplay/configSchema.d.ts +5 -0
- package/dist/LinearHicDisplay/index.d.ts +1 -2
- package/dist/LinearHicDisplay/index.js +3 -2
- package/dist/LinearHicDisplay/model.d.ts +50 -32
- package/dist/LinearHicDisplay/model.js +127 -124
- package/esm/HicAdapter/index.d.ts +1 -2
- package/esm/HicAdapter/index.js +2 -2
- package/esm/HicRenderer/index.d.ts +1 -2
- package/esm/HicRenderer/index.js +2 -2
- package/esm/HicTrack/index.d.ts +1 -2
- package/esm/HicTrack/index.js +2 -2
- package/esm/LinearHicDisplay/configSchema.d.ts +5 -0
- package/esm/LinearHicDisplay/index.d.ts +1 -2
- package/esm/LinearHicDisplay/index.js +2 -2
- package/esm/LinearHicDisplay/model.d.ts +50 -32
- package/esm/LinearHicDisplay/model.js +126 -124
- package/package.json +2 -2
package/dist/HicAdapter/index.js
CHANGED
|
@@ -28,11 +28,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
30
30
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
31
|
-
|
|
31
|
+
function HicAdapterF(pluginManager) {
|
|
32
32
|
pluginManager.addAdapterType(() => new pluggableElementTypes_1.AdapterType({
|
|
33
33
|
name: 'HicAdapter',
|
|
34
34
|
displayName: 'Hi-C adapter',
|
|
35
35
|
configSchema: configSchema_1.default,
|
|
36
36
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./HicAdapter'))).then(r => r.default),
|
|
37
37
|
}));
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = HicAdapterF;
|
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const HicRendering_1 = __importDefault(require("./components/HicRendering"));
|
|
7
7
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
8
8
|
const HicRenderer_1 = __importDefault(require("./HicRenderer"));
|
|
9
|
-
|
|
9
|
+
function HicRendererF(pluginManager) {
|
|
10
10
|
pluginManager.addRendererType(() => new HicRenderer_1.default({
|
|
11
11
|
name: 'HicRenderer',
|
|
12
12
|
ReactComponent: HicRendering_1.default,
|
|
13
13
|
configSchema: configSchema_1.default,
|
|
14
14
|
pluginManager,
|
|
15
15
|
}));
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = HicRendererF;
|
package/dist/HicTrack/index.d.ts
CHANGED
package/dist/HicTrack/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
|
|
7
7
|
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
8
8
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
9
|
-
|
|
9
|
+
function HicTrackF(pluginManager) {
|
|
10
10
|
pluginManager.addTrackType(() => {
|
|
11
11
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
12
12
|
return new TrackType_1.default({
|
|
@@ -16,4 +16,5 @@ exports.default = (pluginManager) => {
|
|
|
16
16
|
stateModel: (0, models_1.createBaseTrackModel)(pluginManager, 'HicTrack', configSchema),
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = HicTrackF;
|
|
@@ -27,6 +27,11 @@ declare const HicTrackConfigFactory: (pluginManager: PluginManager) => import("@
|
|
|
27
27
|
defaultValue: string;
|
|
28
28
|
contextVariable: string[];
|
|
29
29
|
};
|
|
30
|
+
jexlFilters: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
defaultValue: never[];
|
|
34
|
+
};
|
|
30
35
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
31
36
|
export type HicTrackConfigModel = ReturnType<typeof HicTrackConfigFactory>;
|
|
32
37
|
export type HicTrackConfig = Instance<HicTrackConfigModel>;
|
|
@@ -7,7 +7,7 @@ const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
|
7
7
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
8
8
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
9
9
|
const model_1 = __importDefault(require("./model"));
|
|
10
|
-
|
|
10
|
+
function LinearHicDisplayF(pluginManager) {
|
|
11
11
|
pluginManager.addDisplayType(() => {
|
|
12
12
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
13
13
|
return new pluggableElementTypes_1.DisplayType({
|
|
@@ -20,4 +20,5 @@ exports.default = (pluginManager) => {
|
|
|
20
20
|
ReactComponent: plugin_linear_genome_view_1.BaseLinearDisplayComponent,
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = LinearHicDisplayF;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
-
|
|
3
|
+
export default function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
6
6
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -62,7 +62,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
62
62
|
setError(error: unknown): void;
|
|
63
63
|
reload(): void;
|
|
64
64
|
beforeDestroy(): void;
|
|
65
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
65
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
66
|
+
* #action
|
|
67
|
+
*/
|
|
66
68
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
67
69
|
maxFeatureScreenDensity: {
|
|
68
70
|
type: string;
|
|
@@ -73,7 +75,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
73
75
|
type: string;
|
|
74
76
|
defaultValue: number;
|
|
75
77
|
description: string;
|
|
76
|
-
};
|
|
78
|
+
}; /**
|
|
79
|
+
* #property
|
|
80
|
+
*/
|
|
77
81
|
height: {
|
|
78
82
|
type: string;
|
|
79
83
|
defaultValue: number;
|
|
@@ -81,13 +85,18 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
81
85
|
};
|
|
82
86
|
mouseover: {
|
|
83
87
|
type: string;
|
|
84
|
-
description: string;
|
|
85
|
-
* #getter
|
|
86
|
-
*/
|
|
88
|
+
description: string;
|
|
87
89
|
defaultValue: string;
|
|
88
90
|
contextVariable: string[];
|
|
89
91
|
};
|
|
90
|
-
|
|
92
|
+
jexlFilters: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
defaultValue: never[];
|
|
96
|
+
};
|
|
97
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
98
|
+
* #action
|
|
99
|
+
*/
|
|
91
100
|
} & {
|
|
92
101
|
type: import("mobx-state-tree").ISimpleType<"LinearHicDisplay">;
|
|
93
102
|
configuration: AnyConfigurationSchemaType;
|
|
@@ -97,26 +106,26 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
97
106
|
}, {
|
|
98
107
|
rendererTypeName: string;
|
|
99
108
|
error: unknown;
|
|
100
|
-
message: string | undefined;
|
|
109
|
+
message: string | undefined; /**
|
|
110
|
+
* #property
|
|
111
|
+
*/
|
|
101
112
|
} & {
|
|
102
113
|
readonly RenderingComponent: import("react").FC<{
|
|
103
114
|
model: {
|
|
104
115
|
id: string;
|
|
105
116
|
type: string;
|
|
106
|
-
rpcDriverName: string | undefined;
|
|
117
|
+
rpcDriverName: string | undefined; /**
|
|
118
|
+
* #property
|
|
119
|
+
*/
|
|
107
120
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
108
121
|
rendererTypeName: string;
|
|
109
|
-
error: unknown;
|
|
122
|
+
error: unknown;
|
|
123
|
+
message: string | undefined; /**
|
|
110
124
|
* #property
|
|
111
125
|
*/
|
|
112
|
-
message: string | undefined;
|
|
113
126
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
114
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
115
|
-
|
|
116
|
-
*/
|
|
117
|
-
type: import("mobx-state-tree").ISimpleType<string>; /**
|
|
118
|
-
* #method
|
|
119
|
-
*/
|
|
127
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
128
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
120
129
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
121
130
|
}, {
|
|
122
131
|
rendererTypeName: string;
|
|
@@ -132,9 +141,7 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
132
141
|
type: string;
|
|
133
142
|
rpcDriverName: string | undefined;
|
|
134
143
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
135
|
-
rendererTypeName: string;
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
144
|
+
rendererTypeName: string;
|
|
138
145
|
error: unknown;
|
|
139
146
|
message: string | undefined;
|
|
140
147
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -169,13 +176,13 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
169
176
|
setHeight(displayHeight: number): number;
|
|
170
177
|
resizeHeight(distance: number): number;
|
|
171
178
|
} & {
|
|
172
|
-
featureDensityStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats> | undefined;
|
|
173
|
-
* #getter
|
|
174
|
-
*/
|
|
179
|
+
featureDensityStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats> | undefined;
|
|
175
180
|
featureDensityStats: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined;
|
|
176
181
|
currStatsBpPerPx: number;
|
|
177
182
|
} & {
|
|
178
|
-
readonly currentBytesRequested: number;
|
|
183
|
+
readonly currentBytesRequested: number; /**
|
|
184
|
+
* #method
|
|
185
|
+
*/
|
|
179
186
|
readonly currentFeatureScreenDensity: number;
|
|
180
187
|
readonly maxFeatureScreenDensity: any;
|
|
181
188
|
readonly featureDensityStatsReady: boolean;
|
|
@@ -199,7 +206,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
199
206
|
featureIdUnderMouse: string | undefined;
|
|
200
207
|
contextMenuFeature: import("@jbrowse/core/util").Feature | undefined;
|
|
201
208
|
} & {
|
|
202
|
-
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
209
|
+
readonly blockType: "dynamicBlocks" | "staticBlocks"; /**
|
|
210
|
+
* #getter
|
|
211
|
+
*/
|
|
203
212
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
204
213
|
} & {
|
|
205
214
|
readonly renderDelay: number;
|
|
@@ -216,6 +225,7 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
216
225
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
217
226
|
deleteBlock(key: string): void;
|
|
218
227
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
228
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
219
229
|
clearFeatureSelection(): void;
|
|
220
230
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
221
231
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -338,7 +348,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
338
348
|
setError(error: unknown): void;
|
|
339
349
|
reload(): void;
|
|
340
350
|
beforeDestroy(): void;
|
|
341
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
351
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
352
|
+
* #action
|
|
353
|
+
*/
|
|
342
354
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
343
355
|
maxFeatureScreenDensity: {
|
|
344
356
|
type: string;
|
|
@@ -349,7 +361,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
349
361
|
type: string;
|
|
350
362
|
defaultValue: number;
|
|
351
363
|
description: string;
|
|
352
|
-
};
|
|
364
|
+
}; /**
|
|
365
|
+
* #property
|
|
366
|
+
*/
|
|
353
367
|
height: {
|
|
354
368
|
type: string;
|
|
355
369
|
defaultValue: number;
|
|
@@ -357,13 +371,18 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
357
371
|
};
|
|
358
372
|
mouseover: {
|
|
359
373
|
type: string;
|
|
360
|
-
description: string;
|
|
361
|
-
* #getter
|
|
362
|
-
*/
|
|
374
|
+
description: string;
|
|
363
375
|
defaultValue: string;
|
|
364
376
|
contextVariable: string[];
|
|
365
377
|
};
|
|
366
|
-
|
|
378
|
+
jexlFilters: {
|
|
379
|
+
type: string;
|
|
380
|
+
description: string;
|
|
381
|
+
defaultValue: never[];
|
|
382
|
+
};
|
|
383
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
384
|
+
* #action
|
|
385
|
+
*/
|
|
367
386
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
368
387
|
type: string;
|
|
369
388
|
id: string;
|
|
@@ -373,4 +392,3 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
373
392
|
userBpPerPxLimit: number | undefined;
|
|
374
393
|
userByteSizeLimit: number | undefined;
|
|
375
394
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
376
|
-
export default _default;
|
|
@@ -9,138 +9,141 @@ const mobx_state_tree_1 = require("mobx-state-tree");
|
|
|
9
9
|
* extends `BaseLinearDisplay`
|
|
10
10
|
*/
|
|
11
11
|
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
|
-
type: mobx_state_tree_1.types.literal('LinearHicDisplay'),
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
|
-
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
22
|
-
/**
|
|
23
|
-
* #property
|
|
24
|
-
*/
|
|
25
|
-
resolution: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 1),
|
|
26
|
-
/**
|
|
27
|
-
* #property
|
|
28
|
-
*/
|
|
29
|
-
useLogScale: false,
|
|
30
|
-
/**
|
|
31
|
-
* #property
|
|
32
|
-
*/
|
|
33
|
-
colorScheme: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
34
|
-
}))
|
|
35
|
-
.views(self => {
|
|
36
|
-
const { renderProps: superRenderProps } = self;
|
|
37
|
-
return {
|
|
12
|
+
function stateModelFactory(configSchema) {
|
|
13
|
+
return mobx_state_tree_1.types
|
|
14
|
+
.compose('LinearHicDisplay', plugin_linear_genome_view_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
38
15
|
/**
|
|
39
|
-
* #
|
|
16
|
+
* #property
|
|
40
17
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
type: mobx_state_tree_1.types.literal('LinearHicDisplay'),
|
|
19
|
+
/**
|
|
20
|
+
* #property
|
|
21
|
+
*/
|
|
22
|
+
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
23
|
+
/**
|
|
24
|
+
* #property
|
|
25
|
+
*/
|
|
26
|
+
resolution: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 1),
|
|
27
|
+
/**
|
|
28
|
+
* #property
|
|
29
|
+
*/
|
|
30
|
+
useLogScale: false,
|
|
31
|
+
/**
|
|
32
|
+
* #property
|
|
33
|
+
*/
|
|
34
|
+
colorScheme: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
35
|
+
}))
|
|
36
|
+
.views(self => {
|
|
37
|
+
const { renderProps: superRenderProps } = self;
|
|
38
|
+
return {
|
|
39
|
+
/**
|
|
40
|
+
* #getter
|
|
41
|
+
*/
|
|
42
|
+
get blockType() {
|
|
43
|
+
return 'dynamicBlocks';
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* #getter
|
|
47
|
+
*/
|
|
48
|
+
get rendererTypeName() {
|
|
49
|
+
return 'HicRenderer';
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* #method
|
|
53
|
+
*/
|
|
54
|
+
renderProps() {
|
|
55
|
+
const config = self.rendererType.configSchema.create({
|
|
56
|
+
...(0, configuration_1.getConf)(self, 'renderer'),
|
|
57
|
+
// add specific jexl color callback when using pre-defined color schemes
|
|
58
|
+
...(self.colorScheme
|
|
59
|
+
? { color: 'jexl:interpolate(count,scale)' }
|
|
60
|
+
: {}),
|
|
61
|
+
}, (0, mobx_state_tree_1.getEnv)(self));
|
|
62
|
+
return {
|
|
63
|
+
...superRenderProps(),
|
|
64
|
+
config,
|
|
65
|
+
rpcDriverName: self.rpcDriverName,
|
|
66
|
+
displayModel: self,
|
|
67
|
+
resolution: self.resolution,
|
|
68
|
+
useLogScale: self.useLogScale,
|
|
69
|
+
colorScheme: self.colorScheme,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
})
|
|
74
|
+
.actions(self => ({
|
|
44
75
|
/**
|
|
45
|
-
* #
|
|
76
|
+
* #action
|
|
46
77
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
78
|
+
setResolution(n) {
|
|
79
|
+
self.resolution = n;
|
|
49
80
|
},
|
|
50
81
|
/**
|
|
51
|
-
* #
|
|
82
|
+
* #action
|
|
52
83
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...(0, configuration_1.getConf)(self, 'renderer'),
|
|
56
|
-
// add specific jexl color callback when using pre-defined color schemes
|
|
57
|
-
...(self.colorScheme
|
|
58
|
-
? { color: 'jexl:interpolate(count,scale)' }
|
|
59
|
-
: {}),
|
|
60
|
-
}, (0, mobx_state_tree_1.getEnv)(self));
|
|
61
|
-
return {
|
|
62
|
-
...superRenderProps(),
|
|
63
|
-
config,
|
|
64
|
-
rpcDriverName: self.rpcDriverName,
|
|
65
|
-
displayModel: self,
|
|
66
|
-
resolution: self.resolution,
|
|
67
|
-
useLogScale: self.useLogScale,
|
|
68
|
-
colorScheme: self.colorScheme,
|
|
69
|
-
};
|
|
84
|
+
setUseLogScale(f) {
|
|
85
|
+
self.useLogScale = f;
|
|
70
86
|
},
|
|
71
|
-
};
|
|
72
|
-
})
|
|
73
|
-
.actions(self => ({
|
|
74
|
-
/**
|
|
75
|
-
* #action
|
|
76
|
-
*/
|
|
77
|
-
setResolution(n) {
|
|
78
|
-
self.resolution = n;
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* #action
|
|
82
|
-
*/
|
|
83
|
-
setUseLogScale(f) {
|
|
84
|
-
self.useLogScale = f;
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* #action
|
|
88
|
-
*/
|
|
89
|
-
setColorScheme(f) {
|
|
90
|
-
self.colorScheme = f;
|
|
91
|
-
},
|
|
92
|
-
}))
|
|
93
|
-
.views(self => {
|
|
94
|
-
const { trackMenuItems: superTrackMenuItems } = self;
|
|
95
|
-
return {
|
|
96
87
|
/**
|
|
97
|
-
* #
|
|
88
|
+
* #action
|
|
98
89
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
...superTrackMenuItems(),
|
|
102
|
-
{
|
|
103
|
-
label: 'Use log scale',
|
|
104
|
-
type: 'checkbox',
|
|
105
|
-
checked: self.useLogScale,
|
|
106
|
-
onClick: () => self.setUseLogScale(!self.useLogScale),
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
label: 'Color scheme',
|
|
110
|
-
type: 'subMenu',
|
|
111
|
-
subMenu: [
|
|
112
|
-
{
|
|
113
|
-
label: 'Fall',
|
|
114
|
-
onClick: () => self.setColorScheme('fall'),
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
label: 'Viridis',
|
|
118
|
-
onClick: () => self.setColorScheme('viridis'),
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: 'Juicebox',
|
|
122
|
-
onClick: () => self.setColorScheme('juicebox'),
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: 'Clear',
|
|
126
|
-
onClick: () => self.setColorScheme(undefined),
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
label: 'Resolution',
|
|
132
|
-
subMenu: [
|
|
133
|
-
{
|
|
134
|
-
label: 'Finer resolution',
|
|
135
|
-
onClick: () => self.setResolution(self.resolution * 2),
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
label: 'Coarser resolution',
|
|
139
|
-
onClick: () => self.setResolution(self.resolution / 2),
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
];
|
|
90
|
+
setColorScheme(f) {
|
|
91
|
+
self.colorScheme = f;
|
|
144
92
|
},
|
|
145
|
-
}
|
|
146
|
-
|
|
93
|
+
}))
|
|
94
|
+
.views(self => {
|
|
95
|
+
const { trackMenuItems: superTrackMenuItems } = self;
|
|
96
|
+
return {
|
|
97
|
+
/**
|
|
98
|
+
* #getter
|
|
99
|
+
*/
|
|
100
|
+
trackMenuItems() {
|
|
101
|
+
return [
|
|
102
|
+
...superTrackMenuItems(),
|
|
103
|
+
{
|
|
104
|
+
label: 'Use log scale',
|
|
105
|
+
type: 'checkbox',
|
|
106
|
+
checked: self.useLogScale,
|
|
107
|
+
onClick: () => self.setUseLogScale(!self.useLogScale),
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: 'Color scheme',
|
|
111
|
+
type: 'subMenu',
|
|
112
|
+
subMenu: [
|
|
113
|
+
{
|
|
114
|
+
label: 'Fall',
|
|
115
|
+
onClick: () => self.setColorScheme('fall'),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Viridis',
|
|
119
|
+
onClick: () => self.setColorScheme('viridis'),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
label: 'Juicebox',
|
|
123
|
+
onClick: () => self.setColorScheme('juicebox'),
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: 'Clear',
|
|
127
|
+
onClick: () => self.setColorScheme(undefined),
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'Resolution',
|
|
133
|
+
subMenu: [
|
|
134
|
+
{
|
|
135
|
+
label: 'Finer resolution',
|
|
136
|
+
onClick: () => self.setResolution(self.resolution * 2),
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: 'Coarser resolution',
|
|
140
|
+
onClick: () => self.setResolution(self.resolution / 2),
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
exports.default = stateModelFactory;
|
package/esm/HicAdapter/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AdapterType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
|
-
export default (pluginManager)
|
|
3
|
+
export default function HicAdapterF(pluginManager) {
|
|
4
4
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
5
5
|
name: 'HicAdapter',
|
|
6
6
|
displayName: 'Hi-C adapter',
|
|
7
7
|
configSchema,
|
|
8
8
|
getAdapterClass: () => import('./HicAdapter').then(r => r.default),
|
|
9
9
|
}));
|
|
10
|
-
}
|
|
10
|
+
}
|
package/esm/HicRenderer/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import ReactComponent from './components/HicRendering';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
3
|
import HicRenderer from './HicRenderer';
|
|
4
|
-
export default (pluginManager)
|
|
4
|
+
export default function HicRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new HicRenderer({
|
|
6
6
|
name: 'HicRenderer',
|
|
7
7
|
ReactComponent,
|
|
8
8
|
configSchema,
|
|
9
9
|
pluginManager,
|
|
10
10
|
}));
|
|
11
|
-
}
|
|
11
|
+
}
|
package/esm/HicTrack/index.d.ts
CHANGED
package/esm/HicTrack/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
2
2
|
import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
3
|
import configSchemaF from './configSchema';
|
|
4
|
-
export default (pluginManager)
|
|
4
|
+
export default function HicTrackF(pluginManager) {
|
|
5
5
|
pluginManager.addTrackType(() => {
|
|
6
6
|
const configSchema = configSchemaF(pluginManager);
|
|
7
7
|
return new TrackType({
|
|
@@ -11,4 +11,4 @@ export default (pluginManager) => {
|
|
|
11
11
|
stateModel: createBaseTrackModel(pluginManager, 'HicTrack', configSchema),
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
|
-
}
|
|
14
|
+
}
|
|
@@ -27,6 +27,11 @@ declare const HicTrackConfigFactory: (pluginManager: PluginManager) => import("@
|
|
|
27
27
|
defaultValue: string;
|
|
28
28
|
contextVariable: string[];
|
|
29
29
|
};
|
|
30
|
+
jexlFilters: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
defaultValue: never[];
|
|
34
|
+
};
|
|
30
35
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
31
36
|
export type HicTrackConfigModel = ReturnType<typeof HicTrackConfigFactory>;
|
|
32
37
|
export type HicTrackConfig = Instance<HicTrackConfigModel>;
|
|
@@ -2,7 +2,7 @@ import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
|
2
2
|
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
3
3
|
import configSchemaFactory from './configSchema';
|
|
4
4
|
import stateModelFactory from './model';
|
|
5
|
-
export default (pluginManager)
|
|
5
|
+
export default function LinearHicDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaFactory(pluginManager);
|
|
8
8
|
return new DisplayType({
|
|
@@ -15,4 +15,4 @@ export default (pluginManager) => {
|
|
|
15
15
|
ReactComponent: BaseLinearDisplayComponent,
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
-
|
|
3
|
+
export default function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
6
6
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -62,7 +62,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
62
62
|
setError(error: unknown): void;
|
|
63
63
|
reload(): void;
|
|
64
64
|
beforeDestroy(): void;
|
|
65
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
65
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
66
|
+
* #action
|
|
67
|
+
*/
|
|
66
68
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
67
69
|
maxFeatureScreenDensity: {
|
|
68
70
|
type: string;
|
|
@@ -73,7 +75,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
73
75
|
type: string;
|
|
74
76
|
defaultValue: number;
|
|
75
77
|
description: string;
|
|
76
|
-
};
|
|
78
|
+
}; /**
|
|
79
|
+
* #property
|
|
80
|
+
*/
|
|
77
81
|
height: {
|
|
78
82
|
type: string;
|
|
79
83
|
defaultValue: number;
|
|
@@ -81,13 +85,18 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
81
85
|
};
|
|
82
86
|
mouseover: {
|
|
83
87
|
type: string;
|
|
84
|
-
description: string;
|
|
85
|
-
* #getter
|
|
86
|
-
*/
|
|
88
|
+
description: string;
|
|
87
89
|
defaultValue: string;
|
|
88
90
|
contextVariable: string[];
|
|
89
91
|
};
|
|
90
|
-
|
|
92
|
+
jexlFilters: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
defaultValue: never[];
|
|
96
|
+
};
|
|
97
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
98
|
+
* #action
|
|
99
|
+
*/
|
|
91
100
|
} & {
|
|
92
101
|
type: import("mobx-state-tree").ISimpleType<"LinearHicDisplay">;
|
|
93
102
|
configuration: AnyConfigurationSchemaType;
|
|
@@ -97,26 +106,26 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
97
106
|
}, {
|
|
98
107
|
rendererTypeName: string;
|
|
99
108
|
error: unknown;
|
|
100
|
-
message: string | undefined;
|
|
109
|
+
message: string | undefined; /**
|
|
110
|
+
* #property
|
|
111
|
+
*/
|
|
101
112
|
} & {
|
|
102
113
|
readonly RenderingComponent: import("react").FC<{
|
|
103
114
|
model: {
|
|
104
115
|
id: string;
|
|
105
116
|
type: string;
|
|
106
|
-
rpcDriverName: string | undefined;
|
|
117
|
+
rpcDriverName: string | undefined; /**
|
|
118
|
+
* #property
|
|
119
|
+
*/
|
|
107
120
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
108
121
|
rendererTypeName: string;
|
|
109
|
-
error: unknown;
|
|
122
|
+
error: unknown;
|
|
123
|
+
message: string | undefined; /**
|
|
110
124
|
* #property
|
|
111
125
|
*/
|
|
112
|
-
message: string | undefined;
|
|
113
126
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
114
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
115
|
-
|
|
116
|
-
*/
|
|
117
|
-
type: import("mobx-state-tree").ISimpleType<string>; /**
|
|
118
|
-
* #method
|
|
119
|
-
*/
|
|
127
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
128
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
120
129
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
121
130
|
}, {
|
|
122
131
|
rendererTypeName: string;
|
|
@@ -132,9 +141,7 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
132
141
|
type: string;
|
|
133
142
|
rpcDriverName: string | undefined;
|
|
134
143
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
135
|
-
rendererTypeName: string;
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
144
|
+
rendererTypeName: string;
|
|
138
145
|
error: unknown;
|
|
139
146
|
message: string | undefined;
|
|
140
147
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -169,13 +176,13 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
169
176
|
setHeight(displayHeight: number): number;
|
|
170
177
|
resizeHeight(distance: number): number;
|
|
171
178
|
} & {
|
|
172
|
-
featureDensityStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats> | undefined;
|
|
173
|
-
* #getter
|
|
174
|
-
*/
|
|
179
|
+
featureDensityStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats> | undefined;
|
|
175
180
|
featureDensityStats: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined;
|
|
176
181
|
currStatsBpPerPx: number;
|
|
177
182
|
} & {
|
|
178
|
-
readonly currentBytesRequested: number;
|
|
183
|
+
readonly currentBytesRequested: number; /**
|
|
184
|
+
* #method
|
|
185
|
+
*/
|
|
179
186
|
readonly currentFeatureScreenDensity: number;
|
|
180
187
|
readonly maxFeatureScreenDensity: any;
|
|
181
188
|
readonly featureDensityStatsReady: boolean;
|
|
@@ -199,7 +206,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
199
206
|
featureIdUnderMouse: string | undefined;
|
|
200
207
|
contextMenuFeature: import("@jbrowse/core/util").Feature | undefined;
|
|
201
208
|
} & {
|
|
202
|
-
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
209
|
+
readonly blockType: "dynamicBlocks" | "staticBlocks"; /**
|
|
210
|
+
* #getter
|
|
211
|
+
*/
|
|
203
212
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
204
213
|
} & {
|
|
205
214
|
readonly renderDelay: number;
|
|
@@ -216,6 +225,7 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
216
225
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
217
226
|
deleteBlock(key: string): void;
|
|
218
227
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
228
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
219
229
|
clearFeatureSelection(): void;
|
|
220
230
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
221
231
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -338,7 +348,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
338
348
|
setError(error: unknown): void;
|
|
339
349
|
reload(): void;
|
|
340
350
|
beforeDestroy(): void;
|
|
341
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
351
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
352
|
+
* #action
|
|
353
|
+
*/
|
|
342
354
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
343
355
|
maxFeatureScreenDensity: {
|
|
344
356
|
type: string;
|
|
@@ -349,7 +361,9 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
349
361
|
type: string;
|
|
350
362
|
defaultValue: number;
|
|
351
363
|
description: string;
|
|
352
|
-
};
|
|
364
|
+
}; /**
|
|
365
|
+
* #property
|
|
366
|
+
*/
|
|
353
367
|
height: {
|
|
354
368
|
type: string;
|
|
355
369
|
defaultValue: number;
|
|
@@ -357,13 +371,18 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
357
371
|
};
|
|
358
372
|
mouseover: {
|
|
359
373
|
type: string;
|
|
360
|
-
description: string;
|
|
361
|
-
* #getter
|
|
362
|
-
*/
|
|
374
|
+
description: string;
|
|
363
375
|
defaultValue: string;
|
|
364
376
|
contextVariable: string[];
|
|
365
377
|
};
|
|
366
|
-
|
|
378
|
+
jexlFilters: {
|
|
379
|
+
type: string;
|
|
380
|
+
description: string;
|
|
381
|
+
defaultValue: never[];
|
|
382
|
+
};
|
|
383
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
384
|
+
* #action
|
|
385
|
+
*/
|
|
367
386
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
368
387
|
type: string;
|
|
369
388
|
id: string;
|
|
@@ -373,4 +392,3 @@ declare const _default: (configSchema: AnyConfigurationSchemaType) => import("mo
|
|
|
373
392
|
userBpPerPxLimit: number | undefined;
|
|
374
393
|
userByteSizeLimit: number | undefined;
|
|
375
394
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
376
|
-
export default _default;
|
|
@@ -7,138 +7,140 @@ import { types, getEnv } from 'mobx-state-tree';
|
|
|
7
7
|
* extends `BaseLinearDisplay`
|
|
8
8
|
*/
|
|
9
9
|
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
10
|
-
export default (configSchema)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* #property
|
|
14
|
-
*/
|
|
15
|
-
type: types.literal('LinearHicDisplay'),
|
|
16
|
-
/**
|
|
17
|
-
* #property
|
|
18
|
-
*/
|
|
19
|
-
configuration: ConfigurationReference(configSchema),
|
|
20
|
-
/**
|
|
21
|
-
* #property
|
|
22
|
-
*/
|
|
23
|
-
resolution: types.optional(types.number, 1),
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
|
-
useLogScale: false,
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
|
-
colorScheme: types.maybe(types.string),
|
|
32
|
-
}))
|
|
33
|
-
.views(self => {
|
|
34
|
-
const { renderProps: superRenderProps } = self;
|
|
35
|
-
return {
|
|
10
|
+
export default function stateModelFactory(configSchema) {
|
|
11
|
+
return types
|
|
12
|
+
.compose('LinearHicDisplay', BaseLinearDisplay, types.model({
|
|
36
13
|
/**
|
|
37
|
-
* #
|
|
14
|
+
* #property
|
|
38
15
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
16
|
+
type: types.literal('LinearHicDisplay'),
|
|
17
|
+
/**
|
|
18
|
+
* #property
|
|
19
|
+
*/
|
|
20
|
+
configuration: ConfigurationReference(configSchema),
|
|
21
|
+
/**
|
|
22
|
+
* #property
|
|
23
|
+
*/
|
|
24
|
+
resolution: types.optional(types.number, 1),
|
|
25
|
+
/**
|
|
26
|
+
* #property
|
|
27
|
+
*/
|
|
28
|
+
useLogScale: false,
|
|
29
|
+
/**
|
|
30
|
+
* #property
|
|
31
|
+
*/
|
|
32
|
+
colorScheme: types.maybe(types.string),
|
|
33
|
+
}))
|
|
34
|
+
.views(self => {
|
|
35
|
+
const { renderProps: superRenderProps } = self;
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* #getter
|
|
39
|
+
*/
|
|
40
|
+
get blockType() {
|
|
41
|
+
return 'dynamicBlocks';
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* #getter
|
|
45
|
+
*/
|
|
46
|
+
get rendererTypeName() {
|
|
47
|
+
return 'HicRenderer';
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* #method
|
|
51
|
+
*/
|
|
52
|
+
renderProps() {
|
|
53
|
+
const config = self.rendererType.configSchema.create({
|
|
54
|
+
...getConf(self, 'renderer'),
|
|
55
|
+
// add specific jexl color callback when using pre-defined color schemes
|
|
56
|
+
...(self.colorScheme
|
|
57
|
+
? { color: 'jexl:interpolate(count,scale)' }
|
|
58
|
+
: {}),
|
|
59
|
+
}, getEnv(self));
|
|
60
|
+
return {
|
|
61
|
+
...superRenderProps(),
|
|
62
|
+
config,
|
|
63
|
+
rpcDriverName: self.rpcDriverName,
|
|
64
|
+
displayModel: self,
|
|
65
|
+
resolution: self.resolution,
|
|
66
|
+
useLogScale: self.useLogScale,
|
|
67
|
+
colorScheme: self.colorScheme,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
})
|
|
72
|
+
.actions(self => ({
|
|
42
73
|
/**
|
|
43
|
-
* #
|
|
74
|
+
* #action
|
|
44
75
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
76
|
+
setResolution(n) {
|
|
77
|
+
self.resolution = n;
|
|
47
78
|
},
|
|
48
79
|
/**
|
|
49
|
-
* #
|
|
80
|
+
* #action
|
|
50
81
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
...getConf(self, 'renderer'),
|
|
54
|
-
// add specific jexl color callback when using pre-defined color schemes
|
|
55
|
-
...(self.colorScheme
|
|
56
|
-
? { color: 'jexl:interpolate(count,scale)' }
|
|
57
|
-
: {}),
|
|
58
|
-
}, getEnv(self));
|
|
59
|
-
return {
|
|
60
|
-
...superRenderProps(),
|
|
61
|
-
config,
|
|
62
|
-
rpcDriverName: self.rpcDriverName,
|
|
63
|
-
displayModel: self,
|
|
64
|
-
resolution: self.resolution,
|
|
65
|
-
useLogScale: self.useLogScale,
|
|
66
|
-
colorScheme: self.colorScheme,
|
|
67
|
-
};
|
|
82
|
+
setUseLogScale(f) {
|
|
83
|
+
self.useLogScale = f;
|
|
68
84
|
},
|
|
69
|
-
};
|
|
70
|
-
})
|
|
71
|
-
.actions(self => ({
|
|
72
|
-
/**
|
|
73
|
-
* #action
|
|
74
|
-
*/
|
|
75
|
-
setResolution(n) {
|
|
76
|
-
self.resolution = n;
|
|
77
|
-
},
|
|
78
|
-
/**
|
|
79
|
-
* #action
|
|
80
|
-
*/
|
|
81
|
-
setUseLogScale(f) {
|
|
82
|
-
self.useLogScale = f;
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* #action
|
|
86
|
-
*/
|
|
87
|
-
setColorScheme(f) {
|
|
88
|
-
self.colorScheme = f;
|
|
89
|
-
},
|
|
90
|
-
}))
|
|
91
|
-
.views(self => {
|
|
92
|
-
const { trackMenuItems: superTrackMenuItems } = self;
|
|
93
|
-
return {
|
|
94
85
|
/**
|
|
95
|
-
* #
|
|
86
|
+
* #action
|
|
96
87
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
...superTrackMenuItems(),
|
|
100
|
-
{
|
|
101
|
-
label: 'Use log scale',
|
|
102
|
-
type: 'checkbox',
|
|
103
|
-
checked: self.useLogScale,
|
|
104
|
-
onClick: () => self.setUseLogScale(!self.useLogScale),
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: 'Color scheme',
|
|
108
|
-
type: 'subMenu',
|
|
109
|
-
subMenu: [
|
|
110
|
-
{
|
|
111
|
-
label: 'Fall',
|
|
112
|
-
onClick: () => self.setColorScheme('fall'),
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: 'Viridis',
|
|
116
|
-
onClick: () => self.setColorScheme('viridis'),
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: 'Juicebox',
|
|
120
|
-
onClick: () => self.setColorScheme('juicebox'),
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: 'Clear',
|
|
124
|
-
onClick: () => self.setColorScheme(undefined),
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: 'Resolution',
|
|
130
|
-
subMenu: [
|
|
131
|
-
{
|
|
132
|
-
label: 'Finer resolution',
|
|
133
|
-
onClick: () => self.setResolution(self.resolution * 2),
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
label: 'Coarser resolution',
|
|
137
|
-
onClick: () => self.setResolution(self.resolution / 2),
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
},
|
|
141
|
-
];
|
|
88
|
+
setColorScheme(f) {
|
|
89
|
+
self.colorScheme = f;
|
|
142
90
|
},
|
|
143
|
-
}
|
|
144
|
-
|
|
91
|
+
}))
|
|
92
|
+
.views(self => {
|
|
93
|
+
const { trackMenuItems: superTrackMenuItems } = self;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* #getter
|
|
97
|
+
*/
|
|
98
|
+
trackMenuItems() {
|
|
99
|
+
return [
|
|
100
|
+
...superTrackMenuItems(),
|
|
101
|
+
{
|
|
102
|
+
label: 'Use log scale',
|
|
103
|
+
type: 'checkbox',
|
|
104
|
+
checked: self.useLogScale,
|
|
105
|
+
onClick: () => self.setUseLogScale(!self.useLogScale),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Color scheme',
|
|
109
|
+
type: 'subMenu',
|
|
110
|
+
subMenu: [
|
|
111
|
+
{
|
|
112
|
+
label: 'Fall',
|
|
113
|
+
onClick: () => self.setColorScheme('fall'),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: 'Viridis',
|
|
117
|
+
onClick: () => self.setColorScheme('viridis'),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Juicebox',
|
|
121
|
+
onClick: () => self.setColorScheme('juicebox'),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'Clear',
|
|
125
|
+
onClick: () => self.setColorScheme(undefined),
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: 'Resolution',
|
|
131
|
+
subMenu: [
|
|
132
|
+
{
|
|
133
|
+
label: 'Finer resolution',
|
|
134
|
+
onClick: () => self.setResolution(self.resolution * 2),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'Coarser resolution',
|
|
138
|
+
onClick: () => self.setResolution(self.resolution / 2),
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-hic",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "JBrowse 2 hic adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "511048cb6965f0bf624c96de244e7fd47fce17d6"
|
|
60
60
|
}
|