@jbrowse/plugin-linear-comparative-view 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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -60
- package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/dist/LGVSyntenyDisplay/components/util.js +6 -13
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/dist/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/dist/LGVSyntenyDisplay/index.d.ts +1 -1
- package/dist/LGVSyntenyDisplay/index.js +1 -1
- package/dist/LGVSyntenyDisplay/model.d.ts +122 -69
- package/dist/LGVSyntenyDisplay/model.js +20 -37
- package/dist/LaunchLinearSyntenyView.d.ts +1 -1
- package/dist/LaunchLinearSyntenyView.js +1 -3
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/dist/LinearComparativeDisplay/index.d.ts +1 -1
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/dist/LinearComparativeDisplay/stateModelFactory.js +13 -57
- package/dist/LinearComparativeView/components/Header.d.ts +2 -3
- package/dist/LinearComparativeView/components/Header.js +56 -86
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +5 -15
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -32
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/dist/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/dist/LinearComparativeView/components/Rubberband.js +36 -69
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/dist/LinearComparativeView/components/VerticalGuide.js +5 -9
- package/dist/LinearComparativeView/index.d.ts +1 -1
- package/dist/LinearComparativeView/index.js +17 -7
- package/dist/LinearComparativeView/model.d.ts +38 -90
- package/dist/LinearComparativeView/model.js +40 -107
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/dist/LinearReadVsRef/LinearReadVsRef.js +10 -55
- package/dist/LinearReadVsRef/index.d.ts +1 -1
- package/dist/LinearReadVsRef/index.js +17 -9
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/Component.js +11 -36
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +95 -106
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -6
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/dist/LinearSyntenyDisplay/components/util.js +0 -9
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/index.js +18 -9
- package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
- package/dist/LinearSyntenyDisplay/model.js +18 -99
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +35 -76
- package/dist/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/dist/LinearSyntenyView/components/Icons.js +3 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +130 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +39 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +22 -0
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -150
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +43 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +68 -0
- package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -10
- package/dist/LinearSyntenyView/index.d.ts +1 -1
- package/dist/LinearSyntenyView/index.js +17 -7
- package/dist/LinearSyntenyView/model.d.ts +54 -58
- package/dist/LinearSyntenyView/model.js +61 -56
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -6
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +7 -24
- package/dist/LinearSyntenyView/types.d.ts +12 -0
- package/dist/LinearSyntenyView/types.js +2 -0
- package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/dist/LinearSyntenyViewHelper/index.js +2 -2
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +87 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +5 -90
- package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
- package/dist/SyntenyFeatureDetail/index.js +18 -14
- package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
- package/dist/SyntenyFeatureDetail/types.js +2 -0
- package/dist/SyntenyTrack/configSchema.d.ts +1 -1
- package/dist/SyntenyTrack/configSchema.js +1 -9
- package/dist/SyntenyTrack/index.d.ts +1 -1
- package/dist/SyntenyTrack/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/util.d.ts +2 -2
- package/dist/util.js +1 -11
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -36
- package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/esm/LGVSyntenyDisplay/components/util.js +6 -13
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
- package/esm/LGVSyntenyDisplay/index.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +122 -69
- package/esm/LGVSyntenyDisplay/model.js +4 -31
- package/esm/LaunchLinearSyntenyView.d.ts +1 -1
- package/esm/LaunchLinearSyntenyView.js +1 -3
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/esm/LinearComparativeDisplay/index.d.ts +1 -1
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
- package/esm/LinearComparativeView/components/Header.d.ts +2 -3
- package/esm/LinearComparativeView/components/Header.js +56 -63
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +5 -12
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -29
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/esm/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearComparativeView/components/Rubberband.js +36 -46
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearComparativeView/components/VerticalGuide.js +5 -6
- package/esm/LinearComparativeView/index.d.ts +1 -1
- package/esm/LinearComparativeView/model.d.ts +38 -90
- package/esm/LinearComparativeView/model.js +24 -101
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/esm/LinearReadVsRef/LinearReadVsRef.js +10 -32
- package/esm/LinearReadVsRef/index.d.ts +1 -1
- package/esm/LinearReadVsRef/index.js +1 -3
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/Component.js +11 -13
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +79 -100
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -3
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/esm/LinearSyntenyDisplay/components/util.js +2 -11
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/index.js +1 -2
- package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
- package/esm/LinearSyntenyDisplay/model.js +1 -92
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +35 -53
- package/esm/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/esm/LinearSyntenyView/components/Icons.js +3 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +125 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +37 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +16 -0
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -127
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +40 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.js +65 -0
- package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -3
- package/esm/LinearSyntenyView/index.d.ts +1 -1
- package/esm/LinearSyntenyView/model.d.ts +54 -58
- package/esm/LinearSyntenyView/model.js +44 -49
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +4 -9
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +8 -25
- package/esm/LinearSyntenyView/types.d.ts +12 -0
- package/esm/LinearSyntenyView/types.js +1 -0
- package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/esm/LinearSyntenyViewHelper/index.js +2 -2
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +52 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +6 -68
- package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/index.js +1 -7
- package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
- package/esm/SyntenyFeatureDetail/types.js +1 -0
- package/esm/SyntenyTrack/configSchema.d.ts +1 -1
- package/esm/SyntenyTrack/configSchema.js +1 -9
- package/esm/SyntenyTrack/index.d.ts +1 -1
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +4 -4
- package/esm/util.d.ts +2 -2
- package/esm/util.js +1 -11
- package/package.json +2 -4
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -194
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -59
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -52
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -169
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.js +0 -4
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -34
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { Instance } from 'mobx-state-tree';
|
|
4
4
|
interface Pos {
|
|
5
5
|
offsetPx: number;
|
|
6
6
|
}
|
|
@@ -12,11 +12,6 @@ export interface FeatPos {
|
|
|
12
12
|
f: Feature;
|
|
13
13
|
cigar: string[];
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* #stateModel LinearSyntenyDisplay
|
|
17
|
-
* extends
|
|
18
|
-
* - [LinearComparativeDisplay](../linearcomparativedisplay)
|
|
19
|
-
*/
|
|
20
15
|
declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
21
16
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
22
17
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -25,13 +20,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
25
20
|
type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
|
|
26
21
|
configuration: AnyConfigurationSchemaType;
|
|
27
22
|
} & {
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
23
|
type: import("mobx-state-tree").ISimpleType<"LinearSyntenyDisplay">;
|
|
32
|
-
/**
|
|
33
|
-
* #property
|
|
34
|
-
*/
|
|
35
24
|
configuration: AnyConfigurationSchemaType;
|
|
36
25
|
}, {
|
|
37
26
|
rendererTypeName: string;
|
|
@@ -92,7 +81,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
92
81
|
setRpcDriverName(rpcDriverName: string): void;
|
|
93
82
|
reload(): void;
|
|
94
83
|
} & {
|
|
95
|
-
renderInProgress:
|
|
84
|
+
renderInProgress: string | undefined;
|
|
96
85
|
features: Feature[] | undefined;
|
|
97
86
|
message: string | undefined;
|
|
98
87
|
} & {
|
|
@@ -113,12 +102,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
113
102
|
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
114
103
|
[x: string]: any;
|
|
115
104
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
116
|
-
} & import("mobx-state-tree"
|
|
117
|
-
* #volatile
|
|
118
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
119
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
120
|
-
* mouseover shading
|
|
121
|
-
*/).IStateTreeNode<AnyConfigurationSchemaType>);
|
|
105
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
122
106
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
123
107
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
108
|
rendererTypeName: string;
|
|
@@ -179,7 +163,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
179
163
|
setRpcDriverName(rpcDriverName: string): void;
|
|
180
164
|
reload(): void;
|
|
181
165
|
} & {
|
|
182
|
-
renderInProgress:
|
|
166
|
+
renderInProgress: string | undefined;
|
|
183
167
|
features: Feature[] | undefined;
|
|
184
168
|
message: string | undefined;
|
|
185
169
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -248,14 +232,14 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
248
232
|
setRpcDriverName(rpcDriverName: string): void;
|
|
249
233
|
reload(): void;
|
|
250
234
|
} & {
|
|
251
|
-
renderInProgress:
|
|
235
|
+
renderInProgress: string | undefined;
|
|
252
236
|
features: Feature[] | undefined;
|
|
253
237
|
message: string | undefined;
|
|
254
238
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
255
239
|
highResolutionScaling: number;
|
|
256
240
|
};
|
|
257
241
|
} & {
|
|
258
|
-
setLoading(
|
|
242
|
+
setLoading(newStopToken: string): void;
|
|
259
243
|
setMessage(messageText: string): void;
|
|
260
244
|
setRendered(args?: {
|
|
261
245
|
features: Feature[];
|
|
@@ -264,106 +248,28 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
264
248
|
} & {
|
|
265
249
|
afterAttach(): void;
|
|
266
250
|
} & {
|
|
267
|
-
/**
|
|
268
|
-
* #volatile
|
|
269
|
-
* canvas used for drawing visible screen
|
|
270
|
-
*/
|
|
271
251
|
mainCanvas: HTMLCanvasElement | null;
|
|
272
|
-
/**
|
|
273
|
-
* #volatile
|
|
274
|
-
* canvas used for drawing click map with feature ids this renders a
|
|
275
|
-
* unique color per alignment, so that it can be re-traced after a
|
|
276
|
-
* feature click with getImageData at that pixel
|
|
277
|
-
*/
|
|
278
252
|
clickMapCanvas: HTMLCanvasElement | null;
|
|
279
|
-
/**
|
|
280
|
-
* #volatile
|
|
281
|
-
* canvas used for drawing click map with cigar data this can show if you
|
|
282
|
-
* are mousing over a insertion/deletion. it is similar in purpose to the
|
|
283
|
-
* clickMapRef but was not feasible to pack this into the clickMapRef
|
|
284
|
-
*/
|
|
285
253
|
cigarClickMapCanvas: HTMLCanvasElement | null;
|
|
286
|
-
/**
|
|
287
|
-
* #volatile
|
|
288
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
289
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
290
|
-
* mouseover shading
|
|
291
|
-
*/
|
|
292
254
|
mouseoverCanvas: HTMLCanvasElement | null;
|
|
293
|
-
/**
|
|
294
|
-
* #volatile
|
|
295
|
-
* assigned by reaction
|
|
296
|
-
*/
|
|
297
255
|
featPositions: FeatPos[];
|
|
298
|
-
/**
|
|
299
|
-
* #volatile
|
|
300
|
-
* currently mouse'd over feature
|
|
301
|
-
*/
|
|
302
256
|
mouseoverId: string | undefined;
|
|
303
|
-
/**
|
|
304
|
-
* #volatile
|
|
305
|
-
* currently click'd over feature
|
|
306
|
-
*/
|
|
307
257
|
clickId: string | undefined;
|
|
308
|
-
/**
|
|
309
|
-
* #volatile
|
|
310
|
-
* currently mouseover'd CIGAR subfeature
|
|
311
|
-
*/
|
|
312
258
|
cigarMouseoverId: number;
|
|
313
259
|
} & {
|
|
314
|
-
/**
|
|
315
|
-
* #action
|
|
316
|
-
*/
|
|
317
260
|
setFeatPositions(arg: FeatPos[]): void;
|
|
318
|
-
/**
|
|
319
|
-
* #action
|
|
320
|
-
*/
|
|
321
261
|
setMainCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
322
|
-
/**
|
|
323
|
-
* #action
|
|
324
|
-
*/
|
|
325
262
|
setClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
326
|
-
/**
|
|
327
|
-
* #action
|
|
328
|
-
*/
|
|
329
263
|
setCigarClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
330
|
-
/**
|
|
331
|
-
* #action
|
|
332
|
-
*/
|
|
333
264
|
setMouseoverCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
334
|
-
/**
|
|
335
|
-
* #action
|
|
336
|
-
*/
|
|
337
265
|
setMouseoverId(arg?: string): void;
|
|
338
|
-
/**
|
|
339
|
-
* #action
|
|
340
|
-
*/
|
|
341
266
|
setCigarMouseoverId(arg: number): void;
|
|
342
|
-
/**
|
|
343
|
-
* #action
|
|
344
|
-
*/
|
|
345
267
|
setClickId(arg?: string): void;
|
|
346
268
|
} & {
|
|
347
|
-
/**
|
|
348
|
-
* #getter
|
|
349
|
-
*/
|
|
350
269
|
readonly adapterConfig: any;
|
|
351
|
-
/**
|
|
352
|
-
* #getter
|
|
353
|
-
*/
|
|
354
270
|
readonly trackIds: string[];
|
|
355
|
-
/**
|
|
356
|
-
* #getter
|
|
357
|
-
*/
|
|
358
271
|
readonly numFeats: number;
|
|
359
|
-
/**
|
|
360
|
-
* #getter
|
|
361
|
-
* used for synteny svg rendering
|
|
362
|
-
*/
|
|
363
272
|
readonly ready: boolean;
|
|
364
|
-
/**
|
|
365
|
-
* #getter
|
|
366
|
-
*/
|
|
367
273
|
readonly featMap: {
|
|
368
274
|
[k: string]: FeatPos;
|
|
369
275
|
};
|
|
@@ -1,126 +1,49 @@
|
|
|
1
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
1
2
|
import { types } from 'mobx-state-tree';
|
|
2
|
-
import { getConf, ConfigurationReference, } from '@jbrowse/core/configuration';
|
|
3
|
-
// locals
|
|
4
3
|
import baseModelFactory from '../LinearComparativeDisplay/stateModelFactory';
|
|
5
|
-
/**
|
|
6
|
-
* #stateModel LinearSyntenyDisplay
|
|
7
|
-
* extends
|
|
8
|
-
* - [LinearComparativeDisplay](../linearcomparativedisplay)
|
|
9
|
-
*/
|
|
10
4
|
function stateModelFactory(configSchema) {
|
|
11
5
|
return types
|
|
12
6
|
.compose('LinearSyntenyDisplay', baseModelFactory(configSchema), types.model({
|
|
13
|
-
/**
|
|
14
|
-
* #property
|
|
15
|
-
*/
|
|
16
7
|
type: types.literal('LinearSyntenyDisplay'),
|
|
17
|
-
/**
|
|
18
|
-
* #property
|
|
19
|
-
*/
|
|
20
8
|
configuration: ConfigurationReference(configSchema),
|
|
21
9
|
}))
|
|
22
10
|
.volatile(() => ({
|
|
23
|
-
/**
|
|
24
|
-
* #volatile
|
|
25
|
-
* canvas used for drawing visible screen
|
|
26
|
-
*/
|
|
27
11
|
mainCanvas: null,
|
|
28
|
-
/**
|
|
29
|
-
* #volatile
|
|
30
|
-
* canvas used for drawing click map with feature ids this renders a
|
|
31
|
-
* unique color per alignment, so that it can be re-traced after a
|
|
32
|
-
* feature click with getImageData at that pixel
|
|
33
|
-
*/
|
|
34
12
|
clickMapCanvas: null,
|
|
35
|
-
/**
|
|
36
|
-
* #volatile
|
|
37
|
-
* canvas used for drawing click map with cigar data this can show if you
|
|
38
|
-
* are mousing over a insertion/deletion. it is similar in purpose to the
|
|
39
|
-
* clickMapRef but was not feasible to pack this into the clickMapRef
|
|
40
|
-
*/
|
|
41
13
|
cigarClickMapCanvas: null,
|
|
42
|
-
/**
|
|
43
|
-
* #volatile
|
|
44
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
45
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
46
|
-
* mouseover shading
|
|
47
|
-
*/
|
|
48
14
|
mouseoverCanvas: null,
|
|
49
|
-
/**
|
|
50
|
-
* #volatile
|
|
51
|
-
* assigned by reaction
|
|
52
|
-
*/
|
|
53
15
|
featPositions: [],
|
|
54
|
-
/**
|
|
55
|
-
* #volatile
|
|
56
|
-
* currently mouse'd over feature
|
|
57
|
-
*/
|
|
58
16
|
mouseoverId: undefined,
|
|
59
|
-
/**
|
|
60
|
-
* #volatile
|
|
61
|
-
* currently click'd over feature
|
|
62
|
-
*/
|
|
63
17
|
clickId: undefined,
|
|
64
|
-
/**
|
|
65
|
-
* #volatile
|
|
66
|
-
* currently mouseover'd CIGAR subfeature
|
|
67
|
-
*/
|
|
68
18
|
cigarMouseoverId: -1,
|
|
69
19
|
}))
|
|
70
20
|
.actions(self => ({
|
|
71
|
-
/**
|
|
72
|
-
* #action
|
|
73
|
-
*/
|
|
74
21
|
setFeatPositions(arg) {
|
|
75
22
|
self.featPositions = arg;
|
|
76
23
|
},
|
|
77
|
-
/**
|
|
78
|
-
* #action
|
|
79
|
-
*/
|
|
80
24
|
setMainCanvasRef(ref) {
|
|
81
25
|
self.mainCanvas = ref;
|
|
82
26
|
},
|
|
83
|
-
/**
|
|
84
|
-
* #action
|
|
85
|
-
*/
|
|
86
27
|
setClickMapCanvasRef(ref) {
|
|
87
28
|
self.clickMapCanvas = ref;
|
|
88
29
|
},
|
|
89
|
-
/**
|
|
90
|
-
* #action
|
|
91
|
-
*/
|
|
92
30
|
setCigarClickMapCanvasRef(ref) {
|
|
93
31
|
self.cigarClickMapCanvas = ref;
|
|
94
32
|
},
|
|
95
|
-
/**
|
|
96
|
-
* #action
|
|
97
|
-
*/
|
|
98
33
|
setMouseoverCanvasRef(ref) {
|
|
99
34
|
self.mouseoverCanvas = ref;
|
|
100
35
|
},
|
|
101
|
-
/**
|
|
102
|
-
* #action
|
|
103
|
-
*/
|
|
104
36
|
setMouseoverId(arg) {
|
|
105
37
|
self.mouseoverId = arg;
|
|
106
38
|
},
|
|
107
|
-
/**
|
|
108
|
-
* #action
|
|
109
|
-
*/
|
|
110
39
|
setCigarMouseoverId(arg) {
|
|
111
40
|
self.cigarMouseoverId = arg;
|
|
112
41
|
},
|
|
113
|
-
/**
|
|
114
|
-
* #action
|
|
115
|
-
*/
|
|
116
42
|
setClickId(arg) {
|
|
117
43
|
self.clickId = arg;
|
|
118
44
|
},
|
|
119
45
|
}))
|
|
120
46
|
.views(self => ({
|
|
121
|
-
/**
|
|
122
|
-
* #getter
|
|
123
|
-
*/
|
|
124
47
|
get adapterConfig() {
|
|
125
48
|
return {
|
|
126
49
|
name: self.parentTrack.configuration.adapter.type,
|
|
@@ -128,35 +51,21 @@ function stateModelFactory(configSchema) {
|
|
|
128
51
|
...getConf(self.parentTrack, 'adapter'),
|
|
129
52
|
};
|
|
130
53
|
},
|
|
131
|
-
/**
|
|
132
|
-
* #getter
|
|
133
|
-
*/
|
|
134
54
|
get trackIds() {
|
|
135
55
|
return getConf(self, 'trackIds');
|
|
136
56
|
},
|
|
137
|
-
/**
|
|
138
|
-
* #getter
|
|
139
|
-
*/
|
|
140
57
|
get numFeats() {
|
|
141
58
|
return self.featPositions.length;
|
|
142
59
|
},
|
|
143
|
-
/**
|
|
144
|
-
* #getter
|
|
145
|
-
* used for synteny svg rendering
|
|
146
|
-
*/
|
|
147
60
|
get ready() {
|
|
148
61
|
return this.numFeats > 0;
|
|
149
62
|
},
|
|
150
|
-
/**
|
|
151
|
-
* #getter
|
|
152
|
-
*/
|
|
153
63
|
get featMap() {
|
|
154
64
|
return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
|
|
155
65
|
},
|
|
156
66
|
}))
|
|
157
67
|
.actions(self => ({
|
|
158
68
|
afterAttach() {
|
|
159
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
160
69
|
;
|
|
161
70
|
(async () => {
|
|
162
71
|
try {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ExportSvgOptions } from '../model';
|
|
1
|
+
import type { ExportSvgOptions } from '../model';
|
|
3
2
|
export default function ExportSvgDialog({ model, handleClose, }: {
|
|
4
3
|
model: {
|
|
5
4
|
exportSvg(opts: ExportSvgOptions): Promise<void>;
|
|
6
5
|
};
|
|
7
6
|
handleClose: () => void;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
|
|
4
4
|
import { getSession, useLocalStorage } from '@jbrowse/core/util';
|
|
5
|
+
import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
|
|
5
6
|
function LoadingMessage() {
|
|
6
|
-
return (
|
|
7
|
-
React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
|
|
8
|
-
React.createElement(Typography, { display: "inline" }, "Creating SVG")));
|
|
7
|
+
return (_jsxs("div", { children: [_jsx(CircularProgress, { size: 20, style: { marginRight: 20 } }), _jsx(Typography, { display: "inline", children: "Creating SVG" })] }));
|
|
9
8
|
}
|
|
10
9
|
function useSvgLocal(key, val) {
|
|
11
10
|
return useLocalStorage(`svg-${key}`, val);
|
|
12
11
|
}
|
|
13
12
|
function TextField2({ children, ...rest }) {
|
|
14
|
-
return (
|
|
15
|
-
React.createElement(TextField, { ...rest }, children)));
|
|
13
|
+
return (_jsx("div", { children: _jsx(TextField, { ...rest, children: children }) }));
|
|
16
14
|
}
|
|
17
15
|
export default function ExportSvgDialog({ model, handleClose, }) {
|
|
18
16
|
const session = getSession(model);
|
|
@@ -23,50 +21,34 @@ export default function ExportSvgDialog({ model, handleClose, }) {
|
|
|
23
21
|
const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
|
|
24
22
|
const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
|
|
25
23
|
const [error, setError] = useState();
|
|
26
|
-
return (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
await model.exportSvg({
|
|
57
|
-
rasterizeLayers,
|
|
58
|
-
filename,
|
|
59
|
-
themeName,
|
|
60
|
-
trackLabels,
|
|
61
|
-
});
|
|
62
|
-
handleClose();
|
|
63
|
-
}
|
|
64
|
-
catch (e) {
|
|
65
|
-
console.error(e);
|
|
66
|
-
setError(e);
|
|
67
|
-
}
|
|
68
|
-
finally {
|
|
69
|
-
setLoading(false);
|
|
70
|
-
}
|
|
71
|
-
} }, "Submit"))));
|
|
24
|
+
return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [_jsxs(DialogContent, { children: [error ? (_jsx(ErrorMessage, { error: error })) : loading ? (_jsx(LoadingMessage, {})) : null, _jsx(TextField2, { helperText: "filename", value: filename, onChange: event => {
|
|
25
|
+
setFilename(event.target.value);
|
|
26
|
+
} }), _jsxs(TextField2, { select: true, label: "Track label positioning", variant: "outlined", value: trackLabels, style: { width: 150 }, onChange: event => {
|
|
27
|
+
setTrackLabels(event.target.value);
|
|
28
|
+
}, children: [_jsx(MenuItem, { value: "offset", children: "Offset" }), _jsx(MenuItem, { value: "overlay", children: "Overlay" }), _jsx(MenuItem, { value: "left", children: "Left" }), _jsx(MenuItem, { value: "none", children: "None" })] }), _jsx("br", {}), session.allThemes ? (_jsx(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
|
|
29
|
+
setThemeName(event.target.value);
|
|
30
|
+
}, children: Object.entries(session.allThemes()).map(([key, val]) => (_jsx(MenuItem, { value: key, children: val.name || '(Unknown name)' }, key))) })) : null, offscreenCanvas ? (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
31
|
+
setRasterizeLayers(val => !val);
|
|
32
|
+
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (_jsx(Typography, { children: "Note: rasterizing layers not yet supported in this browser, so SVG size may be large" }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
33
|
+
handleClose();
|
|
34
|
+
}, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
|
|
35
|
+
setLoading(true);
|
|
36
|
+
setError(undefined);
|
|
37
|
+
try {
|
|
38
|
+
await model.exportSvg({
|
|
39
|
+
rasterizeLayers,
|
|
40
|
+
filename,
|
|
41
|
+
themeName,
|
|
42
|
+
trackLabels,
|
|
43
|
+
});
|
|
44
|
+
handleClose();
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
console.error(e);
|
|
48
|
+
setError(e);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
setLoading(false);
|
|
52
|
+
}
|
|
53
|
+
}, children: "Submit" })] })] }));
|
|
72
54
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function StraightLines(props: SvgIconProps): React.JSX.Element;
|
|
1
|
+
import type { SvgIconProps } from '@mui/material';
|
|
2
|
+
export declare function Curves(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function StraightLines(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { SvgIcon } from '@mui/material';
|
|
3
3
|
export function Curves(props) {
|
|
4
|
-
return (
|
|
5
|
-
React.createElement("path", { fill: "currentColor", d: "M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z" })));
|
|
4
|
+
return (_jsx(SvgIcon, { ...props, children: _jsx("path", { fill: "currentColor", d: "M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z" }) }));
|
|
6
5
|
}
|
|
7
6
|
export function StraightLines(props) {
|
|
8
|
-
return (
|
|
9
|
-
React.createElement("path", { fill: "currentColor", d: "M22 12L17 22L7.1 6.04L4.24 12H2L7 2L16.9 17.96L19.76 12H22Z" })));
|
|
7
|
+
return (_jsx(SvgIcon, { ...props, children: _jsx("path", { fill: "currentColor", d: "M22 12L17 22L7.1 6.04L4.24 12H2L7 2L16.9 17.96L19.76 12H22Z" }) }));
|
|
10
8
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const ImportSyntenyOpenCustomTrack: ({ model, assembly1, assembly2, selectedRow, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
selectedRow: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImportSyntenyOpenCustomTrack;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { ErrorMessage, FileSelector } from '@jbrowse/core/ui';
|
|
4
|
+
import HelpIcon from '@mui/icons-material/Help';
|
|
5
|
+
import { Button, FormControlLabel, Grid2, Paper, Radio, RadioGroup, Tooltip, Typography, } from '@mui/material';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
7
|
+
import { getAdapter } from './getAdapter';
|
|
8
|
+
import { basename, extName, getName, stripGz } from './util';
|
|
9
|
+
const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, assembly2, selectedRow, }) {
|
|
10
|
+
const [swap, setSwap] = useState(false);
|
|
11
|
+
const [bed2Location, setBed2Location] = useState();
|
|
12
|
+
const [bed1Location, setBed1Location] = useState();
|
|
13
|
+
const [fileLocation, setFileLocation] = useState();
|
|
14
|
+
const [indexFileLocation, setIndexFileLocation] = useState();
|
|
15
|
+
const [value, setValue] = useState('');
|
|
16
|
+
const [error, setError] = useState();
|
|
17
|
+
const fileName = getName(fileLocation);
|
|
18
|
+
const radioOption = value || (fileName ? extName(stripGz(fileName)) : '');
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
try {
|
|
21
|
+
if (fileLocation) {
|
|
22
|
+
const fn = fileName ? basename(fileName) : 'MyTrack';
|
|
23
|
+
const trackId = `${fn}-${Date.now()}-sessionTrack`;
|
|
24
|
+
setError(undefined);
|
|
25
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
26
|
+
type: 'userOpened',
|
|
27
|
+
value: {
|
|
28
|
+
trackId,
|
|
29
|
+
name: fn,
|
|
30
|
+
assemblyNames: [assembly2, assembly1],
|
|
31
|
+
type: 'SyntenyTrack',
|
|
32
|
+
adapter: getAdapter({
|
|
33
|
+
radioOption,
|
|
34
|
+
assembly1: swap ? assembly2 : assembly1,
|
|
35
|
+
assembly2: swap ? assembly1 : assembly2,
|
|
36
|
+
fileLocation,
|
|
37
|
+
indexFileLocation,
|
|
38
|
+
bed1Location,
|
|
39
|
+
bed2Location,
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.error(e);
|
|
47
|
+
setError(e);
|
|
48
|
+
}
|
|
49
|
+
}, [
|
|
50
|
+
swap,
|
|
51
|
+
model,
|
|
52
|
+
selectedRow,
|
|
53
|
+
fileName,
|
|
54
|
+
assembly1,
|
|
55
|
+
assembly2,
|
|
56
|
+
bed1Location,
|
|
57
|
+
bed2Location,
|
|
58
|
+
fileLocation,
|
|
59
|
+
indexFileLocation,
|
|
60
|
+
radioOption,
|
|
61
|
+
]);
|
|
62
|
+
const helpStrings = {
|
|
63
|
+
'.paf': 'minimap2 target.fa query.fa',
|
|
64
|
+
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
65
|
+
'.out': 'mashmap target.fa query.fa',
|
|
66
|
+
'.delta': 'mummer target.fa query.fa',
|
|
67
|
+
'.chain': 'e.g. queryToTarget.chain',
|
|
68
|
+
};
|
|
69
|
+
return (_jsxs(Paper, { style: { padding: 12 }, children: [error ? _jsx(ErrorMessage, { error: error }) : null, _jsx(Typography, { style: { textAlign: 'center' }, children: "Add a .paf (minimap2), .delta (Mummer), .chain (UCSC liftover), .anchors or .anchors.simple (MCScan), or .pif.gz (jbrowse CLI make-pif) file to view. These file types can also be gzipped." }), _jsx(RadioGroup, { value: radioOption, onChange: event => {
|
|
70
|
+
setValue(event.target.value);
|
|
71
|
+
}, children: _jsx(Grid2, { container: true, justifyContent: "center", children: [
|
|
72
|
+
'.paf',
|
|
73
|
+
'.delta',
|
|
74
|
+
'.out',
|
|
75
|
+
'.chain',
|
|
76
|
+
'.anchors',
|
|
77
|
+
'.anchors.simple',
|
|
78
|
+
'.pif.gz',
|
|
79
|
+
].map(extension => (_jsx(FormControlLabel, { value: extension, control: _jsx(Radio, {}), label: extension }, extension))) }) }), _jsx(Grid2, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
80
|
+
radioOption === '.out' ||
|
|
81
|
+
radioOption === '.delta' ||
|
|
82
|
+
radioOption === '.chain' ||
|
|
83
|
+
radioOption === '.pif.gz' ? (_jsxs("div", { style: {
|
|
84
|
+
display: 'flex',
|
|
85
|
+
flexDirection: 'column',
|
|
86
|
+
gap: 10,
|
|
87
|
+
}, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
88
|
+
setFileLocation(loc);
|
|
89
|
+
} }), _jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: _jsx("code", { children: helpStrings[radioOption] }), children: _jsx(HelpIcon, {}) })] }), _jsxs("div", { style: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
gap: 20,
|
|
92
|
+
}, children: [_jsxs("div", { style: {
|
|
93
|
+
display: 'grid',
|
|
94
|
+
gridTemplateColumns: '1fr 1fr',
|
|
95
|
+
gap: 4,
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
}, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: "query assembly" }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: "target assembly" })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
98
|
+
setSwap(!swap);
|
|
99
|
+
}, children: "Swap?" })] })] })] })) : value === '.anchors' || value === '.anchors.simple' ? (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", value, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', _jsx("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), _jsxs("div", { children: [_jsx(FileSelector, { inline: true, name: value, location: fileLocation, setLocation: loc => {
|
|
100
|
+
setFileLocation(loc);
|
|
101
|
+
} }), _jsx(FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
102
|
+
setBed1Location(loc);
|
|
103
|
+
} }), _jsx(FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
104
|
+
setBed2Location(loc);
|
|
105
|
+
} })] }), _jsxs("div", { style: {
|
|
106
|
+
margin: 'auto',
|
|
107
|
+
display: 'flex',
|
|
108
|
+
justifyContent: 'center',
|
|
109
|
+
gap: 20,
|
|
110
|
+
}, children: [_jsxs("div", { style: {
|
|
111
|
+
display: 'grid',
|
|
112
|
+
gridTemplateColumns: '1fr 1fr',
|
|
113
|
+
gap: 4,
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
}, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: "bed1 assembly" }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: "bed2 assembly" })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
116
|
+
setSwap(!swap);
|
|
117
|
+
}, children: "Swap?" })] })] })) : value === '.pif.gz' ? (_jsxs("div", { style: { display: 'flex' }, children: [_jsx("div", { children: _jsx(FileSelector, { name: `${value} location`, description: "", location: fileLocation, setLocation: loc => {
|
|
118
|
+
setFileLocation(loc);
|
|
119
|
+
} }) }), _jsx("div", { children: _jsx(FileSelector, { name: `${value} index location`, description: "", location: indexFileLocation, setLocation: loc => {
|
|
120
|
+
setIndexFileLocation(loc);
|
|
121
|
+
} }) })] })) : (_jsx(FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
122
|
+
setFileLocation(loc);
|
|
123
|
+
} })) })] }));
|
|
124
|
+
});
|
|
125
|
+
export default ImportSyntenyOpenCustomTrack;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const ImportSyntenyTrackSelector: ({ model, selectedRow, assembly1, assembly2, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
selectedRow: number;
|
|
5
|
+
assembly1: string;
|
|
6
|
+
assembly2: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImportSyntenyTrackSelector;
|