@jbrowse/plugin-dotplot-view 2.17.0 → 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 +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 +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 +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 +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,10 +1,5 @@
|
|
|
1
|
-
import { checkAbortSignal } from '@jbrowse/core/util';
|
|
2
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
3
|
-
|
|
4
|
-
* call a synteny renderer with the given args
|
|
5
|
-
* param views: a set of views that each contain a set of regions
|
|
6
|
-
* used instead of passing regions directly as in render()
|
|
7
|
-
*/
|
|
2
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
3
|
export default class ComparativeRender extends RpcMethodType {
|
|
9
4
|
constructor() {
|
|
10
5
|
super(...arguments);
|
|
@@ -31,11 +26,11 @@ export default class ComparativeRender extends RpcMethodType {
|
|
|
31
26
|
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
32
27
|
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
33
28
|
}
|
|
34
|
-
const { sessionId, rendererType,
|
|
29
|
+
const { sessionId, rendererType, stopToken } = deserializedArgs;
|
|
35
30
|
if (!sessionId) {
|
|
36
31
|
throw new Error('must pass a unique session id');
|
|
37
32
|
}
|
|
38
|
-
|
|
33
|
+
checkStopToken(stopToken);
|
|
39
34
|
const renderer = this.getRenderer(rendererType);
|
|
40
35
|
return rpcDriver === 'MainThreadRpcDriver'
|
|
41
36
|
? renderer.render(deserializedArgs)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
const DotplotDisplay = observer(function DotplotDisplay(props) {
|
|
5
5
|
const { model, children } = props;
|
|
6
6
|
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">>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
3
2
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
4
|
-
|
|
5
|
-
import { stateModelFactory } from './stateModelFactory';
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
6
4
|
import ReactComponent from './components/DotplotDisplay';
|
|
5
|
+
import { stateModelFactory } from './stateModelFactory';
|
|
7
6
|
export default function DotplotDisplayF(pm) {
|
|
8
7
|
pm.addDisplayType(() => {
|
|
9
8
|
const configSchema = configSchemaFactory(pm);
|
|
@@ -18,21 +17,12 @@ export default function DotplotDisplayF(pm) {
|
|
|
18
17
|
});
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
/**
|
|
22
|
-
* #config DotplotDisplay
|
|
23
|
-
*/
|
|
24
20
|
export function configSchemaFactory(pm) {
|
|
25
21
|
return ConfigurationSchema('DotplotDisplay', {
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
22
|
renderer: types.optional(pm.pluggableConfigSchemaType('renderer'), {
|
|
30
23
|
type: 'DotplotRenderer',
|
|
31
24
|
}),
|
|
32
25
|
}, {
|
|
33
|
-
/**
|
|
34
|
-
* #identifier
|
|
35
|
-
*/
|
|
36
26
|
explicitIdentifier: 'displayId',
|
|
37
27
|
explicitlyTyped: true,
|
|
38
28
|
});
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import clone from 'clone';
|
|
2
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
+
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
4
4
|
import { getSnapshot } from 'mobx-state-tree';
|
|
5
|
-
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
6
5
|
export function renderBlockData(self) {
|
|
7
6
|
const { rpcManager } = getSession(self);
|
|
8
7
|
const { rendererType } = self;
|
|
9
8
|
const { adapterConfig } = self;
|
|
10
9
|
const parent = getContainingView(self);
|
|
11
|
-
// Alternative to readConfObject(config) is below used because renderProps is
|
|
12
|
-
// something under our control. Compare to serverSideRenderedBlock
|
|
13
10
|
readConfObject(self.configuration);
|
|
14
11
|
getSnapshot(parent);
|
|
15
12
|
if (parent.initialized) {
|
|
@@ -19,7 +16,7 @@ export function renderBlockData(self) {
|
|
|
19
16
|
rpcManager,
|
|
20
17
|
renderProps: {
|
|
21
18
|
...self.renderProps(),
|
|
22
|
-
view:
|
|
19
|
+
view: structuredClone(getSnapshot(parent)),
|
|
23
20
|
width: viewWidth,
|
|
24
21
|
height: viewHeight,
|
|
25
22
|
borderSize,
|
|
@@ -28,7 +25,7 @@ export function renderBlockData(self) {
|
|
|
28
25
|
adapterConfig,
|
|
29
26
|
rendererType: rendererType.name,
|
|
30
27
|
sessionId: getRpcSessionId(self),
|
|
31
|
-
timeout: 1000000,
|
|
28
|
+
timeout: 1000000,
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
31
|
}
|
|
@@ -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>;
|
|
@@ -1,32 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { getConf, ConfigurationReference, } from '@jbrowse/core/configuration';
|
|
4
|
-
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
5
|
-
import { getContainingView, makeAbortableReaction, ReactRendering, } from '@jbrowse/core/util';
|
|
2
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
6
3
|
import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes/models';
|
|
7
|
-
|
|
4
|
+
import { ReactRendering, getContainingView, makeAbortableReaction, } from '@jbrowse/core/util';
|
|
5
|
+
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
6
|
+
import { types } from 'mobx-state-tree';
|
|
8
7
|
import ServerSideRenderedBlockContent from '../ServerSideRenderedBlockContent';
|
|
9
8
|
import { renderBlockData, renderBlockEffect } from './renderDotplotBlock';
|
|
10
|
-
/**
|
|
11
|
-
* #stateModel DotplotDisplay
|
|
12
|
-
* #category display
|
|
13
|
-
*/
|
|
14
9
|
export function stateModelFactory(configSchema) {
|
|
15
10
|
return types
|
|
16
11
|
.compose('DotplotDisplay', BaseDisplay, types
|
|
17
12
|
.model({
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
13
|
type: types.literal('DotplotDisplay'),
|
|
22
|
-
/**
|
|
23
|
-
* #property
|
|
24
|
-
*/
|
|
25
14
|
configuration: ConfigurationReference(configSchema),
|
|
26
15
|
})
|
|
27
16
|
.volatile(() => ({
|
|
17
|
+
stopToken: undefined,
|
|
28
18
|
warnings: [],
|
|
29
|
-
renderInProgress: undefined,
|
|
30
19
|
filled: false,
|
|
31
20
|
data: undefined,
|
|
32
21
|
reactElement: undefined,
|
|
@@ -40,15 +29,9 @@ export function stateModelFactory(configSchema) {
|
|
|
40
29
|
return (vview.bpPerPx === self.data.bpPerPxY &&
|
|
41
30
|
hview.bpPerPx === self.data.bpPerPxX);
|
|
42
31
|
},
|
|
43
|
-
/**
|
|
44
|
-
* #getter
|
|
45
|
-
*/
|
|
46
32
|
get rendererTypeName() {
|
|
47
33
|
return getConf(self, ['renderer', 'type']);
|
|
48
34
|
},
|
|
49
|
-
/**
|
|
50
|
-
* #method
|
|
51
|
-
*/
|
|
52
35
|
renderProps() {
|
|
53
36
|
return {
|
|
54
37
|
...getParentRenderProps(self),
|
|
@@ -59,9 +42,6 @@ export function stateModelFactory(configSchema) {
|
|
|
59
42
|
},
|
|
60
43
|
}))
|
|
61
44
|
.views(self => ({
|
|
62
|
-
/**
|
|
63
|
-
* #method
|
|
64
|
-
*/
|
|
65
45
|
async renderSvg(opts) {
|
|
66
46
|
const props = renderBlockData(self);
|
|
67
47
|
if (!props) {
|
|
@@ -80,77 +60,55 @@ export function stateModelFactory(configSchema) {
|
|
|
80
60
|
React.createElement(ReactRendering, { rendering: rendering })));
|
|
81
61
|
},
|
|
82
62
|
}))
|
|
83
|
-
.actions(self => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
self.renderingComponent = renderingComponent;
|
|
135
|
-
renderInProgress = undefined;
|
|
136
|
-
},
|
|
137
|
-
/**
|
|
138
|
-
* #action
|
|
139
|
-
*/
|
|
140
|
-
setError(error) {
|
|
141
|
-
console.error(error);
|
|
142
|
-
if (renderInProgress && !renderInProgress.signal.aborted) {
|
|
143
|
-
renderInProgress.abort();
|
|
144
|
-
}
|
|
145
|
-
// the rendering failed for some reason
|
|
146
|
-
self.filled = false;
|
|
147
|
-
self.message = undefined;
|
|
148
|
-
self.reactElement = undefined;
|
|
149
|
-
self.data = undefined;
|
|
150
|
-
self.error = error;
|
|
151
|
-
self.renderingComponent = undefined;
|
|
152
|
-
renderInProgress = undefined;
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
});
|
|
63
|
+
.actions(self => ({
|
|
64
|
+
afterAttach() {
|
|
65
|
+
makeAbortableReaction(self, () => renderBlockData(self), blockData => renderBlockEffect(blockData), {
|
|
66
|
+
name: `${self.type} ${self.id} rendering`,
|
|
67
|
+
delay: 500,
|
|
68
|
+
fireImmediately: true,
|
|
69
|
+
}, this.setLoading, this.setRendered, this.setError);
|
|
70
|
+
},
|
|
71
|
+
setLoading(stopToken) {
|
|
72
|
+
self.filled = false;
|
|
73
|
+
self.message = undefined;
|
|
74
|
+
self.reactElement = undefined;
|
|
75
|
+
self.data = undefined;
|
|
76
|
+
self.error = undefined;
|
|
77
|
+
self.renderingComponent = undefined;
|
|
78
|
+
self.stopToken = stopToken;
|
|
79
|
+
},
|
|
80
|
+
setMessage(messageText) {
|
|
81
|
+
self.filled = false;
|
|
82
|
+
self.message = messageText;
|
|
83
|
+
self.reactElement = undefined;
|
|
84
|
+
self.data = undefined;
|
|
85
|
+
self.error = undefined;
|
|
86
|
+
self.renderingComponent = undefined;
|
|
87
|
+
self.stopToken = undefined;
|
|
88
|
+
},
|
|
89
|
+
setRendered(args) {
|
|
90
|
+
if (args === undefined) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const { data, reactElement, renderingComponent } = args;
|
|
94
|
+
self.warnings = data.warnings;
|
|
95
|
+
self.filled = true;
|
|
96
|
+
self.message = undefined;
|
|
97
|
+
self.reactElement = reactElement;
|
|
98
|
+
self.data = data;
|
|
99
|
+
self.error = undefined;
|
|
100
|
+
self.renderingComponent = renderingComponent;
|
|
101
|
+
self.stopToken = undefined;
|
|
102
|
+
},
|
|
103
|
+
setError(error) {
|
|
104
|
+
console.error(error);
|
|
105
|
+
self.filled = false;
|
|
106
|
+
self.message = undefined;
|
|
107
|
+
self.reactElement = undefined;
|
|
108
|
+
self.data = undefined;
|
|
109
|
+
self.error = error;
|
|
110
|
+
self.renderingComponent = undefined;
|
|
111
|
+
self.stopToken = undefined;
|
|
112
|
+
},
|
|
113
|
+
}));
|
|
156
114
|
}
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getConf } from '@jbrowse/core/configuration';
|
|
2
|
-
import { getSession,
|
|
3
|
-
import { MismatchParser
|
|
2
|
+
import { gatherOverlaps, getSession, sum } from '@jbrowse/core/util';
|
|
3
|
+
import { MismatchParser } from '@jbrowse/plugin-alignments';
|
|
4
4
|
const { featurizeSA, getClip, getLength, getLengthSansClipping } = MismatchParser;
|
|
5
5
|
export function onClick(feature, self) {
|
|
6
6
|
var _a;
|
|
@@ -19,25 +19,24 @@ export function onClick(feature, self) {
|
|
|
19
19
|
const trackName = `${readName}_vs_${trackAssembly}`;
|
|
20
20
|
const SA = (_a = feature.get('tags')) === null || _a === void 0 ? void 0 : _a.SA;
|
|
21
21
|
const SA2 = featurizeSA(SA, feature.id(), strand, readName, true);
|
|
22
|
-
const feat = feature.toJSON();
|
|
23
|
-
feat.strand = 1;
|
|
24
|
-
feat.mate = {
|
|
25
|
-
refName: readName,
|
|
26
|
-
start: clipPos,
|
|
27
|
-
end: clipPos + getLengthSansClipping(cigar),
|
|
28
|
-
};
|
|
29
|
-
// if secondary alignment or supplementary, calculate length from SA[0]'s
|
|
30
|
-
// CIGAR which is the primary alignments. otherwise it is the primary
|
|
31
|
-
// alignment just use seq.length if primary alignment
|
|
32
22
|
const totalLength = getLength(flags & 2048 ? SA2[0].CIGAR : cigar);
|
|
33
|
-
const features = [
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
const features = [
|
|
24
|
+
{
|
|
25
|
+
...feature.toJSON(),
|
|
26
|
+
strand: 1,
|
|
27
|
+
mate: {
|
|
28
|
+
refName: readName,
|
|
29
|
+
start: clipPos,
|
|
30
|
+
end: clipPos + getLengthSansClipping(cigar),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
...SA2,
|
|
34
|
+
].sort((a, b) => a.clipPos - b.clipPos);
|
|
36
35
|
session.addView('DotplotView', {
|
|
37
36
|
type: 'DotplotView',
|
|
38
37
|
hview: {
|
|
39
38
|
offsetPx: 0,
|
|
40
|
-
bpPerPx:
|
|
39
|
+
bpPerPx: sum(features.map(a => a.end - a.start)) / 800,
|
|
41
40
|
displayedRegions: gatherOverlaps(features.map((f, index) => {
|
|
42
41
|
const { start, end, refName } = f;
|
|
43
42
|
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;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
// icons
|
|
2
1
|
import AddIcon from '@mui/icons-material/Add';
|
|
3
|
-
// local
|
|
4
2
|
import { onClick } from './DotplotReadVsRef';
|
|
5
3
|
export default function DotplotReadVsRefMenuItem(pluginManager) {
|
|
6
4
|
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
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { checkAbortSignal } from '@jbrowse/core/util';
|
|
2
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
3
|
-
|
|
4
|
-
* call a synteny renderer with the given args
|
|
5
|
-
* param views: a set of views that each contain a set of regions
|
|
6
|
-
* used instead of passing regions directly as in render()
|
|
7
|
-
*/
|
|
2
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
3
|
export default class ComparativeRender extends RpcMethodType {
|
|
9
4
|
constructor() {
|
|
10
5
|
super(...arguments);
|
|
@@ -31,11 +26,11 @@ export default class ComparativeRender extends RpcMethodType {
|
|
|
31
26
|
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
32
27
|
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
33
28
|
}
|
|
34
|
-
const { sessionId, rendererType,
|
|
29
|
+
const { sessionId, rendererType, stopToken } = deserializedArgs;
|
|
35
30
|
if (!sessionId) {
|
|
36
31
|
throw new Error('must pass a unique session id');
|
|
37
32
|
}
|
|
38
|
-
|
|
33
|
+
checkStopToken(stopToken);
|
|
39
34
|
const renderer = this.getRenderer(rendererType);
|
|
40
35
|
return rpcDriver === 'MainThreadRpcDriver'
|
|
41
36
|
? 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;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { renameRegionsIfNeeded, renderToAbstractCanvas, } from '@jbrowse/core/util';
|
|
2
1
|
import ComparativeRenderer from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
3
|
-
|
|
2
|
+
import { renameRegionsIfNeeded, renderToAbstractCanvas, } from '@jbrowse/core/util';
|
|
4
3
|
import { Dotplot1DView } from '../DotplotView/model';
|
|
5
4
|
export default class DotplotRenderer extends ComparativeRenderer {
|
|
6
5
|
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;
|
|
@@ -1,57 +1,36 @@
|
|
|
1
1
|
declare const _default: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
color: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
contextVariable: string[];
|
|
10
7
|
};
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
posColor: {
|
|
15
9
|
type: string;
|
|
16
10
|
description: string;
|
|
17
11
|
defaultValue: string;
|
|
18
12
|
};
|
|
19
|
-
/**
|
|
20
|
-
* #slot
|
|
21
|
-
*/
|
|
22
13
|
negColor: {
|
|
23
14
|
type: string;
|
|
24
15
|
description: string;
|
|
25
16
|
defaultValue: string;
|
|
26
17
|
};
|
|
27
|
-
/**
|
|
28
|
-
* #slot
|
|
29
|
-
*/
|
|
30
18
|
lineWidth: {
|
|
31
19
|
type: string;
|
|
32
20
|
description: string;
|
|
33
21
|
defaultValue: number;
|
|
34
22
|
};
|
|
35
|
-
/**
|
|
36
|
-
* #slot
|
|
37
|
-
*/
|
|
38
23
|
colorBy: {
|
|
39
24
|
type: string;
|
|
40
25
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
41
26
|
description: string;
|
|
42
27
|
defaultValue: string;
|
|
43
28
|
};
|
|
44
|
-
/**
|
|
45
|
-
* #slot
|
|
46
|
-
*/
|
|
47
29
|
thresholdsPalette: {
|
|
48
30
|
type: string;
|
|
49
31
|
defaultValue: string[];
|
|
50
32
|
description: string;
|
|
51
33
|
};
|
|
52
|
-
/**
|
|
53
|
-
* #slot
|
|
54
|
-
*/
|
|
55
34
|
thresholds: {
|
|
56
35
|
type: string;
|
|
57
36
|
defaultValue: string[];
|