@jbrowse/plugin-linear-comparative-view 3.6.4 → 3.7.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/LGVSyntenyDisplay/configSchemaF.js +1 -1
- package/dist/LGVSyntenyDisplay/model.d.ts +17 -2
- package/dist/LinearComparativeView/components/ColorBySelector.d.ts +5 -0
- package/dist/LinearComparativeView/components/ColorBySelector.js +54 -0
- package/dist/LinearComparativeView/components/Header.js +7 -2
- package/dist/LinearComparativeView/components/MinLengthSlider.d.ts +5 -0
- package/dist/LinearComparativeView/components/MinLengthSlider.js +47 -0
- package/dist/LinearComparativeView/components/OpacitySlider.d.ts +5 -0
- package/dist/LinearComparativeView/components/OpacitySlider.js +46 -0
- package/dist/LinearComparativeView/components/RubberbandSpan.js +2 -2
- package/dist/LinearComparativeView/components/SliderTooltip.d.ts +2 -0
- package/dist/LinearComparativeView/components/SliderTooltip.js +9 -0
- package/dist/LinearComparativeView/components/useRangeSelect.js +10 -14
- package/dist/LinearComparativeView/model.d.ts +7 -4
- package/dist/LinearComparativeView/model.js +4 -0
- package/dist/LinearSyntenyDisplay/afterAttach.js +5 -3
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -5
- package/dist/LinearSyntenyDisplay/components/util.d.ts +2 -1
- package/dist/LinearSyntenyDisplay/components/util.js +43 -2
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +3 -2
- package/dist/LinearSyntenyDisplay/drawSynteny.js +284 -45
- package/dist/LinearSyntenyDisplay/model.d.ts +6 -0
- package/dist/LinearSyntenyDisplay/model.js +12 -0
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +6 -0
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.js +87 -0
- package/dist/LinearSyntenyView/model.d.ts +46 -15
- package/dist/LinearSyntenyView/model.js +70 -18
- package/dist/LinearSyntenyView/util/diagonalize.d.ts +27 -0
- package/dist/LinearSyntenyView/util/diagonalize.js +91 -0
- package/esm/LGVSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +17 -2
- package/esm/LinearComparativeView/components/ColorBySelector.d.ts +5 -0
- package/esm/LinearComparativeView/components/ColorBySelector.js +49 -0
- package/esm/LinearComparativeView/components/Header.js +8 -3
- package/esm/LinearComparativeView/components/MinLengthSlider.d.ts +5 -0
- package/esm/LinearComparativeView/components/MinLengthSlider.js +42 -0
- package/esm/LinearComparativeView/components/OpacitySlider.d.ts +5 -0
- package/esm/LinearComparativeView/components/OpacitySlider.js +41 -0
- package/esm/LinearComparativeView/components/RubberbandSpan.js +2 -2
- package/esm/LinearComparativeView/components/SliderTooltip.d.ts +2 -0
- package/esm/LinearComparativeView/components/SliderTooltip.js +6 -0
- package/esm/LinearComparativeView/components/useRangeSelect.js +11 -15
- package/esm/LinearComparativeView/model.d.ts +7 -4
- package/esm/LinearComparativeView/model.js +4 -0
- package/esm/LinearSyntenyDisplay/afterAttach.js +6 -4
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -5
- package/esm/LinearSyntenyDisplay/components/util.d.ts +2 -1
- package/esm/LinearSyntenyDisplay/components/util.js +43 -3
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +3 -2
- package/esm/LinearSyntenyDisplay/drawSynteny.js +283 -45
- package/esm/LinearSyntenyDisplay/model.d.ts +6 -0
- package/esm/LinearSyntenyDisplay/model.js +12 -0
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +6 -0
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.js +85 -0
- package/esm/LinearSyntenyView/model.d.ts +46 -15
- package/esm/LinearSyntenyView/model.js +70 -18
- package/esm/LinearSyntenyView/util/diagonalize.d.ts +27 -0
- package/esm/LinearSyntenyView/util/diagonalize.js +88 -0
- package/package.json +5 -5
|
@@ -23,10 +23,10 @@ const useStyles = makeStyles()(theme => {
|
|
|
23
23
|
export default function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top = 0, sticky = false, }) {
|
|
24
24
|
const { classes } = useStyles();
|
|
25
25
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
26
|
-
return (_jsxs(_Fragment, { children: [anchorEl ? (_jsxs(_Fragment, { children: [_jsx(RubberbandTooltip, { side: "left", anchorEl: anchorEl, text: leftBpOffset.map((l, idx) => (_jsx("div", { children: stringify(l, true) },
|
|
26
|
+
return (_jsxs(_Fragment, { children: [anchorEl ? (_jsxs(_Fragment, { children: [_jsx(RubberbandTooltip, { side: "left", anchorEl: anchorEl, text: leftBpOffset.map((l, idx) => (_jsx("div", { children: stringify(l, true) }, `${JSON.stringify(l)}-left-${idx}`))) }), _jsx(RubberbandTooltip, { side: "right", anchorEl: anchorEl, text: rightBpOffset.map((l, idx) => (_jsx("div", { children: stringify(l, true) }, `${JSON.stringify(l)}-right-${idx}`))) })] })) : null, _jsx("div", { className: classes.rubberband, style: { left, width }, children: numOfBpSelected ? (_jsx(Typography, { ref: el => {
|
|
27
27
|
setAnchorEl(el);
|
|
28
28
|
}, variant: "h6", className: classes.rubberbandText, style: {
|
|
29
29
|
top,
|
|
30
30
|
position: sticky ? 'sticky' : undefined,
|
|
31
|
-
}, children: numOfBpSelected.map((n, i) => (_jsx("div", { children: getBpDisplayStr(n) }, i))) })) : null })] }));
|
|
31
|
+
}, children: numOfBpSelected.map((n, i) => (_jsx("div", { children: getBpDisplayStr(n) }, `bpSelectedRow-${i}`))) })) : null })] }));
|
|
32
32
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from '@mui/material';
|
|
3
|
+
export default function SliderTooltip(props) {
|
|
4
|
+
const { children, open, value } = props;
|
|
5
|
+
return (_jsx(Tooltip, { open: open, enterTouchDelay: 0, placement: "top", title: value, arrow: true, children: children }));
|
|
6
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { transaction } from 'mobx';
|
|
3
3
|
import { getRelativeX } from './util';
|
|
4
4
|
export function useRangeSelect(ref, model) {
|
|
@@ -7,6 +7,11 @@ export function useRangeSelect(ref, model) {
|
|
|
7
7
|
const [anchorPosition, setAnchorPosition] = useState();
|
|
8
8
|
const [guideX, setGuideX] = useState();
|
|
9
9
|
const mouseDragging = startX !== undefined && anchorPosition === undefined;
|
|
10
|
+
const handleClose = useCallback(() => {
|
|
11
|
+
setAnchorPosition(undefined);
|
|
12
|
+
setStartX(undefined);
|
|
13
|
+
setCurrentX(undefined);
|
|
14
|
+
}, []);
|
|
10
15
|
useEffect(() => {
|
|
11
16
|
function computeOffsets(offsetX) {
|
|
12
17
|
if (startX === undefined) {
|
|
@@ -29,6 +34,10 @@ export function useRangeSelect(ref, model) {
|
|
|
29
34
|
if (startX !== undefined && ref.current) {
|
|
30
35
|
const { clientX, clientY } = event;
|
|
31
36
|
const offsetX = getRelativeX(event, ref.current);
|
|
37
|
+
if (Math.abs(offsetX - startX) <= 3) {
|
|
38
|
+
handleClose();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
32
41
|
setAnchorPosition({
|
|
33
42
|
offsetX,
|
|
34
43
|
clientX,
|
|
@@ -54,15 +63,7 @@ export function useRangeSelect(ref, model) {
|
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
return () => { };
|
|
57
|
-
}, [startX, mouseDragging, model, ref]);
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
if (!mouseDragging &&
|
|
60
|
-
currentX !== undefined &&
|
|
61
|
-
startX !== undefined &&
|
|
62
|
-
Math.abs(currentX - startX) <= 3) {
|
|
63
|
-
handleClose();
|
|
64
|
-
}
|
|
65
|
-
}, [mouseDragging, currentX, startX]);
|
|
66
|
+
}, [startX, mouseDragging, model, ref, handleClose]);
|
|
66
67
|
function mouseDown(event) {
|
|
67
68
|
event.preventDefault();
|
|
68
69
|
event.stopPropagation();
|
|
@@ -81,11 +82,6 @@ export function useRangeSelect(ref, model) {
|
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
|
-
function handleClose() {
|
|
85
|
-
setAnchorPosition(undefined);
|
|
86
|
-
setStartX(undefined);
|
|
87
|
-
setCurrentX(undefined);
|
|
88
|
-
}
|
|
89
85
|
function handleMenuItemClick(_, callback) {
|
|
90
86
|
callback();
|
|
91
87
|
handleClose();
|
|
@@ -13,6 +13,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
13
13
|
showIntraviewLinks: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
14
14
|
linkViews: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
15
15
|
interactiveOverlay: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
16
|
+
showDynamicControls: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
16
17
|
levels: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
17
18
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
18
19
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -78,8 +79,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
78
79
|
readonly interRegionPaddingWidth: number;
|
|
79
80
|
readonly assemblyNames: string[];
|
|
80
81
|
readonly assemblyDisplayNames: string[];
|
|
81
|
-
readonly isTopLevelView:
|
|
82
|
-
readonly stickyViewHeaders: boolean
|
|
82
|
+
readonly isTopLevelView: boolean;
|
|
83
|
+
readonly stickyViewHeaders: boolean;
|
|
83
84
|
readonly rubberbandTop: number;
|
|
84
85
|
readonly pinnedTracksTop: number;
|
|
85
86
|
} & {
|
|
@@ -303,6 +304,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
303
304
|
removeView(view: LinearGenomeViewModel): void;
|
|
304
305
|
setLevelHeight(newHeight: number, level?: number): number;
|
|
305
306
|
setLinkViews(arg: boolean): void;
|
|
307
|
+
setShowDynamicControls(arg: boolean): void;
|
|
306
308
|
activateTrackSelector(level: number): import("@jbrowse/core/util").Widget;
|
|
307
309
|
toggleTrack(trackId: string, level?: number): void;
|
|
308
310
|
showTrack(trackId: string, level?: number, initialSnapshot?: {}): void;
|
|
@@ -330,6 +332,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
330
332
|
showIntraviewLinks: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
331
333
|
linkViews: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
332
334
|
interactiveOverlay: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
335
|
+
showDynamicControls: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
333
336
|
levels: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
334
337
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
335
338
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -395,8 +398,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
395
398
|
readonly interRegionPaddingWidth: number;
|
|
396
399
|
readonly assemblyNames: string[];
|
|
397
400
|
readonly assemblyDisplayNames: string[];
|
|
398
|
-
readonly isTopLevelView:
|
|
399
|
-
readonly stickyViewHeaders: boolean
|
|
401
|
+
readonly isTopLevelView: boolean;
|
|
402
|
+
readonly stickyViewHeaders: boolean;
|
|
400
403
|
readonly rubberbandTop: number;
|
|
401
404
|
readonly pinnedTracksTop: number;
|
|
402
405
|
} & {
|
|
@@ -17,6 +17,7 @@ function stateModelFactory(pluginManager) {
|
|
|
17
17
|
showIntraviewLinks: true,
|
|
18
18
|
linkViews: false,
|
|
19
19
|
interactiveOverlay: false,
|
|
20
|
+
showDynamicControls: true,
|
|
20
21
|
levels: types.array(LinearSyntenyViewHelper),
|
|
21
22
|
views: types.array(pluginManager.getViewType('LinearGenomeView')
|
|
22
23
|
.stateModel),
|
|
@@ -93,6 +94,9 @@ function stateModelFactory(pluginManager) {
|
|
|
93
94
|
setLinkViews(arg) {
|
|
94
95
|
self.linkViews = arg;
|
|
95
96
|
},
|
|
97
|
+
setShowDynamicControls(arg) {
|
|
98
|
+
self.showDynamicControls = arg;
|
|
99
|
+
},
|
|
96
100
|
activateTrackSelector(level) {
|
|
97
101
|
if (self.trackSelectorType === 'hierarchical') {
|
|
98
102
|
const session = getSession(self);
|
|
@@ -3,7 +3,7 @@ import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
|
|
|
3
3
|
import { MismatchParser } from '@jbrowse/plugin-alignments';
|
|
4
4
|
import { autorun, reaction } from 'mobx';
|
|
5
5
|
import { addDisposer, getSnapshot } from 'mobx-state-tree';
|
|
6
|
-
import {
|
|
6
|
+
import { drawCigarClickMap, drawMouseoverClickMap, drawRef, } from './drawSynteny';
|
|
7
7
|
export function doAfterAttach(self) {
|
|
8
8
|
addDisposer(self, autorun(() => {
|
|
9
9
|
var _a, _b;
|
|
@@ -17,11 +17,12 @@ export function doAfterAttach(self) {
|
|
|
17
17
|
if (!ctx1 || !ctx3) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
+
const { alpha } = self;
|
|
20
21
|
const height = self.height;
|
|
21
22
|
const width = view.width;
|
|
22
23
|
ctx1.clearRect(0, 0, width, height);
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
drawRef(self, ctx1);
|
|
25
|
+
drawCigarClickMap(self, ctx3);
|
|
25
26
|
}));
|
|
26
27
|
addDisposer(self, autorun(() => {
|
|
27
28
|
const view = getContainingView(self);
|
|
@@ -29,7 +30,8 @@ export function doAfterAttach(self) {
|
|
|
29
30
|
!view.views.every(a => a.displayedRegions.length > 0 && a.initialized)) {
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
const { clickId, mouseoverId } = self;
|
|
34
|
+
drawMouseoverClickMap(self);
|
|
33
35
|
}));
|
|
34
36
|
addDisposer(self, reaction(() => {
|
|
35
37
|
const view = getContainingView(self);
|
|
@@ -151,11 +151,16 @@ const LinearSyntenyRendering = observer(function ({ model, }) {
|
|
|
151
151
|
const { f, cigar } = model.featPositions[id];
|
|
152
152
|
const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length);
|
|
153
153
|
const cigarIdx = getId(r2, g2, b2, unitMultiplier2);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
if (cigarIdx % 2 === 0 && (r2 !== 0 || g2 !== 0 || b2 !== 0)) {
|
|
155
|
+
setTooltip(getTooltip({
|
|
156
|
+
feature: f,
|
|
157
|
+
cigarOp: cigar[cigarIdx + 1],
|
|
158
|
+
cigarOpLen: cigar[cigarIdx],
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
setTooltip('');
|
|
163
|
+
}
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
}, onMouseLeave: () => {
|
|
@@ -32,13 +32,14 @@ export declare function drawMatchSimple({ feature, ctx, offsets, level, cb, heig
|
|
|
32
32
|
hideTiny?: boolean;
|
|
33
33
|
}): void;
|
|
34
34
|
export declare function draw(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number, mid: number, drawCurves?: boolean): void;
|
|
35
|
+
export declare function drawLocationMarkers(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number, mid: number, bpPerPx1: number, bpPerPx2: number, drawCurves?: boolean): void;
|
|
35
36
|
export declare function drawBox(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number): void;
|
|
36
37
|
export declare function drawBezierBox(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number, mid: number): void;
|
|
37
38
|
export declare function onSynClick(event: React.MouseEvent, model: LinearSyntenyDisplayModel): import("../model").FeatPos | undefined;
|
|
38
39
|
export declare function onSynContextClick(event: React.MouseEvent, model: LinearSyntenyDisplayModel, setAnchorEl: (arg: ClickCoord) => void): void;
|
|
39
40
|
export declare function getTooltip({ feature, cigarOp, cigarOpLen, }: {
|
|
40
41
|
feature: Feature;
|
|
41
|
-
cigarOp?: string;
|
|
42
42
|
cigarOpLen?: string;
|
|
43
|
+
cigarOp?: string;
|
|
43
44
|
}): string;
|
|
44
45
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assembleLocString, doesIntersect2, getContainingTrack, getContainingView, getSession, isSessionModelWithWidgets, } from '@jbrowse/core/util';
|
|
1
|
+
import { assembleLocString, doesIntersect2, getContainingTrack, getContainingView, getSession, isSessionModelWithWidgets, toLocale, } from '@jbrowse/core/util';
|
|
2
2
|
import { MAX_COLOR_RANGE, getId } from '../drawSynteny';
|
|
3
3
|
export function drawMatchSimple({ feature, ctx, offsets, level, cb, height, drawCurves, oobLimit, viewWidth, hideTiny, }) {
|
|
4
4
|
const { p11, p12, p21, p22 } = feature;
|
|
@@ -42,6 +42,42 @@ export function draw(ctx, x1, x2, y1, x3, x4, y2, mid, drawCurves) {
|
|
|
42
42
|
drawBox(ctx, x1, x2, y1, x3, x4, y2);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
export function drawLocationMarkers(ctx, x1, x2, y1, x3, x4, y2, mid, bpPerPx1, bpPerPx2, drawCurves) {
|
|
46
|
+
const width1 = Math.abs(x2 - x1);
|
|
47
|
+
const width2 = Math.abs(x4 - x3);
|
|
48
|
+
const averageWidth = (width1 + width2) / 2;
|
|
49
|
+
if (averageWidth < 30) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const targetPixelSpacing = 20;
|
|
53
|
+
const numMarkers = Math.max(2, Math.floor(averageWidth / targetPixelSpacing) + 1);
|
|
54
|
+
const prevStrokeStyle = ctx.strokeStyle;
|
|
55
|
+
const prevLineWidth = ctx.lineWidth;
|
|
56
|
+
ctx.strokeStyle = 'rgba(0, 0, 0, 0.25)';
|
|
57
|
+
ctx.lineWidth = 0.5;
|
|
58
|
+
ctx.beginPath();
|
|
59
|
+
if (drawCurves) {
|
|
60
|
+
for (let step = 0; step < numMarkers; step++) {
|
|
61
|
+
const t = step / numMarkers;
|
|
62
|
+
const topX = x1 + (x2 - x1) * t;
|
|
63
|
+
const bottomX = x4 + (x3 - x4) * t;
|
|
64
|
+
ctx.moveTo(topX, y1);
|
|
65
|
+
ctx.bezierCurveTo(topX, mid, bottomX, mid, bottomX, y2);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
for (let step = 0; step < numMarkers; step++) {
|
|
70
|
+
const t = step / numMarkers;
|
|
71
|
+
const topX = x1 + (x2 - x1) * t;
|
|
72
|
+
const bottomX = x4 + (x3 - x4) * t;
|
|
73
|
+
ctx.moveTo(topX, y1);
|
|
74
|
+
ctx.lineTo(bottomX, y2);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
ctx.stroke();
|
|
78
|
+
ctx.strokeStyle = prevStrokeStyle;
|
|
79
|
+
ctx.lineWidth = prevLineWidth;
|
|
80
|
+
}
|
|
45
81
|
export function drawBox(ctx, x1, x2, y1, x3, x4, y2) {
|
|
46
82
|
ctx.beginPath();
|
|
47
83
|
ctx.moveTo(x1, y1);
|
|
@@ -122,7 +158,11 @@ export function onSynContextClick(event, model, setAnchorEl) {
|
|
|
122
158
|
const f = model.featPositions[id];
|
|
123
159
|
if (f) {
|
|
124
160
|
model.setClickId(f.f.id());
|
|
125
|
-
setAnchorEl({
|
|
161
|
+
setAnchorEl({
|
|
162
|
+
clientX,
|
|
163
|
+
clientY,
|
|
164
|
+
feature: f,
|
|
165
|
+
});
|
|
126
166
|
}
|
|
127
167
|
}
|
|
128
168
|
export function getTooltip({ feature, cigarOp, cigarOpLen, }) {
|
|
@@ -140,7 +180,7 @@ export function getTooltip({ feature, cigarOp, cigarOpLen, }) {
|
|
|
140
180
|
`Query len: ${l1.toLocaleString('en-US')}`,
|
|
141
181
|
`Target len: ${l2.toLocaleString('en-US')}`,
|
|
142
182
|
identity ? `Identity: ${identity.toPrecision(2)}` : '',
|
|
143
|
-
cigarOp ? `CIGAR operator: ${
|
|
183
|
+
cigarOp ? `CIGAR operator: ${toLocale(+cigarOpLen)}${cigarOp}` : '',
|
|
144
184
|
n1 ? `Name 1: ${n1}` : '',
|
|
145
185
|
n2 ? `Name 2: ${n2}` : '',
|
|
146
186
|
]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LinearSyntenyDisplayModel } from './model';
|
|
2
2
|
export declare const MAX_COLOR_RANGE: number;
|
|
3
3
|
export declare function getId(r: number, g: number, b: number, unitMultiplier: number): number;
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
4
|
+
export declare function drawCigarClickMap(model: LinearSyntenyDisplayModel, cigarClickMapCanvas: CanvasRenderingContext2D): void;
|
|
5
|
+
export declare function drawRef(model: LinearSyntenyDisplayModel, mainCanvas: CanvasRenderingContext2D): void;
|
|
6
|
+
export declare function drawMouseoverClickMap(model: LinearSyntenyDisplayModel): void;
|