@jbrowse/plugin-dotplot-view 2.16.1 → 2.18.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 +1 -1
- package/dist/DotplotDisplay/components/DotplotDisplay.js +1 -1
- 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 +7 -43
- package/dist/DotplotDisplay/stateModelFactory.js +55 -97
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +16 -16
- 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 +5 -4
- package/dist/DotplotRenderer/DotplotRenderer.js +1 -2
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- 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 +1 -1
- package/dist/DotplotView/components/Axes.js +3 -4
- package/dist/DotplotView/components/CursorIcon.d.ts +1 -1
- package/dist/DotplotView/components/CursorIcon.js +1 -1
- package/dist/DotplotView/components/DotplotControls.d.ts +1 -1
- package/dist/DotplotView/components/DotplotControls.js +5 -6
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +1 -1
- package/dist/DotplotView/components/DotplotTooltipClick.js +1 -1
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +1 -1
- package/dist/DotplotView/components/DotplotView.d.ts +1 -1
- package/dist/DotplotView/components/DotplotView.js +5 -12
- package/dist/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/dist/DotplotView/components/DotplotWarnings.js +0 -1
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/dist/DotplotView/components/ExportSvgDialog.js +2 -4
- package/dist/DotplotView/components/Grid.d.ts +1 -1
- package/dist/DotplotView/components/Grid.js +2 -4
- package/dist/DotplotView/components/Header.d.ts +1 -1
- package/dist/DotplotView/components/Header.js +2 -2
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +2 -2
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +1 -1
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +5 -10
- package/dist/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/dist/DotplotView/components/ImportForm/index.js +4 -5
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +1 -1
- package/dist/DotplotView/components/PanButtons.js +3 -4
- package/dist/DotplotView/components/WarningDialog.d.ts +6 -5
- package/dist/DotplotView/components/WarningDialog.js +10 -6
- 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 +0 -1
- package/dist/DotplotView/model.d.ts +5 -129
- package/dist/DotplotView/model.js +6 -192
- package/dist/DotplotView/svgcomponents/SVGBackground.js +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +5 -9
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -1
- package/dist/ServerSideRenderedBlockContent.js +2 -3
- package/dist/ServerSideSyntenyRendering.d.ts +0 -4
- package/dist/ServerSideSyntenyRendering.js +1 -1
- 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 +1 -1
- package/esm/DotplotDisplay/components/DotplotDisplay.js +1 -1
- 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 +7 -43
- package/esm/DotplotDisplay/stateModelFactory.js +56 -98
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +18 -18
- 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 +5 -4
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- 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 +1 -1
- package/esm/DotplotView/components/Axes.js +3 -4
- package/esm/DotplotView/components/CursorIcon.d.ts +1 -1
- package/esm/DotplotView/components/CursorIcon.js +1 -1
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
- package/esm/DotplotView/components/DotplotControls.js +5 -6
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipClick.js +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +1 -1
- package/esm/DotplotView/components/DotplotView.d.ts +1 -1
- package/esm/DotplotView/components/DotplotView.js +6 -13
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/esm/DotplotView/components/DotplotWarnings.js +0 -1
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/DotplotView/components/ExportSvgDialog.js +2 -4
- package/esm/DotplotView/components/Grid.d.ts +1 -1
- package/esm/DotplotView/components/Grid.js +2 -4
- package/esm/DotplotView/components/Header.d.ts +1 -1
- package/esm/DotplotView/components/Header.js +2 -2
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +2 -2
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +2 -2
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +6 -11
- package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/index.js +6 -7
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +1 -1
- package/esm/DotplotView/components/PanButtons.js +3 -4
- package/esm/DotplotView/components/WarningDialog.d.ts +6 -5
- package/esm/DotplotView/components/WarningDialog.js +10 -6
- 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 +5 -129
- package/esm/DotplotView/model.js +7 -193
- package/esm/DotplotView/svgcomponents/SVGBackground.js +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -9
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -1
- package/esm/ServerSideRenderedBlockContent.js +2 -3
- package/esm/ServerSideSyntenyRendering.d.ts +0 -4
- package/esm/ServerSideSyntenyRendering.js +2 -2
- 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
|
@@ -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)
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
8
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
const DotplotDisplay = (0, mobx_react_1.observer)(function DotplotDisplay(props) {
|
|
10
10
|
const { model, children } = props;
|
|
11
11
|
const { offsetX = 0, offsetY = 0 } = model.data || {};
|
|
@@ -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,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
/**
|
|
7
|
-
* #stateModel DotplotDisplay
|
|
8
|
-
* #category display
|
|
9
|
-
*/
|
|
2
|
+
import type { ExportSvgOptions } from '../DotplotView/model';
|
|
3
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { ThemeOptions } from '@mui/material';
|
|
5
|
+
import type { Instance } from 'mobx-state-tree';
|
|
10
6
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
11
7
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
12
8
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
13
9
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
14
10
|
} & {
|
|
15
|
-
/**
|
|
16
|
-
* #property
|
|
17
|
-
*/
|
|
18
11
|
type: import("mobx-state-tree").ISimpleType<"DotplotDisplay">;
|
|
19
|
-
/**
|
|
20
|
-
* #property
|
|
21
|
-
*/
|
|
22
12
|
configuration: AnyConfigurationSchemaType;
|
|
23
13
|
}, {
|
|
24
14
|
rendererTypeName: string;
|
|
25
15
|
error: unknown;
|
|
26
16
|
message: string | undefined;
|
|
27
17
|
} & {
|
|
28
|
-
readonly RenderingComponent: React.
|
|
29
|
-
/**
|
|
30
|
-
* #stateModel DotplotDisplay
|
|
31
|
-
* #category display
|
|
32
|
-
*/
|
|
33
|
-
FC<{
|
|
18
|
+
readonly RenderingComponent: React.FC<{
|
|
34
19
|
model: {
|
|
35
20
|
id: string;
|
|
36
21
|
type: string;
|
|
@@ -84,11 +69,11 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
84
69
|
setRpcDriverName(rpcDriverName: string): void;
|
|
85
70
|
reload(): void;
|
|
86
71
|
} & {
|
|
72
|
+
stopToken: string | undefined;
|
|
87
73
|
warnings: {
|
|
88
74
|
message: string;
|
|
89
75
|
effect: string;
|
|
90
76
|
}[];
|
|
91
|
-
renderInProgress: AbortController | undefined;
|
|
92
77
|
filled: boolean;
|
|
93
78
|
data: any;
|
|
94
79
|
reactElement: React.ReactElement | undefined;
|
|
@@ -97,42 +82,21 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
97
82
|
ReactComponent2: React.FC<any>;
|
|
98
83
|
} & {
|
|
99
84
|
readonly shouldDisplay: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* #getter
|
|
102
|
-
*/
|
|
103
85
|
readonly rendererTypeName: any;
|
|
104
|
-
/**
|
|
105
|
-
* #method
|
|
106
|
-
*/
|
|
107
86
|
renderProps(): any;
|
|
108
87
|
} & {
|
|
109
|
-
/**
|
|
110
|
-
* #method
|
|
111
|
-
*/
|
|
112
88
|
renderSvg(opts: ExportSvgOptions & {
|
|
113
89
|
theme?: ThemeOptions;
|
|
114
90
|
}): Promise<React.JSX.Element | null>;
|
|
115
91
|
} & {
|
|
116
92
|
afterAttach(): void;
|
|
117
|
-
|
|
118
|
-
* #action
|
|
119
|
-
*/
|
|
120
|
-
setLoading(abortController: AbortController): void;
|
|
121
|
-
/**
|
|
122
|
-
* #action
|
|
123
|
-
*/
|
|
93
|
+
setLoading(stopToken?: string): void;
|
|
124
94
|
setMessage(messageText: string): void;
|
|
125
|
-
/**
|
|
126
|
-
* #action
|
|
127
|
-
*/
|
|
128
95
|
setRendered(args?: {
|
|
129
96
|
data: any;
|
|
130
97
|
reactElement: React.ReactElement;
|
|
131
98
|
renderingComponent: React.Component;
|
|
132
99
|
}): void;
|
|
133
|
-
/**
|
|
134
|
-
* #action
|
|
135
|
-
*/
|
|
136
100
|
setError(error: unknown): void;
|
|
137
101
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
138
102
|
export type DotplotDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -5,34 +5,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.stateModelFactory = stateModelFactory;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
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) {
|
|
@@ -86,77 +66,55 @@ function stateModelFactory(configSchema) {
|
|
|
86
66
|
react_1.default.createElement(util_1.ReactRendering, { rendering: rendering })));
|
|
87
67
|
},
|
|
88
68
|
}))
|
|
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
|
-
});
|
|
69
|
+
.actions(self => ({
|
|
70
|
+
afterAttach() {
|
|
71
|
+
(0, util_1.makeAbortableReaction)(self, () => (0, renderDotplotBlock_1.renderBlockData)(self), blockData => (0, renderDotplotBlock_1.renderBlockEffect)(blockData), {
|
|
72
|
+
name: `${self.type} ${self.id} rendering`,
|
|
73
|
+
delay: 500,
|
|
74
|
+
fireImmediately: true,
|
|
75
|
+
}, this.setLoading, this.setRendered, this.setError);
|
|
76
|
+
},
|
|
77
|
+
setLoading(stopToken) {
|
|
78
|
+
self.filled = false;
|
|
79
|
+
self.message = undefined;
|
|
80
|
+
self.reactElement = undefined;
|
|
81
|
+
self.data = undefined;
|
|
82
|
+
self.error = undefined;
|
|
83
|
+
self.renderingComponent = undefined;
|
|
84
|
+
self.stopToken = stopToken;
|
|
85
|
+
},
|
|
86
|
+
setMessage(messageText) {
|
|
87
|
+
self.filled = false;
|
|
88
|
+
self.message = messageText;
|
|
89
|
+
self.reactElement = undefined;
|
|
90
|
+
self.data = undefined;
|
|
91
|
+
self.error = undefined;
|
|
92
|
+
self.renderingComponent = undefined;
|
|
93
|
+
self.stopToken = undefined;
|
|
94
|
+
},
|
|
95
|
+
setRendered(args) {
|
|
96
|
+
if (args === undefined) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const { data, reactElement, renderingComponent } = args;
|
|
100
|
+
self.warnings = data.warnings;
|
|
101
|
+
self.filled = true;
|
|
102
|
+
self.message = undefined;
|
|
103
|
+
self.reactElement = reactElement;
|
|
104
|
+
self.data = data;
|
|
105
|
+
self.error = undefined;
|
|
106
|
+
self.renderingComponent = renderingComponent;
|
|
107
|
+
self.stopToken = undefined;
|
|
108
|
+
},
|
|
109
|
+
setError(error) {
|
|
110
|
+
console.error(error);
|
|
111
|
+
self.filled = false;
|
|
112
|
+
self.message = undefined;
|
|
113
|
+
self.reactElement = undefined;
|
|
114
|
+
self.data = undefined;
|
|
115
|
+
self.error = error;
|
|
116
|
+
self.renderingComponent = undefined;
|
|
117
|
+
self.stopToken = undefined;
|
|
118
|
+
},
|
|
119
|
+
}));
|
|
162
120
|
}
|
|
@@ -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;
|
|
@@ -4,8 +4,9 @@ exports.onClick = onClick;
|
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
5
|
const util_1 = require("@jbrowse/core/util");
|
|
6
6
|
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
7
|
-
const { featurizeSA, getClip,
|
|
7
|
+
const { featurizeSA, getClip, getLength, getLengthSansClipping } = plugin_alignments_1.MismatchParser;
|
|
8
8
|
function onClick(feature, self) {
|
|
9
|
+
var _a;
|
|
9
10
|
const session = (0, util_1.getSession)(self);
|
|
10
11
|
try {
|
|
11
12
|
const cigar = feature.get('CIGAR');
|
|
@@ -19,27 +20,26 @@ function onClick(feature, self) {
|
|
|
19
20
|
const assemblyNames = [trackAssembly, readAssembly];
|
|
20
21
|
const trackId = `track-${Date.now()}`;
|
|
21
22
|
const trackName = `${readName}_vs_${trackAssembly}`;
|
|
22
|
-
const SA =
|
|
23
|
+
const SA = (_a = feature.get('tags')) === null || _a === void 0 ? void 0 : _a.SA;
|
|
23
24
|
const SA2 = featurizeSA(SA, feature.id(), strand, readName, true);
|
|
24
|
-
const feat = feature.toJSON();
|
|
25
|
-
feat.strand = 1;
|
|
26
|
-
feat.mate = {
|
|
27
|
-
refName: readName,
|
|
28
|
-
start: clipPos,
|
|
29
|
-
end: clipPos + getLengthSansClipping(cigar),
|
|
30
|
-
};
|
|
31
|
-
// if secondary alignment or supplementary, calculate length from SA[0]'s
|
|
32
|
-
// CIGAR which is the primary alignments. otherwise it is the primary
|
|
33
|
-
// alignment just use seq.length if primary alignment
|
|
34
25
|
const totalLength = getLength(flags & 2048 ? SA2[0].CIGAR : cigar);
|
|
35
|
-
const features = [
|
|
36
|
-
|
|
37
|
-
|
|
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
38
|
session.addView('DotplotView', {
|
|
39
39
|
type: 'DotplotView',
|
|
40
40
|
hview: {
|
|
41
41
|
offsetPx: 0,
|
|
42
|
-
bpPerPx:
|
|
42
|
+
bpPerPx: (0, util_1.sum)(features.map(a => a.end - a.start)) / 800,
|
|
43
43
|
displayedRegions: (0, util_1.gatherOverlaps)(features.map((f, index) => {
|
|
44
44
|
const { start, end, refName } = f;
|
|
45
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)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import ComparativeRenderer from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
2
|
+
import type { Dotplot1DViewModel } from '../DotplotView/model';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { RenderArgs, RenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
5
|
+
import type { Region } from '@jbrowse/core/util';
|
|
5
6
|
export interface DotplotRenderArgsDeserialized extends RenderArgsDeserialized {
|
|
6
7
|
adapterConfig: AnyConfigurationModel;
|
|
7
8
|
height: number;
|
|
@@ -26,9 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const util_1 = require("@jbrowse/core/util");
|
|
30
29
|
const ComparativeServerSideRendererType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType"));
|
|
31
|
-
|
|
30
|
+
const util_1 = require("@jbrowse/core/util");
|
|
32
31
|
const model_1 = require("../DotplotView/model");
|
|
33
32
|
class DotplotRenderer extends ComparativeServerSideRendererType_1.default {
|
|
34
33
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotplotRenderArgsDeserialized } from '../DotplotRenderer';
|
|
2
|
+
import type { DotplotRenderArgsDeserialized } from '../DotplotRenderer';
|
|
3
3
|
declare const DotplotRendering: (props: DotplotRenderArgsDeserialized) => React.JSX.Element;
|
|
4
4
|
export default DotplotRendering;
|