@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,44 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { Select, MenuItem, Paper, Typography } from '@mui/material';
|
|
3
|
+
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
6
|
+
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
// icons
|
|
9
|
+
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
10
|
+
function f(track, assembly1, assembly2) {
|
|
11
|
+
const assemblyNames = readConfObject(track, 'assemblyNames');
|
|
12
|
+
return (assemblyNames.includes(assembly1) &&
|
|
13
|
+
assemblyNames.includes(assembly2) &&
|
|
14
|
+
track.type.includes('Synteny'));
|
|
15
|
+
}
|
|
16
|
+
const Selector = observer(({ model, assembly1, assembly2, setShowTrackId, }) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const session = getSession(model);
|
|
19
|
+
const { tracks, sessionTracks } = session;
|
|
20
|
+
const allTracks = [...tracks, ...sessionTracks];
|
|
21
|
+
const filteredTracks = allTracks.filter(t => f(t, assembly2, assembly1));
|
|
22
|
+
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
23
|
+
const [value, setValue] = useState(resetTrack);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
// if assembly1/assembly2 changes, then we will want to use this effect to change
|
|
26
|
+
// the state of the useState because it otherwise gets locked to a stale value
|
|
27
|
+
setValue(resetTrack);
|
|
28
|
+
}, [resetTrack]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
// sets track data in a useEffect because the initial load is needed as well as
|
|
31
|
+
// onChange's to the select box
|
|
32
|
+
setShowTrackId(value);
|
|
33
|
+
}, [value, setShowTrackId]);
|
|
34
|
+
return (React.createElement(Paper, { style: { padding: 12 } },
|
|
35
|
+
React.createElement(Typography, { paragraph: true }, "Select a track from the select box below, the track will be shown when you hit \"Launch\"."),
|
|
36
|
+
React.createElement(Typography, { paragraph: true },
|
|
37
|
+
"Note: there is a track selector ",
|
|
38
|
+
React.createElement("i", null, "inside"),
|
|
39
|
+
" the DotplotView, which can turn on one or more SyntenyTracks (more than one can be displayed at once). Look for the track selector icon ",
|
|
40
|
+
React.createElement(TrackSelectorIcon, null)),
|
|
41
|
+
filteredTracks.length ? (React.createElement(Select, { value: value, onChange: event => setValue(event.target.value) }, filteredTracks.map(track => (React.createElement(MenuItem, { key: track.trackId, value: track.trackId }, getTrackName(track, session)))))) : (React.createElement(ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))));
|
|
42
|
+
});
|
|
43
|
+
export default Selector;
|
|
44
|
+
//# sourceMappingURL=ImportSyntenyTrackSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportSyntenyTrackSelector.js","sourceR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A;AACH,CAAC,CACF,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButton, Paper } from '@mui/material';
|
|
3
|
+
import { makeStyles } from 'tss-react/mui';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
// icons
|
|
6
|
+
import ArrowDropDown from '@mui/icons-material/ArrowDropDown';
|
|
7
|
+
import ArrowDropUp from '@mui/icons-material/ArrowDropUp';
|
|
8
|
+
import ArrowLeft from '@mui/icons-material/ArrowLeft';
|
|
9
|
+
import ArrowRight from '@mui/icons-material/ArrowRight';
|
|
10
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
11
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
12
|
+
const useStyles = makeStyles()({
|
|
13
|
+
dpad: {
|
|
14
|
+
display: 'grid',
|
|
15
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
16
|
+
margin: 0,
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
right: 50,
|
|
19
|
+
zIndex: 1000,
|
|
20
|
+
top: 50,
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
padding: 0,
|
|
24
|
+
margin: 0,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export default observer(function PanButtons({ model, }) {
|
|
28
|
+
const { classes } = useStyles();
|
|
29
|
+
return (React.createElement(Paper, { className: classes.dpad, elevation: 6 },
|
|
30
|
+
React.createElement("div", null),
|
|
31
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => model.vview.scroll(100) },
|
|
32
|
+
React.createElement(ArrowDropUp, null)),
|
|
33
|
+
React.createElement("div", null),
|
|
34
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => model.hview.scroll(-100) },
|
|
35
|
+
React.createElement(ArrowLeft, null)),
|
|
36
|
+
React.createElement("div", null),
|
|
37
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => model.hview.scroll(100) },
|
|
38
|
+
React.createElement(ArrowRight, null)),
|
|
39
|
+
React.createElement("div", null),
|
|
40
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => model.vview.scroll(-100) },
|
|
41
|
+
React.createElement(ArrowDropDown, null)),
|
|
42
|
+
React.createElement("div", null),
|
|
43
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => {
|
|
44
|
+
model.hview.zoomIn();
|
|
45
|
+
model.vview.zoomIn();
|
|
46
|
+
} },
|
|
47
|
+
React.createElement(ZoomIn, null)),
|
|
48
|
+
React.createElement("div", null),
|
|
49
|
+
React.createElement(IconButton, { className: classes.icon, onClick: () => {
|
|
50
|
+
model.hview.zoomOut();
|
|
51
|
+
model.vview.zoomOut();
|
|
52
|
+
} },
|
|
53
|
+
React.createElement(ZoomOut, null))));
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=PanButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanButtons.js","sourceRoot":"","sources":["../../../src/DotplotView/components/PanButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAQ;AACR,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,WAAW,MAAM,iCAAiC,CAAA;AACzD,OAAO,SAAS,MAAM,+BAA+B,CAAA;AACrD,OAAO,UAAU,MAAM,gCAAgC,CAAA;AACvD,OAAO,MAAM,MAAM,4BAA4B,CAAA;AAC/C,OAAO,OAAO,MAAM,6BAA6B,CAAA;AAKjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,mBAAmB,EAAE,gBAAgB;QAC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AAE,GAAG,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;gBACpB,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;YACtB,CAAC;YAED,oBAAC,MAAM,OAAG,CACC;QACb,gCAAO;QACP,oBAAC,UAAU,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,oBAAC,OAAO,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,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DialogContent, DialogContentText } from '@mui/material';
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
import { DataGrid } from '@mui/x-data-grid';
|
|
7
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
8
|
+
import { measureGridWidth } from '@jbrowse/core/util';
|
|
9
|
+
const useStyles = makeStyles()({
|
|
10
|
+
content: {
|
|
11
|
+
minWidth: 600,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export default observer(function WarningDialog({ trackWarnings, handleClose, }) {
|
|
15
|
+
const { classes } = useStyles();
|
|
16
|
+
const rows = [];
|
|
17
|
+
for (let i = 0; i < trackWarnings.length; i++) {
|
|
18
|
+
const track = trackWarnings[i];
|
|
19
|
+
const name = getConf(track, 'name');
|
|
20
|
+
for (let j = 0; j < track.displays[0].warnings.length; j++) {
|
|
21
|
+
const warning = track.displays[0].warnings[j];
|
|
22
|
+
rows.push({ name, ...warning, id: i + '_' + j });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const columns = [
|
|
26
|
+
{ field: 'name' },
|
|
27
|
+
{ field: 'message', width: measureGridWidth(rows.map(r => r.message)) },
|
|
28
|
+
{ field: 'effect', width: measureGridWidth(rows.map(r => r.effect)) },
|
|
29
|
+
];
|
|
30
|
+
return (React.createElement(Dialog, { open: true, onClose: handleClose, maxWidth: "xl", title: "Dotplot rendered with warnings" },
|
|
31
|
+
React.createElement(DialogContent, { className: classes.content },
|
|
32
|
+
React.createElement(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."),
|
|
33
|
+
React.createElement("div", { style: { height: 600, width: '100%', overflow: 'auto' } },
|
|
34
|
+
React.createElement(DataGrid, { rows: rows, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, disableColumnMenu: true })))));
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=WarningDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WarningDialog.js","sourceRoot":"","sources":["../../../src/DotplotView/components/WarningDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,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B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE;QACvE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE;KACtE,CAAA;IACD,OAAO,CACL,oBAAC,MAAM,IACL,IAAI,QACJ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,gCAAgC;QAEtC,oBAAC,aAAa,IAAC,SAAS,EAAE,OAAO,CAAC,OAAO;YACvC,oBAAC,iBAAiB,oQAKE;YACpB,6BAAK,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;gBAC1D,oBAAC,QAAQ,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,83 @@
|
|
|
1
|
+
export function locstr(px, view, includeAsm = true) {
|
|
2
|
+
const { assemblyName, refName, start, offset, oob } = view.pxToBp(px);
|
|
3
|
+
const coord = Math.floor(start + offset);
|
|
4
|
+
return oob
|
|
5
|
+
? 'out of bounds'
|
|
6
|
+
: `${includeAsm ? '{' + assemblyName + '}' : ''}${refName}:${coord.toLocaleString('en-US')}`;
|
|
7
|
+
}
|
|
8
|
+
export function getBlockLabelKeysToHide(blocks, length, viewOffsetPx) {
|
|
9
|
+
const blockLabelKeysToHide = new Set();
|
|
10
|
+
const sortedBlocks = [...blocks].sort((a, b) => {
|
|
11
|
+
const alen = a.end - a.start;
|
|
12
|
+
const blen = b.end - b.start;
|
|
13
|
+
return blen - alen;
|
|
14
|
+
});
|
|
15
|
+
const positions = Array.from({ length: Math.round(length) });
|
|
16
|
+
for (const { key, offsetPx } of sortedBlocks) {
|
|
17
|
+
const y = Math.round(length - offsetPx + viewOffsetPx);
|
|
18
|
+
const labelBounds = [Math.max(y - 12, 0), y];
|
|
19
|
+
if (y === 0 || positions.slice(...labelBounds).some(Boolean)) {
|
|
20
|
+
blockLabelKeysToHide.add(key);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
positions.fill(true, ...labelBounds);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return blockLabelKeysToHide;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Given a scale ( bp/px ) and minimum distances (px) between major and minor
|
|
30
|
+
* gridlines, return an object like `{ majorPitch: bp, minorPitch: bp }` giving
|
|
31
|
+
* the gridline pitches to use.
|
|
32
|
+
*/
|
|
33
|
+
export function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
|
|
34
|
+
scale = Math.abs(scale);
|
|
35
|
+
const minMajorPitchBp = minMajorPitchPx * scale;
|
|
36
|
+
const majorMagnitude = Number.parseInt(Number(minMajorPitchBp).toExponential().split(/e/i)[1], 10);
|
|
37
|
+
let majorPitch = 10 ** majorMagnitude;
|
|
38
|
+
while (majorPitch < minMajorPitchBp) {
|
|
39
|
+
majorPitch *= 2;
|
|
40
|
+
if (majorPitch >= minMajorPitchBp) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
majorPitch *= 2.5;
|
|
44
|
+
}
|
|
45
|
+
majorPitch = Math.max(majorPitch, 5);
|
|
46
|
+
const majorPitchPx = majorPitch / scale;
|
|
47
|
+
let minorPitch = 0;
|
|
48
|
+
if (!(majorPitch % 10) && majorPitchPx / 10 >= minMinorPitchPx) {
|
|
49
|
+
minorPitch = majorPitch / 10;
|
|
50
|
+
}
|
|
51
|
+
else if (!(majorPitch % 5) && majorPitchPx / 5 >= minMinorPitchPx) {
|
|
52
|
+
minorPitch = majorPitch / 5;
|
|
53
|
+
}
|
|
54
|
+
else if (!(majorPitch % 2) && majorPitchPx / 2 >= minMinorPitchPx) {
|
|
55
|
+
minorPitch = majorPitch / 2;
|
|
56
|
+
}
|
|
57
|
+
return { majorPitch, minorPitch };
|
|
58
|
+
}
|
|
59
|
+
export function makeTicks(regions, bpPerPx, emitMajor = true, emitMinor = true) {
|
|
60
|
+
const ticks = [];
|
|
61
|
+
const gridPitch = chooseGridPitch(bpPerPx, 60, 15);
|
|
62
|
+
const iterPitch = gridPitch.minorPitch || gridPitch.majorPitch;
|
|
63
|
+
for (let i = 0; i < regions.length; i++) {
|
|
64
|
+
const region = regions[i];
|
|
65
|
+
const { start, end, refName } = region;
|
|
66
|
+
let index = 0;
|
|
67
|
+
const minBase = start;
|
|
68
|
+
const maxBase = end;
|
|
69
|
+
for (let base = Math.floor(minBase / iterPitch) * iterPitch; base < Math.ceil(maxBase / iterPitch) * iterPitch + 1; base += iterPitch) {
|
|
70
|
+
if (emitMinor && base % gridPitch.majorPitch) {
|
|
71
|
+
ticks.push({ type: 'minor', base: base - 1, index, refName });
|
|
72
|
+
index += 1;
|
|
73
|
+
}
|
|
74
|
+
else if (emitMajor &&
|
|
75
|
+
Math.abs(base - region.start) > gridPitch.minorPitch) {
|
|
76
|
+
ticks.push({ type: 'major', base: base - 1, index, refName });
|
|
77
|
+
index += 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return ticks;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/DotplotView/components/util.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,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;AAED,MAAM,UAAU,uBAAuB,CACrC,MAAmB,EACnB,MAAc,EACd,YAAoB;IAEpB,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9C,MAAM,YAAY,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QA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C,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;QACzB,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QACtC,IAAI,KAAK,GAAG,CAAC,CAAA;QAEb,MAAM,OAAO,GAAG,KAAK,CAAA;QACrB,MAAM,OAAO,GAAG,GAAG,CAAA;QAEnB,KACE,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,SAAS,EACtD,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,SAAS,GAAG,CAAC,EACrD,IAAI,IAAI,SAAS,EACjB;YACA,IAAI,SAAS,IAAI,IAAI,GAAG,SAAS,CAAC,UAAU,EAAE;gBAC5C,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;gBAC7D,KAAK,IAAI,CAAC,CAAA;aACX;iBAAM,IACL,SAAS;gBACT,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,UAAU,EACpD;gBACA,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;gBAC7D,KAAK,IAAI,CAAC,CAAA;aACX;SACF;KACF;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
2
|
+
import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType';
|
|
3
|
+
// locals
|
|
4
|
+
import stateModelFactory from './model';
|
|
5
|
+
export default function (pluginManager) {
|
|
6
|
+
pluginManager.addViewType(() => {
|
|
7
|
+
return new ViewType({
|
|
8
|
+
name: 'DotplotView',
|
|
9
|
+
displayName: 'Dotplot view',
|
|
10
|
+
stateModel: stateModelFactory(pluginManager),
|
|
11
|
+
ReactComponent: lazy(() => import('./components/DotplotView')),
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DotplotView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAC5B,OAAO,QAAQ,MAAM,8CAA8C,CAAA;AAEnE,SAAS;AACT,OAAO,iBAAiB,MAAM,SAAS,CAAA;AAEvC,MAAM,CAAC,OAAO,WAAW,aAA4B;IACnD,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7B,OAAO,IAAI,QAAQ,CAAC;YAClB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,cAAc;YAC3B,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC;YAC5C,cAAc,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;SAC/D,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}
|