@jbrowse/plugin-dotplot-view 3.7.0 → 4.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/esm/ComparativeRenderer/index.d.ts +10 -10
- package/esm/ComparativeRenderer/index.js +4 -17
- package/esm/DiagonalizeDotplotRpc.js +9 -12
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -1
- package/esm/DotplotDisplay/index.d.ts +3 -3
- package/esm/DotplotDisplay/index.js +4 -4
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +2 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +6 -4
- package/esm/DotplotDisplay/stateModelFactory.d.ts +143 -30
- package/esm/DotplotDisplay/stateModelFactory.js +5 -14
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +5 -6
- package/esm/DotplotReadVsRef/index.js +1 -1
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +30 -39
- package/esm/DotplotRenderer/DotplotRenderer.js +55 -22
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- package/esm/DotplotRenderer/components/DotplotRendering.js +1 -1
- package/esm/DotplotRenderer/configSchema.d.ts +3 -3
- package/esm/DotplotRenderer/configSchema.js +1 -1
- package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/esm/DotplotRenderer/drawDotplot.js +5 -6
- package/esm/DotplotRenderer/index.js +4 -4
- package/esm/DotplotView/1dview.d.ts +25 -25
- package/esm/DotplotView/1dview.js +13 -3
- package/esm/DotplotView/components/Axes.d.ts +1 -1
- package/esm/DotplotView/components/Axes.js +31 -41
- package/esm/DotplotView/components/ColorBySelector.d.ts +1 -1
- package/esm/DotplotView/components/ColorBySelector.js +3 -4
- package/esm/DotplotView/components/DiagonalizationProgressDialog.d.ts +1 -1
- package/esm/DotplotView/components/DiagonalizationProgressDialog.js +1 -1
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
- package/esm/DotplotView/components/DotplotControls.js +7 -8
- package/esm/DotplotView/components/DotplotGrid.d.ts +6 -0
- package/esm/DotplotView/components/{Grid.js → DotplotGrid.js} +19 -20
- package/esm/DotplotView/components/DotplotGridWrapper.d.ts +6 -0
- package/esm/DotplotView/components/DotplotGridWrapper.js +8 -0
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -2
- package/esm/DotplotView/components/DotplotTooltipClick.js +4 -4
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +2 -2
- package/esm/DotplotView/components/DotplotTooltips.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltips.js +2 -2
- package/esm/DotplotView/components/DotplotView.d.ts +2 -2
- package/esm/DotplotView/components/DotplotView.js +23 -21
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/esm/DotplotView/components/DotplotWarnings.js +3 -3
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/DotplotView/components/Header.d.ts +1 -1
- package/esm/DotplotView/components/Header.js +5 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +6 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +2 -3
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +10 -1
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +8 -4
- package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/index.js +4 -9
- package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +2 -2
- package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.js +2 -2
- package/esm/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/index.d.ts +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/index.js +3 -3
- package/esm/DotplotView/components/MinLengthSlider.d.ts +1 -1
- package/esm/DotplotView/components/MinLengthSlider.js +7 -7
- package/esm/DotplotView/components/MouseInteractionLayer.d.ts +3 -3
- package/esm/DotplotView/components/MouseInteractionLayer.js +6 -4
- package/esm/DotplotView/components/OpacitySlider.d.ts +1 -1
- package/esm/DotplotView/components/OpacitySlider.js +5 -6
- package/esm/DotplotView/components/PanButtons.d.ts +1 -1
- package/esm/DotplotView/components/PanButtons.js +1 -1
- package/esm/DotplotView/components/SelectionContextMenu.d.ts +1 -1
- package/esm/DotplotView/components/WarningDialog.js +1 -1
- package/esm/DotplotView/components/util.d.ts +1 -1
- package/esm/DotplotView/components/util.js +17 -5
- package/esm/DotplotView/index.js +2 -2
- package/esm/DotplotView/model.d.ts +208 -90
- package/esm/DotplotView/model.js +118 -79
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -6
- package/esm/DotplotView/types.d.ts +7 -1
- package/esm/LaunchDotplotView.js +6 -36
- package/esm/ServerSideRenderedBlockContent.js +2 -6
- package/esm/ServerSideSyntenyRendering.d.ts +1 -1
- package/esm/ServerSideSyntenyRendering.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +8 -11
- package/esm/util.d.ts +1 -1
- package/package.json +28 -35
- package/dist/ComparativeRenderer/index.d.ts +0 -22
- package/dist/ComparativeRenderer/index.js +0 -53
- package/dist/DiagonalizeDotplotRpc.d.ts +0 -30
- package/dist/DiagonalizeDotplotRpc.js +0 -156
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +0 -6
- package/dist/DotplotDisplay/components/DotplotDisplay.js +0 -18
- package/dist/DotplotDisplay/index.d.ts +0 -5
- package/dist/DotplotDisplay/index.js +0 -36
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +0 -11
- package/dist/DotplotDisplay/renderDotplotBlock.js +0 -52
- package/dist/DotplotDisplay/stateModelFactory.d.ts +0 -108
- package/dist/DotplotDisplay/stateModelFactory.js +0 -134
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +0 -3
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +0 -100
- package/dist/DotplotReadVsRef/index.d.ts +0 -2
- package/dist/DotplotReadVsRef/index.js +0 -41
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +0 -53
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +0 -65
- package/dist/DotplotRenderer/DotplotRenderer.js +0 -102
- package/dist/DotplotRenderer/clamp.d.ts +0 -7
- package/dist/DotplotRenderer/clamp.js +0 -62
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +0 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +0 -9
- package/dist/DotplotRenderer/configSchema.d.ts +0 -40
- package/dist/DotplotRenderer/configSchema.js +0 -57
- package/dist/DotplotRenderer/drawDotplot.d.ts +0 -22
- package/dist/DotplotRenderer/drawDotplot.js +0 -209
- package/dist/DotplotRenderer/index.d.ts +0 -2
- package/dist/DotplotRenderer/index.js +0 -17
- package/dist/DotplotView/1dview.d.ts +0 -199
- package/dist/DotplotView/1dview.js +0 -65
- package/dist/DotplotView/components/Axes.d.ts +0 -13
- package/dist/DotplotView/components/Axes.js +0 -107
- package/dist/DotplotView/components/ColorBySelector.d.ts +0 -5
- package/dist/DotplotView/components/ColorBySelector.js +0 -79
- package/dist/DotplotView/components/CursorIcon.d.ts +0 -3
- package/dist/DotplotView/components/CursorIcon.js +0 -15
- package/dist/DotplotView/components/DiagonalizationProgressDialog.d.ts +0 -6
- package/dist/DotplotView/components/DiagonalizationProgressDialog.js +0 -125
- package/dist/DotplotView/components/DotplotControls.d.ts +0 -5
- package/dist/DotplotView/components/DotplotControls.js +0 -187
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +0 -10
- package/dist/DotplotView/components/DotplotTooltipClick.js +0 -17
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +0 -9
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +0 -16
- package/dist/DotplotView/components/DotplotTooltips.d.ts +0 -15
- package/dist/DotplotView/components/DotplotTooltips.js +0 -43
- package/dist/DotplotView/components/DotplotView.d.ts +0 -5
- package/dist/DotplotView/components/DotplotView.js +0 -100
- package/dist/DotplotView/components/DotplotWarnings.d.ts +0 -5
- package/dist/DotplotView/components/DotplotWarnings.js +0 -53
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/DotplotView/components/ExportSvgDialog.js +0 -53
- package/dist/DotplotView/components/Grid.d.ts +0 -9
- package/dist/DotplotView/components/Grid.js +0 -47
- package/dist/DotplotView/components/Header.d.ts +0 -9
- package/dist/DotplotView/components/Header.js +0 -33
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -78
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +0 -42
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +0 -23
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +0 -117
- package/dist/DotplotView/components/ImportForm/getAdapter.js +0 -68
- package/dist/DotplotView/components/ImportForm/index.d.ts +0 -5
- package/dist/DotplotView/components/ImportForm/index.js +0 -75
- package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +0 -23
- package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.js +0 -13
- package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -23
- package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.js +0 -10
- package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
- package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
- package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +0 -24
- package/dist/DotplotView/components/ImportForm/selectors/index.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/index.js +0 -12
- package/dist/DotplotView/components/ImportForm/util.d.ts +0 -10
- package/dist/DotplotView/components/ImportForm/util.js +0 -24
- package/dist/DotplotView/components/MinLengthSlider.d.ts +0 -5
- package/dist/DotplotView/components/MinLengthSlider.js +0 -44
- package/dist/DotplotView/components/MouseInteractionLayer.d.ts +0 -17
- package/dist/DotplotView/components/MouseInteractionLayer.js +0 -18
- package/dist/DotplotView/components/OpacitySlider.d.ts +0 -5
- package/dist/DotplotView/components/OpacitySlider.js +0 -43
- package/dist/DotplotView/components/PanButtons.d.ts +0 -5
- package/dist/DotplotView/components/PanButtons.js +0 -47
- package/dist/DotplotView/components/SelectionContextMenu.d.ts +0 -13
- package/dist/DotplotView/components/SelectionContextMenu.js +0 -42
- package/dist/DotplotView/components/SliderTooltip.d.ts +0 -2
- package/dist/DotplotView/components/SliderTooltip.js +0 -9
- package/dist/DotplotView/components/WarningDialog.d.ts +0 -16
- package/dist/DotplotView/components/WarningDialog.js +0 -39
- package/dist/DotplotView/components/hooks/useCtrlKeyTracking.d.ts +0 -1
- package/dist/DotplotView/components/hooks/useCtrlKeyTracking.js +0 -24
- package/dist/DotplotView/components/hooks/useCursorMode.d.ts +0 -7
- package/dist/DotplotView/components/hooks/useCursorMode.js +0 -19
- package/dist/DotplotView/components/hooks/useMouseCoordinates.d.ts +0 -29
- package/dist/DotplotView/components/hooks/useMouseCoordinates.js +0 -52
- package/dist/DotplotView/components/hooks/useMouseMoveHandler.d.ts +0 -6
- package/dist/DotplotView/components/hooks/useMouseMoveHandler.js +0 -27
- package/dist/DotplotView/components/hooks/useMouseUpHandler.d.ts +0 -3
- package/dist/DotplotView/components/hooks/useMouseUpHandler.js +0 -31
- package/dist/DotplotView/components/hooks/useWheelHandler.d.ts +0 -8
- package/dist/DotplotView/components/hooks/useWheelHandler.js +0 -47
- package/dist/DotplotView/components/util.d.ts +0 -14
- package/dist/DotplotView/components/util.js +0 -80
- package/dist/DotplotView/index.d.ts +0 -2
- package/dist/DotplotView/index.js +0 -52
- package/dist/DotplotView/model.d.ts +0 -440
- package/dist/DotplotView/model.js +0 -502
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +0 -4
- package/dist/DotplotView/svgcomponents/SVGBackground.js +0 -10
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +0 -2
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +0 -30
- package/dist/DotplotView/types.d.ts +0 -12
- package/dist/DotplotView/types.js +0 -2
- package/dist/LaunchDotplotView.d.ts +0 -2
- package/dist/LaunchDotplotView.js +0 -43
- package/dist/ServerSideRenderedBlockContent.d.ts +0 -12
- package/dist/ServerSideRenderedBlockContent.js +0 -48
- package/dist/ServerSideSyntenyRendering.d.ts +0 -13
- package/dist/ServerSideSyntenyRendering.js +0 -23
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -42
- package/dist/util.d.ts +0 -9
- package/dist/util.js +0 -7
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +0 -47
- package/esm/DotplotView/components/Grid.d.ts +0 -9
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
|
-
const Axes_1 = require("./Axes");
|
|
11
|
-
const DotplotTooltips_1 = __importDefault(require("./DotplotTooltips"));
|
|
12
|
-
const Header_1 = __importDefault(require("./Header"));
|
|
13
|
-
const ImportForm_1 = __importDefault(require("./ImportForm"));
|
|
14
|
-
const MouseInteractionLayer_1 = __importDefault(require("./MouseInteractionLayer"));
|
|
15
|
-
const SelectionContextMenu_1 = __importDefault(require("./SelectionContextMenu"));
|
|
16
|
-
const useCtrlKeyTracking_1 = require("./hooks/useCtrlKeyTracking");
|
|
17
|
-
const useCursorMode_1 = require("./hooks/useCursorMode");
|
|
18
|
-
const useMouseCoordinates_1 = require("./hooks/useMouseCoordinates");
|
|
19
|
-
const useMouseMoveHandler_1 = require("./hooks/useMouseMoveHandler");
|
|
20
|
-
const useMouseUpHandler_1 = require("./hooks/useMouseUpHandler");
|
|
21
|
-
const useWheelHandler_1 = require("./hooks/useWheelHandler");
|
|
22
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
23
|
-
spacer: {
|
|
24
|
-
gridColumn: '1/2',
|
|
25
|
-
gridRow: '2/2',
|
|
26
|
-
},
|
|
27
|
-
root: {
|
|
28
|
-
position: 'relative',
|
|
29
|
-
marginBottom: theme.spacing(1),
|
|
30
|
-
overflow: 'hidden',
|
|
31
|
-
},
|
|
32
|
-
container: {
|
|
33
|
-
display: 'grid',
|
|
34
|
-
padding: 5,
|
|
35
|
-
position: 'relative',
|
|
36
|
-
},
|
|
37
|
-
overlay: {
|
|
38
|
-
pointerEvents: 'none',
|
|
39
|
-
overflow: 'hidden',
|
|
40
|
-
display: 'flex',
|
|
41
|
-
width: '100%',
|
|
42
|
-
gridRow: '1/2',
|
|
43
|
-
gridColumn: '2/2',
|
|
44
|
-
zIndex: 100,
|
|
45
|
-
'& path': {
|
|
46
|
-
cursor: 'crosshair',
|
|
47
|
-
fill: 'none',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
content: {
|
|
51
|
-
position: 'relative',
|
|
52
|
-
gridColumn: '2/2',
|
|
53
|
-
gridRow: '1/2',
|
|
54
|
-
},
|
|
55
|
-
resizeHandle: {
|
|
56
|
-
height: 4,
|
|
57
|
-
background: '#ccc',
|
|
58
|
-
boxSizing: 'border-box',
|
|
59
|
-
borderTop: '1px solid #fafafa',
|
|
60
|
-
},
|
|
61
|
-
}));
|
|
62
|
-
const RenderedComponent = (0, mobx_react_1.observer)(({ model }) => {
|
|
63
|
-
const { classes } = useStyles();
|
|
64
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: classes.overlay, children: model.tracks.map(track => {
|
|
65
|
-
const [display] = track.displays;
|
|
66
|
-
const { RenderingComponent } = display;
|
|
67
|
-
return RenderingComponent ? ((0, jsx_runtime_1.jsx)(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
|
|
68
|
-
}) }));
|
|
69
|
-
});
|
|
70
|
-
const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
71
|
-
const { classes } = useStyles();
|
|
72
|
-
const { hview, vview, wheelMode, cursorMode } = model;
|
|
73
|
-
const { mousecurrClient, mousedownClient, mouseupClient, mouseOvered, setMouseCurrClient, setMouseDownClient, setMouseUpClient, setMouseOvered, ref, root, rootRect, mousedown, mousecurr, mouseup, mouserect, mouserectClient, xdistance, ydistance, } = (0, useMouseCoordinates_1.useMouseCoordinates)();
|
|
74
|
-
const { ctrlKeyDown, validPan, validSelect, setCtrlKeyWasUsed, setCtrlKeyDown, } = (0, useCursorMode_1.useCursorMode)(cursorMode);
|
|
75
|
-
(0, useWheelHandler_1.useWheelHandler)(ref, wheelMode, hview, vview, mousecurr, rootRect.height);
|
|
76
|
-
(0, useMouseMoveHandler_1.useMouseMoveHandler)(mousecurrClient, mousedownClient, mouseupClient, validPan, hview, vview, setMouseCurrClient);
|
|
77
|
-
(0, useCtrlKeyTracking_1.useCtrlKeyTracking)(setCtrlKeyDown);
|
|
78
|
-
(0, useMouseUpHandler_1.useMouseUpHandler)(mousedown, mouseup, xdistance, ydistance, validSelect, setMouseUpClient, setMouseDownClient);
|
|
79
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Header_1.default, { model: model, selection: !validSelect || !(mousedown && mouserect)
|
|
80
|
-
? undefined
|
|
81
|
-
: {
|
|
82
|
-
width: Math.abs(xdistance),
|
|
83
|
-
height: Math.abs(ydistance),
|
|
84
|
-
} }), (0, jsx_runtime_1.jsxs)("div", { ref: root, className: classes.root, onMouseLeave: () => {
|
|
85
|
-
setMouseOvered(false);
|
|
86
|
-
}, onMouseEnter: () => {
|
|
87
|
-
setMouseOvered(true);
|
|
88
|
-
}, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(Axes_1.VerticalAxis, { model: model }), (0, jsx_runtime_1.jsx)(Axes_1.HorizontalAxis, { model: model }), (0, jsx_runtime_1.jsxs)("div", { ref: ref, className: classes.content, children: [(0, jsx_runtime_1.jsx)(DotplotTooltips_1.default, { model: model, mouseOvered: mouseOvered, validSelect: validSelect, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance, mousedown: mousedown, mousedownClient: mousedownClient, ydistance: ydistance }), (0, jsx_runtime_1.jsx)(MouseInteractionLayer_1.default, { model: model, ctrlKeyDown: ctrlKeyDown, cursorMode: cursorMode, validSelect: validSelect, mousedown: mousedown, mouserect: mouserect, xdistance: xdistance, ydistance: ydistance, setMouseDownClient: setMouseDownClient, setMouseCurrClient: setMouseCurrClient, setCtrlKeyWasUsed: setCtrlKeyWasUsed }), (0, jsx_runtime_1.jsx)("div", { className: classes.spacer })] }), (0, jsx_runtime_1.jsx)(RenderedComponent, { model: model }), (0, jsx_runtime_1.jsx)(SelectionContextMenu_1.default, { model: model, mouseup: mouseup, mouseupClient: mouseupClient, mousedown: mousedown, setMouseUpClient: setMouseUpClient, setMouseDownClient: setMouseDownClient, setMouseOvered: setMouseOvered })] }), (0, jsx_runtime_1.jsx)(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
|
|
89
|
-
});
|
|
90
|
-
const DotplotView = (0, mobx_react_1.observer)(function ({ model }) {
|
|
91
|
-
const { initialized, loading, error } = model;
|
|
92
|
-
if ((!initialized && !loading) || error) {
|
|
93
|
-
return (0, jsx_runtime_1.jsx)(ImportForm_1.default, { model: model });
|
|
94
|
-
}
|
|
95
|
-
if (loading) {
|
|
96
|
-
return (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { variant: "h6" });
|
|
97
|
-
}
|
|
98
|
-
return (0, jsx_runtime_1.jsx)(DotplotViewInternal, { model: model });
|
|
99
|
-
});
|
|
100
|
-
exports.default = DotplotView;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
|
-
const react_1 = require("react");
|
|
38
|
-
const material_1 = require("@mui/material");
|
|
39
|
-
const mobx_react_1 = require("mobx-react");
|
|
40
|
-
const WarningDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./WarningDialog'))));
|
|
41
|
-
const DotplotWarnings = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
42
|
-
const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
|
|
43
|
-
const [shown, setShown] = (0, react_1.useState)(false);
|
|
44
|
-
const [hide, setHide] = (0, react_1.useState)(false);
|
|
45
|
-
return trackWarnings.length && !hide ? ((0, jsx_runtime_1.jsxs)(material_1.Alert, { severity: "warning", children: ["Warnings during render", ' ', (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
|
|
46
|
-
setShown(true);
|
|
47
|
-
}, children: "More info" }), shown ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => {
|
|
48
|
-
setShown(false);
|
|
49
|
-
} }) })) : null, (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
50
|
-
setHide(true);
|
|
51
|
-
}, children: "Dismiss" })] })) : null;
|
|
52
|
-
});
|
|
53
|
-
exports.default = DotplotWarnings;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = ExportSvgDialog;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
function LoadingMessage() {
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20, style: { marginRight: 20 } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { display: "inline", children: "Creating SVG" })] }));
|
|
11
|
-
}
|
|
12
|
-
function TextField2({ children, ...rest }) {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { ...rest, children: children }) }));
|
|
14
|
-
}
|
|
15
|
-
function useSvgLocal(key, val) {
|
|
16
|
-
return (0, util_1.useLocalStorage)(`svg-${key}`, val);
|
|
17
|
-
}
|
|
18
|
-
function ExportSvgDialog({ model, handleClose, }) {
|
|
19
|
-
const session = (0, util_1.getSession)(model);
|
|
20
|
-
const offscreenCanvas = typeof OffscreenCanvas !== 'undefined';
|
|
21
|
-
const [rasterizeLayers, setRasterizeLayers] = (0, react_1.useState)(offscreenCanvas);
|
|
22
|
-
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
23
|
-
const [error, setError] = (0, react_1.useState)();
|
|
24
|
-
const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg');
|
|
25
|
-
const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [error ? ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error })) : loading ? ((0, jsx_runtime_1.jsx)(LoadingMessage, {})) : null, (0, jsx_runtime_1.jsx)(TextField2, { helperText: "filename", value: filename, onChange: event => {
|
|
27
|
-
setFilename(event.target.value);
|
|
28
|
-
} }), session.allThemes ? ((0, jsx_runtime_1.jsx)(TextField2, { select: true, label: "Theme", value: themeName, onChange: event => {
|
|
29
|
-
setThemeName(event.target.value);
|
|
30
|
-
}, children: Object.entries(session.allThemes()).map(([key, val]) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: key, children: val.name || '(Unknown name)' }, key))) })) : null, offscreenCanvas ? ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
31
|
-
setRasterizeLayers(val => !val);
|
|
32
|
-
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Note: rasterizing layers not yet supported in this browser, so SVG size may be large" }))] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
33
|
-
handleClose();
|
|
34
|
-
}, children: "Cancel" }), (0, jsx_runtime_1.jsx)(material_1.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
|
-
});
|
|
43
|
-
handleClose();
|
|
44
|
-
}
|
|
45
|
-
catch (e) {
|
|
46
|
-
console.error(e);
|
|
47
|
-
setError(e);
|
|
48
|
-
}
|
|
49
|
-
finally {
|
|
50
|
-
setLoading(false);
|
|
51
|
-
}
|
|
52
|
-
}, children: "Submit" })] })] }));
|
|
53
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
2
|
-
export declare const GridRaw: ({ model, children, }: {
|
|
3
|
-
model: DotplotViewModel;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
-
export default function Grid({ model, children, }: {
|
|
7
|
-
model: DotplotViewModel;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GridRaw = void 0;
|
|
4
|
-
exports.default = Grid;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const util_1 = require("@jbrowse/core/util");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
exports.GridRaw = (0, mobx_react_1.observer)(function ({ model, children, }) {
|
|
10
|
-
const { viewWidth, viewHeight, hview, vview } = model;
|
|
11
|
-
const hblocks = hview.dynamicBlocks.contentBlocks;
|
|
12
|
-
const vblocks = vview.dynamicBlocks.contentBlocks;
|
|
13
|
-
if (!hblocks.length || !vblocks.length) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const htop = hview.displayedRegionsTotalPx - hview.offsetPx;
|
|
17
|
-
const vtop = vview.displayedRegionsTotalPx - vview.offsetPx;
|
|
18
|
-
const hbottom = hblocks[0].offsetPx - hview.offsetPx;
|
|
19
|
-
const vbottom = vblocks[0].offsetPx - vview.offsetPx;
|
|
20
|
-
const theme = (0, material_1.useTheme)();
|
|
21
|
-
const stroke = theme.palette.divider;
|
|
22
|
-
const rx = Math.max(hbottom, 0);
|
|
23
|
-
const ry = Math.max(viewHeight - vtop, 0);
|
|
24
|
-
const w = Math.min(htop - hbottom, viewWidth);
|
|
25
|
-
const h = Math.min(viewHeight - vbottom - ry, viewHeight);
|
|
26
|
-
let lastx = Number.POSITIVE_INFINITY;
|
|
27
|
-
let lasty = Number.POSITIVE_INFINITY;
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: rx, y: ry, width: w, height: h, ...(0, util_1.getFillProps)(theme.palette.background.default) }), (0, jsx_runtime_1.jsxs)("g", { children: [hblocks.map(region => {
|
|
29
|
-
const x = region.offsetPx - hview.offsetPx;
|
|
30
|
-
const render = Math.floor(x) !== Math.floor(lastx);
|
|
31
|
-
if (render) {
|
|
32
|
-
lastx = x;
|
|
33
|
-
}
|
|
34
|
-
return render ? ((0, jsx_runtime_1.jsx)("line", { x1: x, y1: 0, x2: x, y2: viewHeight, ...(0, util_1.getStrokeProps)(stroke) }, JSON.stringify(region))) : null;
|
|
35
|
-
}), vblocks.map(region => {
|
|
36
|
-
const y = viewHeight - (region.offsetPx - vview.offsetPx);
|
|
37
|
-
const render = Math.floor(y) !== Math.floor(lasty);
|
|
38
|
-
if (render) {
|
|
39
|
-
lasty = y;
|
|
40
|
-
}
|
|
41
|
-
return render ? ((0, jsx_runtime_1.jsx)("line", { x1: 0, y1: y, x2: viewWidth, y2: y, ...(0, util_1.getStrokeProps)(stroke) }, JSON.stringify(region))) : null;
|
|
42
|
-
}), (0, jsx_runtime_1.jsx)("line", { x1: htop, y1: 0, x2: htop, y2: viewHeight, ...(0, util_1.getStrokeProps)(stroke) }), (0, jsx_runtime_1.jsx)("line", { x1: 0, y1: viewHeight - vtop, x2: viewWidth, y2: viewHeight - vtop, ...(0, util_1.getStrokeProps)(stroke) })] }), children] }));
|
|
43
|
-
});
|
|
44
|
-
function Grid({ model, children, }) {
|
|
45
|
-
const { viewWidth, viewHeight } = model;
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("svg", { width: viewWidth, height: viewHeight, style: { background: 'rgba(0,0,0,0.12)' }, children: (0, jsx_runtime_1.jsx)(exports.GridRaw, { model: model, children: children }) }));
|
|
47
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
2
|
-
declare const DotplotHeader: ({ model, selection, }: {
|
|
3
|
-
model: DotplotViewModel;
|
|
4
|
-
selection?: {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default DotplotHeader;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const mui_1 = require("tss-react/mui");
|
|
11
|
-
const DotplotControls_1 = __importDefault(require("./DotplotControls"));
|
|
12
|
-
const DotplotWarnings_1 = __importDefault(require("./DotplotWarnings"));
|
|
13
|
-
const PanButtons_1 = __importDefault(require("./PanButtons"));
|
|
14
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
-
bp: {
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
marginLeft: 10,
|
|
19
|
-
},
|
|
20
|
-
spacer: {
|
|
21
|
-
flexGrow: 1,
|
|
22
|
-
},
|
|
23
|
-
headerBar: {
|
|
24
|
-
display: 'flex',
|
|
25
|
-
position: 'relative',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
const DotplotHeader = (0, mobx_react_1.observer)(function ({ model, selection, }) {
|
|
29
|
-
const { classes } = useStyles();
|
|
30
|
-
const { hview, vview, showPanButtons } = model;
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.headerBar, children: [(0, jsx_runtime_1.jsx)(DotplotControls_1.default, { model: model }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: ["x: ", hview.assemblyNames.join(','), " ", (0, util_1.getBpDisplayStr)(hview.currBp), (0, jsx_runtime_1.jsx)("br", {}), "y: ", vview.assemblyNames.join(','), " ", (0, util_1.getBpDisplayStr)(vview.currBp)] }), selection ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: [`width:${(0, util_1.getBpDisplayStr)(hview.bpPerPx * selection.width)}`, " ", (0, jsx_runtime_1.jsx)("br", {}), `height:${(0, util_1.getBpDisplayStr)(vview.bpPerPx * selection.height)}`] })) : null, (0, jsx_runtime_1.jsx)("div", { className: classes.spacer }), (0, jsx_runtime_1.jsx)(DotplotWarnings_1.default, { model: model }), showPanButtons ? (0, jsx_runtime_1.jsx)(PanButtons_1.default, { model: model }) : null] }));
|
|
32
|
-
});
|
|
33
|
-
exports.default = DotplotHeader;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../../model';
|
|
2
|
-
declare const ImportSyntenyOpenCustomTrack: ({ model, assembly1, assembly2, }: {
|
|
3
|
-
model: DotplotViewModel;
|
|
4
|
-
assembly1: string;
|
|
5
|
-
assembly2: string;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default ImportSyntenyOpenCustomTrack;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
8
|
-
const getAdapter_1 = require("./getAdapter");
|
|
9
|
-
const selectors_1 = require("./selectors");
|
|
10
|
-
const util_1 = require("./util");
|
|
11
|
-
const ImportSyntenyOpenCustomTrack = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, }) {
|
|
12
|
-
const [swap, setSwap] = (0, react_1.useState)(false);
|
|
13
|
-
const [bed2Location, setBed2Location] = (0, react_1.useState)();
|
|
14
|
-
const [bed1Location, setBed1Location] = (0, react_1.useState)();
|
|
15
|
-
const [fileLocation, setFileLocation] = (0, react_1.useState)();
|
|
16
|
-
const [indexFileLocation, setIndexFileLocation] = (0, react_1.useState)();
|
|
17
|
-
const [value, setValue] = (0, react_1.useState)('');
|
|
18
|
-
const [error, setError] = (0, react_1.useState)();
|
|
19
|
-
const fileName = (0, util_1.getName)(fileLocation);
|
|
20
|
-
const radioOption = value || (fileName ? (0, util_1.extName)((0, util_1.stripGz)(fileName)) : '');
|
|
21
|
-
(0, react_1.useEffect)(() => {
|
|
22
|
-
try {
|
|
23
|
-
if (fileLocation) {
|
|
24
|
-
const fn = fileName ? (0, util_1.basename)(fileName) : 'MyTrack';
|
|
25
|
-
const trackId = `${fn}-${Date.now()}-sessionTrack`;
|
|
26
|
-
setError(undefined);
|
|
27
|
-
model.setImportFormSyntenyTrack(0, {
|
|
28
|
-
type: 'userOpened',
|
|
29
|
-
value: {
|
|
30
|
-
trackId,
|
|
31
|
-
name: fn,
|
|
32
|
-
assemblyNames: [assembly2, assembly1],
|
|
33
|
-
type: 'SyntenyTrack',
|
|
34
|
-
adapter: (0, getAdapter_1.getAdapter)({
|
|
35
|
-
radioOption,
|
|
36
|
-
assembly1: swap ? assembly2 : assembly1,
|
|
37
|
-
assembly2: swap ? assembly1 : assembly2,
|
|
38
|
-
fileLocation,
|
|
39
|
-
indexFileLocation,
|
|
40
|
-
bed1Location,
|
|
41
|
-
bed2Location,
|
|
42
|
-
}),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch (e) {
|
|
48
|
-
console.error(e);
|
|
49
|
-
setError(e);
|
|
50
|
-
}
|
|
51
|
-
}, [
|
|
52
|
-
swap,
|
|
53
|
-
model,
|
|
54
|
-
fileName,
|
|
55
|
-
assembly1,
|
|
56
|
-
assembly2,
|
|
57
|
-
bed1Location,
|
|
58
|
-
bed2Location,
|
|
59
|
-
fileLocation,
|
|
60
|
-
indexFileLocation,
|
|
61
|
-
radioOption,
|
|
62
|
-
]);
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsx)(material_1.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." }), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { value: radioOption, onChange: event => {
|
|
64
|
-
setValue(event.target.value);
|
|
65
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, justifyContent: "center", children: [
|
|
66
|
-
'.paf',
|
|
67
|
-
'.delta',
|
|
68
|
-
'.out',
|
|
69
|
-
'.chain',
|
|
70
|
-
'.anchors',
|
|
71
|
-
'.anchors.simple',
|
|
72
|
-
'.pif.gz',
|
|
73
|
-
].map(extension => ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: extension, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: extension }, extension))) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
74
|
-
radioOption === '.out' ||
|
|
75
|
-
radioOption === '.delta' ||
|
|
76
|
-
radioOption === '.chain' ? ((0, jsx_runtime_1.jsx)(selectors_1.SyntenyFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap })) : radioOption === '.anchors' || radioOption === '.anchors.simple' ? ((0, jsx_runtime_1.jsx)(selectors_1.AnchorsFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, bed1Location: bed1Location, setBed1Location: setBed1Location, bed2Location: bed2Location, setBed2Location: setBed2Location })) : radioOption === '.pif.gz' ? ((0, jsx_runtime_1.jsx)(selectors_1.PifGzSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, indexFileLocation: indexFileLocation, setIndexFileLocation: setIndexFileLocation })) : null })] }));
|
|
77
|
-
});
|
|
78
|
-
exports.default = ImportSyntenyOpenCustomTrack;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../../model';
|
|
2
|
-
declare const ImportSyntenyTrackSelector: ({ model, assembly1, assembly2, }: {
|
|
3
|
-
model: DotplotViewModel;
|
|
4
|
-
assembly1: string;
|
|
5
|
-
assembly2: string;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default ImportSyntenyTrackSelector;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
-
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const mobx_react_1 = require("mobx-react");
|
|
12
|
-
function isRelevantTrack(track, assembly1, assembly2) {
|
|
13
|
-
const assemblyNames = (0, configuration_1.readConfObject)(track, 'assemblyNames');
|
|
14
|
-
return (assemblyNames.includes(assembly1) &&
|
|
15
|
-
assemblyNames.includes(assembly2) &&
|
|
16
|
-
track.type.includes('Synteny'));
|
|
17
|
-
}
|
|
18
|
-
const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, }) {
|
|
19
|
-
var _a;
|
|
20
|
-
const session = (0, util_1.getSession)(model);
|
|
21
|
-
const { tracks, sessionTracks } = session;
|
|
22
|
-
const allTracks = [
|
|
23
|
-
...tracks,
|
|
24
|
-
...(sessionTracks || []),
|
|
25
|
-
];
|
|
26
|
-
const filteredTracks = allTracks.filter(t => isRelevantTrack(t, assembly2, assembly1));
|
|
27
|
-
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
28
|
-
const [value, setValue] = (0, react_1.useState)(resetTrack);
|
|
29
|
-
(0, react_1.useEffect)(() => {
|
|
30
|
-
setValue(resetTrack);
|
|
31
|
-
}, [resetTrack]);
|
|
32
|
-
(0, react_1.useEffect)(() => {
|
|
33
|
-
model.setImportFormSyntenyTrack(0, {
|
|
34
|
-
type: 'preConfigured',
|
|
35
|
-
value,
|
|
36
|
-
});
|
|
37
|
-
}, [model, value]);
|
|
38
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { children: ["Select a track from the select box below, the track will be shown when you hit \"Launch\". Note: there is a track selector ", (0, jsx_runtime_1.jsx)("i", { children: "inside" }), " the DotplotView, which can turn on one or more SyntenyTracks (more than one can be displayed at once). Look for the track selector icon", ' ', (0, jsx_runtime_1.jsx)(Icons_1.TrackSelector, {})] }), filteredTracks.length ? ((0, jsx_runtime_1.jsx)(material_1.Select, { value: value, onChange: event => {
|
|
39
|
-
setValue(event.target.value);
|
|
40
|
-
}, children: filteredTracks.map(track => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: track.trackId, children: (0, tracks_1.getTrackName)(track, session) }, track.trackId))) })) : ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))] }));
|
|
41
|
-
});
|
|
42
|
-
exports.default = ImportSyntenyTrackSelector;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../../model';
|
|
2
|
-
declare const TrackSelector: ({ assembly1, assembly2, model, }: {
|
|
3
|
-
model: DotplotViewModel;
|
|
4
|
-
assembly1: string;
|
|
5
|
-
assembly2: string;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default TrackSelector;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const ImportSyntenyOpenCustomTrack_1 = __importDefault(require("./ImportSyntenyOpenCustomTrack"));
|
|
11
|
-
const ImportSyntenyTrackSelector_1 = __importDefault(require("./ImportSyntenyTrackSelector"));
|
|
12
|
-
const TrackSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, model, }) {
|
|
13
|
-
const [choice, setChoice] = (0, react_1.useState)('tracklist');
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
if (choice === 'none') {
|
|
16
|
-
model.setImportFormSyntenyTrack(0, { type: 'none' });
|
|
17
|
-
}
|
|
18
|
-
}, [model, choice]);
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, { id: "group-label", children: "(Optional) Select or add a synteny track" }), (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { row: true, value: choice, onChange: event => {
|
|
20
|
-
setChoice(event.target.value);
|
|
21
|
-
}, "aria-labelledby": "group-label", children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "none", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "None" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "tracklist", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "Existing track" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "custom", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "New track" })] })] }), choice === 'custom' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyOpenCustomTrack_1.default, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
22
|
-
});
|
|
23
|
-
exports.default = TrackSelector;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { FileLocation } from '@jbrowse/core/util';
|
|
2
|
-
export declare function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }: {
|
|
3
|
-
radioOption: string;
|
|
4
|
-
assembly1: string;
|
|
5
|
-
assembly2: string;
|
|
6
|
-
fileLocation?: FileLocation;
|
|
7
|
-
indexFileLocation?: FileLocation;
|
|
8
|
-
bed1Location?: FileLocation;
|
|
9
|
-
bed2Location?: FileLocation;
|
|
10
|
-
}): {
|
|
11
|
-
type: string;
|
|
12
|
-
pafLocation: FileLocation | undefined;
|
|
13
|
-
queryAssembly: string;
|
|
14
|
-
targetAssembly: string;
|
|
15
|
-
outLocation?: undefined;
|
|
16
|
-
deltaLocation?: undefined;
|
|
17
|
-
chainLocation?: undefined;
|
|
18
|
-
mcscanAnchorsLocation?: undefined;
|
|
19
|
-
bed1Location?: undefined;
|
|
20
|
-
bed2Location?: undefined;
|
|
21
|
-
assemblyNames?: undefined;
|
|
22
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
23
|
-
pifGzLocation?: undefined;
|
|
24
|
-
index?: undefined;
|
|
25
|
-
} | {
|
|
26
|
-
type: string;
|
|
27
|
-
outLocation: FileLocation | undefined;
|
|
28
|
-
queryAssembly: string;
|
|
29
|
-
targetAssembly: string;
|
|
30
|
-
pafLocation?: undefined;
|
|
31
|
-
deltaLocation?: undefined;
|
|
32
|
-
chainLocation?: undefined;
|
|
33
|
-
mcscanAnchorsLocation?: undefined;
|
|
34
|
-
bed1Location?: undefined;
|
|
35
|
-
bed2Location?: undefined;
|
|
36
|
-
assemblyNames?: undefined;
|
|
37
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
38
|
-
pifGzLocation?: undefined;
|
|
39
|
-
index?: undefined;
|
|
40
|
-
} | {
|
|
41
|
-
type: string;
|
|
42
|
-
deltaLocation: FileLocation | undefined;
|
|
43
|
-
queryAssembly: string;
|
|
44
|
-
targetAssembly: string;
|
|
45
|
-
pafLocation?: undefined;
|
|
46
|
-
outLocation?: undefined;
|
|
47
|
-
chainLocation?: undefined;
|
|
48
|
-
mcscanAnchorsLocation?: undefined;
|
|
49
|
-
bed1Location?: undefined;
|
|
50
|
-
bed2Location?: undefined;
|
|
51
|
-
assemblyNames?: undefined;
|
|
52
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
53
|
-
pifGzLocation?: undefined;
|
|
54
|
-
index?: undefined;
|
|
55
|
-
} | {
|
|
56
|
-
type: string;
|
|
57
|
-
chainLocation: FileLocation | undefined;
|
|
58
|
-
queryAssembly: string;
|
|
59
|
-
targetAssembly: string;
|
|
60
|
-
pafLocation?: undefined;
|
|
61
|
-
outLocation?: undefined;
|
|
62
|
-
deltaLocation?: undefined;
|
|
63
|
-
mcscanAnchorsLocation?: undefined;
|
|
64
|
-
bed1Location?: undefined;
|
|
65
|
-
bed2Location?: undefined;
|
|
66
|
-
assemblyNames?: undefined;
|
|
67
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
68
|
-
pifGzLocation?: undefined;
|
|
69
|
-
index?: undefined;
|
|
70
|
-
} | {
|
|
71
|
-
type: string;
|
|
72
|
-
mcscanAnchorsLocation: FileLocation | undefined;
|
|
73
|
-
bed1Location: FileLocation | undefined;
|
|
74
|
-
bed2Location: FileLocation | undefined;
|
|
75
|
-
assemblyNames: string[];
|
|
76
|
-
pafLocation?: undefined;
|
|
77
|
-
queryAssembly?: undefined;
|
|
78
|
-
targetAssembly?: undefined;
|
|
79
|
-
outLocation?: undefined;
|
|
80
|
-
deltaLocation?: undefined;
|
|
81
|
-
chainLocation?: undefined;
|
|
82
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
83
|
-
pifGzLocation?: undefined;
|
|
84
|
-
index?: undefined;
|
|
85
|
-
} | {
|
|
86
|
-
type: string;
|
|
87
|
-
mcscanSimpleAnchorsLocation: FileLocation | undefined;
|
|
88
|
-
bed1Location: FileLocation | undefined;
|
|
89
|
-
bed2Location: FileLocation | undefined;
|
|
90
|
-
assemblyNames: string[];
|
|
91
|
-
pafLocation?: undefined;
|
|
92
|
-
queryAssembly?: undefined;
|
|
93
|
-
targetAssembly?: undefined;
|
|
94
|
-
outLocation?: undefined;
|
|
95
|
-
deltaLocation?: undefined;
|
|
96
|
-
chainLocation?: undefined;
|
|
97
|
-
mcscanAnchorsLocation?: undefined;
|
|
98
|
-
pifGzLocation?: undefined;
|
|
99
|
-
index?: undefined;
|
|
100
|
-
} | {
|
|
101
|
-
type: string;
|
|
102
|
-
pifGzLocation: FileLocation | undefined;
|
|
103
|
-
index: {
|
|
104
|
-
location: FileLocation | undefined;
|
|
105
|
-
};
|
|
106
|
-
assemblyNames: string[];
|
|
107
|
-
pafLocation?: undefined;
|
|
108
|
-
queryAssembly?: undefined;
|
|
109
|
-
targetAssembly?: undefined;
|
|
110
|
-
outLocation?: undefined;
|
|
111
|
-
deltaLocation?: undefined;
|
|
112
|
-
chainLocation?: undefined;
|
|
113
|
-
mcscanAnchorsLocation?: undefined;
|
|
114
|
-
bed1Location?: undefined;
|
|
115
|
-
bed2Location?: undefined;
|
|
116
|
-
mcscanSimpleAnchorsLocation?: undefined;
|
|
117
|
-
};
|