@jbrowse/plugin-linear-comparative-view 2.18.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -58
- package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/dist/LGVSyntenyDisplay/components/util.js +6 -12
- package/dist/LGVSyntenyDisplay/model.d.ts +21 -7
- package/dist/LGVSyntenyDisplay/model.js +19 -8
- package/dist/LinearComparativeView/components/Header.d.ts +1 -2
- package/dist/LinearComparativeView/components/Header.js +52 -81
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -2
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +2 -11
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -2
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +13 -21
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +1 -2
- package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -5
- package/dist/LinearComparativeView/components/Rubberband.d.ts +1 -2
- package/dist/LinearComparativeView/components/Rubberband.js +20 -51
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +1 -2
- package/dist/LinearComparativeView/components/VerticalGuide.js +4 -8
- package/dist/LinearComparativeView/index.js +17 -7
- package/dist/LinearComparativeView/model.d.ts +32 -28
- package/dist/LinearComparativeView/model.js +37 -8
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +1 -2
- package/dist/LinearReadVsRef/LinearReadVsRef.js +5 -36
- package/dist/LinearReadVsRef/index.js +17 -7
- package/dist/LinearSyntenyDisplay/afterAttach.js +6 -3
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/Component.js +9 -32
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +89 -84
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +2 -5
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +2 -3
- package/dist/LinearSyntenyDisplay/index.js +17 -7
- package/dist/LinearSyntenyDisplay/model.js +17 -7
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -2
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +34 -73
- package/dist/LinearSyntenyView/components/Icons.d.ts +2 -3
- 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 +1 -2
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +44 -143
- 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/LinearSyntenyView.d.ts +1 -2
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -9
- package/dist/LinearSyntenyView/index.js +17 -7
- package/dist/LinearSyntenyView/model.d.ts +49 -30
- package/dist/LinearSyntenyView/model.js +57 -15
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -5
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -10
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +4 -16
- package/dist/LinearSyntenyView/types.d.ts +12 -0
- package/dist/LinearSyntenyView/types.js +2 -0
- package/dist/LinearSyntenyViewHelper/index.js +2 -2
- 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 +3 -79
- package/dist/SyntenyFeatureDetail/index.js +17 -7
- package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
- package/dist/SyntenyFeatureDetail/types.js +2 -0
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -34
- package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/esm/LGVSyntenyDisplay/components/util.js +6 -12
- package/esm/LGVSyntenyDisplay/model.d.ts +21 -7
- package/esm/LGVSyntenyDisplay/model.js +2 -1
- package/esm/LinearComparativeView/components/Header.d.ts +1 -2
- package/esm/LinearComparativeView/components/Header.js +52 -58
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -2
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -8
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -2
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +13 -18
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -2
- package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -5
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -2
- package/esm/LinearComparativeView/components/Rubberband.js +20 -28
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -2
- package/esm/LinearComparativeView/components/VerticalGuide.js +4 -5
- package/esm/LinearComparativeView/model.d.ts +32 -28
- package/esm/LinearComparativeView/model.js +21 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +1 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.js +5 -13
- package/esm/LinearSyntenyDisplay/afterAttach.js +6 -3
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/Component.js +9 -9
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +72 -77
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +2 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +2 -3
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -2
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +34 -50
- package/esm/LinearSyntenyView/components/Icons.d.ts +2 -3
- 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 +1 -2
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +45 -121
- 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/LinearSyntenyView.d.ts +1 -2
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -2
- package/esm/LinearSyntenyView/model.d.ts +49 -30
- package/esm/LinearSyntenyView/model.js +41 -9
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -7
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +4 -16
- package/esm/LinearSyntenyView/types.d.ts +12 -0
- package/esm/LinearSyntenyView/types.js +1 -0
- package/esm/LinearSyntenyViewHelper/index.js +2 -2
- 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 +4 -57
- package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
- package/esm/SyntenyFeatureDetail/types.js +1 -0
- package/package.json +11 -11
- 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 -57
- 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 -32
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
2
3
|
import { observer } from 'mobx-react';
|
|
3
4
|
import LinearComparativeViewComponent from '../../LinearComparativeView/components/LinearComparativeView';
|
|
4
5
|
const LinearSyntenyImportForm = lazy(() => import('./ImportForm/LinearSyntenyImportForm'));
|
|
5
6
|
const LinearSyntenyView = observer(function ({ model }) {
|
|
6
|
-
return !model.initialized ? (
|
|
7
|
+
return !model.initialized ? (_jsx(LinearSyntenyImportForm, { model: model })) : (_jsx(LinearComparativeViewComponent, { model: model }));
|
|
7
8
|
});
|
|
8
9
|
export default LinearSyntenyView;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { Curves } from './components/Icons';
|
|
3
|
+
import type { ImportFormSyntenyTrack } from './types';
|
|
3
4
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
4
5
|
import type { Instance } from 'mobx-state-tree';
|
|
5
6
|
export interface ExportSvgOptions {
|
|
@@ -27,7 +28,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
27
28
|
type: import("mobx-state-tree").ISimpleType<"LinearComparativeView">;
|
|
28
29
|
trackSelectorType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
29
30
|
showIntraviewLinks: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
30
|
-
|
|
31
|
+
linkViews: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
|
+
interactiveOverlay: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
31
33
|
levels: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
32
34
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
33
35
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -61,7 +63,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
61
63
|
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
62
64
|
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
63
65
|
showGridlines: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
64
|
-
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType>>, [undefined]>;
|
|
66
|
+
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
65
67
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
66
68
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
67
69
|
}, {
|
|
@@ -82,8 +84,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
82
84
|
trackRefs: Record<string, HTMLDivElement>;
|
|
83
85
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
84
86
|
coarseTotalBp: number;
|
|
85
|
-
leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
86
|
-
rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
87
|
+
leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset;
|
|
88
|
+
rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset;
|
|
87
89
|
} & {
|
|
88
90
|
readonly trackLabelsSetting: any;
|
|
89
91
|
readonly width: number;
|
|
@@ -130,12 +132,12 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
130
132
|
setHideHeaderOverview(b: boolean): void;
|
|
131
133
|
setHideNoTracksActive(b: boolean): void;
|
|
132
134
|
setShowGridlines(b: boolean): void;
|
|
133
|
-
addToHighlights(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType): void;
|
|
134
|
-
setHighlight(highlight?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType[]): void;
|
|
135
|
-
removeHighlight(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType): void;
|
|
135
|
+
addToHighlights(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType): void;
|
|
136
|
+
setHighlight(highlight?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[]): void;
|
|
137
|
+
removeHighlight(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType): void;
|
|
136
138
|
scrollTo(offsetPx: number): number;
|
|
137
139
|
zoomTo(bpPerPx: number, offset?: number, centerAtOffset?: boolean): number;
|
|
138
|
-
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, right?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
140
|
+
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, right?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
139
141
|
setSearchResults(searchResults: import("@jbrowse/core/TextSearch/BaseResults").default[], searchQuery: string, assemblyName?: string): void;
|
|
140
142
|
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
141
143
|
horizontallyFlip(): void;
|
|
@@ -152,7 +154,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
152
154
|
setShowCenterLine(b: boolean): void;
|
|
153
155
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
154
156
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
155
|
-
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, rightOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): {
|
|
157
|
+
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, rightOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): {
|
|
156
158
|
start: number;
|
|
157
159
|
end: number;
|
|
158
160
|
type: string;
|
|
@@ -174,7 +176,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
174
176
|
setDraggingTrackId(idx?: string): void;
|
|
175
177
|
setScaleFactor(factor: number): void;
|
|
176
178
|
clearView(): void;
|
|
177
|
-
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").ExportSvgOptions): Promise<void>;
|
|
179
|
+
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
178
180
|
} & {
|
|
179
181
|
slide: (viewWidths: number) => void;
|
|
180
182
|
} & {
|
|
@@ -196,15 +198,15 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
196
198
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
197
199
|
afterAttach(): void;
|
|
198
200
|
} & {
|
|
199
|
-
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
201
|
+
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
200
202
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
201
203
|
navToSearchString({ input, assembly, }: {
|
|
202
204
|
input: string;
|
|
203
205
|
assembly: import("@jbrowse/core/assemblyManager/assembly").Assembly;
|
|
204
206
|
}): Promise<void>;
|
|
205
207
|
navToLocations(parsedLocStrings: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string): Promise<void>;
|
|
206
|
-
navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation): void;
|
|
207
|
-
navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation[]): void;
|
|
208
|
+
navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").NavLocation): void;
|
|
209
|
+
navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").NavLocation[]): void;
|
|
208
210
|
} & {
|
|
209
211
|
rubberBandMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
210
212
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -259,7 +261,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
259
261
|
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
260
262
|
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
261
263
|
showGridlines: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
262
|
-
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType>>, [undefined]>;
|
|
264
|
+
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
263
265
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
264
266
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
265
267
|
}>>, import("mobx-state-tree")._NotCustomized>>;
|
|
@@ -283,12 +285,14 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
283
285
|
readonly refNames: string[][];
|
|
284
286
|
readonly assemblyNames: string[];
|
|
285
287
|
} & {
|
|
288
|
+
afterAttach(): void;
|
|
286
289
|
beforeDestroy(): void;
|
|
287
290
|
onSubviewAction(actionName: string, path: string, args?: unknown[]): void;
|
|
288
291
|
setWidth(newWidth: number): void;
|
|
289
292
|
setViews(views: import("mobx-state-tree").SnapshotIn<import("@jbrowse/plugin-linear-genome-view").LinearGenomeViewModel>[]): void;
|
|
290
293
|
removeView(view: import("@jbrowse/plugin-linear-genome-view").LinearGenomeViewModel): void;
|
|
291
294
|
setLevelHeight(newHeight: number, level?: number): number;
|
|
295
|
+
setLinkViews(arg: boolean): void;
|
|
292
296
|
activateTrackSelector(level: number): import("@jbrowse/core/util").Widget;
|
|
293
297
|
toggleTrack(trackId: string, level?: number): void;
|
|
294
298
|
showTrack(trackId: string, level?: number, initialSnapshot?: {}): void;
|
|
@@ -306,8 +310,13 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
306
310
|
} & {
|
|
307
311
|
afterAttach(): void;
|
|
308
312
|
} & {
|
|
309
|
-
|
|
310
|
-
|
|
313
|
+
importFormSyntenyTrackSelections: import("mobx").IObservableArray<ImportFormSyntenyTrack>;
|
|
314
|
+
} & {
|
|
315
|
+
importFormRemoveRow(idx: number): void;
|
|
316
|
+
clearImportFormSyntenyTracks(): void;
|
|
317
|
+
setImportFormSyntenyTrack(arg: number, val: ImportFormSyntenyTrack): void;
|
|
318
|
+
setDrawCurves(arg: boolean): void;
|
|
319
|
+
setDrawCIGAR(arg: boolean): void;
|
|
311
320
|
showAllRegions(): void;
|
|
312
321
|
} & {
|
|
313
322
|
exportSvg(opts: ExportSvgOptions): Promise<void>;
|
|
@@ -332,8 +341,17 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
332
341
|
label: string;
|
|
333
342
|
type: string;
|
|
334
343
|
checked: boolean;
|
|
344
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
345
|
+
muiName: string;
|
|
346
|
+
};
|
|
335
347
|
onClick: () => void;
|
|
348
|
+
description?: undefined;
|
|
349
|
+
} | {
|
|
350
|
+
label: string;
|
|
351
|
+
type: string;
|
|
352
|
+
checked: boolean;
|
|
336
353
|
icon: typeof Curves;
|
|
354
|
+
onClick: () => void;
|
|
337
355
|
description?: undefined;
|
|
338
356
|
} | {
|
|
339
357
|
label: string;
|
|
@@ -363,7 +381,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
363
381
|
type: import("mobx-state-tree").ISimpleType<"LinearComparativeView">;
|
|
364
382
|
trackSelectorType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
365
383
|
showIntraviewLinks: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
366
|
-
|
|
384
|
+
linkViews: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
385
|
+
interactiveOverlay: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
367
386
|
levels: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
368
387
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
369
388
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -397,7 +416,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
397
416
|
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
398
417
|
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
399
418
|
showGridlines: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
400
|
-
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType>>, [undefined]>;
|
|
419
|
+
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
401
420
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
402
421
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
403
422
|
}, {
|
|
@@ -418,8 +437,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
418
437
|
trackRefs: Record<string, HTMLDivElement>;
|
|
419
438
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
420
439
|
coarseTotalBp: number;
|
|
421
|
-
leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
422
|
-
rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
440
|
+
leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset;
|
|
441
|
+
rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset;
|
|
423
442
|
} & {
|
|
424
443
|
readonly trackLabelsSetting: any;
|
|
425
444
|
readonly width: number;
|
|
@@ -466,12 +485,12 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
466
485
|
setHideHeaderOverview(b: boolean): void;
|
|
467
486
|
setHideNoTracksActive(b: boolean): void;
|
|
468
487
|
setShowGridlines(b: boolean): void;
|
|
469
|
-
addToHighlights(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType): void;
|
|
470
|
-
setHighlight(highlight?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType[]): void;
|
|
471
|
-
removeHighlight(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType): void;
|
|
488
|
+
addToHighlights(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType): void;
|
|
489
|
+
setHighlight(highlight?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[]): void;
|
|
490
|
+
removeHighlight(highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType): void;
|
|
472
491
|
scrollTo(offsetPx: number): number;
|
|
473
492
|
zoomTo(bpPerPx: number, offset?: number, centerAtOffset?: boolean): number;
|
|
474
|
-
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, right?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
493
|
+
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, right?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
475
494
|
setSearchResults(searchResults: import("@jbrowse/core/TextSearch/BaseResults").default[], searchQuery: string, assemblyName?: string): void;
|
|
476
495
|
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
477
496
|
horizontallyFlip(): void;
|
|
@@ -488,7 +507,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
488
507
|
setShowCenterLine(b: boolean): void;
|
|
489
508
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
490
509
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
491
|
-
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, rightOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): {
|
|
510
|
+
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, rightOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): {
|
|
492
511
|
start: number;
|
|
493
512
|
end: number;
|
|
494
513
|
type: string;
|
|
@@ -510,7 +529,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
510
529
|
setDraggingTrackId(idx?: string): void;
|
|
511
530
|
setScaleFactor(factor: number): void;
|
|
512
531
|
clearView(): void;
|
|
513
|
-
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").ExportSvgOptions): Promise<void>;
|
|
532
|
+
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
514
533
|
} & {
|
|
515
534
|
slide: (viewWidths: number) => void;
|
|
516
535
|
} & {
|
|
@@ -532,15 +551,15 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
532
551
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
533
552
|
afterAttach(): void;
|
|
534
553
|
} & {
|
|
535
|
-
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
554
|
+
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
536
555
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
537
556
|
navToSearchString({ input, assembly, }: {
|
|
538
557
|
input: string;
|
|
539
558
|
assembly: import("@jbrowse/core/assemblyManager/assembly").Assembly;
|
|
540
559
|
}): Promise<void>;
|
|
541
560
|
navToLocations(parsedLocStrings: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string): Promise<void>;
|
|
542
|
-
navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation): void;
|
|
543
|
-
navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation[]): void;
|
|
561
|
+
navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").NavLocation): void;
|
|
562
|
+
navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").NavLocation[]): void;
|
|
544
563
|
} & {
|
|
545
564
|
rubberBandMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
546
565
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -595,7 +614,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
595
614
|
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
596
615
|
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
597
616
|
showGridlines: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
598
|
-
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").HighlightType>>, [undefined]>;
|
|
617
|
+
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
599
618
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
600
619
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
601
620
|
}>>, import("mobx-state-tree")._NotCustomized>>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import CropFreeIcon from '@mui/icons-material/CropFree';
|
|
4
|
+
import LinkIcon from '@mui/icons-material/Link';
|
|
4
5
|
import PhotoCameraIcon from '@mui/icons-material/PhotoCamera';
|
|
5
6
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
6
7
|
import { saveAs } from 'file-saver';
|
|
7
|
-
import { transaction } from 'mobx';
|
|
8
|
+
import { observable, transaction } from 'mobx';
|
|
8
9
|
import { types } from 'mobx-state-tree';
|
|
9
10
|
import { Curves } from './components/Icons';
|
|
10
11
|
import baseModel from '../LinearComparativeView/model';
|
|
@@ -15,13 +16,25 @@ export default function stateModelFactory(pluginManager) {
|
|
|
15
16
|
type: types.literal('LinearSyntenyView'),
|
|
16
17
|
drawCIGAR: true,
|
|
17
18
|
drawCurves: false,
|
|
19
|
+
}))
|
|
20
|
+
.volatile(() => ({
|
|
21
|
+
importFormSyntenyTrackSelections: observable.array(),
|
|
18
22
|
}))
|
|
19
23
|
.actions(self => ({
|
|
20
|
-
|
|
21
|
-
self.
|
|
24
|
+
importFormRemoveRow(idx) {
|
|
25
|
+
self.importFormSyntenyTrackSelections.splice(idx, 1);
|
|
26
|
+
},
|
|
27
|
+
clearImportFormSyntenyTracks() {
|
|
28
|
+
self.importFormSyntenyTrackSelections.clear();
|
|
29
|
+
},
|
|
30
|
+
setImportFormSyntenyTrack(arg, val) {
|
|
31
|
+
self.importFormSyntenyTrackSelections[arg] = val;
|
|
32
|
+
},
|
|
33
|
+
setDrawCurves(arg) {
|
|
34
|
+
self.drawCurves = arg;
|
|
22
35
|
},
|
|
23
|
-
|
|
24
|
-
self.drawCIGAR =
|
|
36
|
+
setDrawCIGAR(arg) {
|
|
37
|
+
self.drawCIGAR = arg;
|
|
25
38
|
},
|
|
26
39
|
showAllRegions() {
|
|
27
40
|
transaction(() => {
|
|
@@ -60,17 +73,30 @@ export default function stateModelFactory(pluginManager) {
|
|
|
60
73
|
},
|
|
61
74
|
{
|
|
62
75
|
label: 'Draw CIGAR',
|
|
63
|
-
onClick:
|
|
76
|
+
onClick: () => {
|
|
77
|
+
self.setDrawCIGAR(!self.drawCIGAR);
|
|
78
|
+
},
|
|
64
79
|
checked: self.drawCIGAR,
|
|
65
80
|
type: 'checkbox',
|
|
66
81
|
description: 'Draws per-base CIGAR level alignments',
|
|
67
82
|
},
|
|
83
|
+
{
|
|
84
|
+
label: 'Link views',
|
|
85
|
+
type: 'checkbox',
|
|
86
|
+
checked: self.linkViews,
|
|
87
|
+
icon: LinkIcon,
|
|
88
|
+
onClick: () => {
|
|
89
|
+
self.setLinkViews(!self.linkViews);
|
|
90
|
+
},
|
|
91
|
+
},
|
|
68
92
|
{
|
|
69
93
|
label: 'Use curved lines',
|
|
70
94
|
type: 'checkbox',
|
|
71
95
|
checked: self.drawCurves,
|
|
72
|
-
onClick: self.toggleCurves,
|
|
73
96
|
icon: Curves,
|
|
97
|
+
onClick: () => {
|
|
98
|
+
self.setDrawCurves(!self.drawCurves);
|
|
99
|
+
},
|
|
74
100
|
},
|
|
75
101
|
{
|
|
76
102
|
label: 'Export SVG',
|
|
@@ -78,7 +104,10 @@ export default function stateModelFactory(pluginManager) {
|
|
|
78
104
|
onClick: () => {
|
|
79
105
|
getSession(self).queueDialog(handleClose => [
|
|
80
106
|
ExportSvgDialog,
|
|
81
|
-
{
|
|
107
|
+
{
|
|
108
|
+
model: self,
|
|
109
|
+
handleClose,
|
|
110
|
+
},
|
|
82
111
|
]);
|
|
83
112
|
},
|
|
84
113
|
},
|
|
@@ -93,7 +122,10 @@ export default function stateModelFactory(pluginManager) {
|
|
|
93
122
|
onClick: () => {
|
|
94
123
|
getSession(self).queueDialog(handleClose => [
|
|
95
124
|
ExportSvgDialog,
|
|
96
|
-
{
|
|
125
|
+
{
|
|
126
|
+
model: self,
|
|
127
|
+
handleClose,
|
|
128
|
+
},
|
|
97
129
|
]);
|
|
98
130
|
},
|
|
99
131
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
export default function SVGBackground({ width, height, shift, }) {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
-
return (
|
|
6
|
+
return (_jsx("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
|
|
3
2
|
export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }: {
|
|
4
3
|
textHeight: number;
|
|
@@ -9,4 +8,4 @@ export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHe
|
|
|
9
8
|
displayResults: any;
|
|
10
9
|
rulerHeight: number;
|
|
11
10
|
shift: number;
|
|
12
|
-
}):
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getFillProps } from '@jbrowse/core/util';
|
|
3
3
|
import { SVGRuler, SVGTracks } from '@jbrowse/plugin-linear-genome-view';
|
|
4
4
|
import { useTheme } from '@mui/material';
|
|
5
5
|
export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }) {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return (
|
|
8
|
-
React.createElement("g", { transform: `translate(${trackLabelOffset})` },
|
|
9
|
-
React.createElement("text", { x: 0, fontSize: fontSize, ...getFillProps(theme.palette.text.primary) }, view.assemblyNames.join(', ')),
|
|
10
|
-
React.createElement(SVGRuler, { model: displayResults.view, fontSize: fontSize })),
|
|
11
|
-
React.createElement("g", { transform: `translate(0 ${rulerHeight + fontSize})` },
|
|
12
|
-
React.createElement(SVGTracks, { textHeight: textHeight, trackLabels: trackLabels, fontSize: fontSize, model: displayResults.view, displayResults: displayResults.data, trackLabelOffset: trackLabelOffset }))));
|
|
7
|
+
return (_jsxs("g", { transform: `translate(${shift} ${fontSize})`, children: [_jsxs("g", { transform: `translate(${trackLabelOffset})`, children: [_jsx("text", { x: 0, fontSize: fontSize, ...getFillProps(theme.palette.text.primary), children: view.assemblyNames.join(', ') }), _jsx(SVGRuler, { model: displayResults.view, fontSize: fontSize })] }), _jsx("g", { transform: `translate(0 ${rulerHeight + fontSize})`, children: _jsx(SVGTracks, { textHeight: textHeight, trackLabels: trackLabels, fontSize: fontSize, model: displayResults.view, displayResults: displayResults.data, trackLabelOffset: trackLabelOffset }) })] }));
|
|
13
8
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createJBrowseTheme } from '@jbrowse/core/ui';
|
|
3
3
|
import { ReactRendering, getSerializedSvg, getSession, max, measureText, renderToAbstractCanvas, renderToStaticMarkup, sum, } from '@jbrowse/core/util';
|
|
4
4
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
5
5
|
import { totalHeight } from '@jbrowse/plugin-linear-genome-view';
|
|
6
6
|
import { ThemeProvider } from '@mui/material';
|
|
7
7
|
import { when } from 'mobx';
|
|
8
|
-
import { getRoot } from 'mobx-state-tree';
|
|
9
8
|
import SVGBackground from './SVGBackground';
|
|
10
9
|
import SVGLinearGenomeView from './SVGLinearGenomeView';
|
|
11
10
|
import { drawRef } from '../../LinearSyntenyDisplay/drawSynteny';
|
|
@@ -18,7 +17,6 @@ export async function renderToSvg(model, opts) {
|
|
|
18
17
|
const { width, views, levels } = model;
|
|
19
18
|
const shift = 50;
|
|
20
19
|
const offset = rulerHeight;
|
|
21
|
-
const { createRootFn } = getRoot(model);
|
|
22
20
|
const heights = views.map(v => totalHeight(v.tracks, textHeight, trackLabels) + offset);
|
|
23
21
|
const totalHeightSvg = sum(heights) + sum(levels.map(l => l.height)) + 100;
|
|
24
22
|
const displayResults = await Promise.all(views.map(async (view) => ({
|
|
@@ -60,7 +58,7 @@ export async function renderToSvg(model, opts) {
|
|
|
60
58
|
const w = width + trackLabelOffset;
|
|
61
59
|
const theme = createJBrowseTheme(themeVar);
|
|
62
60
|
const RenderList = [
|
|
63
|
-
|
|
61
|
+
_jsx(SVGLinearGenomeView, { rulerHeight: rulerHeight, trackLabelOffset: trackLabelOffset, shift: shift, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[0], view: views[0], fontSize: fontSize }, views[0].id),
|
|
64
62
|
];
|
|
65
63
|
let currOffset = heights[0] + fontSize + rulerHeight;
|
|
66
64
|
for (let i = 1; i < views.length; i++) {
|
|
@@ -69,18 +67,8 @@ export async function renderToSvg(model, opts) {
|
|
|
69
67
|
const rendering = renderings[i - 1];
|
|
70
68
|
const height = heights[i];
|
|
71
69
|
const levelHeight = level.height || 0;
|
|
72
|
-
RenderList.push(
|
|
73
|
-
levelHeight ? (React.createElement("defs", null,
|
|
74
|
-
React.createElement("clipPath", { id: `synclip-${i}` },
|
|
75
|
-
React.createElement("rect", { x: 0, y: 0, width: width, height: levelHeight })))) : null,
|
|
76
|
-
React.createElement("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})` }, rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (React.createElement(ReactRendering, { key: i, rendering: r })))),
|
|
77
|
-
React.createElement("g", { transform: `translate(0 ${levelHeight})` },
|
|
78
|
-
React.createElement(SVGLinearGenomeView, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], key: view.id, view: view, fontSize: fontSize }))));
|
|
70
|
+
RenderList.push(_jsxs("g", { transform: `translate(0 ${currOffset})`, children: [levelHeight ? (_jsx("defs", { children: _jsx("clipPath", { id: `synclip-${i}`, children: _jsx("rect", { x: 0, y: 0, width: width, height: levelHeight }) }) })) : null, _jsx("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})`, children: rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (_jsx(ReactRendering, { rendering: r }, i))) }), _jsx("g", { transform: `translate(0 ${levelHeight})`, children: _jsx(SVGLinearGenomeView, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], view: view, fontSize: fontSize }, view.id) })] }, view.id));
|
|
79
71
|
currOffset += height + fontSize + rulerHeight + levelHeight;
|
|
80
72
|
}
|
|
81
|
-
return renderToStaticMarkup(
|
|
82
|
-
React.createElement(Wrapper, null,
|
|
83
|
-
React.createElement("svg", { width: width, height: totalHeightSvg, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, totalHeightSvg].toString() },
|
|
84
|
-
React.createElement(SVGBackground, { width: w, height: totalHeightSvg, shift: shift }),
|
|
85
|
-
RenderList))), createRootFn);
|
|
73
|
+
return renderToStaticMarkup(_jsx(ThemeProvider, { theme: theme, children: _jsx(Wrapper, { children: _jsxs("svg", { width: width, height: totalHeightSvg, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, totalHeightSvg].toString(), children: [_jsx(SVGBackground, { width: w, height: totalHeightSvg, shift: shift }), RenderList] }) }) }));
|
|
86
74
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { SnapshotIn } from 'mobx-state-tree';
|
|
3
|
+
export type Conf = SnapshotIn<AnyConfigurationModel>;
|
|
4
|
+
export type ImportFormSyntenyTrack = {
|
|
5
|
+
type: 'preConfigured';
|
|
6
|
+
value: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'userOpened';
|
|
9
|
+
value: Conf;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'none';
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType';
|
|
3
3
|
import { linearSyntenyViewHelperModelFactory } from './stateModelFactory';
|
|
4
4
|
function UnusedComponent() {
|
|
5
|
-
return
|
|
5
|
+
return _jsx("div", {});
|
|
6
6
|
}
|
|
7
7
|
export default function LinearSyntenyViewF(pluginManager) {
|
|
8
8
|
pluginManager.addViewType(() => {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
3
|
+
import { SimpleFeature, assembleLocString, getSession, } from '@jbrowse/core/util';
|
|
4
|
+
import { Link } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
const LaunchSyntenyViewDialog = lazy(() => import('../LGVSyntenyDisplay/components/LaunchSyntenyViewDialog'));
|
|
7
|
+
const LinkToSyntenyView = observer(function ({ model, }) {
|
|
8
|
+
const { featureData, view, level, trackId } = model;
|
|
9
|
+
return (_jsxs("ul", { children: [view.type === 'LinearSyntenyView' ? (_jsx("li", { children: _jsx(Link, { href: "#", onClick: event => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
const { views } = view;
|
|
13
|
+
if (level !== undefined) {
|
|
14
|
+
(_a = views[level]) === null || _a === void 0 ? void 0 : _a.navTo(featureData);
|
|
15
|
+
(_b = views[level + 1]) === null || _b === void 0 ? void 0 : _b.navTo(featureData.mate);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
const f1 = featureData;
|
|
19
|
+
const f2 = featureData.mate;
|
|
20
|
+
const r1 = f1.assemblyName;
|
|
21
|
+
const r2 = f2.assemblyName;
|
|
22
|
+
const v1 = views.find(view => view.assemblyNames[0] === r1);
|
|
23
|
+
const v2 = views.find(view => view.assemblyNames[0] === r2);
|
|
24
|
+
if (!v1 || !v2) {
|
|
25
|
+
getSession(model).notify([
|
|
26
|
+
v1
|
|
27
|
+
? `Unable to find ${assembleLocString(f1)} in synteny view`
|
|
28
|
+
: '',
|
|
29
|
+
v2
|
|
30
|
+
? `Unable to find ${assembleLocString(f2)} in synteny view`
|
|
31
|
+
: '',
|
|
32
|
+
].join(' ... '));
|
|
33
|
+
}
|
|
34
|
+
v1 === null || v1 === void 0 ? void 0 : v1.navTo(f1);
|
|
35
|
+
v2 === null || v2 === void 0 ? void 0 : v2.navTo(f2);
|
|
36
|
+
}
|
|
37
|
+
}, children: "Center view on this feature" }) })) : null, _jsx("li", { children: _jsx(Link, { href: "#", onClick: event => {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
const feature = new SimpleFeature(featureData);
|
|
40
|
+
const session = getSession(model);
|
|
41
|
+
session.queueDialog(handleClose => [
|
|
42
|
+
LaunchSyntenyViewDialog,
|
|
43
|
+
{
|
|
44
|
+
session,
|
|
45
|
+
feature,
|
|
46
|
+
trackId,
|
|
47
|
+
handleClose,
|
|
48
|
+
},
|
|
49
|
+
]);
|
|
50
|
+
}, children: "Launch new linear synteny view on this feature" }) })] }));
|
|
51
|
+
});
|
|
52
|
+
export default LinkToSyntenyView;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
-
interface SyntenyFeatureDetailModel {
|
|
4
|
-
trackId: string;
|
|
5
|
-
featureData: SimpleFeatureSerialized;
|
|
6
|
-
level?: number;
|
|
7
|
-
view: {
|
|
8
|
-
type: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
1
|
+
import type { SyntenyFeatureDetailModel } from './types';
|
|
11
2
|
declare const SyntenyFeatureDetail: ({ model, }: {
|
|
12
3
|
model: SyntenyFeatureDetailModel;
|
|
13
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
5
|
export default SyntenyFeatureDetail;
|