@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,13 @@
|
|
|
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
|
+
function SVGBackground({ width, height, }) {
|
|
9
|
+
const theme = (0, material_1.useTheme)();
|
|
10
|
+
return (react_1.default.createElement("rect", { x: 0, y: 0, width: width, height: height, fill: theme.palette.background.default }));
|
|
11
|
+
}
|
|
12
|
+
exports.default = SVGBackground;
|
|
13
|
+
//# sourceMappingURL=SVGBackground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVGBackground.js","sourceRoot":"","sources":["../../../src/DotplotView/svgcomponents/SVGBackground.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,4CAAwC;AAExC,SAAwB,aAAa,CAAC,EACpC,KAAK,EACL,MAAM,GAIP;IACC,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IACxB,OAAO,CACL,wCACE,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,GACtC,CACH,CAAA;AACH,CAAC;AAjBD,gCAiBC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.renderToSvg = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const server_1 = require("react-dom/server");
|
|
9
|
+
const mobx_1 = require("mobx");
|
|
10
|
+
const util_1 = require("@jbrowse/core/util");
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
12
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
13
|
+
const Grid_1 = require("../components/Grid");
|
|
14
|
+
const Axes_1 = require("../components/Axes");
|
|
15
|
+
const SVGBackground_1 = __importDefault(require("./SVGBackground"));
|
|
16
|
+
// render LGV to SVG
|
|
17
|
+
async function renderToSvg(model, opts) {
|
|
18
|
+
var _a;
|
|
19
|
+
await (0, mobx_1.when)(() => model.initialized);
|
|
20
|
+
const { themeName = 'default', Wrapper = ({ children }) => react_1.default.createElement(react_1.default.Fragment, null, children) } = opts;
|
|
21
|
+
const session = (0, util_1.getSession)(model);
|
|
22
|
+
const theme = (_a = session.allThemes) === null || _a === void 0 ? void 0 : _a.call(session)[themeName];
|
|
23
|
+
const { width, borderX, viewWidth, viewHeight, tracks, height } = model;
|
|
24
|
+
const shift = 50;
|
|
25
|
+
const displayResults = await Promise.all(tracks.map(async (track) => {
|
|
26
|
+
const display = track.displays[0];
|
|
27
|
+
await (0, mobx_1.when)(() => (display.ready !== undefined ? display.ready : true));
|
|
28
|
+
return { track, result: await display.renderSvg({ ...opts, theme }) };
|
|
29
|
+
}));
|
|
30
|
+
const w = width + shift * 2;
|
|
31
|
+
// the xlink namespace is used for rendering <image> tag
|
|
32
|
+
return (0, server_1.renderToStaticMarkup)(react_1.default.createElement(material_1.ThemeProvider, { theme: (0, ui_1.createJBrowseTheme)(theme) },
|
|
33
|
+
react_1.default.createElement(Wrapper, null,
|
|
34
|
+
react_1.default.createElement("svg", { width: width, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w, height].toString() },
|
|
35
|
+
react_1.default.createElement(SVGBackground_1.default, { width: w, height: height }),
|
|
36
|
+
react_1.default.createElement(Axes_1.VerticalAxisRaw, { model: model }),
|
|
37
|
+
react_1.default.createElement("g", { transform: `translate(${borderX} 0)` },
|
|
38
|
+
react_1.default.createElement(Grid_1.GridRaw, { model: model }),
|
|
39
|
+
react_1.default.createElement("defs", null,
|
|
40
|
+
react_1.default.createElement("clipPath", { id: "clip-ruler" },
|
|
41
|
+
react_1.default.createElement("rect", { x: 0, y: 0, width: viewWidth, height: viewHeight }))),
|
|
42
|
+
react_1.default.createElement("g", { clipPath: "url(#clip-ruler)" }, displayResults.map(({ result }, i) => (react_1.default.createElement("g", { key: i }, result))))),
|
|
43
|
+
react_1.default.createElement("g", { transform: `translate(${borderX} ${viewHeight})` },
|
|
44
|
+
react_1.default.createElement(Axes_1.HorizontalAxisRaw, { model: model }))))));
|
|
45
|
+
}
|
|
46
|
+
exports.renderToSvg = renderToSvg;
|
|
47
|
+
//# sourceMappingURL=SVGDotplotView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVGDotplotView.js","sourceRoot":"","sources":["../../../src/DotplotView/svgcomponents/SVGDotplot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1 = require("mobx");
|
|
4
|
+
function LaunchDotplotView(pluginManager) {
|
|
5
|
+
pluginManager.addToExtensionPoint('LaunchView-DotplotView',
|
|
6
|
+
// @ts-expect-error
|
|
7
|
+
async ({ session, views, tracks = [], }) => {
|
|
8
|
+
try {
|
|
9
|
+
const model = session.addView('DotplotView', {});
|
|
10
|
+
const assemblyNames = views.map(view => view.assembly);
|
|
11
|
+
(0, mobx_1.transaction)(() => {
|
|
12
|
+
model.setViews([
|
|
13
|
+
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
14
|
+
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
15
|
+
]);
|
|
16
|
+
model.setAssemblyNames(assemblyNames[0], assemblyNames[1]);
|
|
17
|
+
});
|
|
18
|
+
// http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=spec-{"views":[{"type":"DotplotView","views":[{"assembly":"volvox"},{"assembly":"volvox"}],"tracks":["volvox_fake_synteny"]}]}
|
|
19
|
+
const idsNotFound = [];
|
|
20
|
+
tracks.forEach(track => tryTrack(model, track, idsNotFound));
|
|
21
|
+
if (idsNotFound.length) {
|
|
22
|
+
throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
session.notify(`${e}`, 'error');
|
|
27
|
+
throw e;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.default = LaunchDotplotView;
|
|
32
|
+
function tryTrack(model, trackId, idsNotFound) {
|
|
33
|
+
try {
|
|
34
|
+
model.showTrack(trackId);
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
if (`${e}`.match('Could not resolve identifier')) {
|
|
38
|
+
idsNotFound.push(trackId);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
throw e;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=LaunchDotplotView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C,CAAA;YAC/B,MAAM,CAAC,CAAA;SACR;IACH,CAAC,CACF,CAAA;AACH,CAAC;AAzCD,oCAyCC;AAED,SAAS,QAAQ,CACf,KAA2C,EAC3C,OAAe,EACf,WAAqB;IAErB,IAAI;QACF,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;KACzB;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,EAAE;YAChD,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;SAC1B;aAAM;YACL,MAAM,CAAC,CAAA;SACR;KACF;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
declare const _default: ({ model, style, }: {
|
|
3
|
+
model: {
|
|
4
|
+
error?: unknown;
|
|
5
|
+
message?: string;
|
|
6
|
+
filled?: boolean;
|
|
7
|
+
shouldDisplay?: boolean;
|
|
8
|
+
reactElement?: React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
style: CSSProperties;
|
|
11
|
+
}) => React.JSX.Element | null;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
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 mui_1 = require("tss-react/mui");
|
|
28
|
+
const material_1 = require("@mui/material");
|
|
29
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
30
|
+
const mobx_react_1 = require("mobx-react");
|
|
31
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
32
|
+
const bg = theme.palette.action.disabledBackground;
|
|
33
|
+
return {
|
|
34
|
+
loading: {
|
|
35
|
+
paddingLeft: '0.6em',
|
|
36
|
+
backgroundColor: theme.palette.background.default,
|
|
37
|
+
backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${bg} 5px, ${bg} 10px)`,
|
|
38
|
+
textAlign: 'center',
|
|
39
|
+
},
|
|
40
|
+
blockMessage: {
|
|
41
|
+
backgroundColor: bg,
|
|
42
|
+
padding: '10px',
|
|
43
|
+
},
|
|
44
|
+
blockError: {
|
|
45
|
+
backgroundColor: bg,
|
|
46
|
+
padding: '10px',
|
|
47
|
+
color: 'red',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
function LoadingMessage() {
|
|
52
|
+
// only show the loading message after 300ms to prevent excessive flickering
|
|
53
|
+
const [shown, setShown] = (0, react_1.useState)(false);
|
|
54
|
+
const { classes } = useStyles();
|
|
55
|
+
(0, react_1.useEffect)(() => {
|
|
56
|
+
const timeout = setTimeout(() => setShown(true), 300);
|
|
57
|
+
return () => clearTimeout(timeout);
|
|
58
|
+
}, []);
|
|
59
|
+
return shown ? (react_1.default.createElement("div", { className: classes.loading },
|
|
60
|
+
react_1.default.createElement(ui_1.LoadingEllipses, null))) : null;
|
|
61
|
+
}
|
|
62
|
+
function BlockMessage({ messageText }) {
|
|
63
|
+
const { classes } = useStyles();
|
|
64
|
+
return (react_1.default.createElement("div", { className: classes.blockMessage },
|
|
65
|
+
react_1.default.createElement(material_1.Typography, null, `${messageText}`)));
|
|
66
|
+
}
|
|
67
|
+
function BlockError({ error }) {
|
|
68
|
+
const { classes } = useStyles();
|
|
69
|
+
return (react_1.default.createElement("div", { className: classes.blockError },
|
|
70
|
+
react_1.default.createElement(material_1.Typography, null, `${error}`)));
|
|
71
|
+
}
|
|
72
|
+
exports.default = (0, mobx_react_1.observer)(function ({ model, style, }) {
|
|
73
|
+
if (model.error) {
|
|
74
|
+
return react_1.default.createElement(BlockError, { error: model.error, "data-testid": "reload_button" });
|
|
75
|
+
}
|
|
76
|
+
else if (model.message) {
|
|
77
|
+
return react_1.default.createElement(BlockMessage, { messageText: model.message });
|
|
78
|
+
}
|
|
79
|
+
else if (!model.filled) {
|
|
80
|
+
return react_1.default.createElement(LoadingMessage, null);
|
|
81
|
+
}
|
|
82
|
+
else if (model.shouldDisplay) {
|
|
83
|
+
return react_1.default.createElement("div", { style: style }, model.reactElement);
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=ServerSideRenderedBlockContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSideRenderedBlockContent.js","sourceRoot":"","sources":["../src/ServerSideRenderedBlockContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiE;AACjE,uCAA0C;AAC1C,4CAA0C;AAC1C,yCAAkD;AAClD,2CAAqC;AAErC,MAAM,SAAS,GAAG,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AClC,8BAAC,qBAAU,QAAE,GAAG,WAAW,EAAE,CAAc,CACvC,CACP,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,KAAK,EAAsB;IAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC/B,OAAO,CACL,uCAAK,SAAS,EAAE,OAAO,CAAC,UAAU;QAChC,8BAAC,qBAAU,QAAE,GAAG,KAAK,EAAE,CAAc,CACjC,CACP,CAAA;AACH,CAAC;AAED,kBAAe,IAAA,qBAAQ,EAAC,UAAU,EAChC,KAAK,EACL,KAAK,GAUN;IACC,IAAI,KAAK,CAAC,KAAK,EAAE;QACf,OAAO,8BAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,iBAAc,eAAe,GAAG,CAAA;KACtE;SAAM,IAAI,KAAK,CAAC,OAAO,EAAE;QACxB,OAAO,8BAAC,YAAY,IAAC,WAAW,EAAE,KAAK,CAAC,OAAO,GAAI,CAAA;KACpD;SAAM,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACxB,OAAO,8BAAC,cAAc,OAAG,CAAA;KAC1B;SAAM,IAAI,KAAK,CAAC,aAAa,EAAE;QAC9B,OAAO,uCAAK,KAAK,EAAE,KAAK,IAAG,KAAK,CAAC,YAAY,CAAO,CAAA;KACrD;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A block whose content is rendered outside of the main thread and hydrated by this
|
|
4
|
+
* component.
|
|
5
|
+
*/
|
|
6
|
+
declare function ServerSideSyntenyRendering({ model, }: {
|
|
7
|
+
model: {
|
|
8
|
+
imageData: string;
|
|
9
|
+
style: Record<string, string>;
|
|
10
|
+
renderProps: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
highResolutionScaling?: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
declare namespace ServerSideSyntenyRendering {
|
|
18
|
+
var propTypes: {
|
|
19
|
+
model: import("prop-types").Validator<any>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare const _default: typeof ServerSideSyntenyRendering;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const mobx_react_1 = require("mobx-react");
|
|
29
|
+
const offscreenCanvasPonyfill_1 = require("@jbrowse/core/util/offscreenCanvasPonyfill");
|
|
30
|
+
/**
|
|
31
|
+
* A block whose content is rendered outside of the main thread and hydrated by this
|
|
32
|
+
* component.
|
|
33
|
+
*/
|
|
34
|
+
function ServerSideSyntenyRendering({ model, }) {
|
|
35
|
+
const { imageData, style, renderProps } = model;
|
|
36
|
+
const { width, height, highResolutionScaling = 1 } = renderProps;
|
|
37
|
+
const featureCanvas = (0, react_1.useRef)(null);
|
|
38
|
+
const [done, setDone] = (0, react_1.useState)(false);
|
|
39
|
+
(0, react_1.useEffect)(() => {
|
|
40
|
+
if (!imageData) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const canvas = featureCanvas.current;
|
|
44
|
+
const context = canvas.getContext('2d');
|
|
45
|
+
(0, offscreenCanvasPonyfill_1.drawImageOntoCanvasContext)(imageData, context);
|
|
46
|
+
setDone(true);
|
|
47
|
+
}, [height, imageData, width]);
|
|
48
|
+
return (react_1.default.createElement("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
|
|
49
|
+
}
|
|
50
|
+
ServerSideSyntenyRendering.propTypes = {
|
|
51
|
+
model: mobx_react_1.PropTypes.observableObject.isRequired,
|
|
52
|
+
};
|
|
53
|
+
exports.default = (0, mobx_react_1.observer)(ServerSideSyntenyRendering);
|
|
54
|
+
//# sourceMappingURL=ServerSideSyntenyRendering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSideSyntenyRendering.js","sourceRoot":"","sources":["../src/ServerSideSyntenyRendering.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,+CAA0D;AAC1D,2CAAgD;AAChD,wFAAuF;AAEvF;;;GAGG;AACH,SAAS,0BAA0B,CAAC,EAClC,KAAK,GAWN;IACC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAC/C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,qBAAqB,GAAG,CAAC,EAAE,GAAG,WAAW,CAAA;IAEhE,MAAM,aAAa,GAAG,IAAA,cAAM,EAAoB,IAAI,CAAC,CAAA;IACrD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAEvC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS,EAAE;YACd,OAAM;SACP;QACD,MAAM,MAAM,GAAG,aAAa,CAAC,OAAQ,CAAA;QACrC,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE,CAAA;QACxC,IAAA,oDAA0B,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAA;IACf,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAE9B,OAAO,CACL,yDACe,qBAAqB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EACvD,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,KAAK,GAAG,qBAAqB,EACpC,MAAM,EAAE,MAAM,GAAG,qBAAqB,EACtC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,GAClC,CACH,CAAA;AACH,CAAC;AAED,0BAA0B,CAAC,SAAS,GAAG;IACrC,KAAK,EAAE,sBAAS,CAAC,gBAAgB,CAAC,UAAU;CAC7C,CAAA;AAED,kBAAe,IAAA,qBAAQ,EAAC,0BAA0B,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
+
export default class DotplotPlugin extends Plugin {
|
|
4
|
+
name: string;
|
|
5
|
+
install(pluginManager: PluginManager): void;
|
|
6
|
+
configure(pluginManager: PluginManager): void;
|
|
7
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
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 Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
// icons
|
|
9
|
+
const Timeline_1 = __importDefault(require("@mui/icons-material/Timeline"));
|
|
10
|
+
// locals
|
|
11
|
+
const DotplotView_1 = __importDefault(require("./DotplotView"));
|
|
12
|
+
const DotplotDisplay_1 = __importDefault(require("./DotplotDisplay"));
|
|
13
|
+
const DotplotRenderer_1 = __importDefault(require("./DotplotRenderer"));
|
|
14
|
+
const LaunchDotplotView_1 = __importDefault(require("./LaunchDotplotView"));
|
|
15
|
+
const ComparativeRenderer_1 = __importDefault(require("./ComparativeRenderer"));
|
|
16
|
+
const DotplotReadVsRef_1 = __importDefault(require("./DotplotReadVsRef"));
|
|
17
|
+
class DotplotPlugin extends Plugin_1.default {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.name = 'DotplotPlugin';
|
|
21
|
+
}
|
|
22
|
+
install(pluginManager) {
|
|
23
|
+
(0, DotplotView_1.default)(pluginManager);
|
|
24
|
+
(0, DotplotDisplay_1.default)(pluginManager);
|
|
25
|
+
(0, DotplotRenderer_1.default)(pluginManager);
|
|
26
|
+
(0, LaunchDotplotView_1.default)(pluginManager);
|
|
27
|
+
(0, DotplotReadVsRef_1.default)(pluginManager);
|
|
28
|
+
// install our comparative rendering rpc callback
|
|
29
|
+
pluginManager.addRpcMethod(() => new ComparativeRenderer_1.default(pluginManager));
|
|
30
|
+
}
|
|
31
|
+
configure(pluginManager) {
|
|
32
|
+
if ((0, util_1.isAbstractMenuManager)(pluginManager.rootModel)) {
|
|
33
|
+
pluginManager.rootModel.appendToSubMenu(['Add'], {
|
|
34
|
+
label: 'Dotplot view',
|
|
35
|
+
icon: Timeline_1.default,
|
|
36
|
+
onClick: (session) => {
|
|
37
|
+
session.addView('DotplotView', {});
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = DotplotPlugin;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,kEAAyC;AAEzC,6CAAgF;AAEhF,QAAQ;AACR,4EAAuD;AAEvD,SAAS;AACT,gEAAwC;AACxC,sEAA8C;AAC9C,wEAAgD;AAChD,4EAAoD;AACpD,gFAAuD;AACvD,0EAAyD;AAEzD,MAAqB,aAAc,SAAQ,gBAAM;IAAjD;;QACE,SAAI,GAAG,eAAe,CAAA;IAwBxB,CAAC;IAtBC,OAAO,CAAC,aAA4B;QAClC,IAAA,qBAAY,EAAC,aAAa,CAAC,CAAA;QAC3B,IAAA,wBAAe,EAAC,aAAa,CAAC,CAAA;QAC9B,IAAA,yBAAgB,EAAC,aAAa,CAAC,CAAA;QAC/B,IAAA,2BAAkB,EAAC,aAAa,CAAC,CAAA;QACjC,IAAA,0BAAwB,EAAC,aAAa,CAAC,CAAA;QAEvC,iDAAiD;QACjD,aAAa,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,6BAAmB,CAAC,aAAa,CAAC,CAAC,CAAA;IAC1E,CAAC;IAED,SAAS,CAAC,aAA4B;QACpC,IAAI,IAAA,4BAAqB,EAAC,aAAa,CAAC,SAAS,CAAC,EAAE;YAClD,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC/C,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,kBAAY;gBAClB,OAAO,EAAE,CAAC,OAA6B,EAAE,EAAE;oBACzC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;gBACpC,CAAC;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF;AAzBD,gCAyBC"}
|
package/dist/util.d.ts
ADDED
package/dist/util.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTag = void 0;
|
|
4
|
+
function getTag(f, tag) {
|
|
5
|
+
const tags = f.get('tags');
|
|
6
|
+
return tags ? tags[tag] : f.get(tag);
|
|
7
|
+
}
|
|
8
|
+
exports.getTag = getTag;
|
|
9
|
+
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAUA,SAAgB,MAAM,CAAC,CAAU,EAAE,GAAW;IAC5C,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wBAGC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
+
import ComparativeRenderer, { RenderArgs as ComparativeRenderArgs, RenderArgsSerialized as ComparativeRenderArgsSerialized, RenderResults, ResultsSerialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
3
|
+
import { RemoteAbortSignal } from '@jbrowse/core/rpc/remoteAbortSignals';
|
|
4
|
+
interface RenderArgs extends ComparativeRenderArgs {
|
|
5
|
+
adapterConfig: {};
|
|
6
|
+
rendererType: string;
|
|
7
|
+
}
|
|
8
|
+
interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
|
|
9
|
+
adapterConfig: {};
|
|
10
|
+
rendererType: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* call a synteny renderer with the given args
|
|
14
|
+
* param views: a set of views that each contain a set of regions
|
|
15
|
+
* used instead of passing regions directly as in render()
|
|
16
|
+
*/
|
|
17
|
+
export default class ComparativeRender extends RpcMethodType {
|
|
18
|
+
name: string;
|
|
19
|
+
renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
|
|
20
|
+
getRenderer(rendererType: string): ComparativeRenderer;
|
|
21
|
+
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
|
|
22
|
+
execute(args: RenderArgsSerialized & {
|
|
23
|
+
signal?: RemoteAbortSignal;
|
|
24
|
+
}, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
|
|
25
|
+
deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { checkAbortSignal } from '@jbrowse/core/util';
|
|
2
|
+
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
3
|
+
/**
|
|
4
|
+
* call a synteny renderer with the given args
|
|
5
|
+
* param views: a set of views that each contain a set of regions
|
|
6
|
+
* used instead of passing regions directly as in render()
|
|
7
|
+
*/
|
|
8
|
+
export default class ComparativeRender extends RpcMethodType {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.name = 'ComparativeRender';
|
|
12
|
+
}
|
|
13
|
+
async renameRegionsIfNeeded(args, rend) {
|
|
14
|
+
return rend.renameRegionsIfNeeded(args);
|
|
15
|
+
}
|
|
16
|
+
getRenderer(rendererType) {
|
|
17
|
+
const pm = this.pluginManager;
|
|
18
|
+
return pm.getRendererType(rendererType);
|
|
19
|
+
}
|
|
20
|
+
async serializeArguments(args, rpcDriver) {
|
|
21
|
+
const { rendererType } = args;
|
|
22
|
+
const renderer = this.getRenderer(rendererType);
|
|
23
|
+
const n = (await super.serializeArguments(args, rpcDriver));
|
|
24
|
+
const result = await this.renameRegionsIfNeeded(n, renderer);
|
|
25
|
+
return rpcDriver === 'MainThreadRpcDriver'
|
|
26
|
+
? result
|
|
27
|
+
: renderer.serializeArgsInClient(result);
|
|
28
|
+
}
|
|
29
|
+
async execute(args, rpcDriver) {
|
|
30
|
+
let deserializedArgs = args;
|
|
31
|
+
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
32
|
+
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
33
|
+
}
|
|
34
|
+
const { sessionId, rendererType, signal } = deserializedArgs;
|
|
35
|
+
if (!sessionId) {
|
|
36
|
+
throw new Error('must pass a unique session id');
|
|
37
|
+
}
|
|
38
|
+
checkAbortSignal(signal);
|
|
39
|
+
const renderer = this.getRenderer(rendererType);
|
|
40
|
+
return rpcDriver === 'MainThreadRpcDriver'
|
|
41
|
+
? renderer.render(deserializedArgs)
|
|
42
|
+
: renderer.renderInWorker(deserializedArgs);
|
|
43
|
+
}
|
|
44
|
+
async deserializeReturn(val, args, rpcDriver) {
|
|
45
|
+
const ret = (await super.deserializeReturn(val, args, rpcDriver));
|
|
46
|
+
if (rpcDriver === 'MainThreadRpcDriver') {
|
|
47
|
+
return ret;
|
|
48
|
+
}
|
|
49
|
+
const renderer = this.getRenderer(args.rendererType);
|
|
50
|
+
return renderer.deserializeResultsInClient(ret, args);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=index.js.map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IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;SACpE;QACD,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAA;QAC5D,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;SACjD;QAED,gBAAgB,CAAC,MAAM,CAAC,CAAA;QAExB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QAC/C,OAAO,SAAS,KAAK,qBAAqB;YACxC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACnC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAA;IAC/C,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,GAAsC,EACtC,IAAgB,EAChB,SAAiB;QAEjB,MAAM,GAAG,GAAG,CAAC,MAAM,KAAK,CAAC,iBAAiB,CACxC,GAAG,EACH,IAAI,EACJ,SAAS,CACV,CAAsB,CAAA;QACvB,IAAI,SAAS,KAAK,qBAAqB,EAAE;YACvC,OAAO,GAAG,CAAA;SACX;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACpD,OAAO,QAAQ,CAAC,0BAA0B,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DotplotDisplayModel } from '../stateModelFactory';
|
|
3
|
+
declare function DotplotDisplay(props: {
|
|
4
|
+
model: DotplotDisplayModel;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare const _default: typeof DotplotDisplay;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
4
|
+
function DotplotDisplay(props) {
|
|
5
|
+
const { model, children } = props;
|
|
6
|
+
const { offsetX = 0, offsetY = 0 } = model.data || {};
|
|
7
|
+
const view = getContainingView(model);
|
|
8
|
+
const top = view.vview.offsetPx - offsetY;
|
|
9
|
+
const left = -(view.hview.offsetPx - offsetX);
|
|
10
|
+
return (React.createElement("div", { style: { position: 'relative' } },
|
|
11
|
+
React.createElement(model.ReactComponent2, { ...props, style: {
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top,
|
|
14
|
+
left,
|
|
15
|
+
} }),
|
|
16
|
+
children));
|
|
17
|
+
}
|
|
18
|
+
export default observer(DotplotDisplay);
|
|
19
|
+
//# sourceMappingURL=DotplotDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DotplotDisplay.js","sourceRoot":"","sources":["../../../src/DotplotDisplay/components/DotplotDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAMtD,SAAS,cAAc,CAAC,KAGvB;IACC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IACjC,MAAM,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;IACrD,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAqB,CAAA;IAEzD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAA;IAC7C,OAAO,CACL,6BAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;QAClC,oBAAC,KAAK,CAAC,eAAe,OAChB,KAAK,EACT,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,GAAG;gBACH,IAAI;aACL,GACD;QACD,QAAQ,CACL,CACP,CAAA;AACH,CAAC;AAED,eAAe,QAAQ,CAAC,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
declare const _default: (pm: PluginManager) => void;
|
|
3
|
+
export default _default;
|
|
4
|
+
/**
|
|
5
|
+
* #config DotplotDisplay
|
|
6
|
+
*/
|
|
7
|
+
export declare function configSchemaFactory(pm: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
|
+
/**
|
|
9
|
+
* #slot
|
|
10
|
+
*/
|
|
11
|
+
renderer: import("mobx-state-tree").IOptionalIType<any, [undefined]>;
|
|
12
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
4
|
+
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
5
|
+
// locals
|
|
6
|
+
import { stateModelFactory } from './stateModelFactory';
|
|
7
|
+
import ReactComponent from './components/DotplotDisplay';
|
|
8
|
+
export default (pm) => {
|
|
9
|
+
pm.addDisplayType(() => {
|
|
10
|
+
const configSchema = configSchemaFactory(pm);
|
|
11
|
+
return new DisplayType({
|
|
12
|
+
name: 'DotplotDisplay',
|
|
13
|
+
displayName: 'Dotplot display',
|
|
14
|
+
configSchema,
|
|
15
|
+
stateModel: stateModelFactory(configSchema),
|
|
16
|
+
trackType: 'SyntenyTrack',
|
|
17
|
+
viewType: 'DotplotView',
|
|
18
|
+
ReactComponent,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* #config DotplotDisplay
|
|
24
|
+
*/
|
|
25
|
+
export function configSchemaFactory(pm) {
|
|
26
|
+
return ConfigurationSchema('DotplotDisplay', {
|
|
27
|
+
/**
|
|
28
|
+
* #slot
|
|
29
|
+
*/
|
|
30
|
+
renderer: types.optional(pm.pluggableConfigSchemaType('renderer'), {
|
|
31
|
+
type: 'DotplotRenderer',
|
|
32
|
+
}),
|
|
33
|
+
}, {
|
|
34
|
+
/**
|
|
35
|
+
* #identifier
|
|
36
|
+
*/
|
|
37
|
+
explicitIdentifier: 'displayId',
|
|
38
|
+
explicitlyTyped: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DotplotDisplay/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,WAAW,MAAM,iDAAiD,CAAA;AAGzE,SAAS;AACT,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,cAAc,MAAM,6BAA6B,CAAA;AAExD,eAAe,CAAC,EAAiB,EAAE,EAAE;IACnC,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE;QACrB,MAAM,YAAY,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAC5C,OAAO,IAAI,WAAW,CAAC;YACrB,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,iBAAiB;YAC9B,YAAY;YACZ,UAAU,EAAE,iBAAiB,CAAC,YAAY,CAAC;YAC3C,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,aAAa;YACvB,cAAc;SACf,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAO;IACzC,OAAO,mBAAmB,CACxB,gBAAgB,EAChB;QACE;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE;YACjE,IAAI,EAAE,iBAAiB;SACxB,CAAC;KACH,EACD;QACE;;WAEG;QACH,kBAAkB,EAAE,WAAW;QAC/B,eAAe,EAAE,IAAI;KACtB,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
|
+
export declare function renderBlockData(self: IAnyStateTreeNode): {
|
|
3
|
+
rendererType: any;
|
|
4
|
+
rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
5
|
+
renderProps: any;
|
|
6
|
+
} | undefined;
|
|
7
|
+
export declare function renderBlockEffect(props?: ReturnType<typeof renderBlockData>): Promise<{
|
|
8
|
+
reactElement: any;
|
|
9
|
+
data: any;
|
|
10
|
+
renderingComponent: any;
|
|
11
|
+
} | undefined>;
|