@jbrowse/plugin-dotplot-view 2.17.0 → 3.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/dist/ComparativeRenderer/index.d.ts +3 -8
- package/dist/ComparativeRenderer/index.js +3 -8
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/dist/DotplotDisplay/components/DotplotDisplay.js +7 -12
- package/dist/DotplotDisplay/index.d.ts +1 -7
- package/dist/DotplotDisplay/index.js +2 -12
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/dist/DotplotDisplay/renderDotplotBlock.js +3 -9
- package/dist/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/dist/DotplotDisplay/stateModelFactory.js +57 -100
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +13 -14
- package/dist/DotplotReadVsRef/index.d.ts +1 -1
- package/dist/DotplotReadVsRef/index.js +0 -2
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/dist/DotplotRenderer/DotplotRenderer.js +18 -9
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotRenderer/configSchema.d.ts +0 -21
- package/dist/DotplotRenderer/configSchema.js +2 -27
- package/dist/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/dist/DotplotRenderer/drawDotplot.js +3 -6
- package/dist/DotplotRenderer/index.d.ts +1 -1
- package/dist/DotplotRenderer/index.js +1 -1
- package/dist/DotplotView/1dview.d.ts +2 -77
- package/dist/DotplotView/1dview.js +4 -33
- package/dist/DotplotView/components/Axes.d.ts +5 -6
- package/dist/DotplotView/components/Axes.js +26 -40
- package/dist/DotplotView/components/CursorIcon.d.ts +3 -4
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +2 -3
- package/dist/DotplotView/components/DotplotControls.js +94 -97
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/dist/DotplotView/components/DotplotView.d.ts +2 -3
- package/dist/DotplotView/components/DotplotView.js +80 -92
- package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/dist/DotplotView/components/DotplotWarnings.js +26 -21
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/DotplotView/components/ExportSvgDialog.js +32 -67
- package/dist/DotplotView/components/Grid.d.ts +3 -4
- package/dist/DotplotView/components/Grid.js +19 -32
- package/dist/DotplotView/components/Header.d.ts +2 -3
- package/dist/DotplotView/components/Header.js +4 -23
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -48
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
- package/dist/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/dist/DotplotView/components/ImportForm/index.js +47 -97
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +2 -3
- package/dist/DotplotView/components/PanButtons.js +17 -36
- package/dist/DotplotView/components/WarningDialog.d.ts +7 -7
- package/dist/DotplotView/components/WarningDialog.js +12 -15
- package/dist/DotplotView/components/util.d.ts +2 -7
- package/dist/DotplotView/components/util.js +0 -5
- package/dist/DotplotView/index.d.ts +1 -1
- package/dist/DotplotView/index.js +17 -8
- package/dist/DotplotView/model.d.ts +11 -133
- package/dist/DotplotView/model.js +46 -222
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +3 -6
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
- package/dist/ServerSideRenderedBlockContent.js +11 -37
- package/dist/ServerSideSyntenyRendering.d.ts +1 -6
- package/dist/ServerSideSyntenyRendering.js +4 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/dist/util.d.ts +1 -1
- package/esm/ComparativeRenderer/index.d.ts +3 -8
- package/esm/ComparativeRenderer/index.js +3 -8
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/esm/DotplotDisplay/components/DotplotDisplay.js +7 -9
- package/esm/DotplotDisplay/index.d.ts +1 -7
- package/esm/DotplotDisplay/index.js +2 -12
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +3 -6
- package/esm/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/esm/DotplotDisplay/stateModelFactory.js +58 -101
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +15 -16
- package/esm/DotplotReadVsRef/index.d.ts +1 -1
- package/esm/DotplotReadVsRef/index.js +0 -2
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotRenderer/configSchema.d.ts +0 -21
- package/esm/DotplotRenderer/configSchema.js +2 -27
- package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/esm/DotplotRenderer/drawDotplot.js +4 -7
- package/esm/DotplotRenderer/index.d.ts +1 -1
- package/esm/DotplotRenderer/index.js +1 -1
- package/esm/DotplotView/1dview.d.ts +2 -77
- package/esm/DotplotView/1dview.js +4 -33
- package/esm/DotplotView/components/Axes.d.ts +5 -6
- package/esm/DotplotView/components/Axes.js +26 -37
- package/esm/DotplotView/components/CursorIcon.d.ts +3 -4
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +2 -3
- package/esm/DotplotView/components/DotplotControls.js +94 -97
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/esm/DotplotView/components/DotplotView.d.ts +2 -3
- package/esm/DotplotView/components/DotplotView.js +63 -85
- package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/esm/DotplotView/components/DotplotWarnings.js +9 -14
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/DotplotView/components/ExportSvgDialog.js +32 -44
- package/esm/DotplotView/components/Grid.d.ts +3 -4
- package/esm/DotplotView/components/Grid.js +19 -29
- package/esm/DotplotView/components/Header.d.ts +2 -3
- package/esm/DotplotView/components/Header.js +4 -23
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -25
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
- package/esm/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/esm/DotplotView/components/ImportForm/index.js +48 -75
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +2 -3
- package/esm/DotplotView/components/PanButtons.js +17 -36
- package/esm/DotplotView/components/WarningDialog.d.ts +7 -7
- package/esm/DotplotView/components/WarningDialog.js +12 -12
- package/esm/DotplotView/components/util.d.ts +2 -7
- package/esm/DotplotView/components/util.js +0 -5
- package/esm/DotplotView/index.d.ts +1 -1
- package/esm/DotplotView/index.js +0 -1
- package/esm/DotplotView/model.d.ts +11 -133
- package/esm/DotplotView/model.js +30 -216
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +3 -3
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
- package/esm/ServerSideRenderedBlockContent.js +11 -14
- package/esm/ServerSideSyntenyRendering.d.ts +1 -6
- package/esm/ServerSideSyntenyRendering.js +4 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -6
- package/esm/util.d.ts +1 -1
- package/package.json +2 -4
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
4
|
interface RenderArgs extends ComparativeRenderArgs {
|
|
5
5
|
adapterConfig: Record<string, unknown>;
|
|
6
6
|
rendererType: string;
|
|
@@ -9,18 +9,13 @@ interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
|
|
|
9
9
|
adapterConfig: Record<string, unknown>;
|
|
10
10
|
rendererType: string;
|
|
11
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
12
|
export default class ComparativeRender extends RpcMethodType {
|
|
18
13
|
name: string;
|
|
19
14
|
renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
|
|
20
15
|
getRenderer(rendererType: string): ComparativeRenderer;
|
|
21
16
|
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
|
|
22
17
|
execute(args: RenderArgsSerialized & {
|
|
23
|
-
|
|
18
|
+
stopToken?: string;
|
|
24
19
|
}, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
|
|
25
20
|
deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
26
21
|
}
|
|
@@ -3,13 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const util_1 = require("@jbrowse/core/util");
|
|
7
6
|
const RpcMethodType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodType"));
|
|
8
|
-
|
|
9
|
-
* call a synteny renderer with the given args
|
|
10
|
-
* param views: a set of views that each contain a set of regions
|
|
11
|
-
* used instead of passing regions directly as in render()
|
|
12
|
-
*/
|
|
7
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
13
8
|
class ComparativeRender extends RpcMethodType_1.default {
|
|
14
9
|
constructor() {
|
|
15
10
|
super(...arguments);
|
|
@@ -36,11 +31,11 @@ class ComparativeRender extends RpcMethodType_1.default {
|
|
|
36
31
|
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
37
32
|
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
38
33
|
}
|
|
39
|
-
const { sessionId, rendererType,
|
|
34
|
+
const { sessionId, rendererType, stopToken } = deserializedArgs;
|
|
40
35
|
if (!sessionId) {
|
|
41
36
|
throw new Error('must pass a unique session id');
|
|
42
37
|
}
|
|
43
|
-
(0,
|
|
38
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
44
39
|
const renderer = this.getRenderer(rendererType);
|
|
45
40
|
return rpcDriver === 'MainThreadRpcDriver'
|
|
46
41
|
? renderer.render(deserializedArgs)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotDisplayModel } from '../stateModelFactory';
|
|
1
|
+
import type { DotplotDisplayModel } from '../stateModelFactory';
|
|
3
2
|
declare const DotplotDisplay: (props: {
|
|
4
3
|
model: DotplotDisplayModel;
|
|
5
4
|
children?: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default DotplotDisplay;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const DotplotDisplay = (0, mobx_react_1.observer)(function DotplotDisplay(props) {
|
|
10
7
|
const { model, children } = props;
|
|
11
8
|
const { offsetX = 0, offsetY = 0 } = model.data || {};
|
|
12
9
|
const view = (0, util_1.getContainingView)(model);
|
|
13
10
|
const top = view.vview.offsetPx - offsetY;
|
|
14
11
|
const left = -(view.hview.offsetPx - offsetX);
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} }),
|
|
21
|
-
children));
|
|
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] }));
|
|
22
17
|
});
|
|
23
18
|
exports.default = DotplotDisplay;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DotplotDisplayF(pm: PluginManager): void;
|
|
3
|
-
/**
|
|
4
|
-
* #config DotplotDisplay
|
|
5
|
-
*/
|
|
6
3
|
export declare function configSchemaFactory(pm: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
renderer: import("mobx-state-tree").IOptionalIType<any, [undefined]>;
|
|
11
5
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.default = DotplotDisplayF;
|
|
7
7
|
exports.configSchemaFactory = configSchemaFactory;
|
|
8
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
9
|
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
11
|
-
|
|
12
|
-
const stateModelFactory_1 = require("./stateModelFactory");
|
|
10
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
13
11
|
const DotplotDisplay_1 = __importDefault(require("./components/DotplotDisplay"));
|
|
12
|
+
const stateModelFactory_1 = require("./stateModelFactory");
|
|
14
13
|
function DotplotDisplayF(pm) {
|
|
15
14
|
pm.addDisplayType(() => {
|
|
16
15
|
const configSchema = configSchemaFactory(pm);
|
|
@@ -25,21 +24,12 @@ function DotplotDisplayF(pm) {
|
|
|
25
24
|
});
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
/**
|
|
29
|
-
* #config DotplotDisplay
|
|
30
|
-
*/
|
|
31
27
|
function configSchemaFactory(pm) {
|
|
32
28
|
return (0, configuration_1.ConfigurationSchema)('DotplotDisplay', {
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
29
|
renderer: mobx_state_tree_1.types.optional(pm.pluggableConfigSchemaType('renderer'), {
|
|
37
30
|
type: 'DotplotRenderer',
|
|
38
31
|
}),
|
|
39
32
|
}, {
|
|
40
|
-
/**
|
|
41
|
-
* #identifier
|
|
42
|
-
*/
|
|
43
33
|
explicitIdentifier: 'displayId',
|
|
44
34
|
explicitlyTyped: true,
|
|
45
35
|
});
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.renderBlockData = renderBlockData;
|
|
7
4
|
exports.renderBlockEffect = renderBlockEffect;
|
|
8
|
-
const clone_1 = __importDefault(require("clone"));
|
|
9
5
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
+
const util_1 = require("@jbrowse/core/util");
|
|
10
7
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
11
8
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
12
|
-
const util_1 = require("@jbrowse/core/util");
|
|
13
9
|
function renderBlockData(self) {
|
|
14
10
|
const { rpcManager } = (0, util_1.getSession)(self);
|
|
15
11
|
const { rendererType } = self;
|
|
16
12
|
const { adapterConfig } = self;
|
|
17
13
|
const parent = (0, util_1.getContainingView)(self);
|
|
18
|
-
// Alternative to readConfObject(config) is below used because renderProps is
|
|
19
|
-
// something under our control. Compare to serverSideRenderedBlock
|
|
20
14
|
(0, configuration_1.readConfObject)(self.configuration);
|
|
21
15
|
(0, mobx_state_tree_1.getSnapshot)(parent);
|
|
22
16
|
if (parent.initialized) {
|
|
@@ -26,7 +20,7 @@ function renderBlockData(self) {
|
|
|
26
20
|
rpcManager,
|
|
27
21
|
renderProps: {
|
|
28
22
|
...self.renderProps(),
|
|
29
|
-
view: (
|
|
23
|
+
view: structuredClone((0, mobx_state_tree_1.getSnapshot)(parent)),
|
|
30
24
|
width: viewWidth,
|
|
31
25
|
height: viewHeight,
|
|
32
26
|
borderSize,
|
|
@@ -35,7 +29,7 @@ function renderBlockData(self) {
|
|
|
35
29
|
adapterConfig,
|
|
36
30
|
rendererType: rendererType.name,
|
|
37
31
|
sessionId: (0, tracks_1.getRpcSessionId)(self),
|
|
38
|
-
timeout: 1000000,
|
|
32
|
+
timeout: 1000000,
|
|
39
33
|
},
|
|
40
34
|
};
|
|
41
35
|
}
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ExportSvgOptions } from '../DotplotView/model';
|
|
6
|
-
/**
|
|
7
|
-
* #stateModel DotplotDisplay
|
|
8
|
-
* #category display
|
|
9
|
-
*/
|
|
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';
|
|
10
5
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
11
6
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
12
7
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
13
8
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
14
9
|
} & {
|
|
15
|
-
/**
|
|
16
|
-
* #property
|
|
17
|
-
*/
|
|
18
10
|
type: import("mobx-state-tree").ISimpleType<"DotplotDisplay">;
|
|
19
|
-
/**
|
|
20
|
-
* #property
|
|
21
|
-
*/
|
|
22
11
|
configuration: AnyConfigurationSchemaType;
|
|
23
12
|
}, {
|
|
24
13
|
rendererTypeName: string;
|
|
25
14
|
error: unknown;
|
|
26
15
|
message: string | undefined;
|
|
27
16
|
} & {
|
|
28
|
-
readonly RenderingComponent: React.
|
|
29
|
-
/**
|
|
30
|
-
* #stateModel DotplotDisplay
|
|
31
|
-
* #category display
|
|
32
|
-
*/
|
|
33
|
-
FC<{
|
|
17
|
+
readonly RenderingComponent: React.FC<{
|
|
34
18
|
model: {
|
|
35
19
|
id: string;
|
|
36
20
|
type: string;
|
|
@@ -84,11 +68,11 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
84
68
|
setRpcDriverName(rpcDriverName: string): void;
|
|
85
69
|
reload(): void;
|
|
86
70
|
} & {
|
|
71
|
+
stopToken: string | undefined;
|
|
87
72
|
warnings: {
|
|
88
73
|
message: string;
|
|
89
74
|
effect: string;
|
|
90
75
|
}[];
|
|
91
|
-
renderInProgress: AbortController | undefined;
|
|
92
76
|
filled: boolean;
|
|
93
77
|
data: any;
|
|
94
78
|
reactElement: React.ReactElement | undefined;
|
|
@@ -97,42 +81,21 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
97
81
|
ReactComponent2: React.FC<any>;
|
|
98
82
|
} & {
|
|
99
83
|
readonly shouldDisplay: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* #getter
|
|
102
|
-
*/
|
|
103
84
|
readonly rendererTypeName: any;
|
|
104
|
-
/**
|
|
105
|
-
* #method
|
|
106
|
-
*/
|
|
107
85
|
renderProps(): any;
|
|
108
86
|
} & {
|
|
109
|
-
/**
|
|
110
|
-
* #method
|
|
111
|
-
*/
|
|
112
87
|
renderSvg(opts: ExportSvgOptions & {
|
|
113
88
|
theme?: ThemeOptions;
|
|
114
|
-
}): Promise<
|
|
89
|
+
}): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
115
90
|
} & {
|
|
116
91
|
afterAttach(): void;
|
|
117
|
-
|
|
118
|
-
* #action
|
|
119
|
-
*/
|
|
120
|
-
setLoading(abortController: AbortController): void;
|
|
121
|
-
/**
|
|
122
|
-
* #action
|
|
123
|
-
*/
|
|
92
|
+
setLoading(stopToken?: string): void;
|
|
124
93
|
setMessage(messageText: string): void;
|
|
125
|
-
/**
|
|
126
|
-
* #action
|
|
127
|
-
*/
|
|
128
94
|
setRendered(args?: {
|
|
129
95
|
data: any;
|
|
130
96
|
reactElement: React.ReactElement;
|
|
131
97
|
renderingComponent: React.Component;
|
|
132
98
|
}): void;
|
|
133
|
-
/**
|
|
134
|
-
* #action
|
|
135
|
-
*/
|
|
136
99
|
setError(error: unknown): void;
|
|
137
100
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
138
101
|
export type DotplotDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -4,35 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.stateModelFactory = stateModelFactory;
|
|
7
|
-
const
|
|
8
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
10
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
11
|
-
const util_1 = require("@jbrowse/core/util");
|
|
12
9
|
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
13
|
-
|
|
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");
|
|
14
13
|
const ServerSideRenderedBlockContent_1 = __importDefault(require("../ServerSideRenderedBlockContent"));
|
|
15
14
|
const renderDotplotBlock_1 = require("./renderDotplotBlock");
|
|
16
|
-
/**
|
|
17
|
-
* #stateModel DotplotDisplay
|
|
18
|
-
* #category display
|
|
19
|
-
*/
|
|
20
15
|
function stateModelFactory(configSchema) {
|
|
21
16
|
return mobx_state_tree_1.types
|
|
22
17
|
.compose('DotplotDisplay', models_1.BaseDisplay, mobx_state_tree_1.types
|
|
23
18
|
.model({
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
19
|
type: mobx_state_tree_1.types.literal('DotplotDisplay'),
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
20
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
32
21
|
})
|
|
33
22
|
.volatile(() => ({
|
|
23
|
+
stopToken: undefined,
|
|
34
24
|
warnings: [],
|
|
35
|
-
renderInProgress: undefined,
|
|
36
25
|
filled: false,
|
|
37
26
|
data: undefined,
|
|
38
27
|
reactElement: undefined,
|
|
@@ -46,15 +35,9 @@ function stateModelFactory(configSchema) {
|
|
|
46
35
|
return (vview.bpPerPx === self.data.bpPerPxY &&
|
|
47
36
|
hview.bpPerPx === self.data.bpPerPxX);
|
|
48
37
|
},
|
|
49
|
-
/**
|
|
50
|
-
* #getter
|
|
51
|
-
*/
|
|
52
38
|
get rendererTypeName() {
|
|
53
39
|
return (0, configuration_1.getConf)(self, ['renderer', 'type']);
|
|
54
40
|
},
|
|
55
|
-
/**
|
|
56
|
-
* #method
|
|
57
|
-
*/
|
|
58
41
|
renderProps() {
|
|
59
42
|
return {
|
|
60
43
|
...(0, tracks_1.getParentRenderProps)(self),
|
|
@@ -65,9 +48,6 @@ function stateModelFactory(configSchema) {
|
|
|
65
48
|
},
|
|
66
49
|
}))
|
|
67
50
|
.views(self => ({
|
|
68
|
-
/**
|
|
69
|
-
* #method
|
|
70
|
-
*/
|
|
71
51
|
async renderSvg(opts) {
|
|
72
52
|
const props = (0, renderDotplotBlock_1.renderBlockData)(self);
|
|
73
53
|
if (!props) {
|
|
@@ -82,81 +62,58 @@ function stateModelFactory(configSchema) {
|
|
|
82
62
|
const { hview, vview } = (0, util_1.getContainingView)(self);
|
|
83
63
|
const offX = -hview.offsetPx + rendering.offsetX;
|
|
84
64
|
const offY = -vview.offsetPx + rendering.offsetY;
|
|
85
|
-
return (
|
|
86
|
-
react_1.default.createElement(util_1.ReactRendering, { rendering: rendering })));
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${offX} ${-offY})`, children: (0, jsx_runtime_1.jsx)(util_1.ReactRendering, { rendering: rendering }) }));
|
|
87
66
|
},
|
|
88
67
|
}))
|
|
89
|
-
.actions(self => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
self.renderingComponent = renderingComponent;
|
|
141
|
-
renderInProgress = undefined;
|
|
142
|
-
},
|
|
143
|
-
/**
|
|
144
|
-
* #action
|
|
145
|
-
*/
|
|
146
|
-
setError(error) {
|
|
147
|
-
console.error(error);
|
|
148
|
-
if (renderInProgress && !renderInProgress.signal.aborted) {
|
|
149
|
-
renderInProgress.abort();
|
|
150
|
-
}
|
|
151
|
-
// the rendering failed for some reason
|
|
152
|
-
self.filled = false;
|
|
153
|
-
self.message = undefined;
|
|
154
|
-
self.reactElement = undefined;
|
|
155
|
-
self.data = undefined;
|
|
156
|
-
self.error = error;
|
|
157
|
-
self.renderingComponent = undefined;
|
|
158
|
-
renderInProgress = undefined;
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
});
|
|
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
|
+
}));
|
|
162
119
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Feature } from '@jbrowse/core/util';
|
|
2
|
-
import { LinearPileupDisplayModel } from '@jbrowse/plugin-alignments';
|
|
1
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
+
import type { LinearPileupDisplayModel } from '@jbrowse/plugin-alignments';
|
|
3
3
|
export declare function onClick(feature: Feature, self: LinearPileupDisplayModel): void;
|
|
@@ -22,25 +22,24 @@ function onClick(feature, self) {
|
|
|
22
22
|
const trackName = `${readName}_vs_${trackAssembly}`;
|
|
23
23
|
const SA = (_a = feature.get('tags')) === null || _a === void 0 ? void 0 : _a.SA;
|
|
24
24
|
const SA2 = featurizeSA(SA, feature.id(), strand, readName, true);
|
|
25
|
-
const feat = feature.toJSON();
|
|
26
|
-
feat.strand = 1;
|
|
27
|
-
feat.mate = {
|
|
28
|
-
refName: readName,
|
|
29
|
-
start: clipPos,
|
|
30
|
-
end: clipPos + getLengthSansClipping(cigar),
|
|
31
|
-
};
|
|
32
|
-
// if secondary alignment or supplementary, calculate length from SA[0]'s
|
|
33
|
-
// CIGAR which is the primary alignments. otherwise it is the primary
|
|
34
|
-
// alignment just use seq.length if primary alignment
|
|
35
25
|
const totalLength = getLength(flags & 2048 ? SA2[0].CIGAR : cigar);
|
|
36
|
-
const features = [
|
|
37
|
-
|
|
38
|
-
|
|
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);
|
|
39
38
|
session.addView('DotplotView', {
|
|
40
39
|
type: 'DotplotView',
|
|
41
40
|
hview: {
|
|
42
41
|
offsetPx: 0,
|
|
43
|
-
bpPerPx:
|
|
42
|
+
bpPerPx: (0, util_1.sum)(features.map(a => a.end - a.start)) / 800,
|
|
44
43
|
displayedRegions: (0, util_1.gatherOverlaps)(features.map((f, index) => {
|
|
45
44
|
const { start, end, refName } = f;
|
|
46
45
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DotplotReadVsRefMenuItem(pluginManager: PluginManager): void;
|
|
@@ -4,9 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = DotplotReadVsRefMenuItem;
|
|
7
|
-
// icons
|
|
8
7
|
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
9
|
-
// local
|
|
10
8
|
const DotplotReadVsRef_1 = require("./DotplotReadVsRef");
|
|
11
9
|
function DotplotReadVsRefMenuItem(pluginManager) {
|
|
12
10
|
pluginManager.addToExtensionPoint('Core-extendPluggableElement', (pluggableElement) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
4
|
interface RenderArgs extends ComparativeRenderArgs {
|
|
5
5
|
adapterConfig: Record<string, unknown>;
|
|
6
6
|
rendererType: string;
|
|
@@ -9,18 +9,13 @@ interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
|
|
|
9
9
|
adapterConfig: Record<string, unknown>;
|
|
10
10
|
rendererType: string;
|
|
11
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
12
|
export default class ComparativeRender extends RpcMethodType {
|
|
18
13
|
name: string;
|
|
19
14
|
renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
|
|
20
15
|
getRenderer(rendererType: string): ComparativeRenderer;
|
|
21
16
|
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
|
|
22
17
|
execute(args: RenderArgsSerialized & {
|
|
23
|
-
|
|
18
|
+
stopToken?: string;
|
|
24
19
|
}, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
|
|
25
20
|
deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
26
21
|
}
|
|
@@ -3,13 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const util_1 = require("@jbrowse/core/util");
|
|
7
6
|
const RpcMethodType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodType"));
|
|
8
|
-
|
|
9
|
-
* call a synteny renderer with the given args
|
|
10
|
-
* param views: a set of views that each contain a set of regions
|
|
11
|
-
* used instead of passing regions directly as in render()
|
|
12
|
-
*/
|
|
7
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
13
8
|
class ComparativeRender extends RpcMethodType_1.default {
|
|
14
9
|
constructor() {
|
|
15
10
|
super(...arguments);
|
|
@@ -36,11 +31,11 @@ class ComparativeRender extends RpcMethodType_1.default {
|
|
|
36
31
|
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
37
32
|
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
38
33
|
}
|
|
39
|
-
const { sessionId, rendererType,
|
|
34
|
+
const { sessionId, rendererType, stopToken } = deserializedArgs;
|
|
40
35
|
if (!sessionId) {
|
|
41
36
|
throw new Error('must pass a unique session id');
|
|
42
37
|
}
|
|
43
|
-
(0,
|
|
38
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
44
39
|
const renderer = this.getRenderer(rendererType);
|
|
45
40
|
return rpcDriver === 'MainThreadRpcDriver'
|
|
46
41
|
? renderer.render(deserializedArgs)
|