@jbrowse/plugin-arc 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ArcRenderer/ArcRendering.d.ts +3 -4
- package/dist/ArcRenderer/ArcRendering.js +37 -37
- package/dist/ArcRenderer/configSchema.d.ts +0 -18
- package/dist/ArcRenderer/configSchema.js +1 -22
- package/dist/ArcRenderer/index.d.ts +1 -1
- package/dist/ArcRenderer/index.js +1 -1
- package/dist/ArcTooltip.d.ts +1 -2
- package/dist/ArcTooltip.js +6 -30
- package/dist/LinearArcDisplay/configSchema.d.ts +1 -7
- package/dist/LinearArcDisplay/configSchema.js +1 -10
- package/dist/LinearArcDisplay/index.d.ts +1 -1
- package/dist/LinearArcDisplay/model.d.ts +18 -87
- package/dist/LinearArcDisplay/model.js +2 -40
- package/dist/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/dist/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/Arcs.js +46 -40
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.js +33 -32
- package/dist/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/dist/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/components/util.js +1 -7
- package/dist/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/configSchema.js +0 -9
- package/dist/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/dist/LinearPairedArcDisplay/index.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/index.js +18 -8
- package/dist/LinearPairedArcDisplay/model.d.ts +9 -53
- package/dist/LinearPairedArcDisplay/model.js +19 -48
- package/dist/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/dist/LinearPairedArcDisplay/util.d.ts +4 -4
- package/dist/LinearPairedArcDisplay/util.js +3 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/esm/ArcRenderer/ArcRendering.d.ts +3 -4
- package/esm/ArcRenderer/ArcRendering.js +21 -31
- package/esm/ArcRenderer/configSchema.d.ts +0 -18
- package/esm/ArcRenderer/configSchema.js +1 -22
- package/esm/ArcRenderer/index.d.ts +1 -1
- package/esm/ArcRenderer/index.js +1 -1
- package/esm/ArcTooltip.d.ts +1 -2
- package/esm/ArcTooltip.js +6 -7
- package/esm/LinearArcDisplay/configSchema.d.ts +1 -7
- package/esm/LinearArcDisplay/configSchema.js +1 -10
- package/esm/LinearArcDisplay/index.d.ts +1 -1
- package/esm/LinearArcDisplay/model.d.ts +18 -87
- package/esm/LinearArcDisplay/model.js +3 -41
- package/esm/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/esm/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/Arcs.js +29 -33
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.js +16 -25
- package/esm/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/esm/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/util.js +1 -7
- package/esm/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/esm/LinearPairedArcDisplay/configSchema.js +0 -9
- package/esm/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/esm/LinearPairedArcDisplay/index.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/index.js +1 -1
- package/esm/LinearPairedArcDisplay/model.d.ts +9 -53
- package/esm/LinearPairedArcDisplay/model.js +3 -42
- package/esm/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/esm/LinearPairedArcDisplay/util.d.ts +4 -4
- package/esm/LinearPairedArcDisplay/util.js +3 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel LinearArcDisplay
|
|
4
|
-
* extends
|
|
5
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
6
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
7
2
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
8
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
4
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -16,21 +11,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
16
11
|
} & {
|
|
17
12
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
18
13
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
19
|
-
region: import("mobx-state-tree").
|
|
20
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
21
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
22
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
23
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
24
|
-
} & {
|
|
25
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
26
|
-
}, {
|
|
27
|
-
setRefName(newRefName: string): void;
|
|
28
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
29
15
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
30
16
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
31
17
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
18
|
}, {
|
|
33
|
-
|
|
19
|
+
stopToken: string | undefined;
|
|
34
20
|
filled: boolean;
|
|
35
21
|
reactElement: React.ReactElement | undefined;
|
|
36
22
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -48,21 +34,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
48
34
|
status?: string;
|
|
49
35
|
reactElement?: React.ReactElement;
|
|
50
36
|
};
|
|
51
|
-
}) => import("react").JSX.Element | undefined;
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
52
38
|
renderProps: any;
|
|
53
39
|
} & {
|
|
54
40
|
doReload(): void;
|
|
55
41
|
afterAttach(): void;
|
|
56
42
|
setStatus(message: string): void;
|
|
57
|
-
setLoading(
|
|
43
|
+
setLoading(newStopToken: string): void;
|
|
58
44
|
setMessage(messageText: string): void;
|
|
59
|
-
setRendered(props:
|
|
60
|
-
reactElement: React.ReactElement;
|
|
61
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
62
|
-
layout: any;
|
|
63
|
-
maxHeightReached: boolean;
|
|
64
|
-
renderProps: any;
|
|
65
|
-
} | undefined): void;
|
|
45
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
66
46
|
setError(error: unknown): void;
|
|
67
47
|
reload(): void;
|
|
68
48
|
beforeDestroy(): void;
|
|
@@ -96,17 +76,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
96
76
|
};
|
|
97
77
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
98
78
|
} & {
|
|
99
|
-
/**
|
|
100
|
-
* #property
|
|
101
|
-
*/
|
|
102
79
|
type: import("mobx-state-tree").ISimpleType<"LinearArcDisplay">;
|
|
103
|
-
/**
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
106
80
|
configuration: AnyConfigurationSchemaType;
|
|
107
|
-
/**
|
|
108
|
-
* #property
|
|
109
|
-
*/
|
|
110
81
|
displayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
111
82
|
}, {
|
|
112
83
|
rendererTypeName: string;
|
|
@@ -118,9 +89,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
118
89
|
id: string;
|
|
119
90
|
type: string;
|
|
120
91
|
rpcDriverName: string | undefined;
|
|
121
|
-
} & import("mobx-state-tree/dist/internal"
|
|
122
|
-
* #getter
|
|
123
|
-
*/).NonEmptyObject & {
|
|
92
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
93
|
rendererTypeName: string;
|
|
125
94
|
error: unknown;
|
|
126
95
|
message: string | undefined;
|
|
@@ -199,14 +168,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
199
168
|
readonly regionTooLarge: boolean;
|
|
200
169
|
readonly regionTooLargeReason: string;
|
|
201
170
|
} & {
|
|
171
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
202
172
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
203
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
173
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
204
174
|
} & {
|
|
205
175
|
featureIdUnderMouse: undefined | string;
|
|
206
176
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
207
177
|
} & {
|
|
208
|
-
readonly DisplayMessageComponent:
|
|
209
|
-
readonly blockType: "
|
|
178
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
179
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
210
180
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
211
181
|
} & {
|
|
212
182
|
readonly renderDelay: number;
|
|
@@ -233,30 +203,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
233
203
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
234
204
|
renderProps(): any;
|
|
235
205
|
} & {
|
|
236
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
206
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
237
207
|
afterAttach(): void;
|
|
238
208
|
} & {
|
|
239
|
-
/**
|
|
240
|
-
* #getter
|
|
241
|
-
*/
|
|
242
209
|
readonly blockType: string;
|
|
243
|
-
/**
|
|
244
|
-
* #getter
|
|
245
|
-
*/
|
|
246
210
|
readonly renderDelay: number;
|
|
247
|
-
/**
|
|
248
|
-
* #getter
|
|
249
|
-
*/
|
|
250
211
|
readonly rendererTypeName: any;
|
|
251
212
|
} & {
|
|
252
|
-
/**
|
|
253
|
-
* #getter
|
|
254
|
-
*/
|
|
255
213
|
readonly displayModeSetting: any;
|
|
256
214
|
} & {
|
|
257
|
-
/**
|
|
258
|
-
* #getter
|
|
259
|
-
*/
|
|
260
215
|
readonly rendererConfig: {
|
|
261
216
|
[x: string]: any;
|
|
262
217
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -269,19 +224,10 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
269
224
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
270
225
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
271
226
|
} & {
|
|
272
|
-
/**
|
|
273
|
-
* #method
|
|
274
|
-
*/
|
|
275
227
|
renderProps(): any;
|
|
276
228
|
} & {
|
|
277
|
-
/**
|
|
278
|
-
* #action
|
|
279
|
-
*/
|
|
280
229
|
setDisplayMode(flag: string): void;
|
|
281
230
|
} & {
|
|
282
|
-
/**
|
|
283
|
-
* #method
|
|
284
|
-
*/
|
|
285
231
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
286
232
|
label: string;
|
|
287
233
|
subMenu: {
|
|
@@ -305,21 +251,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
305
251
|
} & {
|
|
306
252
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
307
253
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
308
|
-
region: import("mobx-state-tree").
|
|
309
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
310
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
311
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
312
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
313
|
-
} & {
|
|
314
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
315
|
-
}, {
|
|
316
|
-
setRefName(newRefName: string): void;
|
|
317
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
254
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
318
255
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
319
256
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
320
257
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
321
258
|
}, {
|
|
322
|
-
|
|
259
|
+
stopToken: string | undefined;
|
|
323
260
|
filled: boolean;
|
|
324
261
|
reactElement: React.ReactElement | undefined;
|
|
325
262
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -337,21 +274,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
337
274
|
status?: string;
|
|
338
275
|
reactElement?: React.ReactElement;
|
|
339
276
|
};
|
|
340
|
-
}) => import("react").JSX.Element | undefined;
|
|
277
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
341
278
|
renderProps: any;
|
|
342
279
|
} & {
|
|
343
280
|
doReload(): void;
|
|
344
281
|
afterAttach(): void;
|
|
345
282
|
setStatus(message: string): void;
|
|
346
|
-
setLoading(
|
|
283
|
+
setLoading(newStopToken: string): void;
|
|
347
284
|
setMessage(messageText: string): void;
|
|
348
|
-
setRendered(props:
|
|
349
|
-
reactElement: React.ReactElement;
|
|
350
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
351
|
-
layout: any;
|
|
352
|
-
maxHeightReached: boolean;
|
|
353
|
-
renderProps: any;
|
|
354
|
-
} | undefined): void;
|
|
285
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
355
286
|
setError(error: unknown): void;
|
|
356
287
|
reload(): void;
|
|
357
288
|
beforeDestroy(): void;
|
|
@@ -388,8 +319,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
388
319
|
type: string;
|
|
389
320
|
id: string;
|
|
390
321
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
391
|
-
heightPreConfig: number | undefined;
|
|
392
322
|
rpcDriverName: string | undefined;
|
|
323
|
+
heightPreConfig: number | undefined;
|
|
393
324
|
userBpPerPxLimit: number | undefined;
|
|
394
325
|
userByteSizeLimit: number | undefined;
|
|
395
326
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,61 +1,32 @@
|
|
|
1
|
-
import { ConfigurationReference, getConf
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
3
|
-
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
1
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
4
2
|
import { getEnv } from '@jbrowse/core/util';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* extends
|
|
8
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
9
|
-
*/
|
|
3
|
+
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
+
import { types } from 'mobx-state-tree';
|
|
10
5
|
export function stateModelFactory(configSchema) {
|
|
11
6
|
return types
|
|
12
7
|
.compose('LinearArcDisplay', BaseLinearDisplay, types.model({
|
|
13
|
-
/**
|
|
14
|
-
* #property
|
|
15
|
-
*/
|
|
16
8
|
type: types.literal('LinearArcDisplay'),
|
|
17
|
-
/**
|
|
18
|
-
* #property
|
|
19
|
-
*/
|
|
20
9
|
configuration: ConfigurationReference(configSchema),
|
|
21
|
-
/**
|
|
22
|
-
* #property
|
|
23
|
-
*/
|
|
24
10
|
displayMode: types.maybe(types.string),
|
|
25
11
|
}))
|
|
26
12
|
.views(self => ({
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
*/
|
|
30
13
|
get blockType() {
|
|
31
14
|
return 'staticBlocks';
|
|
32
15
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
16
|
get renderDelay() {
|
|
37
17
|
return 500;
|
|
38
18
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #getter
|
|
41
|
-
*/
|
|
42
19
|
get rendererTypeName() {
|
|
43
20
|
return self.configuration.renderer.type;
|
|
44
21
|
},
|
|
45
22
|
}))
|
|
46
23
|
.views(self => ({
|
|
47
|
-
/**
|
|
48
|
-
* #getter
|
|
49
|
-
*/
|
|
50
24
|
get displayModeSetting() {
|
|
51
25
|
var _a;
|
|
52
26
|
return (_a = self.displayMode) !== null && _a !== void 0 ? _a : getConf(self, ['renderer', 'displayMode']);
|
|
53
27
|
},
|
|
54
28
|
}))
|
|
55
29
|
.views(self => ({
|
|
56
|
-
/**
|
|
57
|
-
* #getter
|
|
58
|
-
*/
|
|
59
30
|
get rendererConfig() {
|
|
60
31
|
const configBlob = getConf(self, ['renderer']) || {};
|
|
61
32
|
const config = configBlob;
|
|
@@ -68,9 +39,6 @@ export function stateModelFactory(configSchema) {
|
|
|
68
39
|
.views(self => {
|
|
69
40
|
const { renderProps: superRenderProps } = self;
|
|
70
41
|
return {
|
|
71
|
-
/**
|
|
72
|
-
* #method
|
|
73
|
-
*/
|
|
74
42
|
renderProps() {
|
|
75
43
|
return {
|
|
76
44
|
...superRenderProps(),
|
|
@@ -82,9 +50,6 @@ export function stateModelFactory(configSchema) {
|
|
|
82
50
|
};
|
|
83
51
|
})
|
|
84
52
|
.actions(self => ({
|
|
85
|
-
/**
|
|
86
|
-
* #action
|
|
87
|
-
*/
|
|
88
53
|
setDisplayMode(flag) {
|
|
89
54
|
self.displayMode = flag;
|
|
90
55
|
},
|
|
@@ -92,9 +57,6 @@ export function stateModelFactory(configSchema) {
|
|
|
92
57
|
.views(self => {
|
|
93
58
|
const superMenuItems = self.trackMenuItems;
|
|
94
59
|
return {
|
|
95
|
-
/**
|
|
96
|
-
* #method
|
|
97
|
-
*/
|
|
98
60
|
trackMenuItems() {
|
|
99
61
|
return [
|
|
100
62
|
...superMenuItems(),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
1
|
+
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
2
|
export declare function doAfterAttach<T extends IAnyStateTreeNode>(self: T): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const Arcs: ({ model, exportSVG, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
exportSVG?: boolean;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default Arcs;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { getContainingView, getSession, getStrokeProps, } from '@jbrowse/core/util';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy, useRef, useState } from 'react';
|
|
4
3
|
import { getConf } from '@jbrowse/core/configuration';
|
|
4
|
+
import { getContainingView, getSession, getStrokeProps, } from '@jbrowse/core/util';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
5
6
|
import { makeFeaturePair, makeSummary } from './util';
|
|
6
7
|
const ArcTooltip = lazy(() => import('../../ArcTooltip'));
|
|
7
8
|
const Arc = observer(function ({ model, feature, alt, assembly, view, }) {
|
|
@@ -27,30 +28,25 @@ const Arc = observer(function ({ model, feature, alt, assembly, view, }) {
|
|
|
27
28
|
const right = p2;
|
|
28
29
|
const col = mouseOvered ? 'black' : c;
|
|
29
30
|
const sw = 3;
|
|
30
|
-
return absrad > 1 ? (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, onClick: () => {
|
|
50
|
-
model.selectFeature(feature);
|
|
51
|
-
}, x1: right, x2: right + k2.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null,
|
|
52
|
-
mouseOvered ? (React.createElement(Suspense, { fallback: null },
|
|
53
|
-
React.createElement(ArcTooltip, { contents: makeSummary(feature, alt) }))) : null)) : null;
|
|
31
|
+
return absrad > 1 ? (_jsxs(_Fragment, { children: [_jsx("path", { d: `M ${left} 0 C ${left} ${destY}, ${right} ${destY}, ${right} 0`, ref: ref, ...getStrokeProps(col), strokeWidth: sw, onMouseOut: () => {
|
|
32
|
+
setMouseOvered(false);
|
|
33
|
+
}, onMouseOver: () => {
|
|
34
|
+
setMouseOvered(true);
|
|
35
|
+
}, onClick: () => {
|
|
36
|
+
model.selectFeature(feature);
|
|
37
|
+
}, fill: "none", pointerEvents: "stroke" }), k1.mateDirection ? (_jsx("line", { ...getStrokeProps(col), strokeWidth: sw, onMouseOut: () => {
|
|
38
|
+
setMouseOvered(false);
|
|
39
|
+
}, onMouseOver: () => {
|
|
40
|
+
setMouseOvered(true);
|
|
41
|
+
}, onClick: () => {
|
|
42
|
+
model.selectFeature(feature);
|
|
43
|
+
}, x1: left, x2: left + k1.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null, k2.mateDirection ? (_jsx("line", { ...getStrokeProps(col), strokeWidth: sw, onMouseOut: () => {
|
|
44
|
+
setMouseOvered(false);
|
|
45
|
+
}, onMouseOver: () => {
|
|
46
|
+
setMouseOvered(true);
|
|
47
|
+
}, onClick: () => {
|
|
48
|
+
model.selectFeature(feature);
|
|
49
|
+
}, x1: right, x2: right + k2.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null, mouseOvered ? (_jsx(Suspense, { fallback: null, children: _jsx(ArcTooltip, { contents: makeSummary(feature, alt) }) })) : null] })) : null;
|
|
54
50
|
}
|
|
55
51
|
return null;
|
|
56
52
|
});
|
|
@@ -58,7 +54,7 @@ const Wrapper = observer(function ({ model, exportSVG, children, }) {
|
|
|
58
54
|
const { height } = model;
|
|
59
55
|
const view = getContainingView(model);
|
|
60
56
|
const width = Math.round(view.dynamicBlocks.totalWidthPx);
|
|
61
|
-
return exportSVG ? (children) : (
|
|
57
|
+
return exportSVG ? (children) : (_jsx("svg", { width: width, height: height, children: children }));
|
|
62
58
|
});
|
|
63
59
|
const Arcs = observer(function ({ model, exportSVG, }) {
|
|
64
60
|
const view = getContainingView(model);
|
|
@@ -66,10 +62,10 @@ const Arcs = observer(function ({ model, exportSVG, }) {
|
|
|
66
62
|
const { assemblyManager } = session;
|
|
67
63
|
const { features } = model;
|
|
68
64
|
const assembly = assemblyManager.get(view.assemblyNames[0]);
|
|
69
|
-
return assembly ? (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
return assembly ? (_jsx(Wrapper, { model: model, exportSVG: exportSVG, children: features === null || features === void 0 ? void 0 : features.map(f => {
|
|
66
|
+
var _a;
|
|
67
|
+
const alts = f.get('ALT');
|
|
68
|
+
return ((_a = alts === null || alts === void 0 ? void 0 : alts.map(a => (_jsx(Arc, { session: session, feature: f, alt: a, view: view, model: model, assembly: assembly }, `${f.id()}-${a}`)))) !== null && _a !== void 0 ? _a : (_jsx(Arc, { session: session, feature: f, view: view, model: model, assembly: assembly }, f.id())));
|
|
69
|
+
}) })) : null;
|
|
74
70
|
});
|
|
75
71
|
export default Arcs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const BaseDisplayComponent: ({ model, children, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
children?: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default BaseDisplayComponent;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
3
3
|
import { LoadingEllipses } from '@jbrowse/core/ui';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
5
|
import { BlockMsg } from '@jbrowse/plugin-linear-genome-view';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
7
|
-
// icons
|
|
8
6
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
9
7
|
import ReportIcon from '@mui/icons-material/Report';
|
|
10
|
-
import {
|
|
8
|
+
import { IconButton, Tooltip } from '@mui/material';
|
|
9
|
+
import { observer } from 'mobx-react';
|
|
10
|
+
import { makeStyles } from 'tss-react/mui';
|
|
11
11
|
const ErrorMessageStackTraceDialog = lazy(() => import('@jbrowse/core/ui/ErrorMessageStackTraceDialog'));
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
loading: {
|
|
@@ -24,31 +24,22 @@ const useStyles = makeStyles()(theme => ({
|
|
|
24
24
|
}));
|
|
25
25
|
const BaseDisplayComponent = observer(function ({ model, children, }) {
|
|
26
26
|
const { error, regionTooLarge } = model;
|
|
27
|
-
return error ? (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
getSession(model).queueDialog(onClose => [
|
|
36
|
-
ErrorMessageStackTraceDialog,
|
|
37
|
-
{ onClose, error: model.error },
|
|
38
|
-
]);
|
|
39
|
-
} },
|
|
40
|
-
React.createElement(ReportIcon, null)))) })) : regionTooLarge ? (model.regionCannotBeRendered()) : (React.createElement(DataDisplay, { model: model }, children));
|
|
27
|
+
return error ? (_jsx(BlockMsg, { message: `${error}`, severity: "error", action: _jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
28
|
+
model.reload();
|
|
29
|
+
}, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
|
|
30
|
+
getSession(model).queueDialog(onClose => [
|
|
31
|
+
ErrorMessageStackTraceDialog,
|
|
32
|
+
{ onClose, error: model.error },
|
|
33
|
+
]);
|
|
34
|
+
}, children: _jsx(ReportIcon, {}) }) })] }) })) : regionTooLarge ? (model.regionCannotBeRendered()) : (_jsx(DataDisplay, { model: model, children: children }));
|
|
41
35
|
});
|
|
42
36
|
const DataDisplay = observer(function ({ model, children, }) {
|
|
43
37
|
const { loading } = model;
|
|
44
|
-
return (
|
|
45
|
-
children,
|
|
46
|
-
loading ? React.createElement(LoadingBar, { model: model }) : null));
|
|
38
|
+
return (_jsxs("div", { children: [children, loading ? _jsx(LoadingBar, { model: model }) : null] }));
|
|
47
39
|
});
|
|
48
40
|
const LoadingBar = observer(function ({ model, }) {
|
|
49
41
|
const { classes } = useStyles();
|
|
50
42
|
const { message } = model;
|
|
51
|
-
return (
|
|
52
|
-
React.createElement(LoadingEllipses, { message: message })));
|
|
43
|
+
return (_jsx("div", { className: classes.loading, children: _jsx(LoadingEllipses, { message: message }) }));
|
|
53
44
|
});
|
|
54
45
|
export default BaseDisplayComponent;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const LinearArcReactComponent: ({ model, exportSVG, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
exportSVG?: boolean;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default LinearArcReactComponent;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import BaseDisplayComponent from './BaseDisplayComponent';
|
|
4
3
|
import Arcs from './Arcs';
|
|
4
|
+
import BaseDisplayComponent from './BaseDisplayComponent';
|
|
5
5
|
const LinearArcReactComponent = observer(function ({ model, exportSVG, }) {
|
|
6
|
-
return (
|
|
7
|
-
React.createElement(Arcs, { model: model, exportSVG: exportSVG })));
|
|
6
|
+
return (_jsx(BaseDisplayComponent, { model: model, children: _jsx(Arcs, { model: model, exportSVG: exportSVG }) }));
|
|
8
7
|
});
|
|
9
8
|
export default LinearArcReactComponent;
|
|
@@ -13,19 +13,13 @@ export function makeFeaturePair(feature, alt) {
|
|
|
13
13
|
let mateStart = 0;
|
|
14
14
|
let joinDirection = 0;
|
|
15
15
|
let mateDirection = 0;
|
|
16
|
-
// one sided bracket used, because there could be <INS:ME> and we just check
|
|
17
|
-
// startswith below
|
|
18
16
|
const symbolicAlleles = ['<TRA', '<DEL', '<INV', '<INS', '<DUP', '<CNV'];
|
|
19
17
|
if (symbolicAlleles.some(a => alt === null || alt === void 0 ? void 0 : alt.startsWith(a))) {
|
|
20
|
-
// END is defined to be a single value, not an array. CHR2 not defined in
|
|
21
|
-
// VCF spec, but should be similar
|
|
22
18
|
const info = feature.get('INFO');
|
|
23
19
|
const e = (_b = (_a = info === null || info === void 0 ? void 0 : info.END) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : end;
|
|
24
20
|
mateRefName = (_d = (_c = info === null || info === void 0 ? void 0 : info.CHR2) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : refName;
|
|
25
21
|
mateEnd = e;
|
|
26
22
|
mateStart = e - 1;
|
|
27
|
-
// re-adjust the arc to be from start to end of feature by re-assigning end
|
|
28
|
-
// to the 'mate'
|
|
29
23
|
end = start + 1;
|
|
30
24
|
}
|
|
31
25
|
else if (bnd === null || bnd === void 0 ? void 0 : bnd.MatePosition) {
|
|
@@ -64,5 +58,5 @@ export function makeSummary(feature, alt) {
|
|
|
64
58
|
alt,
|
|
65
59
|
]
|
|
66
60
|
.filter(f => !!f)
|
|
67
|
-
.join('
|
|
61
|
+
.join('<br/>');
|
|
68
62
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
/**
|
|
4
|
-
* #config LinearPairedArcDisplay
|
|
5
|
-
*/
|
|
6
3
|
export function configSchemaFactory() {
|
|
7
4
|
return ConfigurationSchema('LinearPairedArcDisplay', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
5
|
color: {
|
|
12
6
|
type: 'color',
|
|
13
7
|
description: 'the color of the arcs',
|
|
@@ -15,9 +9,6 @@ export function configSchemaFactory() {
|
|
|
15
9
|
contextVariable: ['feature', 'alt'],
|
|
16
10
|
},
|
|
17
11
|
}, {
|
|
18
|
-
/**
|
|
19
|
-
* #baseConfiguration
|
|
20
|
-
*/
|
|
21
12
|
baseConfiguration: baseLinearDisplayConfigSchema,
|
|
22
13
|
explicitlyTyped: true,
|
|
23
14
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { dedupe, getContainingTrack, getContainingView, getSession, } from '@jbrowse/core/util';
|
|
2
2
|
export async function fetchChains(self) {
|
|
3
|
-
// @ts-expect-error
|
|
4
3
|
const { rpcSessionId: sessionId } = getContainingTrack(self);
|
|
5
4
|
const { rpcManager } = getSession(self);
|
|
6
5
|
const view = getContainingView(self);
|
|
7
|
-
if (!view.initialized || self.error || self.
|
|
6
|
+
if (!view.initialized || self.error || !self.statsReadyAndRegionNotTooLarge) {
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
10
9
|
self.setLoading(true);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearPairedArcDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
3
|
import { configSchemaFactory } from './configSchema';
|
|
3
4
|
import { stateModelFactory } from './model';
|
|
4
|
-
import { lazy } from 'react';
|
|
5
5
|
export default function LinearPairedArcDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaFactory();
|