@jbrowse/plugin-dotplot-view 3.7.0 → 4.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/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
|
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
|
|
5
|
+
const DotplotGrid = observer(function DotplotGrid({ model, children, }) {
|
|
6
6
|
const { viewWidth, viewHeight, hview, vview } = model;
|
|
7
7
|
const hblocks = hview.dynamicBlocks.contentBlocks;
|
|
8
8
|
const vblocks = vview.dynamicBlocks.contentBlocks;
|
|
9
|
+
const theme = useTheme();
|
|
9
10
|
if (!hblocks.length || !vblocks.length) {
|
|
10
11
|
return null;
|
|
11
12
|
}
|
|
@@ -13,31 +14,29 @@ export const GridRaw = observer(function ({ model, children, }) {
|
|
|
13
14
|
const vtop = vview.displayedRegionsTotalPx - vview.offsetPx;
|
|
14
15
|
const hbottom = hblocks[0].offsetPx - hview.offsetPx;
|
|
15
16
|
const vbottom = vblocks[0].offsetPx - vview.offsetPx;
|
|
16
|
-
const theme = useTheme();
|
|
17
17
|
const stroke = theme.palette.divider;
|
|
18
18
|
const rx = Math.max(hbottom, 0);
|
|
19
19
|
const ry = Math.max(viewHeight - vtop, 0);
|
|
20
20
|
const w = Math.min(htop - hbottom, viewWidth);
|
|
21
21
|
const h = Math.min(viewHeight - vbottom - ry, viewHeight);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const hlines = hblocks.filter((region, idx) => {
|
|
23
|
+
const x = Math.floor(region.offsetPx - hview.offsetPx);
|
|
24
|
+
const prevX = idx > 0 ? Math.floor(hblocks[idx - 1].offsetPx - hview.offsetPx) : null;
|
|
25
|
+
return x !== prevX;
|
|
26
|
+
});
|
|
27
|
+
const vlines = vblocks.filter((region, idx) => {
|
|
28
|
+
const y = Math.floor(viewHeight - (region.offsetPx - vview.offsetPx));
|
|
29
|
+
const prevY = idx > 0
|
|
30
|
+
? Math.floor(viewHeight - (vblocks[idx - 1].offsetPx - vview.offsetPx))
|
|
31
|
+
: null;
|
|
32
|
+
return y !== prevY;
|
|
33
|
+
});
|
|
34
|
+
return (_jsxs(_Fragment, { children: [_jsx("rect", { x: rx, y: ry, width: w, height: h, ...getFillProps(theme.palette.background.default) }), _jsxs("g", { children: [hlines.map(region => {
|
|
25
35
|
const x = region.offsetPx - hview.offsetPx;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
lastx = x;
|
|
29
|
-
}
|
|
30
|
-
return render ? (_jsx("line", { x1: x, y1: 0, x2: x, y2: viewHeight, ...getStrokeProps(stroke) }, JSON.stringify(region))) : null;
|
|
31
|
-
}), vblocks.map(region => {
|
|
36
|
+
return (_jsx("line", { x1: x, y1: 0, x2: x, y2: viewHeight, ...getStrokeProps(stroke) }, region.key));
|
|
37
|
+
}), vlines.map(region => {
|
|
32
38
|
const y = viewHeight - (region.offsetPx - vview.offsetPx);
|
|
33
|
-
|
|
34
|
-
if (render) {
|
|
35
|
-
lasty = y;
|
|
36
|
-
}
|
|
37
|
-
return render ? (_jsx("line", { x1: 0, y1: y, x2: viewWidth, y2: y, ...getStrokeProps(stroke) }, JSON.stringify(region))) : null;
|
|
39
|
+
return (_jsx("line", { x1: 0, y1: y, x2: viewWidth, y2: y, ...getStrokeProps(stroke) }, region.key));
|
|
38
40
|
}), _jsx("line", { x1: htop, y1: 0, x2: htop, y2: viewHeight, ...getStrokeProps(stroke) }), _jsx("line", { x1: 0, y1: viewHeight - vtop, x2: viewWidth, y2: viewHeight - vtop, ...getStrokeProps(stroke) })] }), children] }));
|
|
39
41
|
});
|
|
40
|
-
export default
|
|
41
|
-
const { viewWidth, viewHeight } = model;
|
|
42
|
-
return (_jsx("svg", { width: viewWidth, height: viewHeight, style: { background: 'rgba(0,0,0,0.12)' }, children: _jsx(GridRaw, { model: model, children: children }) }));
|
|
43
|
-
}
|
|
42
|
+
export default DotplotGrid;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
import DotplotGrid from "./DotplotGrid.js";
|
|
4
|
+
const DotplotGridWrapper = observer(function DotplotGridWrapper({ model, children, }) {
|
|
5
|
+
const { viewWidth, viewHeight } = model;
|
|
6
|
+
return (_jsx("svg", { width: viewWidth, height: viewHeight, style: { background: 'rgba(0,0,0,0.12)' }, children: _jsx(DotplotGrid, { model: model, children: children }) }));
|
|
7
|
+
});
|
|
8
|
+
export default DotplotGridWrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model.ts';
|
|
2
2
|
type Coord = [number, number] | undefined;
|
|
3
|
-
|
|
3
|
+
declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
4
4
|
model: DotplotViewModel;
|
|
5
5
|
mousedown: Coord;
|
|
6
6
|
mousedownClient: Coord;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import { locstr } from
|
|
5
|
-
|
|
4
|
+
import { locstr } from "./util.js";
|
|
5
|
+
const DotplotTooltipClick = observer(function DotplotTooltipClick({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
7
|
-
const x = (
|
|
8
|
-
const y = (
|
|
7
|
+
const x = (mousedownClient?.[0] || 0) - (xdistance < 0 ? 0 : 0);
|
|
8
|
+
const y = (mousedownClient?.[1] || 0) - (ydistance < 0 ? 0 : 0);
|
|
9
9
|
return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y }, children: [`x - ${locstr(mousedown[0], hview)}`, _jsx("br", {}), `y - ${locstr(viewHeight - mousedown[1], vview)}`, _jsx("br", {})] })) : null;
|
|
10
10
|
});
|
|
11
11
|
export default DotplotTooltipClick;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import { locstr } from
|
|
5
|
-
const DotplotTooltipMouseover = observer(function ({ model, mouserect, mouserectClient, xdistance, }) {
|
|
4
|
+
import { locstr } from "./util.js";
|
|
5
|
+
const DotplotTooltipMouseover = observer(function DotplotTooltipMouseover({ model, mouserect, mouserectClient, xdistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
7
7
|
return mouserect ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
|
|
8
8
|
? { x: mouserectClient[0], y: mouserectClient[1] }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy } from 'react';
|
|
3
|
-
const TooltipWhereClicked = lazy(() => import(
|
|
4
|
-
const TooltipWhereMouseovered = lazy(() => import(
|
|
3
|
+
const TooltipWhereClicked = lazy(() => import("./DotplotTooltipClick.js"));
|
|
4
|
+
const TooltipWhereMouseovered = lazy(() => import("./DotplotTooltipMouseover.js"));
|
|
5
5
|
export default function DotplotTooltips({ model, mouseOvered, validSelect, mouserect, mouserectClient, xdistance, mousedown, mousedownClient, ydistance, }) {
|
|
6
6
|
return (_jsxs(_Fragment, { children: [mouseOvered && validSelect ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }) })) : null, validSelect ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }) })) : null] }));
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
2
|
-
declare const DotplotView: ({ model }: {
|
|
1
|
+
import type { DotplotViewModel } from '../model.ts';
|
|
2
|
+
declare const DotplotView: ({ model, }: {
|
|
3
3
|
model: DotplotViewModel;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default DotplotView;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingEllipses, ResizeHandle } from '@jbrowse/core/ui';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useWheelHandler } from './hooks/useWheelHandler';
|
|
5
|
+
import { HorizontalAxis, VerticalAxis } from "./Axes.js";
|
|
6
|
+
import DotplotTooltips from "./DotplotTooltips.js";
|
|
7
|
+
import Header from "./Header.js";
|
|
8
|
+
import ImportForm from "./ImportForm/index.js";
|
|
9
|
+
import MouseInteractionLayer from "./MouseInteractionLayer.js";
|
|
10
|
+
import SelectionContextMenu from "./SelectionContextMenu.js";
|
|
11
|
+
import { useCtrlKeyTracking } from "./hooks/useCtrlKeyTracking.js";
|
|
12
|
+
import { useCursorMode } from "./hooks/useCursorMode.js";
|
|
13
|
+
import { useMouseCoordinates } from "./hooks/useMouseCoordinates.js";
|
|
14
|
+
import { useMouseMoveHandler } from "./hooks/useMouseMoveHandler.js";
|
|
15
|
+
import { useMouseUpHandler } from "./hooks/useMouseUpHandler.js";
|
|
16
|
+
import { useWheelHandler } from "./hooks/useWheelHandler.js";
|
|
17
17
|
const useStyles = makeStyles()(theme => ({
|
|
18
18
|
spacer: {
|
|
19
19
|
gridColumn: '1/2',
|
|
@@ -54,7 +54,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
54
54
|
borderTop: '1px solid #fafafa',
|
|
55
55
|
},
|
|
56
56
|
}));
|
|
57
|
-
const RenderedComponent = observer(({ model })
|
|
57
|
+
const RenderedComponent = observer(function RenderedComponent({ model, }) {
|
|
58
58
|
const { classes } = useStyles();
|
|
59
59
|
return (_jsx("div", { className: classes.overlay, children: model.tracks.map(track => {
|
|
60
60
|
const [display] = track.displays;
|
|
@@ -62,7 +62,7 @@ const RenderedComponent = observer(({ model }) => {
|
|
|
62
62
|
return RenderingComponent ? (_jsx(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
|
|
63
63
|
}) }));
|
|
64
64
|
});
|
|
65
|
-
const DotplotViewInternal = observer(function ({ model, }) {
|
|
65
|
+
const DotplotViewInternal = observer(function DotplotViewInternal({ model, }) {
|
|
66
66
|
const { classes } = useStyles();
|
|
67
67
|
const { hview, vview, wheelMode, cursorMode } = model;
|
|
68
68
|
const { mousecurrClient, mousedownClient, mouseupClient, mouseOvered, setMouseCurrClient, setMouseDownClient, setMouseUpClient, setMouseOvered, ref, root, rootRect, mousedown, mousecurr, mouseup, mouserect, mouserectClient, xdistance, ydistance, } = useMouseCoordinates();
|
|
@@ -82,14 +82,16 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
82
82
|
setMouseOvered(true);
|
|
83
83
|
}, children: [_jsxs("div", { className: classes.container, children: [_jsx(VerticalAxis, { model: model }), _jsx(HorizontalAxis, { model: model }), _jsxs("div", { ref: ref, className: classes.content, children: [_jsx(DotplotTooltips, { model: model, mouseOvered: mouseOvered, validSelect: validSelect, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance, mousedown: mousedown, mousedownClient: mousedownClient, ydistance: ydistance }), _jsx(MouseInteractionLayer, { model: model, ctrlKeyDown: ctrlKeyDown, cursorMode: cursorMode, validSelect: validSelect, mousedown: mousedown, mouserect: mouserect, xdistance: xdistance, ydistance: ydistance, setMouseDownClient: setMouseDownClient, setMouseCurrClient: setMouseCurrClient, setCtrlKeyWasUsed: setCtrlKeyWasUsed }), _jsx("div", { className: classes.spacer })] }), _jsx(RenderedComponent, { model: model }), _jsx(SelectionContextMenu, { model: model, mouseup: mouseup, mouseupClient: mouseupClient, mousedown: mousedown, setMouseUpClient: setMouseUpClient, setMouseDownClient: setMouseDownClient, setMouseOvered: setMouseOvered })] }), _jsx(ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
|
|
84
84
|
});
|
|
85
|
-
const DotplotView = observer(function ({ model }) {
|
|
86
|
-
const { initialized,
|
|
87
|
-
if (
|
|
85
|
+
const DotplotView = observer(function DotplotView({ model, }) {
|
|
86
|
+
const { initialized, showLoading, error, loadingMessage } = model;
|
|
87
|
+
if (showLoading) {
|
|
88
|
+
return _jsx(LoadingEllipses, { variant: "h6", message: loadingMessage });
|
|
89
|
+
}
|
|
90
|
+
else if (!initialized || error) {
|
|
88
91
|
return _jsx(ImportForm, { model: model });
|
|
89
92
|
}
|
|
90
|
-
|
|
91
|
-
return _jsx(
|
|
93
|
+
else {
|
|
94
|
+
return _jsx(DotplotViewInternal, { model: model });
|
|
92
95
|
}
|
|
93
|
-
return _jsx(DotplotViewInternal, { model: model });
|
|
94
96
|
});
|
|
95
97
|
export default DotplotView;
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Suspense, lazy, useState } from 'react';
|
|
3
3
|
import { Alert, Button } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
const WarningDialog = lazy(() => import(
|
|
6
|
-
const DotplotWarnings = observer(function ({ model, }) {
|
|
7
|
-
const trackWarnings = model.tracks.filter(t =>
|
|
5
|
+
const WarningDialog = lazy(() => import("./WarningDialog.js"));
|
|
6
|
+
const DotplotWarnings = observer(function DotplotWarnings({ model, }) {
|
|
7
|
+
const trackWarnings = model.tracks.filter(t => t.displays[0].warnings?.length);
|
|
8
8
|
const [shown, setShown] = useState(false);
|
|
9
9
|
const [hide, setHide] = useState(false);
|
|
10
10
|
return trackWarnings.length && !hide ? (_jsxs(Alert, { severity: "warning", children: ["Warnings during render", ' ', _jsx(Button, { onClick: () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { Typography } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import PanButtons from './PanButtons';
|
|
6
|
+
import DotplotControls from "./DotplotControls.js";
|
|
7
|
+
import DotplotWarnings from "./DotplotWarnings.js";
|
|
8
|
+
import PanButtons from "./PanButtons.js";
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
bp: {
|
|
11
11
|
display: 'flex',
|
|
@@ -20,7 +20,7 @@ const useStyles = makeStyles()({
|
|
|
20
20
|
position: 'relative',
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
-
const DotplotHeader = observer(function ({ model, selection, }) {
|
|
23
|
+
const DotplotHeader = observer(function DotplotHeader({ model, selection, }) {
|
|
24
24
|
const { classes } = useStyles();
|
|
25
25
|
const { hview, vview, showPanButtons } = model;
|
|
26
26
|
return (_jsxs("div", { className: classes.headerBar, children: [_jsx(DotplotControls, { model: model }), _jsxs(Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: ["x: ", hview.assemblyNames.join(','), " ", getBpDisplayStr(hview.currBp), _jsx("br", {}), "y: ", vview.assemblyNames.join(','), " ", getBpDisplayStr(vview.currBp)] }), selection ? (_jsxs(Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: [`width:${getBpDisplayStr(hview.bpPerPx * selection.width)}`, " ", _jsx("br", {}), `height:${getBpDisplayStr(vview.bpPerPx * selection.height)}`] })) : null, _jsx("div", { className: classes.spacer }), _jsx(DotplotWarnings, { model: model }), showPanButtons ? _jsx(PanButtons, { model: model }) : null] }));
|
|
@@ -3,10 +3,10 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
4
4
|
import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
import { getAdapter } from
|
|
7
|
-
import { AnchorsFileSelector, PifGzSelector, SyntenyFileSelector, } from
|
|
8
|
-
import { basename, extName, getName, stripGz } from
|
|
9
|
-
const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, assembly2, }) {
|
|
6
|
+
import { getAdapter } from "./getAdapter.js";
|
|
7
|
+
import { AnchorsFileSelector, PifGzSelector, SyntenyFileSelector, } from "./selectors/index.js";
|
|
8
|
+
import { basename, extName, getName, stripGz } from "./util.js";
|
|
9
|
+
const ImportSyntenyOpenCustomTrack = observer(function ImportSyntenyOpenCustomTrack({ model, assembly1, assembly2, }) {
|
|
10
10
|
const [swap, setSwap] = useState(false);
|
|
11
11
|
const [bed2Location, setBed2Location] = useState();
|
|
12
12
|
const [bed1Location, setBed1Location] = useState();
|
|
@@ -71,6 +71,7 @@ const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, asse
|
|
|
71
71
|
].map(extension => (_jsx(FormControlLabel, { value: extension, control: _jsx(Radio, {}), label: extension }, extension))) }) }), _jsx(Grid, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
72
72
|
radioOption === '.out' ||
|
|
73
73
|
radioOption === '.delta' ||
|
|
74
|
-
radioOption === '.chain' ? (_jsx(SyntenyFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap })) : radioOption === '.anchors' ||
|
|
74
|
+
radioOption === '.chain' ? (_jsx(SyntenyFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap })) : radioOption === '.anchors' ||
|
|
75
|
+
radioOption === '.anchors.simple' ? (_jsx(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' ? (_jsx(PifGzSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, indexFileLocation: indexFileLocation, setIndexFileLocation: setIndexFileLocation })) : null })] }));
|
|
75
76
|
});
|
|
76
77
|
export default ImportSyntenyOpenCustomTrack;
|
|
@@ -13,8 +13,7 @@ function isRelevantTrack(track, assembly1, assembly2) {
|
|
|
13
13
|
assemblyNames.includes(assembly2) &&
|
|
14
14
|
track.type.includes('Synteny'));
|
|
15
15
|
}
|
|
16
|
-
const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assembly2, }) {
|
|
17
|
-
var _a;
|
|
16
|
+
const ImportSyntenyTrackSelector = observer(function ImportSyntenyTrackSelector({ model, assembly1, assembly2, }) {
|
|
18
17
|
const session = getSession(model);
|
|
19
18
|
const { tracks, sessionTracks } = session;
|
|
20
19
|
const allTracks = [
|
|
@@ -22,7 +21,7 @@ const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assemb
|
|
|
22
21
|
...(sessionTracks || []),
|
|
23
22
|
];
|
|
24
23
|
const filteredTracks = allTracks.filter(t => isRelevantTrack(t, assembly2, assembly1));
|
|
25
|
-
const resetTrack =
|
|
24
|
+
const resetTrack = filteredTracks[0]?.trackId || '';
|
|
26
25
|
const [value, setValue] = useState(resetTrack);
|
|
27
26
|
useEffect(() => {
|
|
28
27
|
setValue(resetTrack);
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../../model';
|
|
1
|
+
import type { DotplotViewModel } from '../../model.ts';
|
|
2
|
+
export interface DotplotImportFormSyntenyOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
ReactComponent: React.FC<{
|
|
6
|
+
model: DotplotViewModel;
|
|
7
|
+
assembly1: string;
|
|
8
|
+
assembly2: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
2
11
|
declare const TrackSelector: ({ assembly1, assembly2, model, }: {
|
|
3
12
|
model: DotplotViewModel;
|
|
4
13
|
assembly1: string;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import { getEnv } from '@jbrowse/core/util';
|
|
3
4
|
import { FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import ImportSyntenyOpenCustomTrack from
|
|
6
|
-
import ImportSyntenyTrackSelector from
|
|
7
|
-
const TrackSelector = observer(function ({ assembly1, assembly2, model, }) {
|
|
6
|
+
import ImportSyntenyOpenCustomTrack from "./ImportSyntenyOpenCustomTrack.js";
|
|
7
|
+
import ImportSyntenyTrackSelector from "./ImportSyntenyTrackSelector.js";
|
|
8
|
+
const TrackSelector = observer(function TrackSelector({ assembly1, assembly2, model, }) {
|
|
9
|
+
const { pluginManager } = getEnv(model);
|
|
8
10
|
const [choice, setChoice] = useState('tracklist');
|
|
11
|
+
const customOptions = pluginManager.evaluateExtensionPoint('DotplotView-ImportFormSyntenyOptions', [], { model, assembly1, assembly2 });
|
|
12
|
+
const selectedCustomOption = customOptions.find(opt => opt.value === choice);
|
|
9
13
|
useEffect(() => {
|
|
10
14
|
if (choice === 'none') {
|
|
11
15
|
model.setImportFormSyntenyTrack(0, { type: 'none' });
|
|
@@ -13,6 +17,6 @@ const TrackSelector = observer(function ({ assembly1, assembly2, model, }) {
|
|
|
13
17
|
}, [model, choice]);
|
|
14
18
|
return (_jsxs(_Fragment, { children: [_jsxs(FormControl, { children: [_jsx(FormLabel, { id: "group-label", children: "(Optional) Select or add a synteny track" }), _jsxs(RadioGroup, { row: true, value: choice, onChange: event => {
|
|
15
19
|
setChoice(event.target.value);
|
|
16
|
-
}, "aria-labelledby": "group-label", children: [_jsx(FormControlLabel, { value: "none", control: _jsx(Radio, {}), label: "None" }), _jsx(FormControlLabel, { value: "tracklist", control: _jsx(Radio, {}), label: "Existing track" }), _jsx(FormControlLabel, { value: "custom", control: _jsx(Radio, {}), label: "New track" })] })] }), choice === 'custom' ? (_jsx(ImportSyntenyOpenCustomTrack, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? (_jsx(ImportSyntenyTrackSelector, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
20
|
+
}, "aria-labelledby": "group-label", children: [_jsx(FormControlLabel, { value: "none", control: _jsx(Radio, {}), label: "None" }), _jsx(FormControlLabel, { value: "tracklist", control: _jsx(Radio, {}), label: "Existing track" }), _jsx(FormControlLabel, { value: "custom", control: _jsx(Radio, {}), label: "New track" }), customOptions.map(opt => (_jsx(FormControlLabel, { value: opt.value, control: _jsx(Radio, {}), label: opt.label }, opt.value)))] })] }), choice === 'custom' ? (_jsx(ImportSyntenyOpenCustomTrack, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? (_jsx(ImportSyntenyTrackSelector, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null, selectedCustomOption ? (_jsx(selectedCustomOption.ReactComponent, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
17
21
|
});
|
|
18
22
|
export default TrackSelector;
|
|
@@ -2,20 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { AssemblySelector, ErrorMessage } from '@jbrowse/core/ui';
|
|
4
4
|
import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
6
|
import { Button, Container, FormControl, Grid, Paper, Typography, } from '@mui/material';
|
|
6
7
|
import { toJS, transaction } from 'mobx';
|
|
7
8
|
import { observer } from 'mobx-react';
|
|
8
|
-
import
|
|
9
|
-
import TrackSelector from './TrackSelector';
|
|
9
|
+
import TrackSelector from "./TrackSelector.js";
|
|
10
10
|
const useStyles = makeStyles()(theme => ({
|
|
11
11
|
importFormContainer: {
|
|
12
12
|
padding: theme.spacing(4),
|
|
13
13
|
margin: '0 auto',
|
|
14
14
|
},
|
|
15
|
-
assemblySelector: {
|
|
16
|
-
width: '75%',
|
|
17
|
-
margin: '0 auto',
|
|
18
|
-
},
|
|
19
15
|
}));
|
|
20
16
|
function doSubmit({ model, assembly1, assembly2, }) {
|
|
21
17
|
const session = getSession(model);
|
|
@@ -24,10 +20,9 @@ function doSubmit({ model, assembly1, assembly2, }) {
|
|
|
24
20
|
transaction(() => {
|
|
25
21
|
if (isSessionWithAddTracks(session)) {
|
|
26
22
|
toJS(importFormSyntenyTrackSelections).map((f, idx) => {
|
|
27
|
-
var _a;
|
|
28
23
|
if (f.type === 'userOpened') {
|
|
29
24
|
session.addTrackConf(f.value);
|
|
30
|
-
model.toggleTrack(
|
|
25
|
+
model.toggleTrack(f.value?.trackId);
|
|
31
26
|
}
|
|
32
27
|
else if (f.type === 'preConfigured') {
|
|
33
28
|
model.showTrack(f.value, idx);
|
|
@@ -37,7 +32,7 @@ function doSubmit({ model, assembly1, assembly2, }) {
|
|
|
37
32
|
model.setAssemblyNames(assembly2, assembly1);
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
|
-
const DotplotImportForm = observer(function ({ model, }) {
|
|
35
|
+
const DotplotImportForm = observer(function DotplotImportForm({ model, }) {
|
|
41
36
|
const { classes } = useStyles();
|
|
42
37
|
const session = getSession(model);
|
|
43
38
|
const { assemblyNames } = session;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectorProps } from './SelectorTypes';
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes.ts';
|
|
2
2
|
declare const AnchorsFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default AnchorsFileSelector;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import SwapAssemblies from
|
|
5
|
-
const AnchorsFileSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
|
|
4
|
+
import SwapAssemblies from "./SwapAssemblies.js";
|
|
5
|
+
const AnchorsFileSelector = observer(function AnchorsFileSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
|
|
6
6
|
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', _jsx("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), _jsxs("div", { children: [_jsx(FileSelector, { inline: true, name: radioOption, location: fileLocation, setLocation: loc => {
|
|
7
7
|
setFileLocation(loc);
|
|
8
8
|
} }), _jsx(FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectorProps } from './SelectorTypes';
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes.ts';
|
|
2
2
|
declare const PifGzSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PifGzSelector;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import SwapAssemblies from
|
|
5
|
-
const PifGzSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation
|
|
4
|
+
import SwapAssemblies from "./SwapAssemblies.js";
|
|
5
|
+
const PifGzSelector = observer(function PifGzSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation = () => { }, radioOption, }) {
|
|
6
6
|
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .pif.gz and index file (.pif.gz.tbi or .pif.gz.csi) files for created by `jbrowse make-pif`"] }), _jsxs("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), _jsx(FileSelector, { name: `${radioOption} index location (.tbi or .csi)`, inline: true, description: "", location: indexFileLocation, setLocation: setIndexFileLocation }), _jsx(SwapAssemblies, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
|
|
7
7
|
});
|
|
8
8
|
export default PifGzSelector;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
2
3
|
import HelpIcon from '@mui/icons-material/Help';
|
|
3
4
|
import { Button, Tooltip } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import {
|
|
6
|
-
import { helpStrings } from './SelectorTypes';
|
|
6
|
+
import { helpStrings } from "./SelectorTypes.js";
|
|
7
7
|
const useStyles = makeStyles()({
|
|
8
8
|
row: {
|
|
9
9
|
display: 'flex',
|
|
@@ -16,7 +16,7 @@ const useStyles = makeStyles()({
|
|
|
16
16
|
alignItems: 'center',
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
|
-
const SwapAssemblies = observer(function ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
|
|
19
|
+
const SwapAssemblies = observer(function SwapAssemblies({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
|
|
20
20
|
const { classes } = useStyles();
|
|
21
21
|
return (_jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: helpContent || (_jsx("code", { children: helpStrings[radioOption] })), children: _jsx(HelpIcon, {}) })] }), _jsxs("div", { className: classes.row, children: [_jsxs("div", { className: classes.swap, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: text1 }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: text2 })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
22
22
|
if (setSwap) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectorProps } from './SelectorTypes';
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes.ts';
|
|
2
2
|
declare const SyntenyFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SyntenyFileSelector;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
import
|
|
5
|
-
import SwapAssemblies from './SwapAssemblies';
|
|
5
|
+
import SwapAssemblies from "./SwapAssemblies.js";
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
container: {
|
|
8
8
|
display: 'flex',
|
|
@@ -10,7 +10,7 @@ const useStyles = makeStyles()({
|
|
|
10
10
|
gap: 10,
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
|
-
const SyntenyFileSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
|
|
13
|
+
const SyntenyFileSelector = observer(function SyntenyFileSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
|
|
14
14
|
const { classes } = useStyles();
|
|
15
15
|
return (_jsxs("div", { className: classes.container, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
16
16
|
setFileLocation(loc);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as AnchorsFileSelector } from './AnchorsFileSelector';
|
|
2
|
-
export { default as PifGzSelector } from './PifGzSelector';
|
|
3
|
-
export { default as SyntenyFileSelector } from './SyntenyFileSelector';
|
|
1
|
+
export { default as AnchorsFileSelector } from './AnchorsFileSelector.tsx';
|
|
2
|
+
export { default as PifGzSelector } from './PifGzSelector.tsx';
|
|
3
|
+
export { default as SyntenyFileSelector } from './SyntenyFileSelector.tsx';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as AnchorsFileSelector } from
|
|
2
|
-
export { default as PifGzSelector } from
|
|
3
|
-
export { default as SyntenyFileSelector } from
|
|
1
|
+
export { default as AnchorsFileSelector } from "./AnchorsFileSelector.js";
|
|
2
|
+
export { default as PifGzSelector } from "./PifGzSelector.js";
|
|
3
|
+
export { default as SyntenyFileSelector } from "./SyntenyFileSelector.js";
|