@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,47 +1,28 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { types } from 'mobx-state-tree';
|
|
3
|
-
|
|
4
|
-
* #config DotplotRenderer
|
|
5
|
-
* #category renderer
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
8
4
|
export default ConfigurationSchema('DotplotRenderer', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
5
|
color: {
|
|
13
6
|
type: 'color',
|
|
14
7
|
description: 'the color of each feature in a synteny, used with colorBy:default',
|
|
15
8
|
defaultValue: '#f0f',
|
|
16
9
|
contextVariable: ['feature'],
|
|
17
10
|
},
|
|
18
|
-
/**
|
|
19
|
-
* #slot
|
|
20
|
-
*/
|
|
21
11
|
posColor: {
|
|
22
12
|
type: 'color',
|
|
23
13
|
description: 'the color for forward alignments, used with colorBy:strand',
|
|
24
14
|
defaultValue: 'blue',
|
|
25
15
|
},
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
16
|
negColor: {
|
|
30
17
|
type: 'color',
|
|
31
18
|
description: 'the color for reverse alignments, used with colorBy:strand',
|
|
32
19
|
defaultValue: 'red',
|
|
33
20
|
},
|
|
34
|
-
/**
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
21
|
lineWidth: {
|
|
38
22
|
type: 'number',
|
|
39
23
|
description: 'width of the lines to be drawn',
|
|
40
|
-
defaultValue: 2.5,
|
|
24
|
+
defaultValue: 2.5,
|
|
41
25
|
},
|
|
42
|
-
/**
|
|
43
|
-
* #slot
|
|
44
|
-
*/
|
|
45
26
|
colorBy: {
|
|
46
27
|
type: 'stringEnum',
|
|
47
28
|
model: types.enumeration('colorBy', [
|
|
@@ -61,17 +42,11 @@ export default ConfigurationSchema('DotplotRenderer', {
|
|
|
61
42
|
</ul>`,
|
|
62
43
|
defaultValue: 'default',
|
|
63
44
|
},
|
|
64
|
-
/**
|
|
65
|
-
* #slot
|
|
66
|
-
*/
|
|
67
45
|
thresholdsPalette: {
|
|
68
46
|
type: 'stringArray',
|
|
69
47
|
defaultValue: ['#094b09', '#2ebd40', '#d5670b', '#ffd84b'],
|
|
70
48
|
description: 'threshold colors, used with colorBy:identity',
|
|
71
49
|
},
|
|
72
|
-
/**
|
|
73
|
-
* #slot
|
|
74
|
-
*/
|
|
75
50
|
thresholds: {
|
|
76
51
|
type: 'stringArray',
|
|
77
52
|
defaultValue: ['0.75', '0.5', '0.25', '0'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Dotplot1DViewModel } from '../DotplotView/model';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { RenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
4
4
|
export interface DotplotRenderArgsDeserialized extends RenderArgsDeserialized {
|
|
5
5
|
adapterConfig: AnyConfigurationModel;
|
|
6
6
|
height: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { readConfObject
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
+
import { createJBrowseTheme } from '@jbrowse/core/ui';
|
|
2
3
|
import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
|
|
3
|
-
import { getSnapshot } from 'mobx-state-tree';
|
|
4
4
|
import { MismatchParser } from '@jbrowse/plugin-alignments';
|
|
5
|
-
import {
|
|
5
|
+
import { getSnapshot } from 'mobx-state-tree';
|
|
6
6
|
const { parseCigar } = MismatchParser;
|
|
7
7
|
const r = 'fell outside of range due to CIGAR string';
|
|
8
8
|
const lt = '(less than min coordinate of feature)';
|
|
9
9
|
const gt = '(greater than max coordinate of feature)';
|
|
10
|
-
const fudgeFactor = 1;
|
|
10
|
+
const fudgeFactor = 1;
|
|
11
11
|
function drawCir(ctx, x, y, r = 1) {
|
|
12
12
|
ctx.beginPath();
|
|
13
13
|
ctx.arc(x, y, r / 2, 0, 2 * Math.PI);
|
|
@@ -30,8 +30,6 @@ export async function drawDotplot(ctx, props) {
|
|
|
30
30
|
const db2 = (_b = vview.dynamicBlocks.contentBlocks[0]) === null || _b === void 0 ? void 0 : _b.offsetPx;
|
|
31
31
|
const warnings = [];
|
|
32
32
|
ctx.lineWidth = lineWidth;
|
|
33
|
-
// we operate on snapshots of these attributes of the hview/vview because
|
|
34
|
-
// it is significantly faster than accessing the mobx objects
|
|
35
33
|
const { bpPerPx: hBpPerPx } = hview;
|
|
36
34
|
const { bpPerPx: vBpPerPx } = vview;
|
|
37
35
|
function clampWithWarnX(num, min, max, feature) {
|
|
@@ -174,7 +172,6 @@ export async function drawDotplot(ctx, props) {
|
|
|
174
172
|
}
|
|
175
173
|
currX = clampWithWarnX(currX, b1, b2, feature);
|
|
176
174
|
currY = clampWithWarnY(currY, e1, e2, feature);
|
|
177
|
-
// only draw a line segment if it is bigger than 0.5px
|
|
178
175
|
if (Math.abs(currX - lastDrawnX) > 0.5 ||
|
|
179
176
|
Math.abs(currY - lastDrawnY) > 0.5) {
|
|
180
177
|
ctx.lineTo(currX, height - currY);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DotplotRendererF(pluginManager: PluginManager): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ReactComponent from './components/DotplotRendering';
|
|
2
1
|
import DotplotRenderer from './DotplotRenderer';
|
|
2
|
+
import ReactComponent from './components/DotplotRendering';
|
|
3
3
|
import configSchema from './configSchema';
|
|
4
4
|
export default function DotplotRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new DotplotRenderer({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Instance } from 'mobx-state-tree';
|
|
1
|
+
import type { Instance } from 'mobx-state-tree';
|
|
2
2
|
declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
3
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
4
|
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
|
|
@@ -53,39 +53,14 @@ declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
|
53
53
|
} & {
|
|
54
54
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
55
55
|
} & {
|
|
56
|
-
/**
|
|
57
|
-
* #action
|
|
58
|
-
*/
|
|
59
56
|
setScaleFactor(n: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* #action
|
|
62
|
-
*/
|
|
63
57
|
center(): void;
|
|
64
58
|
} & {
|
|
65
|
-
/**
|
|
66
|
-
* #getter
|
|
67
|
-
* this uses padding=false and elision=false
|
|
68
|
-
*/
|
|
69
59
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
|
-
/**
|
|
71
|
-
* #getter
|
|
72
|
-
*/
|
|
73
60
|
readonly scaleFactor: number;
|
|
74
|
-
/**
|
|
75
|
-
* #getter
|
|
76
|
-
*/
|
|
77
61
|
readonly maxBpPerPx: number;
|
|
78
|
-
/**
|
|
79
|
-
* #getter
|
|
80
|
-
*/
|
|
81
62
|
readonly minBpPerPx: number;
|
|
82
|
-
/**
|
|
83
|
-
* #getter
|
|
84
|
-
*/
|
|
85
63
|
readonly maxOffset: number;
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
64
|
readonly minOffset: number;
|
|
90
65
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
91
66
|
declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
@@ -142,39 +117,14 @@ declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
|
142
117
|
} & {
|
|
143
118
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
144
119
|
} & {
|
|
145
|
-
/**
|
|
146
|
-
* #action
|
|
147
|
-
*/
|
|
148
120
|
setScaleFactor(n: number): void;
|
|
149
|
-
/**
|
|
150
|
-
* #action
|
|
151
|
-
*/
|
|
152
121
|
center(): void;
|
|
153
122
|
} & {
|
|
154
|
-
/**
|
|
155
|
-
* #getter
|
|
156
|
-
* this uses padding=false and elision=false
|
|
157
|
-
*/
|
|
158
123
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
159
|
-
/**
|
|
160
|
-
* #getter
|
|
161
|
-
*/
|
|
162
124
|
readonly scaleFactor: number;
|
|
163
|
-
/**
|
|
164
|
-
* #getter
|
|
165
|
-
*/
|
|
166
125
|
readonly maxBpPerPx: number;
|
|
167
|
-
/**
|
|
168
|
-
* #getter
|
|
169
|
-
*/
|
|
170
126
|
readonly minBpPerPx: number;
|
|
171
|
-
/**
|
|
172
|
-
* #getter
|
|
173
|
-
*/
|
|
174
127
|
readonly maxOffset: number;
|
|
175
|
-
/**
|
|
176
|
-
* #getter
|
|
177
|
-
*/
|
|
178
128
|
readonly minOffset: number;
|
|
179
129
|
} & {
|
|
180
130
|
readonly width: any;
|
|
@@ -233,42 +183,17 @@ declare const DotplotVView: import("mobx-state-tree").IModelType<{
|
|
|
233
183
|
} & {
|
|
234
184
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
235
185
|
} & {
|
|
236
|
-
/**
|
|
237
|
-
* #action
|
|
238
|
-
*/
|
|
239
186
|
setScaleFactor(n: number): void;
|
|
240
|
-
/**
|
|
241
|
-
* #action
|
|
242
|
-
*/
|
|
243
187
|
center(): void;
|
|
244
188
|
} & {
|
|
245
|
-
/**
|
|
246
|
-
* #getter
|
|
247
|
-
* this uses padding=false and elision=false
|
|
248
|
-
*/
|
|
249
189
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
250
|
-
/**
|
|
251
|
-
* #getter
|
|
252
|
-
*/
|
|
253
190
|
readonly scaleFactor: number;
|
|
254
|
-
/**
|
|
255
|
-
* #getter
|
|
256
|
-
*/
|
|
257
191
|
readonly maxBpPerPx: number;
|
|
258
|
-
/**
|
|
259
|
-
* #getter
|
|
260
|
-
*/
|
|
261
192
|
readonly minBpPerPx: number;
|
|
262
|
-
/**
|
|
263
|
-
* #getter
|
|
264
|
-
*/
|
|
265
193
|
readonly maxOffset: number;
|
|
266
|
-
/**
|
|
267
|
-
* #getter
|
|
268
|
-
*/
|
|
269
194
|
readonly minOffset: number;
|
|
270
195
|
} & {
|
|
271
196
|
readonly width: any;
|
|
272
197
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
273
|
-
export {
|
|
198
|
+
export { Dotplot1DView, DotplotHView, DotplotVView };
|
|
274
199
|
export type Dotplot1DViewModel = Instance<typeof Dotplot1DView>;
|
|
@@ -1,64 +1,35 @@
|
|
|
1
|
-
import { getParent } from 'mobx-state-tree';
|
|
2
|
-
import { observable } from 'mobx';
|
|
3
1
|
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
4
2
|
import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import { observable } from 'mobx';
|
|
4
|
+
import { getParent } from 'mobx-state-tree';
|
|
5
|
+
function x() { }
|
|
10
6
|
const Dotplot1DView = Base1DView.extend(self => {
|
|
11
7
|
const scaleFactor = observable.box(1);
|
|
12
8
|
return {
|
|
13
9
|
views: {
|
|
14
|
-
/**
|
|
15
|
-
* #getter
|
|
16
|
-
* this uses padding=false and elision=false
|
|
17
|
-
*/
|
|
18
10
|
get dynamicBlocks() {
|
|
19
11
|
return calculateDynamicBlocks(self, false, false);
|
|
20
12
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #getter
|
|
23
|
-
*/
|
|
24
13
|
get scaleFactor() {
|
|
25
14
|
return scaleFactor.get();
|
|
26
15
|
},
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
*/
|
|
30
16
|
get maxBpPerPx() {
|
|
31
17
|
return self.totalBp / (self.width - 50);
|
|
32
18
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
19
|
get minBpPerPx() {
|
|
37
20
|
return 1 / 50;
|
|
38
21
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #getter
|
|
41
|
-
*/
|
|
42
22
|
get maxOffset() {
|
|
43
23
|
return self.displayedRegionsTotalPx - self.width * 0.2;
|
|
44
24
|
},
|
|
45
|
-
/**
|
|
46
|
-
* #getter
|
|
47
|
-
*/
|
|
48
25
|
get minOffset() {
|
|
49
26
|
return -self.width * 0.8;
|
|
50
27
|
},
|
|
51
28
|
},
|
|
52
29
|
actions: {
|
|
53
|
-
/**
|
|
54
|
-
* #action
|
|
55
|
-
*/
|
|
56
30
|
setScaleFactor(n) {
|
|
57
31
|
scaleFactor.set(n);
|
|
58
32
|
},
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
33
|
center() {
|
|
63
34
|
const centerBp = self.totalBp / 2;
|
|
64
35
|
const centerPx = centerBp / self.bpPerPx;
|
|
@@ -81,4 +52,4 @@ const DotplotVView = Dotplot1DView.extend(self => ({
|
|
|
81
52
|
},
|
|
82
53
|
},
|
|
83
54
|
}));
|
|
84
|
-
export {
|
|
55
|
+
export { Dotplot1DView, DotplotHView, DotplotVView };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from 'tss-react/mui';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
import { getSnapshot } from 'mobx-state-tree';
|
|
5
2
|
import { getFillProps, getStrokeProps, getTickDisplayStr, } from '@jbrowse/core/util';
|
|
6
3
|
import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
|
|
7
4
|
import { useTheme } from '@mui/material';
|
|
8
|
-
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { getSnapshot } from 'mobx-state-tree';
|
|
7
|
+
import { makeStyles } from 'tss-react/mui';
|
|
9
8
|
import { getBlockLabelKeysToHide } from './util';
|
|
10
9
|
const useStyles = makeStyles()(() => ({
|
|
11
10
|
vtext: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import type { SvgIconProps } from '@mui/material/SvgIcon';
|
|
3
3
|
export declare function CursorMove(props: SvgIconProps): React.JSX.Element;
|
|
4
4
|
export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import SvgIcon from '@mui/material/SvgIcon';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
3
|
export function CursorMove(props) {
|
|
4
4
|
return (React.createElement(SvgIcon, { ...props },
|
|
5
5
|
React.createElement("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" })));
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconButton } from '@mui/material';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
2
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
5
|
-
|
|
6
|
-
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
7
|
-
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
3
|
+
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
8
4
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
5
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
6
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
7
|
+
import { IconButton } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
9
|
import { CursorMouse, CursorMove } from './CursorIcon';
|
|
10
|
-
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
11
10
|
const DotplotControls = observer(function ({ model, }) {
|
|
12
11
|
return (React.createElement("div", null,
|
|
13
12
|
React.createElement(IconButton, { onClick: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
2
|
+
import type { DotplotViewModel } from '../model';
|
|
3
3
|
type Coord = [number, number] | undefined;
|
|
4
4
|
export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
5
5
|
model: DotplotViewModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
import { locstr } from './util';
|
|
5
5
|
export const DotplotTooltipClick = observer(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
2
|
+
import type { DotplotViewModel } from '../model';
|
|
3
3
|
type Coord = [number, number] | undefined;
|
|
4
4
|
declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
|
|
5
5
|
model: DotplotViewModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
import { locstr } from './util';
|
|
5
5
|
const DotplotTooltipMouseover = observer(function ({ model, mouserect, mouserectClient, xdistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { Suspense, lazy, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { LoadingEllipses, Menu, ResizeHandle } from '@jbrowse/core/ui';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
3
|
import { transaction } from 'mobx';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
|
-
import
|
|
7
|
-
import Header from './Header';
|
|
6
|
+
import { HorizontalAxis, VerticalAxis } from './Axes';
|
|
8
7
|
import Grid from './Grid';
|
|
9
|
-
import
|
|
8
|
+
import Header from './Header';
|
|
9
|
+
import ImportForm from './ImportForm';
|
|
10
10
|
const TooltipWhereClicked = lazy(() => import('./DotplotTooltipClick'));
|
|
11
11
|
const TooltipWhereMouseovered = lazy(() => import('./DotplotTooltipMouseover'));
|
|
12
12
|
const blank = { left: 0, top: 0, width: 0, height: 0 };
|
|
@@ -32,7 +32,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
32
32
|
width: '100%',
|
|
33
33
|
gridRow: '1/2',
|
|
34
34
|
gridColumn: '2/2',
|
|
35
|
-
zIndex: 100,
|
|
35
|
+
zIndex: 100,
|
|
36
36
|
'& path': {
|
|
37
37
|
cursor: 'crosshair',
|
|
38
38
|
fill: 'none',
|
|
@@ -50,8 +50,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
50
50
|
borderTop: '1px solid #fafafa',
|
|
51
51
|
},
|
|
52
52
|
}));
|
|
53
|
-
// produces offsetX/offsetY coordinates from a clientX and an element's
|
|
54
|
-
// getBoundingClientRect
|
|
55
53
|
function getOffset(coord, rect) {
|
|
56
54
|
return coord && [coord[0] - rect.left, coord[1] - rect.top];
|
|
57
55
|
}
|
|
@@ -91,7 +89,6 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
91
89
|
(cursorMode === 'crosshair' && ctrlKeyWasUsed);
|
|
92
90
|
const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
|
|
93
91
|
(cursorMode === 'crosshair' && !ctrlKeyWasUsed);
|
|
94
|
-
// use non-React wheel handler to properly prevent body scrolling
|
|
95
92
|
useEffect(() => {
|
|
96
93
|
function onWheel(event) {
|
|
97
94
|
event.preventDefault();
|
|
@@ -160,8 +157,6 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
160
157
|
window.addEventListener('keyup', globalCtrlKeyUp);
|
|
161
158
|
};
|
|
162
159
|
}, []);
|
|
163
|
-
// detect a mouseup after a mousedown was submitted, autoremoves mouseup once
|
|
164
|
-
// that single mouseup is set
|
|
165
160
|
useEffect(() => {
|
|
166
161
|
function globalMouseUp(event) {
|
|
167
162
|
if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
|
|
@@ -229,7 +224,6 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
229
224
|
if (mousedown && mouseup) {
|
|
230
225
|
model.zoomInToMouseCoords(mousedown, mouseup);
|
|
231
226
|
}
|
|
232
|
-
// below line is needed to prevent tooltip from sticking
|
|
233
227
|
setMouseOvered(false);
|
|
234
228
|
},
|
|
235
229
|
},
|
|
@@ -239,7 +233,6 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
239
233
|
if (mousedown && mouseup) {
|
|
240
234
|
model.onDotplotView(mousedown, mouseup);
|
|
241
235
|
}
|
|
242
|
-
// below line is needed to prevent tooltip from sticking
|
|
243
236
|
setMouseOvered(false);
|
|
244
237
|
},
|
|
245
238
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { lazy, useState } from 'react';
|
|
2
2
|
import { Alert, Button } from '@mui/material';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
// lazy components
|
|
5
4
|
const WarningDialog = lazy(() => import('./WarningDialog'));
|
|
6
5
|
const DotplotWarnings = observer(function ({ model, }) {
|
|
7
6
|
const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
|
|
3
2
|
import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
|
|
4
3
|
import { getSession, useLocalStorage } from '@jbrowse/core/util';
|
|
4
|
+
import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
|
|
5
5
|
function LoadingMessage() {
|
|
6
6
|
return (React.createElement("div", null,
|
|
7
7
|
React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
|
|
@@ -30,9 +30,7 @@ export default function ExportSvgDialog({ model, handleClose, }) {
|
|
|
30
30
|
} }),
|
|
31
31
|
session.allThemes ? (React.createElement(TextField2, { select: true, label: "Theme", value: themeName, onChange: event => {
|
|
32
32
|
setThemeName(event.target.value);
|
|
33
|
-
} }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key },
|
|
34
|
-
// @ts-expect-error
|
|
35
|
-
val.name || '(Unknown name)'))))) : null,
|
|
33
|
+
} }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
|
|
36
34
|
offscreenCanvas ? (React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
37
35
|
setRasterizeLayers(val => !val);
|
|
38
36
|
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (React.createElement(Typography, null, "Note: rasterizing layers not yet supported in this browser, so SVG size may be large"))),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { useTheme } from '@mui/material';
|
|
4
2
|
import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
5
|
export const GridRaw = observer(function ({ model, children, }) {
|
|
6
6
|
const { viewWidth, viewHeight, hview, vview } = model;
|
|
7
7
|
const hblocks = hview.dynamicBlocks.contentBlocks;
|
|
@@ -15,8 +15,6 @@ export const GridRaw = observer(function ({ model, children, }) {
|
|
|
15
15
|
const vbottom = vblocks[0].offsetPx - vview.offsetPx;
|
|
16
16
|
const theme = useTheme();
|
|
17
17
|
const stroke = theme.palette.divider;
|
|
18
|
-
// Uses math.max/min avoid making very large SVG rect offscreen element,
|
|
19
|
-
// which can sometimes fail to draw
|
|
20
18
|
const rx = Math.max(hbottom, 0);
|
|
21
19
|
const ry = Math.max(viewHeight - vtop, 0);
|
|
22
20
|
const w = Math.min(htop - hbottom, viewWidth);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
2
3
|
import { Typography } from '@mui/material';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
5
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
import
|
|
6
|
+
import DotplotControls from './DotplotControls';
|
|
6
7
|
import DotplotWarnings from './DotplotWarnings';
|
|
7
8
|
import PanButtons from './PanButtons';
|
|
8
|
-
import DotplotControls from './DotplotControls';
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
bp: {
|
|
11
11
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { SnapshotIn } from 'mobx-state-tree';
|
|
4
4
|
type Conf = SnapshotIn<AnyConfigurationModel>;
|
|
5
5
|
declare const ImportCustomTrack: ({ assembly1, assembly2, setSessionTrackData, }: {
|
|
6
6
|
sessionTrackData: Conf;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
3
2
|
import { ErrorMessage, FileSelector } from '@jbrowse/core/ui';
|
|
3
|
+
import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import { basename, extName, getName, stripGz } from './util';
|
|
6
6
|
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
|