@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,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAdapter = getAdapter;
|
|
4
|
-
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
|
|
5
|
-
if (radioOption === '.paf') {
|
|
6
|
-
return {
|
|
7
|
-
type: 'PAFAdapter',
|
|
8
|
-
pafLocation: fileLocation,
|
|
9
|
-
queryAssembly: assembly1,
|
|
10
|
-
targetAssembly: assembly2,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
else if (radioOption === '.out') {
|
|
14
|
-
return {
|
|
15
|
-
type: 'MashMapAdapter',
|
|
16
|
-
outLocation: fileLocation,
|
|
17
|
-
queryAssembly: assembly1,
|
|
18
|
-
targetAssembly: assembly2,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else if (radioOption === '.delta') {
|
|
22
|
-
return {
|
|
23
|
-
type: 'DeltaAdapter',
|
|
24
|
-
deltaLocation: fileLocation,
|
|
25
|
-
queryAssembly: assembly1,
|
|
26
|
-
targetAssembly: assembly2,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
else if (radioOption === '.chain') {
|
|
30
|
-
return {
|
|
31
|
-
type: 'ChainAdapter',
|
|
32
|
-
chainLocation: fileLocation,
|
|
33
|
-
queryAssembly: assembly1,
|
|
34
|
-
targetAssembly: assembly2,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
else if (radioOption === '.anchors') {
|
|
38
|
-
return {
|
|
39
|
-
type: 'MCScanAnchorsAdapter',
|
|
40
|
-
mcscanAnchorsLocation: fileLocation,
|
|
41
|
-
bed1Location,
|
|
42
|
-
bed2Location,
|
|
43
|
-
assemblyNames: [assembly1, assembly2],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
else if (radioOption === '.anchors.simple') {
|
|
47
|
-
return {
|
|
48
|
-
type: 'MCScanSimpleAnchorsAdapter',
|
|
49
|
-
mcscanSimpleAnchorsLocation: fileLocation,
|
|
50
|
-
bed1Location,
|
|
51
|
-
bed2Location,
|
|
52
|
-
assemblyNames: [assembly1, assembly2],
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
else if (radioOption === '.pif.gz') {
|
|
56
|
-
return {
|
|
57
|
-
type: 'PairwiseIndexedPAFAdapter',
|
|
58
|
-
pifGzLocation: fileLocation,
|
|
59
|
-
index: {
|
|
60
|
-
location: indexFileLocation,
|
|
61
|
-
},
|
|
62
|
-
assemblyNames: [assembly1, assembly2],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw new Error(`Unknown to detect type ${radioOption} from filename (select radio button to clarify)`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,75 +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 ui_1 = require("@jbrowse/core/ui");
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const mobx_1 = require("mobx");
|
|
12
|
-
const mobx_react_1 = require("mobx-react");
|
|
13
|
-
const mui_1 = require("tss-react/mui");
|
|
14
|
-
const TrackSelector_1 = __importDefault(require("./TrackSelector"));
|
|
15
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
16
|
-
importFormContainer: {
|
|
17
|
-
padding: theme.spacing(4),
|
|
18
|
-
margin: '0 auto',
|
|
19
|
-
},
|
|
20
|
-
assemblySelector: {
|
|
21
|
-
width: '75%',
|
|
22
|
-
margin: '0 auto',
|
|
23
|
-
},
|
|
24
|
-
}));
|
|
25
|
-
function doSubmit({ model, assembly1, assembly2, }) {
|
|
26
|
-
const session = (0, util_1.getSession)(model);
|
|
27
|
-
const { importFormSyntenyTrackSelections } = model;
|
|
28
|
-
model.setError(undefined);
|
|
29
|
-
(0, mobx_1.transaction)(() => {
|
|
30
|
-
if ((0, util_1.isSessionWithAddTracks)(session)) {
|
|
31
|
-
(0, mobx_1.toJS)(importFormSyntenyTrackSelections).map((f, idx) => {
|
|
32
|
-
var _a;
|
|
33
|
-
if (f.type === 'userOpened') {
|
|
34
|
-
session.addTrackConf(f.value);
|
|
35
|
-
model.toggleTrack((_a = f.value) === null || _a === void 0 ? void 0 : _a.trackId);
|
|
36
|
-
}
|
|
37
|
-
else if (f.type === 'preConfigured') {
|
|
38
|
-
model.showTrack(f.value, idx);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
model.setAssemblyNames(assembly2, assembly1);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const DotplotImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
46
|
-
const { classes } = useStyles();
|
|
47
|
-
const session = (0, util_1.getSession)(model);
|
|
48
|
-
const { assemblyNames } = session;
|
|
49
|
-
const [assembly2, setAssembly2] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
50
|
-
const [assembly1, setAssembly1] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
51
|
-
const [error, setError] = (0, react_1.useState)();
|
|
52
|
-
const displayError = error || model.error;
|
|
53
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [displayError ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: displayError }) : null, (0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { style: { textAlign: 'center' }, children: "Select assemblies for dotplot view" }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "x-axis assembly", selected: assembly2, session: session, onChange: val => {
|
|
54
|
-
setAssembly2(val);
|
|
55
|
-
} }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "y-axis assembly", selected: assembly1, session: session, onChange: val => {
|
|
56
|
-
setAssembly1(val);
|
|
57
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
|
|
58
|
-
;
|
|
59
|
-
(async () => {
|
|
60
|
-
try {
|
|
61
|
-
setError(undefined);
|
|
62
|
-
doSubmit({
|
|
63
|
-
assembly1,
|
|
64
|
-
assembly2,
|
|
65
|
-
model,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
console.error(e);
|
|
70
|
-
setError(e);
|
|
71
|
-
}
|
|
72
|
-
})();
|
|
73
|
-
}, variant: "contained", color: "primary", children: "Launch" }) })] }), (0, jsx_runtime_1.jsx)(TrackSelector_1.default, { assembly2: assembly2, assembly1: assembly1, model: model })] })] }));
|
|
74
|
-
});
|
|
75
|
-
exports.default = DotplotImportForm;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectorProps } from './SelectorTypes';
|
|
2
|
-
declare const AnchorsFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default AnchorsFileSelector;
|
|
@@ -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 ui_1 = require("@jbrowse/core/ui");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
const SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
|
|
10
|
-
const AnchorsFileSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: radioOption, location: fileLocation, setLocation: loc => {
|
|
12
|
-
setFileLocation(loc);
|
|
13
|
-
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
14
|
-
if (setBed1Location) {
|
|
15
|
-
setBed1Location(loc);
|
|
16
|
-
}
|
|
17
|
-
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
18
|
-
if (setBed2Location) {
|
|
19
|
-
setBed2Location(loc);
|
|
20
|
-
}
|
|
21
|
-
} })] }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "bed 1 assembly", text2: "bed 2 assembly" })] }));
|
|
22
|
-
});
|
|
23
|
-
exports.default = AnchorsFileSelector;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectorProps } from './SelectorTypes';
|
|
2
|
-
declare const PifGzSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default PifGzSelector;
|
|
@@ -1,13 +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 SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
|
|
10
|
-
const PifGzSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation = undefined, setIndexFileLocation = () => { }, radioOption, }) {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.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`"] }), (0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} index location (.tbi or .csi)`, inline: true, description: "", location: indexFileLocation, setLocation: setIndexFileLocation }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
|
|
12
|
-
});
|
|
13
|
-
exports.default = PifGzSelector;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { FileLocation } from '@jbrowse/core/util/types';
|
|
2
|
-
export declare const helpStrings: {
|
|
3
|
-
readonly '.paf': "minimap2 target.fa query.fa";
|
|
4
|
-
readonly '.pif.gz': "minimap2 target.fa query.fa";
|
|
5
|
-
readonly '.out': "mashmap target.fa query.fa";
|
|
6
|
-
readonly '.delta': "mummer target.fa query.fa";
|
|
7
|
-
readonly '.chain': "e.g. queryToTarget.chain";
|
|
8
|
-
};
|
|
9
|
-
export interface SelectorProps {
|
|
10
|
-
assembly1?: string;
|
|
11
|
-
assembly2?: string;
|
|
12
|
-
swap?: boolean;
|
|
13
|
-
setSwap?: (arg: boolean) => void;
|
|
14
|
-
fileLocation?: FileLocation;
|
|
15
|
-
setFileLocation: (arg: FileLocation) => void;
|
|
16
|
-
indexFileLocation?: FileLocation;
|
|
17
|
-
setIndexFileLocation?: (arg: FileLocation) => void;
|
|
18
|
-
bed1Location?: FileLocation;
|
|
19
|
-
setBed1Location?: (arg: FileLocation) => void;
|
|
20
|
-
bed2Location?: FileLocation;
|
|
21
|
-
setBed2Location?: (arg: FileLocation) => void;
|
|
22
|
-
radioOption: string;
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.helpStrings = void 0;
|
|
4
|
-
exports.helpStrings = {
|
|
5
|
-
'.paf': 'minimap2 target.fa query.fa',
|
|
6
|
-
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
7
|
-
'.out': 'mashmap target.fa query.fa',
|
|
8
|
-
'.delta': 'mummer target.fa query.fa',
|
|
9
|
-
'.chain': 'e.g. queryToTarget.chain',
|
|
10
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export interface SwapAssembliesProps {
|
|
3
|
-
assembly1?: string;
|
|
4
|
-
assembly2?: string;
|
|
5
|
-
swap?: boolean;
|
|
6
|
-
setSwap?: (arg: boolean) => void;
|
|
7
|
-
radioOption: string;
|
|
8
|
-
helpContent?: ReactNode;
|
|
9
|
-
text1: string;
|
|
10
|
-
text2: string;
|
|
11
|
-
}
|
|
12
|
-
declare const SwapAssemblies: ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }: SwapAssembliesProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default SwapAssemblies;
|
|
@@ -1,32 +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 Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
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 SelectorTypes_1 = require("./SelectorTypes");
|
|
12
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
13
|
-
row: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
gap: 20,
|
|
16
|
-
},
|
|
17
|
-
swap: {
|
|
18
|
-
display: 'grid',
|
|
19
|
-
gridTemplateColumns: '1fr 1fr',
|
|
20
|
-
gap: 4,
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
const SwapAssemblies = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
|
|
25
|
-
const { classes } = useStyles();
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Verify or click swap", (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: helpContent || ((0, jsx_runtime_1.jsx)("code", { children: SelectorTypes_1.helpStrings[radioOption] })), children: (0, jsx_runtime_1.jsx)(Help_1.default, {}) })] }), (0, jsx_runtime_1.jsxs)("div", { className: classes.row, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.swap, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: text1 }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: text2 })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
27
|
-
if (setSwap) {
|
|
28
|
-
setSwap(!swap);
|
|
29
|
-
}
|
|
30
|
-
}, children: "Swap?" })] })] }));
|
|
31
|
-
});
|
|
32
|
-
exports.default = SwapAssemblies;
|
|
@@ -1,24 +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 SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
|
|
11
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
12
|
-
container: {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
gap: 10,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const SyntenyFileSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
|
|
19
|
-
const { classes } = useStyles();
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
21
|
-
setFileLocation(loc);
|
|
22
|
-
} }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, radioOption: radioOption, text1: "query assembly", text2: "target assembly" })] }));
|
|
23
|
-
});
|
|
24
|
-
exports.default = SyntenyFileSelector;
|
|
@@ -1,12 +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
|
-
exports.SyntenyFileSelector = exports.PifGzSelector = exports.AnchorsFileSelector = void 0;
|
|
7
|
-
var AnchorsFileSelector_1 = require("./AnchorsFileSelector");
|
|
8
|
-
Object.defineProperty(exports, "AnchorsFileSelector", { enumerable: true, get: function () { return __importDefault(AnchorsFileSelector_1).default; } });
|
|
9
|
-
var PifGzSelector_1 = require("./PifGzSelector");
|
|
10
|
-
Object.defineProperty(exports, "PifGzSelector", { enumerable: true, get: function () { return __importDefault(PifGzSelector_1).default; } });
|
|
11
|
-
var SyntenyFileSelector_1 = require("./SyntenyFileSelector");
|
|
12
|
-
Object.defineProperty(exports, "SyntenyFileSelector", { enumerable: true, get: function () { return __importDefault(SyntenyFileSelector_1).default; } });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function getName(sessionTrackData?: {
|
|
2
|
-
uri: string;
|
|
3
|
-
} | {
|
|
4
|
-
localPath: string;
|
|
5
|
-
} | {
|
|
6
|
-
name: string;
|
|
7
|
-
}): any;
|
|
8
|
-
export declare function stripGz(fileName: string): string;
|
|
9
|
-
export declare function basename(str: string): string | undefined;
|
|
10
|
-
export declare function extName(str: string): string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getName = getName;
|
|
4
|
-
exports.stripGz = stripGz;
|
|
5
|
-
exports.basename = basename;
|
|
6
|
-
exports.extName = extName;
|
|
7
|
-
function getName(sessionTrackData) {
|
|
8
|
-
return sessionTrackData
|
|
9
|
-
?
|
|
10
|
-
sessionTrackData.uri ||
|
|
11
|
-
sessionTrackData.localPath ||
|
|
12
|
-
sessionTrackData.name
|
|
13
|
-
: undefined;
|
|
14
|
-
}
|
|
15
|
-
function stripGz(fileName) {
|
|
16
|
-
return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
|
|
17
|
-
}
|
|
18
|
-
function basename(str) {
|
|
19
|
-
return str.split('#')[0].split('?')[0].split('/').pop();
|
|
20
|
-
}
|
|
21
|
-
function extName(str) {
|
|
22
|
-
const r = str.split('.').pop();
|
|
23
|
-
return r ? `.${r}` : '';
|
|
24
|
-
}
|
|
@@ -1,44 +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 mui_1 = require("tss-react/mui");
|
|
11
|
-
const SliderTooltip_1 = __importDefault(require("./SliderTooltip"));
|
|
12
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
13
|
-
container: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
marginLeft: 16,
|
|
17
|
-
marginRight: 16,
|
|
18
|
-
minWidth: 150,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
const MinLengthSlider = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
22
|
-
var _a, _b;
|
|
23
|
-
const { classes } = useStyles();
|
|
24
|
-
const firstDisplay = (_a = model.tracks[0]) === null || _a === void 0 ? void 0 : _a.displays[0];
|
|
25
|
-
const minAlignmentLength = (_b = firstDisplay === null || firstDisplay === void 0 ? void 0 : firstDisplay.minAlignmentLength) !== null && _b !== void 0 ? _b : 0;
|
|
26
|
-
const [minLengthValue, setMinLengthValue] = (0, react_1.useState)(Math.log2(Math.max(1, minAlignmentLength)) * 100);
|
|
27
|
-
(0, react_1.useEffect)(() => {
|
|
28
|
-
setMinLengthValue(Math.log2(Math.max(1, minAlignmentLength)) * 100);
|
|
29
|
-
}, [minAlignmentLength]);
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)("span", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", style: { marginRight: 8 }, children: "Min length:" }), (0, jsx_runtime_1.jsx)(material_1.Slider, { value: minLengthValue, onChange: (_, val) => {
|
|
31
|
-
setMinLengthValue(val);
|
|
32
|
-
}, onChangeCommitted: () => {
|
|
33
|
-
const newMinLength = Math.round(2 ** (minLengthValue / 100));
|
|
34
|
-
for (const track of model.tracks) {
|
|
35
|
-
for (const display of track.displays) {
|
|
36
|
-
;
|
|
37
|
-
display.setMinAlignmentLength(newMinLength);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, min: 0, max: Math.log2(1000000) * 100, valueLabelDisplay: "auto", valueLabelFormat: newValue => Math.round(2 ** (newValue / 100)).toLocaleString(), size: "small", style: { minWidth: 100 }, slots: {
|
|
41
|
-
valueLabel: SliderTooltip_1.default,
|
|
42
|
-
} })] }));
|
|
43
|
-
});
|
|
44
|
-
exports.default = MinLengthSlider;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
2
|
-
type Coord = [number, number] | undefined;
|
|
3
|
-
interface MouseInteractionLayerProps {
|
|
4
|
-
model: DotplotViewModel;
|
|
5
|
-
ctrlKeyDown: boolean;
|
|
6
|
-
cursorMode: string;
|
|
7
|
-
validSelect: boolean;
|
|
8
|
-
mousedown: Coord;
|
|
9
|
-
mouserect: Coord;
|
|
10
|
-
xdistance: number;
|
|
11
|
-
ydistance: number;
|
|
12
|
-
setMouseDownClient: (coord: Coord) => void;
|
|
13
|
-
setMouseCurrClient: (coord: Coord) => void;
|
|
14
|
-
setCtrlKeyWasUsed: (wasUsed: boolean) => void;
|
|
15
|
-
}
|
|
16
|
-
export default function MouseInteractionLayer({ model, ctrlKeyDown, cursorMode, validSelect, mousedown, mouserect, xdistance, ydistance, setMouseDownClient, setMouseCurrClient, setCtrlKeyWasUsed, }: MouseInteractionLayerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,18 +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
|
-
exports.default = MouseInteractionLayer;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Grid_1 = __importDefault(require("./Grid"));
|
|
9
|
-
function MouseInteractionLayer({ model, ctrlKeyDown, cursorMode, validSelect, mousedown, mouserect, xdistance, ydistance, setMouseDownClient, setMouseCurrClient, setCtrlKeyWasUsed, }) {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
|
|
11
|
-
if (event.button === 0) {
|
|
12
|
-
const { clientX, clientY } = event;
|
|
13
|
-
setMouseDownClient([clientX, clientY]);
|
|
14
|
-
setMouseCurrClient([clientX, clientY]);
|
|
15
|
-
setCtrlKeyWasUsed(ctrlKeyDown);
|
|
16
|
-
}
|
|
17
|
-
}, children: (0, jsx_runtime_1.jsx)(Grid_1.default, { model: model, children: validSelect && mousedown && mouserect ? ((0, jsx_runtime_1.jsx)("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null }) }));
|
|
18
|
-
}
|
|
@@ -1,43 +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 material_1 = require("@mui/material");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
|
-
const SliderTooltip_1 = __importDefault(require("./SliderTooltip"));
|
|
11
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
12
|
-
container: {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
marginLeft: 16,
|
|
16
|
-
marginRight: 16,
|
|
17
|
-
minWidth: 150,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
const OpacitySlider = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
const { classes } = useStyles();
|
|
23
|
-
const firstDisplay = (_a = model.tracks[0]) === null || _a === void 0 ? void 0 : _a.displays[0];
|
|
24
|
-
const alpha = (_b = firstDisplay === null || firstDisplay === void 0 ? void 0 : firstDisplay.alpha) !== null && _b !== void 0 ? _b : 1;
|
|
25
|
-
const exponent = 3;
|
|
26
|
-
const alphaToSlider = (a) => Math.pow(a, 1 / exponent);
|
|
27
|
-
const sliderToAlpha = (s) => Math.pow(s, exponent);
|
|
28
|
-
const sliderValue = alphaToSlider(alpha);
|
|
29
|
-
const handleAlphaChange = (_event, value) => {
|
|
30
|
-
const sliderVal = typeof value === 'number' ? value : value[0];
|
|
31
|
-
const newAlpha = sliderToAlpha(sliderVal);
|
|
32
|
-
for (const track of model.tracks) {
|
|
33
|
-
for (const display of track.displays) {
|
|
34
|
-
;
|
|
35
|
-
display.setAlpha(newAlpha);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)("span", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", style: { marginRight: 8 }, children: "Opacity:" }), (0, jsx_runtime_1.jsx)(material_1.Slider, { value: sliderValue, onChange: handleAlphaChange, min: 0, max: 1, step: 0.01, valueLabelDisplay: "auto", size: "small", style: { minWidth: 100 }, slots: {
|
|
40
|
-
valueLabel: SliderTooltip_1.default,
|
|
41
|
-
}, valueLabelFormat: value => sliderToAlpha(value).toFixed(3) })] }));
|
|
42
|
-
});
|
|
43
|
-
exports.default = OpacitySlider;
|
|
@@ -1,47 +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 ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
|
|
8
|
-
const ArrowDropUp_1 = __importDefault(require("@mui/icons-material/ArrowDropUp"));
|
|
9
|
-
const ArrowLeft_1 = __importDefault(require("@mui/icons-material/ArrowLeft"));
|
|
10
|
-
const ArrowRight_1 = __importDefault(require("@mui/icons-material/ArrowRight"));
|
|
11
|
-
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
12
|
-
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
13
|
-
const material_1 = require("@mui/material");
|
|
14
|
-
const mobx_react_1 = require("mobx-react");
|
|
15
|
-
const mui_1 = require("tss-react/mui");
|
|
16
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
17
|
-
dpad: {
|
|
18
|
-
display: 'grid',
|
|
19
|
-
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
20
|
-
margin: 0,
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
right: 50,
|
|
23
|
-
zIndex: 500,
|
|
24
|
-
top: 50,
|
|
25
|
-
},
|
|
26
|
-
icon: {
|
|
27
|
-
padding: 0,
|
|
28
|
-
margin: 0,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
const PanButtons = (0, mobx_react_1.observer)(function PanButtons({ model, }) {
|
|
32
|
-
const { classes } = useStyles();
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { className: classes.dpad, elevation: 6, children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
34
|
-
model.vview.scroll(100);
|
|
35
|
-
}, children: (0, jsx_runtime_1.jsx)(ArrowDropUp_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
36
|
-
model.hview.scroll(-100);
|
|
37
|
-
}, children: (0, jsx_runtime_1.jsx)(ArrowLeft_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
38
|
-
model.hview.scroll(100);
|
|
39
|
-
}, children: (0, jsx_runtime_1.jsx)(ArrowRight_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
40
|
-
model.vview.scroll(-100);
|
|
41
|
-
}, children: (0, jsx_runtime_1.jsx)(ArrowDropDown_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
42
|
-
model.zoomIn();
|
|
43
|
-
}, children: (0, jsx_runtime_1.jsx)(ZoomIn_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
44
|
-
model.zoomOut();
|
|
45
|
-
}, children: (0, jsx_runtime_1.jsx)(ZoomOut_1.default, {}) })] }));
|
|
46
|
-
});
|
|
47
|
-
exports.default = PanButtons;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DotplotViewModel } from '../model';
|
|
2
|
-
type Coord = [number, number] | undefined;
|
|
3
|
-
interface SelectionContextMenuProps {
|
|
4
|
-
model: DotplotViewModel;
|
|
5
|
-
mouseup: Coord;
|
|
6
|
-
mouseupClient: Coord;
|
|
7
|
-
mousedown: Coord;
|
|
8
|
-
setMouseUpClient: (coord: Coord) => void;
|
|
9
|
-
setMouseDownClient: (coord: Coord) => void;
|
|
10
|
-
setMouseOvered: (isOvered: boolean) => void;
|
|
11
|
-
}
|
|
12
|
-
export default function SelectionContextMenu({ model, mouseup, mouseupClient, mousedown, setMouseUpClient, setMouseDownClient, setMouseOvered, }: SelectionContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SelectionContextMenu;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
6
|
-
function getSelectionMenuItems(model, mousedown, mouseup, setMouseOvered) {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
label: 'Zoom in',
|
|
10
|
-
onClick: () => {
|
|
11
|
-
if (mousedown && mouseup) {
|
|
12
|
-
model.zoomInToMouseCoords(mousedown, mouseup);
|
|
13
|
-
}
|
|
14
|
-
setMouseOvered(false);
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: 'Open linear synteny view',
|
|
19
|
-
onClick: () => {
|
|
20
|
-
if (mousedown && mouseup) {
|
|
21
|
-
model.onDotplotView(mousedown, mouseup);
|
|
22
|
-
}
|
|
23
|
-
setMouseOvered(false);
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
function SelectionContextMenu({ model, mouseup, mouseupClient, mousedown, setMouseUpClient, setMouseDownClient, setMouseOvered, }) {
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
|
|
30
|
-
callback();
|
|
31
|
-
setMouseUpClient(undefined);
|
|
32
|
-
setMouseDownClient(undefined);
|
|
33
|
-
}, onClose: () => {
|
|
34
|
-
setMouseUpClient(undefined);
|
|
35
|
-
setMouseDownClient(undefined);
|
|
36
|
-
}, anchorReference: "anchorPosition", anchorPosition: mouseupClient
|
|
37
|
-
? {
|
|
38
|
-
top: mouseupClient[1] + 50,
|
|
39
|
-
left: mouseupClient[0] + 50,
|
|
40
|
-
}
|
|
41
|
-
: undefined, style: { zIndex: 11000 }, menuItems: getSelectionMenuItems(model, mousedown, mouseup, setMouseOvered) }));
|
|
42
|
-
}
|