@jbrowse/plugin-dotplot-view 2.6.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/LICENSE +201 -0
- package/dist/ComparativeRenderer/index.d.ts +27 -0
- package/dist/ComparativeRenderer/index.js +59 -0
- package/dist/ComparativeRenderer/index.js.map +1 -0
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +8 -0
- package/dist/DotplotDisplay/components/DotplotDisplay.js +24 -0
- package/dist/DotplotDisplay/components/DotplotDisplay.js.map +1 -0
- package/dist/DotplotDisplay/index.d.ts +12 -0
- package/dist/DotplotDisplay/index.js +48 -0
- package/dist/DotplotDisplay/index.js.map +1 -0
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +11 -0
- package/dist/DotplotDisplay/renderDotplotBlock.js +57 -0
- package/dist/DotplotDisplay/renderDotplotBlock.js.map +1 -0
- package/dist/DotplotDisplay/stateModelFactory.d.ts +138 -0
- package/dist/DotplotDisplay/stateModelFactory.js +165 -0
- package/dist/DotplotDisplay/stateModelFactory.js.map +1 -0
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +3 -0
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +102 -0
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js.map +1 -0
- package/dist/DotplotReadVsRef/index.d.ts +2 -0
- package/dist/DotplotReadVsRef/index.js +42 -0
- package/dist/DotplotReadVsRef/index.js.map +1 -0
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +27 -0
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +59 -0
- package/dist/DotplotRenderer/ComparativeRenderRpc.js.map +1 -0
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +69 -0
- package/dist/DotplotRenderer/DotplotRenderer.js +274 -0
- package/dist/DotplotRenderer/DotplotRenderer.js.map +1 -0
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +5 -0
- package/dist/DotplotRenderer/components/DotplotRendering.js +13 -0
- package/dist/DotplotRenderer/components/DotplotRendering.js.map +1 -0
- package/dist/DotplotRenderer/configSchema.d.ts +61 -0
- package/dist/DotplotRenderer/configSchema.js +83 -0
- package/dist/DotplotRenderer/configSchema.js.map +1 -0
- package/dist/DotplotRenderer/index.d.ts +3 -0
- package/dist/DotplotRenderer/index.js +17 -0
- package/dist/DotplotRenderer/index.js.map +1 -0
- package/dist/DotplotView/1dview.d.ts +307 -0
- package/dist/DotplotView/1dview.js +95 -0
- package/dist/DotplotView/1dview.js.map +1 -0
- package/dist/DotplotView/blockTypes.d.ts +61 -0
- package/dist/DotplotView/blockTypes.js +117 -0
- package/dist/DotplotView/blockTypes.js.map +1 -0
- package/dist/DotplotView/components/Axes.d.ts +14 -0
- package/dist/DotplotView/components/Axes.js +127 -0
- package/dist/DotplotView/components/Axes.js.map +1 -0
- package/dist/DotplotView/components/CursorIcon.d.ts +4 -0
- package/dist/DotplotView/components/CursorIcon.js +19 -0
- package/dist/DotplotView/components/CursorIcon.js.map +1 -0
- package/dist/DotplotView/components/DotplotTooltip.d.ts +19 -0
- package/dist/DotplotView/components/DotplotTooltip.js +128 -0
- package/dist/DotplotView/components/DotplotTooltip.js.map +1 -0
- package/dist/DotplotView/components/DotplotView.d.ts +6 -0
- package/dist/DotplotView/components/DotplotView.js +272 -0
- package/dist/DotplotView/components/DotplotView.js.map +1 -0
- package/dist/DotplotView/components/DotplotWarnings.d.ts +6 -0
- package/dist/DotplotView/components/DotplotWarnings.js +40 -0
- package/dist/DotplotView/components/DotplotWarnings.js.map +1 -0
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +8 -0
- package/dist/DotplotView/components/ExportSvgDialog.js +76 -0
- package/dist/DotplotView/components/ExportSvgDialog.js.map +1 -0
- package/dist/DotplotView/components/Grid.d.ts +10 -0
- package/dist/DotplotView/components/Grid.js +60 -0
- package/dist/DotplotView/components/Grid.js.map +1 -0
- package/dist/DotplotView/components/Header.d.ts +10 -0
- package/dist/DotplotView/components/Header.js +168 -0
- package/dist/DotplotView/components/Header.js.map +1 -0
- package/dist/DotplotView/components/ImportCustomTrack.d.ts +11 -0
- package/dist/DotplotView/components/ImportCustomTrack.js +180 -0
- package/dist/DotplotView/components/ImportCustomTrack.js.map +1 -0
- package/dist/DotplotView/components/ImportForm.d.ts +6 -0
- package/dist/DotplotView/components/ImportForm.js +121 -0
- package/dist/DotplotView/components/ImportForm.js.map +1 -0
- package/dist/DotplotView/components/ImportSyntenyTrackSelector.d.ts +9 -0
- package/dist/DotplotView/components/ImportSyntenyTrackSelector.js +69 -0
- package/dist/DotplotView/components/ImportSyntenyTrackSelector.js.map +1 -0
- package/dist/DotplotView/components/PanButtons.d.ts +6 -0
- package/dist/DotplotView/components/PanButtons.js +60 -0
- package/dist/DotplotView/components/PanButtons.js.map +1 -0
- package/dist/DotplotView/components/WarningDialog.d.ts +16 -0
- package/dist/DotplotView/components/WarningDialog.js +41 -0
- package/dist/DotplotView/components/WarningDialog.js.map +1 -0
- package/dist/DotplotView/components/util.d.ts +19 -0
- package/dist/DotplotView/components/util.js +90 -0
- package/dist/DotplotView/components/util.js.map +1 -0
- package/dist/DotplotView/index.d.ts +2 -0
- package/dist/DotplotView/index.js +44 -0
- package/dist/DotplotView/index.js.map +1 -0
- package/dist/DotplotView/model.d.ts +616 -0
- package/dist/DotplotView/model.js +647 -0
- package/dist/DotplotView/model.js.map +1 -0
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +5 -0
- package/dist/DotplotView/svgcomponents/SVGBackground.js +13 -0
- package/dist/DotplotView/svgcomponents/SVGBackground.js.map +1 -0
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +2 -0
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +47 -0
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js.map +1 -0
- package/dist/LaunchDotplotView.d.ts +2 -0
- package/dist/LaunchDotplotView.js +45 -0
- package/dist/LaunchDotplotView.js.map +1 -0
- package/dist/ServerSideRenderedBlockContent.d.ts +12 -0
- package/dist/ServerSideRenderedBlockContent.js +87 -0
- package/dist/ServerSideRenderedBlockContent.js.map +1 -0
- package/dist/ServerSideSyntenyRendering.d.ts +23 -0
- package/dist/ServerSideSyntenyRendering.js +54 -0
- package/dist/ServerSideSyntenyRendering.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/util.d.ts +9 -0
- package/dist/util.js +9 -0
- package/dist/util.js.map +1 -0
- package/esm/ComparativeRenderer/index.d.ts +27 -0
- package/esm/ComparativeRenderer/index.js +53 -0
- package/esm/ComparativeRenderer/index.js.map +1 -0
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +8 -0
- package/esm/DotplotDisplay/components/DotplotDisplay.js +19 -0
- package/esm/DotplotDisplay/components/DotplotDisplay.js.map +1 -0
- package/esm/DotplotDisplay/index.d.ts +12 -0
- package/esm/DotplotDisplay/index.js +41 -0
- package/esm/DotplotDisplay/index.js.map +1 -0
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +11 -0
- package/esm/DotplotDisplay/renderDotplotBlock.js +49 -0
- package/esm/DotplotDisplay/renderDotplotBlock.js.map +1 -0
- package/esm/DotplotDisplay/stateModelFactory.d.ts +138 -0
- package/esm/DotplotDisplay/stateModelFactory.js +158 -0
- package/esm/DotplotDisplay/stateModelFactory.js.map +1 -0
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +3 -0
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +98 -0
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js.map +1 -0
- package/esm/DotplotReadVsRef/index.d.ts +2 -0
- package/esm/DotplotReadVsRef/index.js +36 -0
- package/esm/DotplotReadVsRef/index.js.map +1 -0
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +27 -0
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +53 -0
- package/esm/DotplotRenderer/ComparativeRenderRpc.js.map +1 -0
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +69 -0
- package/esm/DotplotRenderer/DotplotRenderer.js +268 -0
- package/esm/DotplotRenderer/DotplotRenderer.js.map +1 -0
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +5 -0
- package/esm/DotplotRenderer/components/DotplotRendering.js +8 -0
- package/esm/DotplotRenderer/components/DotplotRendering.js.map +1 -0
- package/esm/DotplotRenderer/configSchema.d.ts +61 -0
- package/esm/DotplotRenderer/configSchema.js +81 -0
- package/esm/DotplotRenderer/configSchema.js.map +1 -0
- package/esm/DotplotRenderer/index.d.ts +3 -0
- package/esm/DotplotRenderer/index.js +12 -0
- package/esm/DotplotRenderer/index.js.map +1 -0
- package/esm/DotplotView/1dview.d.ts +307 -0
- package/esm/DotplotView/1dview.js +87 -0
- package/esm/DotplotView/1dview.js.map +1 -0
- package/esm/DotplotView/blockTypes.d.ts +61 -0
- package/esm/DotplotView/blockTypes.js +109 -0
- package/esm/DotplotView/blockTypes.js.map +1 -0
- package/esm/DotplotView/components/Axes.d.ts +14 -0
- package/esm/DotplotView/components/Axes.js +121 -0
- package/esm/DotplotView/components/Axes.js.map +1 -0
- package/esm/DotplotView/components/CursorIcon.d.ts +4 -0
- package/esm/DotplotView/components/CursorIcon.js +11 -0
- package/esm/DotplotView/components/CursorIcon.js.map +1 -0
- package/esm/DotplotView/components/DotplotTooltip.d.ts +19 -0
- package/esm/DotplotView/components/DotplotTooltip.js +101 -0
- package/esm/DotplotView/components/DotplotTooltip.js.map +1 -0
- package/esm/DotplotView/components/DotplotView.d.ts +6 -0
- package/esm/DotplotView/components/DotplotView.js +244 -0
- package/esm/DotplotView/components/DotplotView.js.map +1 -0
- package/esm/DotplotView/components/DotplotWarnings.d.ts +6 -0
- package/esm/DotplotView/components/DotplotWarnings.js +15 -0
- package/esm/DotplotView/components/DotplotWarnings.js.map +1 -0
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +8 -0
- package/esm/DotplotView/components/ExportSvgDialog.js +50 -0
- package/esm/DotplotView/components/ExportSvgDialog.js.map +1 -0
- package/esm/DotplotView/components/Grid.d.ts +10 -0
- package/esm/DotplotView/components/Grid.js +53 -0
- package/esm/DotplotView/components/Grid.js.map +1 -0
- package/esm/DotplotView/components/Header.d.ts +10 -0
- package/esm/DotplotView/components/Header.js +140 -0
- package/esm/DotplotView/components/Header.js.map +1 -0
- package/esm/DotplotView/components/ImportCustomTrack.d.ts +11 -0
- package/esm/DotplotView/components/ImportCustomTrack.js +152 -0
- package/esm/DotplotView/components/ImportCustomTrack.js.map +1 -0
- package/esm/DotplotView/components/ImportForm.d.ts +6 -0
- package/esm/DotplotView/components/ImportForm.js +93 -0
- package/esm/DotplotView/components/ImportForm.js.map +1 -0
- package/esm/DotplotView/components/ImportSyntenyTrackSelector.d.ts +9 -0
- package/esm/DotplotView/components/ImportSyntenyTrackSelector.js +44 -0
- package/esm/DotplotView/components/ImportSyntenyTrackSelector.js.map +1 -0
- package/esm/DotplotView/components/PanButtons.d.ts +6 -0
- package/esm/DotplotView/components/PanButtons.js +55 -0
- package/esm/DotplotView/components/PanButtons.js.map +1 -0
- package/esm/DotplotView/components/WarningDialog.d.ts +16 -0
- package/esm/DotplotView/components/WarningDialog.js +36 -0
- package/esm/DotplotView/components/WarningDialog.js.map +1 -0
- package/esm/DotplotView/components/util.d.ts +19 -0
- package/esm/DotplotView/components/util.js +83 -0
- package/esm/DotplotView/components/util.js.map +1 -0
- package/esm/DotplotView/index.d.ts +2 -0
- package/esm/DotplotView/index.js +15 -0
- package/esm/DotplotView/index.js.map +1 -0
- package/esm/DotplotView/model.d.ts +616 -0
- package/esm/DotplotView/model.js +616 -0
- package/esm/DotplotView/model.js.map +1 -0
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +5 -0
- package/esm/DotplotView/svgcomponents/SVGBackground.js +7 -0
- package/esm/DotplotView/svgcomponents/SVGBackground.js.map +1 -0
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +2 -0
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +40 -0
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js.map +1 -0
- package/esm/LaunchDotplotView.d.ts +2 -0
- package/esm/LaunchDotplotView.js +42 -0
- package/esm/LaunchDotplotView.js.map +1 -0
- package/esm/ServerSideRenderedBlockContent.d.ts +12 -0
- package/esm/ServerSideRenderedBlockContent.js +62 -0
- package/esm/ServerSideRenderedBlockContent.js.map +1 -0
- package/esm/ServerSideSyntenyRendering.d.ts +23 -0
- package/esm/ServerSideSyntenyRendering.js +29 -0
- package/esm/ServerSideSyntenyRendering.js.map +1 -0
- package/esm/index.d.ts +7 -0
- package/esm/index.js +38 -0
- package/esm/index.js.map +1 -0
- package/esm/util.d.ts +9 -0
- package/esm/util.js +5 -0
- package/esm/util.js.map +1 -0
- package/package.json +69 -0
- package/src/ComparativeRenderer/index.ts +87 -0
- package/src/DotplotDisplay/components/DotplotDisplay.tsx +34 -0
- package/src/DotplotDisplay/index.ts +48 -0
- package/src/DotplotDisplay/renderDotplotBlock.ts +60 -0
- package/src/DotplotDisplay/stateModelFactory.tsx +196 -0
- package/src/DotplotReadVsRef/DotplotReadVsRef.ts +115 -0
- package/src/DotplotReadVsRef/index.ts +50 -0
- package/src/DotplotRenderer/ComparativeRenderRpc.ts +87 -0
- package/src/DotplotRenderer/DotplotRenderer.ts +328 -0
- package/src/DotplotRenderer/__image_snapshots__/linear-synteny-renderer-test-ts-test-rendering-a-simple-synteny-from-fake-data-1-snap.png +0 -0
- package/src/DotplotRenderer/components/DotplotRendering.tsx +12 -0
- package/src/DotplotRenderer/configSchema.ts +92 -0
- package/src/DotplotRenderer/index.ts +16 -0
- package/src/DotplotView/1dview.ts +98 -0
- package/src/DotplotView/blockTypes.ts +140 -0
- package/src/DotplotView/components/Axes.tsx +246 -0
- package/src/DotplotView/components/CursorIcon.tsx +24 -0
- package/src/DotplotView/components/DotplotTooltip.tsx +163 -0
- package/src/DotplotView/components/DotplotView.tsx +348 -0
- package/src/DotplotView/components/DotplotWarnings.tsx +26 -0
- package/src/DotplotView/components/ExportSvgDialog.tsx +129 -0
- package/src/DotplotView/components/Grid.tsx +112 -0
- package/src/DotplotView/components/Header.tsx +182 -0
- package/src/DotplotView/components/ImportCustomTrack.tsx +262 -0
- package/src/DotplotView/components/ImportForm.tsx +209 -0
- package/src/DotplotView/components/ImportSyntenyTrackSelector.tsx +90 -0
- package/src/DotplotView/components/PanButtons.tsx +93 -0
- package/src/DotplotView/components/WarningDialog.tsx +74 -0
- package/src/DotplotView/components/util.ts +118 -0
- package/src/DotplotView/index.ts +16 -0
- package/src/DotplotView/model.test.ts +17 -0
- package/src/DotplotView/model.ts +719 -0
- package/src/DotplotView/svgcomponents/SVGBackground.tsx +21 -0
- package/src/DotplotView/svgcomponents/SVGDotplotView.tsx +68 -0
- package/src/LaunchDotplotView.ts +63 -0
- package/src/ServerSideRenderedBlockContent.tsx +86 -0
- package/src/ServerSideSyntenyRendering.tsx +54 -0
- package/src/index.ts +41 -0
- package/src/util.ts +14 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
|
+
const material_1 = require("@mui/material");
|
|
31
|
+
const mui_1 = require("tss-react/mui");
|
|
32
|
+
const mobx_react_1 = require("mobx-react");
|
|
33
|
+
const mobx_1 = require("mobx");
|
|
34
|
+
const util_1 = require("@jbrowse/core/util");
|
|
35
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
36
|
+
const ImportCustomTrack_1 = __importDefault(require("./ImportCustomTrack"));
|
|
37
|
+
const ImportSyntenyTrackSelector_1 = __importDefault(require("./ImportSyntenyTrackSelector"));
|
|
38
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
39
|
+
importFormContainer: {
|
|
40
|
+
padding: theme.spacing(4),
|
|
41
|
+
margin: '0 auto',
|
|
42
|
+
},
|
|
43
|
+
assemblySelector: {
|
|
44
|
+
width: '75%',
|
|
45
|
+
margin: '0 auto',
|
|
46
|
+
},
|
|
47
|
+
}));
|
|
48
|
+
function TrackSelector({ setSessionTrackData, setShowTrackId, sessionTrackData, assembly1, assembly2, model, }) {
|
|
49
|
+
const [choice, setChoice] = (0, react_1.useState)('none');
|
|
50
|
+
(0, react_1.useEffect)(() => {
|
|
51
|
+
if (choice === 'none') {
|
|
52
|
+
setSessionTrackData(undefined);
|
|
53
|
+
setShowTrackId(undefined);
|
|
54
|
+
}
|
|
55
|
+
}, [choice, setSessionTrackData, setShowTrackId]);
|
|
56
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
|
+
react_1.default.createElement(material_1.FormControl, null,
|
|
58
|
+
react_1.default.createElement(material_1.FormLabel, { id: "group-label" }, "(Optional) Select or add a synteny track"),
|
|
59
|
+
react_1.default.createElement(material_1.RadioGroup, { row: true, value: choice, onChange: event => setChoice(event.target.value), "aria-labelledby": "group-label" },
|
|
60
|
+
react_1.default.createElement(material_1.FormControlLabel, { value: "none", control: react_1.default.createElement(material_1.Radio, null), label: "None" }),
|
|
61
|
+
react_1.default.createElement(material_1.FormControlLabel, { value: "tracklist", control: react_1.default.createElement(material_1.Radio, null), label: "Existing track" }),
|
|
62
|
+
react_1.default.createElement(material_1.FormControlLabel, { value: "custom", control: react_1.default.createElement(material_1.Radio, null), label: "New track" }))),
|
|
63
|
+
choice === 'custom' ? (react_1.default.createElement(ImportCustomTrack_1.default, { setSessionTrackData: setSessionTrackData, sessionTrackData: sessionTrackData, assembly2: assembly2, assembly1: assembly1 })) : null,
|
|
64
|
+
choice === 'tracklist' ? (react_1.default.createElement(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2, setShowTrackId: setShowTrackId })) : null));
|
|
65
|
+
}
|
|
66
|
+
const DotplotImportForm = (0, mobx_react_1.observer)(({ model }) => {
|
|
67
|
+
const { classes } = useStyles();
|
|
68
|
+
const session = (0, util_1.getSession)(model);
|
|
69
|
+
const { assemblyNames } = session;
|
|
70
|
+
const [assembly2, setAssembly2] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
71
|
+
const [assembly1, setAssembly1] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
72
|
+
const [error, setError] = (0, react_1.useState)();
|
|
73
|
+
const [sessionTrackData, setSessionTrackData] = (0, react_1.useState)();
|
|
74
|
+
const [showTrackId, setShowTrackId] = (0, react_1.useState)();
|
|
75
|
+
function onOpenClick() {
|
|
76
|
+
try {
|
|
77
|
+
if (!(0, util_1.isSessionWithAddTracks)(session)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
setError(undefined);
|
|
81
|
+
model.setError(undefined);
|
|
82
|
+
(0, mobx_1.transaction)(() => {
|
|
83
|
+
if (sessionTrackData) {
|
|
84
|
+
session.addTrackConf(sessionTrackData);
|
|
85
|
+
model.toggleTrack(sessionTrackData.trackId);
|
|
86
|
+
}
|
|
87
|
+
else if (showTrackId) {
|
|
88
|
+
model.showTrack(showTrackId);
|
|
89
|
+
}
|
|
90
|
+
model.setViews([
|
|
91
|
+
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
92
|
+
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
93
|
+
]);
|
|
94
|
+
model.setAssemblyNames(assembly2, assembly1);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
console.error(e);
|
|
99
|
+
setError(e);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// this is a combination of any displayed error message we have
|
|
103
|
+
const displayError = error || model.error;
|
|
104
|
+
return (react_1.default.createElement(material_1.Container, { className: classes.importFormContainer },
|
|
105
|
+
displayError ? react_1.default.createElement(ui_1.ErrorMessage, { error: displayError }) : null,
|
|
106
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", className: classes.assemblySelector },
|
|
107
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
108
|
+
react_1.default.createElement(material_1.Paper, { style: { padding: 12 } },
|
|
109
|
+
react_1.default.createElement(material_1.Typography, { style: { textAlign: 'center' } }, "Select assemblies for dotplot view"),
|
|
110
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center" },
|
|
111
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
112
|
+
react_1.default.createElement(ui_1.AssemblySelector, { selected: assembly1, onChange: val => setAssembly1(val), session: session })),
|
|
113
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
114
|
+
react_1.default.createElement(ui_1.AssemblySelector, { selected: assembly2, onChange: val => setAssembly2(val), session: session })),
|
|
115
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
116
|
+
react_1.default.createElement(material_1.FormControl, null,
|
|
117
|
+
react_1.default.createElement(material_1.Button, { onClick: onOpenClick, variant: "contained", color: "primary" }, "Launch"))))),
|
|
118
|
+
react_1.default.createElement(TrackSelector, { setShowTrackId: setShowTrackId, assembly2: assembly2, assembly1: assembly1, setSessionTrackData: setSessionTrackData, sessionTrackData: sessionTrackData, model: model })))));
|
|
119
|
+
});
|
|
120
|
+
exports.default = DotplotImportForm;
|
|
121
|
+
//# sourceMappingURL=ImportForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportForm.js","sourceRoot":"","sources":["../../../src/DotplotView/components/ImportForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,4CAWsB;AACtB,uCAA0C;AAC1C,2CAAqC;AACrC,+BAAkC;AAGlC,6CAAuE;AACvE,yCAAiE;AAIjE,4EAAmD;AACnD,8FAAqE;AAErE,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,mBAAmB,EAAE;QACnB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,QAAQ;KACjB;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC,CAAC,CAAA;AAIH,SAAS,aAAa,CAAC,EACrB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,KAAK,GAQN;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,MAAM,CAAC,CAAA;IAE5C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,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Q,EAAE,SAAS,EACnB,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAClC,OAAO,EAAE,OAAO,GAChB,CACG;wBACP,8BAAC,eAAI,IAAC,IAAI;4BACR,8BAAC,sBAAW;gCACV,8BAAC,iBAAM,IACL,OAAO,EAAE,WAAW,EACpB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,aAGR,CACG,CACT,CACF,CACD;gBACR,8BAAC,aAAa,IACZ,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,KAAK,GACZ,CACG,CACF,CACG,CACb,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,kBAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DotplotViewModel } from '../model';
|
|
3
|
+
declare const Selector: ({ model, assembly1, assembly2, setShowTrackId, }: {
|
|
4
|
+
model: DotplotViewModel;
|
|
5
|
+
assembly1: string;
|
|
6
|
+
assembly2: string;
|
|
7
|
+
setShowTrackId: (arg: string) => void;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default Selector;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const material_1 = require("@mui/material");
|
|
28
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
29
|
+
const util_1 = require("@jbrowse/core/util");
|
|
30
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
31
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
32
|
+
const mobx_react_1 = require("mobx-react");
|
|
33
|
+
// icons
|
|
34
|
+
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
35
|
+
function f(track, assembly1, assembly2) {
|
|
36
|
+
const assemblyNames = (0, configuration_1.readConfObject)(track, 'assemblyNames');
|
|
37
|
+
return (assemblyNames.includes(assembly1) &&
|
|
38
|
+
assemblyNames.includes(assembly2) &&
|
|
39
|
+
track.type.includes('Synteny'));
|
|
40
|
+
}
|
|
41
|
+
const Selector = (0, mobx_react_1.observer)(({ model, assembly1, assembly2, setShowTrackId, }) => {
|
|
42
|
+
var _a;
|
|
43
|
+
const session = (0, util_1.getSession)(model);
|
|
44
|
+
const { tracks, sessionTracks } = session;
|
|
45
|
+
const allTracks = [...tracks, ...sessionTracks];
|
|
46
|
+
const filteredTracks = allTracks.filter(t => f(t, assembly2, assembly1));
|
|
47
|
+
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
48
|
+
const [value, setValue] = (0, react_1.useState)(resetTrack);
|
|
49
|
+
(0, react_1.useEffect)(() => {
|
|
50
|
+
// if assembly1/assembly2 changes, then we will want to use this effect to change
|
|
51
|
+
// the state of the useState because it otherwise gets locked to a stale value
|
|
52
|
+
setValue(resetTrack);
|
|
53
|
+
}, [resetTrack]);
|
|
54
|
+
(0, react_1.useEffect)(() => {
|
|
55
|
+
// sets track data in a useEffect because the initial load is needed as well as
|
|
56
|
+
// onChange's to the select box
|
|
57
|
+
setShowTrackId(value);
|
|
58
|
+
}, [value, setShowTrackId]);
|
|
59
|
+
return (react_1.default.createElement(material_1.Paper, { style: { padding: 12 } },
|
|
60
|
+
react_1.default.createElement(material_1.Typography, { paragraph: true }, "Select a track from the select box below, the track will be shown when you hit \"Launch\"."),
|
|
61
|
+
react_1.default.createElement(material_1.Typography, { paragraph: true },
|
|
62
|
+
"Note: there is a track selector ",
|
|
63
|
+
react_1.default.createElement("i", null, "inside"),
|
|
64
|
+
" the DotplotView, which can turn on one or more SyntenyTracks (more than one can be displayed at once). Look for the track selector icon ",
|
|
65
|
+
react_1.default.createElement(Icons_1.TrackSelector, null)),
|
|
66
|
+
filteredTracks.length ? (react_1.default.createElement(material_1.Select, { value: value, onChange: event => setValue(event.target.value) }, filteredTracks.map(track => (react_1.default.createElement(material_1.MenuItem, { key: track.trackId, value: track.trackId }, (0, tracks_1.getTrackName)(track, session)))))) : (react_1.default.createElement(ui_1.ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))));
|
|
67
|
+
});
|
|
68
|
+
exports.default = Selector;
|
|
69
|
+
//# sourceMappingURL=ImportSyntenyTrackSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportSyntenyTrackSelector.js","sourceRoot":"","sources":["../../../src/DotplotView/components/ImportSynteny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C,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,+EAA+E;QAC/E,+BAA+B;QAC/B,cAAc,CAAC,KAAK,CAAC,CAAA;IACvB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;IAE3B,OAAO,CACL,8BAAC,gBAAK,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3B,8BAAC,qBAAU,IAAC,SAAS,uGAGR;QAEb,8BAAC,qBAAU,IAAC,SAAS;;YACa,kDAAa;;YAEF,8BAAC,qBAAiB,OAAG,CACrD;QACZ,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CACvB,8BAAC,iBAAM,IACL,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAE9C,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC3B,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAC/C,IAAA,qBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CACpB,CACZ,CAAC,CACK,CACV,CAAC,CAAC,CAAC,CACF,8BAAC,iBAAY,IACX,KAAK,EAAE,+BAA+B,SAAS,IAAI,SAAS,EAAE,GAC9D,CACH,CACK,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 react_1 = __importDefault(require("react"));
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const mui_1 = require("tss-react/mui");
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
|
+
// icons
|
|
11
|
+
const ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
|
|
12
|
+
const ArrowDropUp_1 = __importDefault(require("@mui/icons-material/ArrowDropUp"));
|
|
13
|
+
const ArrowLeft_1 = __importDefault(require("@mui/icons-material/ArrowLeft"));
|
|
14
|
+
const ArrowRight_1 = __importDefault(require("@mui/icons-material/ArrowRight"));
|
|
15
|
+
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
16
|
+
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
17
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
18
|
+
dpad: {
|
|
19
|
+
display: 'grid',
|
|
20
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
21
|
+
margin: 0,
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
right: 50,
|
|
24
|
+
zIndex: 1000,
|
|
25
|
+
top: 50,
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
padding: 0,
|
|
29
|
+
margin: 0,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.default = (0, mobx_react_1.observer)(function PanButtons({ model, }) {
|
|
33
|
+
const { classes } = useStyles();
|
|
34
|
+
return (react_1.default.createElement(material_1.Paper, { className: classes.dpad, elevation: 6 },
|
|
35
|
+
react_1.default.createElement("div", null),
|
|
36
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => model.vview.scroll(100) },
|
|
37
|
+
react_1.default.createElement(ArrowDropUp_1.default, null)),
|
|
38
|
+
react_1.default.createElement("div", null),
|
|
39
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => model.hview.scroll(-100) },
|
|
40
|
+
react_1.default.createElement(ArrowLeft_1.default, null)),
|
|
41
|
+
react_1.default.createElement("div", null),
|
|
42
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => model.hview.scroll(100) },
|
|
43
|
+
react_1.default.createElement(ArrowRight_1.default, null)),
|
|
44
|
+
react_1.default.createElement("div", null),
|
|
45
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => model.vview.scroll(-100) },
|
|
46
|
+
react_1.default.createElement(ArrowDropDown_1.default, null)),
|
|
47
|
+
react_1.default.createElement("div", null),
|
|
48
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
49
|
+
model.hview.zoomIn();
|
|
50
|
+
model.vview.zoomIn();
|
|
51
|
+
} },
|
|
52
|
+
react_1.default.createElement(ZoomIn_1.default, null)),
|
|
53
|
+
react_1.default.createElement("div", null),
|
|
54
|
+
react_1.default.createElement(material_1.IconButton, { className: classes.icon, onClick: () => {
|
|
55
|
+
model.hview.zoomOut();
|
|
56
|
+
model.vview.zoomOut();
|
|
57
|
+
} },
|
|
58
|
+
react_1.default.createElement(ZoomOut_1.default, null))));
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=PanButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanButtons.js","sourceRoot":"","sources":["../../../src/DotplotView/components/PanButtons.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,4CAAiD;AACjD,uCAA0C;AAC1C,2CAAqC;AAErC,QAAQ;AACR,sFAA6D;AAC7D,kFAAyD;AACzD,8EAAqD;AACrD,gFAAuD;AACvD,wEAA+C;AAC/C,0EAAiD;AAKjD,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC;IAC7B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,mBAAmB,EAAE,gBAAgB;QACrC,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,IAAI;QACZ,GAAG,EAAE,EAAE;KACR;IACD,IAAI,EAAE;QACJ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AAC;YAED,8BAAC,gBAAM,OAAG,CACC;QACb,0CAAO;QACP,8BAAC,qBAAU,IACT,SAAS,EAAE,OAAO,CAAC,IAAI,EACvB,OAAO,EAAE,GAAG,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;gBACrB,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;YACvB,CAAC;YAED,8BAAC,iBAAO,OAAG,CACA,CACP,CACT,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
interface TrackWarning {
|
|
4
|
+
configuration: AnyConfigurationModel;
|
|
5
|
+
displays: {
|
|
6
|
+
warnings: {
|
|
7
|
+
message: string;
|
|
8
|
+
effect: string;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
declare const _default: ({ trackWarnings, handleClose, }: {
|
|
13
|
+
handleClose: () => void;
|
|
14
|
+
trackWarnings: TrackWarning[];
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 react_1 = __importDefault(require("react"));
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
|
+
const mui_1 = require("tss-react/mui");
|
|
11
|
+
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
12
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
13
|
+
const util_1 = require("@jbrowse/core/util");
|
|
14
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
+
content: {
|
|
16
|
+
minWidth: 600,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.default = (0, mobx_react_1.observer)(function WarningDialog({ trackWarnings, handleClose, }) {
|
|
20
|
+
const { classes } = useStyles();
|
|
21
|
+
const rows = [];
|
|
22
|
+
for (let i = 0; i < trackWarnings.length; i++) {
|
|
23
|
+
const track = trackWarnings[i];
|
|
24
|
+
const name = (0, configuration_1.getConf)(track, 'name');
|
|
25
|
+
for (let j = 0; j < track.displays[0].warnings.length; j++) {
|
|
26
|
+
const warning = track.displays[0].warnings[j];
|
|
27
|
+
rows.push({ name, ...warning, id: i + '_' + j });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const columns = [
|
|
31
|
+
{ field: 'name' },
|
|
32
|
+
{ field: 'message', width: (0, util_1.measureGridWidth)(rows.map(r => r.message)) },
|
|
33
|
+
{ field: 'effect', width: (0, util_1.measureGridWidth)(rows.map(r => r.effect)) },
|
|
34
|
+
];
|
|
35
|
+
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, maxWidth: "xl", title: "Dotplot rendered with warnings" },
|
|
36
|
+
react_1.default.createElement(material_1.DialogContent, { className: classes.content },
|
|
37
|
+
react_1.default.createElement(material_1.DialogContentText, null, "Found warnings while rendering the dotplot. This is often due to out-of-bound features that may indicate the wrong assemblies are being used. Check that the query and target are configured correctly, and that the right assemblies are being compared."),
|
|
38
|
+
react_1.default.createElement("div", { style: { height: 600, width: '100%', overflow: 'auto' } },
|
|
39
|
+
react_1.default.createElement(x_data_grid_1.DataGrid, { rows: rows, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, disableColumnMenu: true })))));
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=WarningDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WarningDialog.js","sourceRoot":"","sources":["../../../src/DotplotView/components/WarningDialog.tsx"],"names":[],"mappings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E,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAA,uBAAgB,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE;KACtE,CAAA;IACD,OAAO,CACL,8BAAC,WAAM,IACL,IAAI,QACJ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,gCAAgC;QAEtC,8BAAC,wBAAa,IAAC,SAAS,EAAE,OAAO,CAAC,OAAO;YACvC,8BAAC,4BAAiB,oQAKE;YACpB,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;gBAC1D,8BAAC,sBAAQ,IACP,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,0BAA0B,QAC1B,SAAS,EAAE,EAAE,EACb,iBAAiB,SACjB,CACE,CACQ,CACT,CACV,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
2
|
+
import { Dotplot1DViewModel } from '../model';
|
|
3
|
+
export declare function locstr(px: number, view: Dotplot1DViewModel, includeAsm?: boolean): string;
|
|
4
|
+
export declare function getBlockLabelKeysToHide(blocks: BaseBlock[], length: number, viewOffsetPx: number): Set<string>;
|
|
5
|
+
/**
|
|
6
|
+
* Given a scale ( bp/px ) and minimum distances (px) between major and minor
|
|
7
|
+
* gridlines, return an object like `{ majorPitch: bp, minorPitch: bp }` giving
|
|
8
|
+
* the gridline pitches to use.
|
|
9
|
+
*/
|
|
10
|
+
export declare function chooseGridPitch(scale: number, minMajorPitchPx: number, minMinorPitchPx: number): {
|
|
11
|
+
majorPitch: number;
|
|
12
|
+
minorPitch: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function makeTicks(regions: BaseBlock[], bpPerPx: number, emitMajor?: boolean, emitMinor?: boolean): {
|
|
15
|
+
type: string;
|
|
16
|
+
base: number;
|
|
17
|
+
index: number;
|
|
18
|
+
refName: string;
|
|
19
|
+
}[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeTicks = exports.chooseGridPitch = exports.getBlockLabelKeysToHide = exports.locstr = void 0;
|
|
4
|
+
function locstr(px, view, includeAsm = true) {
|
|
5
|
+
const { assemblyName, refName, start, offset, oob } = view.pxToBp(px);
|
|
6
|
+
const coord = Math.floor(start + offset);
|
|
7
|
+
return oob
|
|
8
|
+
? 'out of bounds'
|
|
9
|
+
: `${includeAsm ? '{' + assemblyName + '}' : ''}${refName}:${coord.toLocaleString('en-US')}`;
|
|
10
|
+
}
|
|
11
|
+
exports.locstr = locstr;
|
|
12
|
+
function getBlockLabelKeysToHide(blocks, length, viewOffsetPx) {
|
|
13
|
+
const blockLabelKeysToHide = new Set();
|
|
14
|
+
const sortedBlocks = [...blocks].sort((a, b) => {
|
|
15
|
+
const alen = a.end - a.start;
|
|
16
|
+
const blen = b.end - b.start;
|
|
17
|
+
return blen - alen;
|
|
18
|
+
});
|
|
19
|
+
const positions = Array.from({ length: Math.round(length) });
|
|
20
|
+
for (const { key, offsetPx } of sortedBlocks) {
|
|
21
|
+
const y = Math.round(length - offsetPx + viewOffsetPx);
|
|
22
|
+
const labelBounds = [Math.max(y - 12, 0), y];
|
|
23
|
+
if (y === 0 || positions.slice(...labelBounds).some(Boolean)) {
|
|
24
|
+
blockLabelKeysToHide.add(key);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
positions.fill(true, ...labelBounds);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return blockLabelKeysToHide;
|
|
31
|
+
}
|
|
32
|
+
exports.getBlockLabelKeysToHide = getBlockLabelKeysToHide;
|
|
33
|
+
/**
|
|
34
|
+
* Given a scale ( bp/px ) and minimum distances (px) between major and minor
|
|
35
|
+
* gridlines, return an object like `{ majorPitch: bp, minorPitch: bp }` giving
|
|
36
|
+
* the gridline pitches to use.
|
|
37
|
+
*/
|
|
38
|
+
function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
|
|
39
|
+
scale = Math.abs(scale);
|
|
40
|
+
const minMajorPitchBp = minMajorPitchPx * scale;
|
|
41
|
+
const majorMagnitude = Number.parseInt(Number(minMajorPitchBp).toExponential().split(/e/i)[1], 10);
|
|
42
|
+
let majorPitch = 10 ** majorMagnitude;
|
|
43
|
+
while (majorPitch < minMajorPitchBp) {
|
|
44
|
+
majorPitch *= 2;
|
|
45
|
+
if (majorPitch >= minMajorPitchBp) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
majorPitch *= 2.5;
|
|
49
|
+
}
|
|
50
|
+
majorPitch = Math.max(majorPitch, 5);
|
|
51
|
+
const majorPitchPx = majorPitch / scale;
|
|
52
|
+
let minorPitch = 0;
|
|
53
|
+
if (!(majorPitch % 10) && majorPitchPx / 10 >= minMinorPitchPx) {
|
|
54
|
+
minorPitch = majorPitch / 10;
|
|
55
|
+
}
|
|
56
|
+
else if (!(majorPitch % 5) && majorPitchPx / 5 >= minMinorPitchPx) {
|
|
57
|
+
minorPitch = majorPitch / 5;
|
|
58
|
+
}
|
|
59
|
+
else if (!(majorPitch % 2) && majorPitchPx / 2 >= minMinorPitchPx) {
|
|
60
|
+
minorPitch = majorPitch / 2;
|
|
61
|
+
}
|
|
62
|
+
return { majorPitch, minorPitch };
|
|
63
|
+
}
|
|
64
|
+
exports.chooseGridPitch = chooseGridPitch;
|
|
65
|
+
function makeTicks(regions, bpPerPx, emitMajor = true, emitMinor = true) {
|
|
66
|
+
const ticks = [];
|
|
67
|
+
const gridPitch = chooseGridPitch(bpPerPx, 60, 15);
|
|
68
|
+
const iterPitch = gridPitch.minorPitch || gridPitch.majorPitch;
|
|
69
|
+
for (let i = 0; i < regions.length; i++) {
|
|
70
|
+
const region = regions[i];
|
|
71
|
+
const { start, end, refName } = region;
|
|
72
|
+
let index = 0;
|
|
73
|
+
const minBase = start;
|
|
74
|
+
const maxBase = end;
|
|
75
|
+
for (let base = Math.floor(minBase / iterPitch) * iterPitch; base < Math.ceil(maxBase / iterPitch) * iterPitch + 1; base += iterPitch) {
|
|
76
|
+
if (emitMinor && base % gridPitch.majorPitch) {
|
|
77
|
+
ticks.push({ type: 'minor', base: base - 1, index, refName });
|
|
78
|
+
index += 1;
|
|
79
|
+
}
|
|
80
|
+
else if (emitMajor &&
|
|
81
|
+
Math.abs(base - region.start) > gridPitch.minorPitch) {
|
|
82
|
+
ticks.push({ type: 'major', base: base - 1, index, refName });
|
|
83
|
+
index += 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return ticks;
|
|
88
|
+
}
|
|
89
|
+
exports.makeTicks = makeTicks;
|
|
90
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/DotplotView/components/util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,MAAM,CACpB,EAAU,EACV,IAAwB,EACxB,UAAU,GAAG,IAAI;IAEjB,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,CAAA;IACxC,OAAO,GAAG;QACR,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,GACE,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,EAC1C,GAAG,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAA;AACnD,CAAC;AAZD,wBAYC;AAED,SAAgB,uBAAuB,CAC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|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = require("react");
|
|
30
|
+
const ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
|
|
31
|
+
// locals
|
|
32
|
+
const model_1 = __importDefault(require("./model"));
|
|
33
|
+
function default_1(pluginManager) {
|
|
34
|
+
pluginManager.addViewType(() => {
|
|
35
|
+
return new ViewType_1.default({
|
|
36
|
+
name: 'DotplotView',
|
|
37
|
+
displayName: 'Dotplot view',
|
|
38
|
+
stateModel: (0, model_1.default)(pluginManager),
|
|
39
|
+
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/DotplotView')))),
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.default = default_1;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DotplotView/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA4B;AAC5B,4FAAmE;AAEnE,SAAS;AACT,oDAAuC;AAEvC,mBAAyB,aAA4B;IACnD,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7B,OAAO,IAAI,kBAAQ,CAAC;YAClB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,cAAc;YAC3B,UAAU,EAAE,IAAA,eAAiB,EAAC,aAAa,CAAC;YAC5C,cAAc,EAAE,IAAA,YAAI,EAAC,GAAG,EAAE,mDAAQ,0BAA0B,GAAC,CAAC;SAC/D,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AATD,4BASC"}
|