@jbrowse/plugin-dotplot-view 3.6.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/ComparativeRenderer/index.d.ts +10 -10
- package/esm/ComparativeRenderer/index.js +4 -17
- package/esm/DiagonalizeDotplotRpc.d.ts +30 -0
- package/esm/DiagonalizeDotplotRpc.js +147 -0
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -1
- package/esm/DotplotDisplay/index.d.ts +3 -3
- package/esm/DotplotDisplay/index.js +4 -4
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +2 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +9 -4
- package/esm/DotplotDisplay/stateModelFactory.d.ts +148 -29
- package/esm/DotplotDisplay/stateModelFactory.js +17 -11
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +5 -6
- package/esm/DotplotReadVsRef/index.js +1 -1
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +30 -48
- package/esm/DotplotRenderer/DotplotRenderer.js +55 -22
- package/esm/DotplotRenderer/clamp.d.ts +7 -0
- package/esm/DotplotRenderer/clamp.js +58 -0
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- package/esm/DotplotRenderer/components/DotplotRendering.js +1 -1
- package/esm/DotplotRenderer/configSchema.d.ts +3 -3
- package/esm/DotplotRenderer/configSchema.js +1 -1
- package/esm/DotplotRenderer/drawDotplot.d.ts +7 -6
- package/esm/DotplotRenderer/drawDotplot.js +95 -100
- package/esm/DotplotRenderer/index.js +4 -4
- package/esm/DotplotView/1dview.d.ts +25 -25
- package/esm/DotplotView/1dview.js +16 -4
- package/esm/DotplotView/components/Axes.d.ts +1 -1
- package/esm/DotplotView/components/Axes.js +31 -41
- package/esm/DotplotView/components/ColorBySelector.d.ts +5 -0
- package/esm/DotplotView/components/ColorBySelector.js +73 -0
- package/esm/DotplotView/components/DiagonalizationProgressDialog.d.ts +6 -0
- package/esm/DotplotView/components/DiagonalizationProgressDialog.js +123 -0
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
- package/esm/DotplotView/components/DotplotControls.js +53 -15
- package/esm/DotplotView/components/DotplotGrid.d.ts +6 -0
- package/esm/DotplotView/components/{Grid.js → DotplotGrid.js} +19 -20
- package/esm/DotplotView/components/DotplotGridWrapper.d.ts +6 -0
- package/esm/DotplotView/components/DotplotGridWrapper.js +8 -0
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -2
- package/esm/DotplotView/components/DotplotTooltipClick.js +4 -4
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +2 -2
- package/esm/DotplotView/components/DotplotTooltips.d.ts +15 -0
- package/esm/DotplotView/components/DotplotTooltips.js +7 -0
- package/esm/DotplotView/components/DotplotView.d.ts +2 -2
- package/esm/DotplotView/components/DotplotView.js +31 -171
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/esm/DotplotView/components/DotplotWarnings.js +7 -7
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/DotplotView/components/Header.d.ts +1 -1
- package/esm/DotplotView/components/Header.js +5 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +6 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +2 -3
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +10 -1
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +8 -4
- package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/index.js +4 -10
- package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +2 -2
- package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.js +2 -2
- package/esm/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/index.d.ts +3 -3
- package/esm/DotplotView/components/ImportForm/selectors/index.js +3 -3
- package/esm/DotplotView/components/MinLengthSlider.d.ts +5 -0
- package/esm/DotplotView/components/MinLengthSlider.js +39 -0
- package/esm/DotplotView/components/MouseInteractionLayer.d.ts +17 -0
- package/esm/DotplotView/components/MouseInteractionLayer.js +14 -0
- package/esm/DotplotView/components/OpacitySlider.d.ts +5 -0
- package/esm/DotplotView/components/OpacitySlider.js +37 -0
- package/esm/DotplotView/components/PanButtons.d.ts +1 -1
- package/esm/DotplotView/components/PanButtons.js +1 -1
- package/esm/DotplotView/components/SelectionContextMenu.d.ts +13 -0
- package/esm/DotplotView/components/SelectionContextMenu.js +39 -0
- package/esm/DotplotView/components/SliderTooltip.d.ts +2 -0
- package/esm/DotplotView/components/SliderTooltip.js +6 -0
- package/esm/DotplotView/components/WarningDialog.js +1 -1
- package/esm/DotplotView/components/hooks/useCtrlKeyTracking.d.ts +1 -0
- package/esm/DotplotView/components/hooks/useCtrlKeyTracking.js +21 -0
- package/esm/DotplotView/components/hooks/useCursorMode.d.ts +7 -0
- package/esm/DotplotView/components/hooks/useCursorMode.js +16 -0
- package/esm/DotplotView/components/hooks/useMouseCoordinates.d.ts +29 -0
- package/esm/DotplotView/components/hooks/useMouseCoordinates.js +49 -0
- package/esm/DotplotView/components/hooks/useMouseMoveHandler.d.ts +6 -0
- package/esm/DotplotView/components/hooks/useMouseMoveHandler.js +24 -0
- package/esm/DotplotView/components/hooks/useMouseUpHandler.d.ts +3 -0
- package/esm/DotplotView/components/hooks/useMouseUpHandler.js +28 -0
- package/esm/DotplotView/components/hooks/useWheelHandler.d.ts +8 -0
- package/esm/DotplotView/components/hooks/useWheelHandler.js +44 -0
- package/esm/DotplotView/components/util.d.ts +1 -1
- package/esm/DotplotView/components/util.js +18 -8
- package/esm/DotplotView/index.js +2 -2
- package/esm/DotplotView/model.d.ts +213 -90
- package/esm/DotplotView/model.js +147 -93
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -6
- package/esm/DotplotView/types.d.ts +7 -1
- package/esm/LaunchDotplotView.js +6 -36
- package/esm/ServerSideRenderedBlockContent.js +6 -27
- package/esm/ServerSideSyntenyRendering.d.ts +1 -1
- package/esm/ServerSideSyntenyRendering.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +9 -10
- package/esm/util.d.ts +1 -1
- package/package.json +28 -35
- package/dist/ComparativeRenderer/index.d.ts +0 -22
- package/dist/ComparativeRenderer/index.js +0 -53
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +0 -6
- package/dist/DotplotDisplay/components/DotplotDisplay.js +0 -18
- package/dist/DotplotDisplay/index.d.ts +0 -5
- package/dist/DotplotDisplay/index.js +0 -36
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +0 -11
- package/dist/DotplotDisplay/renderDotplotBlock.js +0 -49
- package/dist/DotplotDisplay/stateModelFactory.d.ts +0 -102
- package/dist/DotplotDisplay/stateModelFactory.js +0 -119
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +0 -3
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +0 -100
- package/dist/DotplotReadVsRef/index.d.ts +0 -2
- package/dist/DotplotReadVsRef/index.js +0 -41
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +0 -53
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +0 -74
- package/dist/DotplotRenderer/DotplotRenderer.js +0 -102
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +0 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +0 -9
- package/dist/DotplotRenderer/configSchema.d.ts +0 -40
- package/dist/DotplotRenderer/configSchema.js +0 -57
- package/dist/DotplotRenderer/drawDotplot.d.ts +0 -21
- package/dist/DotplotRenderer/drawDotplot.js +0 -213
- package/dist/DotplotRenderer/index.d.ts +0 -2
- package/dist/DotplotRenderer/index.js +0 -17
- package/dist/DotplotView/1dview.d.ts +0 -199
- package/dist/DotplotView/1dview.js +0 -63
- package/dist/DotplotView/components/Axes.d.ts +0 -13
- package/dist/DotplotView/components/Axes.js +0 -107
- package/dist/DotplotView/components/CursorIcon.d.ts +0 -3
- package/dist/DotplotView/components/CursorIcon.js +0 -15
- package/dist/DotplotView/components/DotplotControls.d.ts +0 -5
- package/dist/DotplotView/components/DotplotControls.js +0 -115
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +0 -10
- package/dist/DotplotView/components/DotplotTooltipClick.js +0 -17
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +0 -9
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +0 -16
- package/dist/DotplotView/components/DotplotView.d.ts +0 -5
- package/dist/DotplotView/components/DotplotView.js +0 -275
- package/dist/DotplotView/components/DotplotWarnings.d.ts +0 -5
- package/dist/DotplotView/components/DotplotWarnings.js +0 -53
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/DotplotView/components/ExportSvgDialog.js +0 -53
- package/dist/DotplotView/components/Grid.d.ts +0 -9
- package/dist/DotplotView/components/Grid.js +0 -47
- package/dist/DotplotView/components/Header.d.ts +0 -9
- package/dist/DotplotView/components/Header.js +0 -33
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -78
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +0 -42
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +0 -7
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +0 -23
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +0 -117
- package/dist/DotplotView/components/ImportForm/getAdapter.js +0 -68
- package/dist/DotplotView/components/ImportForm/index.d.ts +0 -5
- package/dist/DotplotView/components/ImportForm/index.js +0 -76
- package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +0 -23
- package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.js +0 -13
- package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -23
- package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.js +0 -10
- package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
- package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
- package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +0 -24
- package/dist/DotplotView/components/ImportForm/selectors/index.d.ts +0 -3
- package/dist/DotplotView/components/ImportForm/selectors/index.js +0 -12
- package/dist/DotplotView/components/ImportForm/util.d.ts +0 -10
- package/dist/DotplotView/components/ImportForm/util.js +0 -24
- package/dist/DotplotView/components/PanButtons.d.ts +0 -5
- package/dist/DotplotView/components/PanButtons.js +0 -47
- package/dist/DotplotView/components/WarningDialog.d.ts +0 -16
- package/dist/DotplotView/components/WarningDialog.js +0 -39
- package/dist/DotplotView/components/util.d.ts +0 -14
- package/dist/DotplotView/components/util.js +0 -82
- package/dist/DotplotView/index.d.ts +0 -2
- package/dist/DotplotView/index.js +0 -52
- package/dist/DotplotView/model.d.ts +0 -435
- package/dist/DotplotView/model.js +0 -487
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +0 -4
- package/dist/DotplotView/svgcomponents/SVGBackground.js +0 -10
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +0 -2
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +0 -30
- package/dist/DotplotView/types.d.ts +0 -12
- package/dist/DotplotView/types.js +0 -2
- package/dist/LaunchDotplotView.d.ts +0 -2
- package/dist/LaunchDotplotView.js +0 -43
- package/dist/ServerSideRenderedBlockContent.d.ts +0 -12
- package/dist/ServerSideRenderedBlockContent.js +0 -65
- package/dist/ServerSideSyntenyRendering.d.ts +0 -13
- package/dist/ServerSideSyntenyRendering.js +0 -23
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -40
- package/dist/util.d.ts +0 -9
- package/dist/util.js +0 -7
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +0 -47
- package/esm/DotplotView/components/Grid.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-dotplot-view",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "JBrowse 2 dotplot view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -15,49 +15,42 @@
|
|
|
15
15
|
"directory": "plugins/dotplot-view"
|
|
16
16
|
},
|
|
17
17
|
"author": "JBrowse Team",
|
|
18
|
-
"
|
|
19
|
-
"srcMain": "src/index.ts",
|
|
20
|
-
"main": "dist/index.js",
|
|
18
|
+
"main": "esm/index.js",
|
|
21
19
|
"files": [
|
|
22
|
-
"dist",
|
|
23
20
|
"esm"
|
|
24
21
|
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "npm-run-all build:*",
|
|
27
|
-
"test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
|
|
28
|
-
"prepublishOnly": "yarn test",
|
|
29
|
-
"prepack": "yarn build && yarn useDist",
|
|
30
|
-
"postpack": "yarn useSrc",
|
|
31
|
-
"useDist": "node ../../scripts/useDist.js",
|
|
32
|
-
"useSrc": "node ../../scripts/useSrc.js",
|
|
33
|
-
"prebuild": "npm run clean",
|
|
34
|
-
"build:esm": "tsc --build tsconfig.build.esm.json",
|
|
35
|
-
"build:commonjs": "tsc --build tsconfig.build.commonjs.json",
|
|
36
|
-
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
|
-
},
|
|
38
22
|
"dependencies": {
|
|
39
|
-
"@jbrowse/
|
|
40
|
-
"@
|
|
41
|
-
"@mui/
|
|
42
|
-
"@mui/
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"mobx": "^
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"rxjs": "^7.0.0",
|
|
50
|
-
"tss-react": "^4.0.0"
|
|
23
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
24
|
+
"@mui/icons-material": "^7.3.6",
|
|
25
|
+
"@mui/material": "^7.3.6",
|
|
26
|
+
"@mui/x-data-grid": "^8.23.0",
|
|
27
|
+
"@types/file-saver-es": "^2.0.3",
|
|
28
|
+
"file-saver-es": "^2.0.5",
|
|
29
|
+
"mobx": "^6.15.0",
|
|
30
|
+
"mobx-react": "^9.2.1",
|
|
31
|
+
"@jbrowse/core": "^4.0.0",
|
|
32
|
+
"@jbrowse/plugin-alignments": "^4.0.0"
|
|
51
33
|
},
|
|
52
34
|
"peerDependencies": {
|
|
53
35
|
"react": ">=18.0.0",
|
|
54
36
|
"react-dom": ">=18.0.0"
|
|
55
37
|
},
|
|
56
|
-
"distModule": "esm/index.js",
|
|
57
|
-
"srcModule": "src/index.ts",
|
|
58
|
-
"module": "esm/index.js",
|
|
59
38
|
"publishConfig": {
|
|
60
39
|
"access": "public"
|
|
61
40
|
},
|
|
62
|
-
"
|
|
63
|
-
|
|
41
|
+
"sideEffects": false,
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "pnpm run /^build:/",
|
|
44
|
+
"test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
|
|
45
|
+
"prebuild": "pnpm clean",
|
|
46
|
+
"build:esm": "tsc -p tsconfig.build.esm.json",
|
|
47
|
+
"clean": "rimraf esm *.tsbuildinfo"
|
|
48
|
+
},
|
|
49
|
+
"types": "esm/index.d.ts",
|
|
50
|
+
"exports": {
|
|
51
|
+
".": {
|
|
52
|
+
"types": "./esm/index.d.ts",
|
|
53
|
+
"import": "./esm/index.js"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import type { RenderArgs as ComparativeRenderArgs, RenderArgsSerialized as ComparativeRenderArgsSerialized, RenderResults, ResultsSerialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
3
|
-
import type ComparativeRenderer from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
4
|
-
interface RenderArgs extends ComparativeRenderArgs {
|
|
5
|
-
adapterConfig: Record<string, unknown>;
|
|
6
|
-
rendererType: string;
|
|
7
|
-
}
|
|
8
|
-
interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
|
|
9
|
-
adapterConfig: Record<string, unknown>;
|
|
10
|
-
rendererType: string;
|
|
11
|
-
}
|
|
12
|
-
export default class ComparativeRender extends RpcMethodType {
|
|
13
|
-
name: string;
|
|
14
|
-
renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
|
|
15
|
-
getRenderer(rendererType: string): ComparativeRenderer;
|
|
16
|
-
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
|
|
17
|
-
execute(args: RenderArgsSerialized & {
|
|
18
|
-
stopToken?: string;
|
|
19
|
-
}, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
|
|
20
|
-
deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const RpcMethodType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodType"));
|
|
7
|
-
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
8
|
-
class ComparativeRender extends RpcMethodType_1.default {
|
|
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, stopToken } = deserializedArgs;
|
|
35
|
-
if (!sessionId) {
|
|
36
|
-
throw new Error('must pass a unique session id');
|
|
37
|
-
}
|
|
38
|
-
(0, stopToken_1.checkStopToken)(stopToken);
|
|
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
|
-
exports.default = ComparativeRender;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
const mobx_react_1 = require("mobx-react");
|
|
6
|
-
const DotplotDisplay = (0, mobx_react_1.observer)(function DotplotDisplay(props) {
|
|
7
|
-
const { model, children } = props;
|
|
8
|
-
const { offsetX = 0, offsetY = 0 } = model.data || {};
|
|
9
|
-
const view = (0, util_1.getContainingView)(model);
|
|
10
|
-
const top = view.vview.offsetPx - offsetY;
|
|
11
|
-
const left = -(view.hview.offsetPx - offsetX);
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(model.ReactComponent2, { ...props, style: {
|
|
13
|
-
position: 'absolute',
|
|
14
|
-
top,
|
|
15
|
-
left,
|
|
16
|
-
} }), children] }));
|
|
17
|
-
});
|
|
18
|
-
exports.default = DotplotDisplay;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export default function DotplotDisplayF(pm: PluginManager): void;
|
|
3
|
-
export declare function configSchemaFactory(pm: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
4
|
-
renderer: import("mobx-state-tree").IOptionalIType<any, [undefined]>;
|
|
5
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = DotplotDisplayF;
|
|
7
|
-
exports.configSchemaFactory = configSchemaFactory;
|
|
8
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
|
-
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
10
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
11
|
-
const DotplotDisplay_1 = __importDefault(require("./components/DotplotDisplay"));
|
|
12
|
-
const stateModelFactory_1 = require("./stateModelFactory");
|
|
13
|
-
function DotplotDisplayF(pm) {
|
|
14
|
-
pm.addDisplayType(() => {
|
|
15
|
-
const configSchema = configSchemaFactory(pm);
|
|
16
|
-
return new DisplayType_1.default({
|
|
17
|
-
name: 'DotplotDisplay',
|
|
18
|
-
displayName: 'Dotplot display',
|
|
19
|
-
configSchema,
|
|
20
|
-
stateModel: (0, stateModelFactory_1.stateModelFactory)(configSchema),
|
|
21
|
-
trackType: 'SyntenyTrack',
|
|
22
|
-
viewType: 'DotplotView',
|
|
23
|
-
ReactComponent: DotplotDisplay_1.default,
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function configSchemaFactory(pm) {
|
|
28
|
-
return (0, configuration_1.ConfigurationSchema)('DotplotDisplay', {
|
|
29
|
-
renderer: mobx_state_tree_1.types.optional(pm.pluggableConfigSchemaType('renderer'), {
|
|
30
|
-
type: 'DotplotRenderer',
|
|
31
|
-
}),
|
|
32
|
-
}, {
|
|
33
|
-
explicitIdentifier: 'displayId',
|
|
34
|
-
explicitlyTyped: true,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { 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>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderBlockData = renderBlockData;
|
|
4
|
-
exports.renderBlockEffect = renderBlockEffect;
|
|
5
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
-
const util_1 = require("@jbrowse/core/util");
|
|
7
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
8
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
|
-
function renderBlockData(self) {
|
|
10
|
-
const { rpcManager } = (0, util_1.getSession)(self);
|
|
11
|
-
const { rendererType } = self;
|
|
12
|
-
const { adapterConfig } = self;
|
|
13
|
-
const parent = (0, util_1.getContainingView)(self);
|
|
14
|
-
(0, configuration_1.readConfObject)(self.configuration);
|
|
15
|
-
(0, mobx_state_tree_1.getSnapshot)(parent);
|
|
16
|
-
if (parent.initialized) {
|
|
17
|
-
const { viewWidth, viewHeight, borderSize, borderX, borderY } = parent;
|
|
18
|
-
return {
|
|
19
|
-
rendererType,
|
|
20
|
-
rpcManager,
|
|
21
|
-
renderProps: {
|
|
22
|
-
...self.renderProps(),
|
|
23
|
-
view: structuredClone((0, mobx_state_tree_1.getSnapshot)(parent)),
|
|
24
|
-
width: viewWidth,
|
|
25
|
-
height: viewHeight,
|
|
26
|
-
borderSize,
|
|
27
|
-
borderX,
|
|
28
|
-
borderY,
|
|
29
|
-
adapterConfig,
|
|
30
|
-
rendererType: rendererType.name,
|
|
31
|
-
sessionId: (0, tracks_1.getRpcSessionId)(self),
|
|
32
|
-
timeout: 1000000,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
async function renderBlockEffect(props) {
|
|
39
|
-
if (!props) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const { rendererType, rpcManager, renderProps } = props;
|
|
43
|
-
const { reactElement, ...data } = await rendererType.renderInClient(rpcManager, renderProps);
|
|
44
|
-
return {
|
|
45
|
-
reactElement,
|
|
46
|
-
data,
|
|
47
|
-
renderingComponent: rendererType.ReactComponent,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import type { ExportSvgOptions } from '../DotplotView/model';
|
|
2
|
-
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { ThemeOptions } from '@mui/material';
|
|
4
|
-
import type { Instance } from 'mobx-state-tree';
|
|
5
|
-
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
6
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
9
|
-
} & {
|
|
10
|
-
type: import("mobx-state-tree").ISimpleType<"DotplotDisplay">;
|
|
11
|
-
configuration: AnyConfigurationSchemaType;
|
|
12
|
-
}, {
|
|
13
|
-
rendererTypeName: string;
|
|
14
|
-
error: unknown;
|
|
15
|
-
message: string | undefined;
|
|
16
|
-
} & {
|
|
17
|
-
readonly RenderingComponent: React.FC<{
|
|
18
|
-
model: {
|
|
19
|
-
id: string;
|
|
20
|
-
type: string;
|
|
21
|
-
rpcDriverName: string | undefined;
|
|
22
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
23
|
-
rendererTypeName: string;
|
|
24
|
-
error: unknown;
|
|
25
|
-
message: string | undefined;
|
|
26
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
27
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
28
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
29
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
30
|
-
}, {
|
|
31
|
-
rendererTypeName: string;
|
|
32
|
-
error: unknown;
|
|
33
|
-
message: string | undefined;
|
|
34
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
35
|
-
onHorizontalScroll?: () => void;
|
|
36
|
-
blockState?: Record<string, any>;
|
|
37
|
-
}>;
|
|
38
|
-
readonly DisplayBlurb: React.FC<{
|
|
39
|
-
model: {
|
|
40
|
-
id: string;
|
|
41
|
-
type: string;
|
|
42
|
-
rpcDriverName: string | undefined;
|
|
43
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
44
|
-
rendererTypeName: string;
|
|
45
|
-
error: unknown;
|
|
46
|
-
message: string | undefined;
|
|
47
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
48
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
49
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
50
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
51
|
-
}, {
|
|
52
|
-
rendererTypeName: string;
|
|
53
|
-
error: unknown;
|
|
54
|
-
message: string | undefined;
|
|
55
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
56
|
-
}> | null;
|
|
57
|
-
readonly adapterConfig: any;
|
|
58
|
-
readonly parentTrack: any;
|
|
59
|
-
renderProps(): any;
|
|
60
|
-
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
61
|
-
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
62
|
-
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
63
|
-
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
64
|
-
regionCannotBeRendered(): null;
|
|
65
|
-
} & {
|
|
66
|
-
setMessage(arg?: string): void;
|
|
67
|
-
setError(error?: unknown): void;
|
|
68
|
-
setRpcDriverName(rpcDriverName: string): void;
|
|
69
|
-
reload(): void;
|
|
70
|
-
} & {
|
|
71
|
-
stopToken: string | undefined;
|
|
72
|
-
warnings: {
|
|
73
|
-
message: string;
|
|
74
|
-
effect: string;
|
|
75
|
-
}[];
|
|
76
|
-
filled: boolean;
|
|
77
|
-
data: any;
|
|
78
|
-
reactElement: React.ReactElement | undefined;
|
|
79
|
-
message: string | undefined;
|
|
80
|
-
renderingComponent: any;
|
|
81
|
-
ReactComponent2: React.FC<any>;
|
|
82
|
-
} & {
|
|
83
|
-
readonly shouldDisplay: boolean;
|
|
84
|
-
readonly rendererTypeName: any;
|
|
85
|
-
renderProps(): any;
|
|
86
|
-
} & {
|
|
87
|
-
renderSvg(opts: ExportSvgOptions & {
|
|
88
|
-
theme?: ThemeOptions;
|
|
89
|
-
}): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
90
|
-
} & {
|
|
91
|
-
afterAttach(): void;
|
|
92
|
-
setLoading(stopToken?: string): void;
|
|
93
|
-
setMessage(messageText: string): void;
|
|
94
|
-
setRendered(args?: {
|
|
95
|
-
data: any;
|
|
96
|
-
reactElement: React.ReactElement;
|
|
97
|
-
renderingComponent: React.Component;
|
|
98
|
-
}): void;
|
|
99
|
-
setError(error: unknown): void;
|
|
100
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
101
|
-
export type DotplotDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
102
|
-
export type DotplotDisplayModel = Instance<DotplotDisplayStateModel>;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.stateModelFactory = stateModelFactory;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
|
-
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
10
|
-
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
12
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
13
|
-
const ServerSideRenderedBlockContent_1 = __importDefault(require("../ServerSideRenderedBlockContent"));
|
|
14
|
-
const renderDotplotBlock_1 = require("./renderDotplotBlock");
|
|
15
|
-
function stateModelFactory(configSchema) {
|
|
16
|
-
return mobx_state_tree_1.types
|
|
17
|
-
.compose('DotplotDisplay', models_1.BaseDisplay, mobx_state_tree_1.types
|
|
18
|
-
.model({
|
|
19
|
-
type: mobx_state_tree_1.types.literal('DotplotDisplay'),
|
|
20
|
-
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
21
|
-
})
|
|
22
|
-
.volatile(() => ({
|
|
23
|
-
stopToken: undefined,
|
|
24
|
-
warnings: [],
|
|
25
|
-
filled: false,
|
|
26
|
-
data: undefined,
|
|
27
|
-
reactElement: undefined,
|
|
28
|
-
message: undefined,
|
|
29
|
-
renderingComponent: undefined,
|
|
30
|
-
ReactComponent2: ServerSideRenderedBlockContent_1.default,
|
|
31
|
-
})))
|
|
32
|
-
.views(self => ({
|
|
33
|
-
get shouldDisplay() {
|
|
34
|
-
const { vview, hview } = (0, util_1.getContainingView)(self);
|
|
35
|
-
return (vview.bpPerPx === self.data.bpPerPxY &&
|
|
36
|
-
hview.bpPerPx === self.data.bpPerPxX);
|
|
37
|
-
},
|
|
38
|
-
get rendererTypeName() {
|
|
39
|
-
return (0, configuration_1.getConf)(self, ['renderer', 'type']);
|
|
40
|
-
},
|
|
41
|
-
renderProps() {
|
|
42
|
-
return {
|
|
43
|
-
...(0, tracks_1.getParentRenderProps)(self),
|
|
44
|
-
rpcDriverName: self.rpcDriverName,
|
|
45
|
-
displayModel: self,
|
|
46
|
-
config: self.configuration.renderer,
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
}))
|
|
50
|
-
.views(self => ({
|
|
51
|
-
async renderSvg(opts) {
|
|
52
|
-
const props = (0, renderDotplotBlock_1.renderBlockData)(self);
|
|
53
|
-
if (!props) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
const { rendererType, rpcManager, renderProps } = props;
|
|
57
|
-
const rendering = await rendererType.renderInClient(rpcManager, {
|
|
58
|
-
...renderProps,
|
|
59
|
-
exportSVG: opts,
|
|
60
|
-
theme: opts.theme || renderProps.theme,
|
|
61
|
-
});
|
|
62
|
-
const { hview, vview } = (0, util_1.getContainingView)(self);
|
|
63
|
-
const offX = -hview.offsetPx + rendering.offsetX;
|
|
64
|
-
const offY = -vview.offsetPx + rendering.offsetY;
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${offX} ${-offY})`, children: (0, jsx_runtime_1.jsx)(util_1.ReactRendering, { rendering: rendering }) }));
|
|
66
|
-
},
|
|
67
|
-
}))
|
|
68
|
-
.actions(self => ({
|
|
69
|
-
afterAttach() {
|
|
70
|
-
(0, util_1.makeAbortableReaction)(self, () => (0, renderDotplotBlock_1.renderBlockData)(self), blockData => (0, renderDotplotBlock_1.renderBlockEffect)(blockData), {
|
|
71
|
-
name: `${self.type} ${self.id} rendering`,
|
|
72
|
-
delay: 500,
|
|
73
|
-
fireImmediately: true,
|
|
74
|
-
}, this.setLoading, this.setRendered, this.setError);
|
|
75
|
-
},
|
|
76
|
-
setLoading(stopToken) {
|
|
77
|
-
self.filled = false;
|
|
78
|
-
self.message = undefined;
|
|
79
|
-
self.reactElement = undefined;
|
|
80
|
-
self.data = undefined;
|
|
81
|
-
self.error = undefined;
|
|
82
|
-
self.renderingComponent = undefined;
|
|
83
|
-
self.stopToken = stopToken;
|
|
84
|
-
},
|
|
85
|
-
setMessage(messageText) {
|
|
86
|
-
self.filled = false;
|
|
87
|
-
self.message = messageText;
|
|
88
|
-
self.reactElement = undefined;
|
|
89
|
-
self.data = undefined;
|
|
90
|
-
self.error = undefined;
|
|
91
|
-
self.renderingComponent = undefined;
|
|
92
|
-
self.stopToken = undefined;
|
|
93
|
-
},
|
|
94
|
-
setRendered(args) {
|
|
95
|
-
if (args === undefined) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const { data, reactElement, renderingComponent } = args;
|
|
99
|
-
self.warnings = data.warnings;
|
|
100
|
-
self.filled = true;
|
|
101
|
-
self.message = undefined;
|
|
102
|
-
self.reactElement = reactElement;
|
|
103
|
-
self.data = data;
|
|
104
|
-
self.error = undefined;
|
|
105
|
-
self.renderingComponent = renderingComponent;
|
|
106
|
-
self.stopToken = undefined;
|
|
107
|
-
},
|
|
108
|
-
setError(error) {
|
|
109
|
-
console.error(error);
|
|
110
|
-
self.filled = false;
|
|
111
|
-
self.message = undefined;
|
|
112
|
-
self.reactElement = undefined;
|
|
113
|
-
self.data = undefined;
|
|
114
|
-
self.error = error;
|
|
115
|
-
self.renderingComponent = undefined;
|
|
116
|
-
self.stopToken = undefined;
|
|
117
|
-
},
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onClick = onClick;
|
|
4
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
-
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
7
|
-
const { featurizeSA, getClip, getLength, getLengthSansClipping } = plugin_alignments_1.MismatchParser;
|
|
8
|
-
function onClick(feature, self) {
|
|
9
|
-
var _a;
|
|
10
|
-
const session = (0, util_1.getSession)(self);
|
|
11
|
-
try {
|
|
12
|
-
const cigar = feature.get('CIGAR');
|
|
13
|
-
const clipPos = getClip(cigar, 1);
|
|
14
|
-
const flags = feature.get('flags');
|
|
15
|
-
const strand = feature.get('strand');
|
|
16
|
-
const readName = feature.get('name');
|
|
17
|
-
const readAssembly = `${readName}_assembly_${Date.now()}`;
|
|
18
|
-
const { parentTrack } = self;
|
|
19
|
-
const [trackAssembly] = (0, configuration_1.getConf)(parentTrack, 'assemblyNames');
|
|
20
|
-
const assemblyNames = [trackAssembly, readAssembly];
|
|
21
|
-
const trackId = `track-${Date.now()}`;
|
|
22
|
-
const trackName = `${readName}_vs_${trackAssembly}`;
|
|
23
|
-
const SA = (_a = feature.get('tags')) === null || _a === void 0 ? void 0 : _a.SA;
|
|
24
|
-
const SA2 = featurizeSA(SA, feature.id(), strand, readName, true);
|
|
25
|
-
const totalLength = getLength(flags & 2048 ? SA2[0].CIGAR : cigar);
|
|
26
|
-
const features = [
|
|
27
|
-
{
|
|
28
|
-
...feature.toJSON(),
|
|
29
|
-
strand: 1,
|
|
30
|
-
mate: {
|
|
31
|
-
refName: readName,
|
|
32
|
-
start: clipPos,
|
|
33
|
-
end: clipPos + getLengthSansClipping(cigar),
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
...SA2,
|
|
37
|
-
].sort((a, b) => a.clipPos - b.clipPos);
|
|
38
|
-
session.addView('DotplotView', {
|
|
39
|
-
type: 'DotplotView',
|
|
40
|
-
hview: {
|
|
41
|
-
offsetPx: 0,
|
|
42
|
-
bpPerPx: (0, util_1.sum)(features.map(a => a.end - a.start)) / 800,
|
|
43
|
-
displayedRegions: (0, util_1.gatherOverlaps)(features.map((f, index) => {
|
|
44
|
-
const { start, end, refName } = f;
|
|
45
|
-
return {
|
|
46
|
-
start,
|
|
47
|
-
end,
|
|
48
|
-
refName,
|
|
49
|
-
index,
|
|
50
|
-
assemblyName: trackAssembly,
|
|
51
|
-
};
|
|
52
|
-
})),
|
|
53
|
-
},
|
|
54
|
-
vview: {
|
|
55
|
-
offsetPx: 0,
|
|
56
|
-
bpPerPx: totalLength / 400,
|
|
57
|
-
minimumBlockWidth: 0,
|
|
58
|
-
interRegionPaddingWidth: 0,
|
|
59
|
-
displayedRegions: [
|
|
60
|
-
{
|
|
61
|
-
assemblyName: readAssembly,
|
|
62
|
-
start: 0,
|
|
63
|
-
end: totalLength,
|
|
64
|
-
refName: readName,
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
viewTrackConfigs: [
|
|
69
|
-
{
|
|
70
|
-
type: 'SyntenyTrack',
|
|
71
|
-
assemblyNames,
|
|
72
|
-
adapter: {
|
|
73
|
-
type: 'FromConfigAdapter',
|
|
74
|
-
features,
|
|
75
|
-
},
|
|
76
|
-
trackId,
|
|
77
|
-
name: trackName,
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
assemblyNames,
|
|
81
|
-
tracks: [
|
|
82
|
-
{
|
|
83
|
-
configuration: trackId,
|
|
84
|
-
type: 'SyntenyTrack',
|
|
85
|
-
displays: [
|
|
86
|
-
{
|
|
87
|
-
type: 'DotplotDisplay',
|
|
88
|
-
configuration: `${trackId}-DotplotDisplay`,
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
displayName: `${readName} vs ${trackAssembly}`,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
catch (e) {
|
|
97
|
-
console.error(e);
|
|
98
|
-
session.notifyError(`${e}`, e);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = DotplotReadVsRefMenuItem;
|
|
7
|
-
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
8
|
-
const DotplotReadVsRef_1 = require("./DotplotReadVsRef");
|
|
9
|
-
function DotplotReadVsRefMenuItem(pluginManager) {
|
|
10
|
-
pluginManager.addToExtensionPoint('Core-extendPluggableElement', (pluggableElement) => {
|
|
11
|
-
if (pluggableElement.name === 'LinearPileupDisplay') {
|
|
12
|
-
const { stateModel } = pluggableElement;
|
|
13
|
-
const newStateModel = stateModel.extend((self) => {
|
|
14
|
-
const superContextMenuItems = self.contextMenuItems;
|
|
15
|
-
return {
|
|
16
|
-
views: {
|
|
17
|
-
contextMenuItems() {
|
|
18
|
-
const feature = self.contextMenuFeature;
|
|
19
|
-
return [
|
|
20
|
-
...superContextMenuItems(),
|
|
21
|
-
...(feature
|
|
22
|
-
? [
|
|
23
|
-
{
|
|
24
|
-
label: 'Dotplot of read vs ref',
|
|
25
|
-
icon: Add_1.default,
|
|
26
|
-
onClick: () => {
|
|
27
|
-
(0, DotplotReadVsRef_1.onClick)(feature, self);
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
]
|
|
31
|
-
: []),
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
pluggableElement.stateModel = newStateModel;
|
|
38
|
-
}
|
|
39
|
-
return pluggableElement;
|
|
40
|
-
});
|
|
41
|
-
}
|