@jbrowse/plugin-linear-comparative-view 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +3 -3
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +9 -9
- package/esm/LGVSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LGVSyntenyDisplay/index.js +2 -2
- package/esm/LGVSyntenyDisplay/model.d.ts +1179 -133
- package/esm/LGVSyntenyDisplay/model.js +2 -2
- package/esm/LaunchLinearSyntenyView.js +13 -86
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
- package/esm/LinearComparativeDisplay/index.js +2 -2
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +95 -135
- package/esm/LinearComparativeDisplay/stateModelFactory.js +18 -17
- package/esm/LinearComparativeView/components/ColorBySelector.d.ts +1 -1
- package/esm/LinearComparativeView/components/ColorBySelector.js +3 -4
- package/esm/LinearComparativeView/components/Header.d.ts +1 -1
- package/esm/LinearComparativeView/components/Header.js +8 -9
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +9 -8
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeView.js +5 -5
- package/esm/LinearComparativeView/components/MinLengthSlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/MinLengthSlider.js +7 -7
- package/esm/LinearComparativeView/components/OpacitySlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/OpacitySlider.js +5 -6
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearComparativeView/components/Rubberband.js +5 -5
- package/esm/LinearComparativeView/components/RubberbandSpan.js +3 -5
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearComparativeView/components/VerticalGuide.js +2 -2
- package/esm/LinearComparativeView/components/useRangeSelect.d.ts +1 -1
- package/esm/LinearComparativeView/components/useRangeSelect.js +1 -1
- package/esm/LinearComparativeView/components/util.js +1 -1
- package/esm/LinearComparativeView/index.js +2 -2
- package/esm/LinearComparativeView/model.d.ts +474 -222
- package/esm/LinearComparativeView/model.js +50 -29
- package/esm/LinearReadVsRef/LinearReadVsRef.js +8 -9
- package/esm/LinearReadVsRef/index.js +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +10 -11
- package/esm/LinearSyntenyDisplay/components/BlockError.js +1 -1
- package/esm/LinearSyntenyDisplay/components/BlockMessage.js +6 -15
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/Component.js +5 -5
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -14
- package/esm/LinearSyntenyDisplay/components/LoadingMessage.js +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +8 -33
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
- package/esm/LinearSyntenyDisplay/components/util.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/util.js +3 -3
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.d.ts +2 -0
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.js +53 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +3 -5
- package/esm/LinearSyntenyDisplay/index.js +3 -3
- package/esm/LinearSyntenyDisplay/model.d.ts +97 -137
- package/esm/LinearSyntenyDisplay/model.js +3 -3
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.js +2 -2
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +6 -2
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +4 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +11 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +8 -4
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.js +26 -9
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +5 -5
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +1 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.js +4 -4
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +14 -4
- package/esm/LinearSyntenyView/index.js +2 -2
- package/esm/LinearSyntenyView/model.d.ts +522 -254
- package/esm/LinearSyntenyView/model.js +99 -15
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +3 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +34 -31
- package/esm/LinearSyntenyView/types.d.ts +10 -1
- package/esm/LinearSyntenyViewHelper/index.js +1 -1
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +11 -11
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +5 -43
- package/esm/SyntenyFeatureDetail/Formatter.js +2 -2
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +6 -7
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +3 -3
- package/esm/SyntenyFeatureDetail/index.js +2 -2
- package/esm/SyntenyTrack/configSchema.d.ts +16 -11
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +11 -14
- package/esm/util.d.ts +1 -1
- package/esm/util.js +4 -8
- package/package.json +29 -35
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +0 -9
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -53
- package/dist/LGVSyntenyDisplay/components/util.d.ts +0 -14
- package/dist/LGVSyntenyDisplay/components/util.js +0 -100
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +0 -66
- package/dist/LGVSyntenyDisplay/configSchemaF.js +0 -38
- package/dist/LGVSyntenyDisplay/index.d.ts +0 -2
- package/dist/LGVSyntenyDisplay/index.js +0 -24
- package/dist/LGVSyntenyDisplay/model.d.ts +0 -418
- package/dist/LGVSyntenyDisplay/model.js +0 -118
- package/dist/LaunchLinearSyntenyView.d.ts +0 -2
- package/dist/LaunchLinearSyntenyView.js +0 -93
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -2
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -10
- package/dist/LinearComparativeDisplay/index.d.ts +0 -2
- package/dist/LinearComparativeDisplay/index.js +0 -24
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +0 -243
- package/dist/LinearComparativeDisplay/stateModelFactory.js +0 -146
- package/dist/LinearComparativeView/components/ColorBySelector.d.ts +0 -5
- package/dist/LinearComparativeView/components/ColorBySelector.js +0 -54
- package/dist/LinearComparativeView/components/Header.d.ts +0 -5
- package/dist/LinearComparativeView/components/Header.js +0 -87
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +0 -5
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +0 -24
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +0 -46
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeView.js +0 -30
- package/dist/LinearComparativeView/components/MinLengthSlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/MinLengthSlider.js +0 -47
- package/dist/LinearComparativeView/components/OpacitySlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/OpacitySlider.js +0 -46
- package/dist/LinearComparativeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearComparativeView/components/Rubberband.js +0 -32
- package/dist/LinearComparativeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearComparativeView/components/RubberbandSpan.js +0 -38
- package/dist/LinearComparativeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearComparativeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearComparativeView/components/SliderTooltip.d.ts +0 -2
- package/dist/LinearComparativeView/components/SliderTooltip.js +0 -9
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearComparativeView/components/VerticalGuide.js +0 -26
- package/dist/LinearComparativeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearComparativeView/components/useRangeSelect.js +0 -124
- package/dist/LinearComparativeView/components/util.d.ts +0 -4
- package/dist/LinearComparativeView/components/util.js +0 -6
- package/dist/LinearComparativeView/index.d.ts +0 -2
- package/dist/LinearComparativeView/index.js +0 -55
- package/dist/LinearComparativeView/model.d.ts +0 -606
- package/dist/LinearComparativeView/model.js +0 -238
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +0 -6
- package/dist/LinearReadVsRef/LinearReadVsRef.js +0 -241
- package/dist/LinearReadVsRef/index.d.ts +0 -2
- package/dist/LinearReadVsRef/index.js +0 -86
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/afterAttach.js +0 -104
- package/dist/LinearSyntenyDisplay/components/BlockError.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockError.js +0 -16
- package/dist/LinearSyntenyDisplay/components/BlockMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockMessage.js +0 -24
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/Component.js +0 -26
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +0 -223
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.js +0 -21
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +0 -15
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +0 -56
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +0 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +0 -13
- package/dist/LinearSyntenyDisplay/components/util.d.ts +0 -45
- package/dist/LinearSyntenyDisplay/components/util.js +0 -199
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +0 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -23
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +0 -6
- package/dist/LinearSyntenyDisplay/drawSynteny.js +0 -470
- package/dist/LinearSyntenyDisplay/index.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/index.js +0 -56
- package/dist/LinearSyntenyDisplay/model.d.ts +0 -291
- package/dist/LinearSyntenyDisplay/model.js +0 -133
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +0 -6
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.js +0 -87
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +0 -58
- package/dist/LinearSyntenyView/components/Icons.d.ts +0 -3
- package/dist/LinearSyntenyView/components/Icons.js +0 -12
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -81
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +0 -39
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +0 -22
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +0 -11
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.js +0 -58
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +0 -60
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +0 -43
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +0 -117
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +0 -68
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -19
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +0 -20
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +0 -4
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.js +0 -27
- package/dist/LinearSyntenyView/components/ImportForm/util.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/util.js +0 -24
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +0 -5
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -47
- package/dist/LinearSyntenyView/components/TextField2.d.ts +0 -2
- package/dist/LinearSyntenyView/components/TextField2.js +0 -8
- package/dist/LinearSyntenyView/index.d.ts +0 -2
- package/dist/LinearSyntenyView/index.js +0 -52
- package/dist/LinearSyntenyView/model.d.ts +0 -702
- package/dist/LinearSyntenyView/model.js +0 -240
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +0 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +0 -80
- package/dist/LinearSyntenyView/types.d.ts +0 -29
- package/dist/LinearSyntenyView/types.js +0 -2
- package/dist/LinearSyntenyView/util/diagonalize.d.ts +0 -27
- package/dist/LinearSyntenyView/util/diagonalize.js +0 -91
- package/dist/LinearSyntenyViewHelper/index.d.ts +0 -2
- package/dist/LinearSyntenyViewHelper/index.js +0 -25
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +0 -18
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +0 -78
- package/dist/SyntenyFeatureDetail/Formatter.d.ts +0 -3
- package/dist/SyntenyFeatureDetail/Formatter.js +0 -23
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +0 -7
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +0 -87
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -5
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -19
- package/dist/SyntenyFeatureDetail/index.d.ts +0 -2
- package/dist/SyntenyFeatureDetail/index.js +0 -60
- package/dist/SyntenyFeatureDetail/types.d.ts +0 -9
- package/dist/SyntenyFeatureDetail/types.js +0 -2
- package/dist/SyntenyTrack/configSchema.d.ts +0 -80
- package/dist/SyntenyTrack/configSchema.js +0 -9
- package/dist/SyntenyTrack/index.d.ts +0 -2
- package/dist/SyntenyTrack/index.js +0 -19
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -48
- package/dist/util.d.ts +0 -25
- package/dist/util.js +0 -67
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.drawMatchSimple = drawMatchSimple;
|
|
4
|
-
exports.draw = draw;
|
|
5
|
-
exports.drawLocationMarkers = drawLocationMarkers;
|
|
6
|
-
exports.drawBox = drawBox;
|
|
7
|
-
exports.drawBezierBox = drawBezierBox;
|
|
8
|
-
exports.onSynClick = onSynClick;
|
|
9
|
-
exports.onSynContextClick = onSynContextClick;
|
|
10
|
-
exports.getTooltip = getTooltip;
|
|
11
|
-
const util_1 = require("@jbrowse/core/util");
|
|
12
|
-
const drawSynteny_1 = require("../drawSynteny");
|
|
13
|
-
function drawMatchSimple({ feature, ctx, offsets, level, cb, height, drawCurves, oobLimit, viewWidth, hideTiny, }) {
|
|
14
|
-
const { p11, p12, p21, p22 } = feature;
|
|
15
|
-
const x11 = p11.offsetPx - offsets[level];
|
|
16
|
-
const x12 = p12.offsetPx - offsets[level];
|
|
17
|
-
const x21 = p21.offsetPx - offsets[level + 1];
|
|
18
|
-
const x22 = p22.offsetPx - offsets[level + 1];
|
|
19
|
-
const l1 = Math.abs(x12 - x11);
|
|
20
|
-
const l2 = Math.abs(x22 - x21);
|
|
21
|
-
const y1 = 0;
|
|
22
|
-
const y2 = height;
|
|
23
|
-
const mid = (y2 - y1) / 2;
|
|
24
|
-
const minX = Math.min(x21, x22);
|
|
25
|
-
const maxX = Math.max(x21, x22);
|
|
26
|
-
if (!(0, util_1.doesIntersect2)(minX, maxX, -oobLimit, viewWidth + oobLimit)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (l1 <= 1 && l2 <= 1) {
|
|
30
|
-
if (!hideTiny) {
|
|
31
|
-
ctx.beginPath();
|
|
32
|
-
ctx.moveTo(x11, y1);
|
|
33
|
-
if (drawCurves) {
|
|
34
|
-
ctx.bezierCurveTo(x11, mid, x21, mid, x21, y2);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
ctx.lineTo(x21, y2);
|
|
38
|
-
}
|
|
39
|
-
ctx.stroke();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
draw(ctx, x11, x12, y1, x22, x21, y2, mid, drawCurves);
|
|
44
|
-
cb(ctx);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function draw(ctx, x1, x2, y1, x3, x4, y2, mid, drawCurves) {
|
|
48
|
-
if (drawCurves) {
|
|
49
|
-
drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
drawBox(ctx, x1, x2, y1, x3, x4, y2);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function drawLocationMarkers(ctx, x1, x2, y1, x3, x4, y2, mid, bpPerPx1, bpPerPx2, drawCurves) {
|
|
56
|
-
const width1 = Math.abs(x2 - x1);
|
|
57
|
-
const width2 = Math.abs(x4 - x3);
|
|
58
|
-
const averageWidth = (width1 + width2) / 2;
|
|
59
|
-
if (averageWidth < 30) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const targetPixelSpacing = 20;
|
|
63
|
-
const numMarkers = Math.max(2, Math.floor(averageWidth / targetPixelSpacing) + 1);
|
|
64
|
-
const prevStrokeStyle = ctx.strokeStyle;
|
|
65
|
-
const prevLineWidth = ctx.lineWidth;
|
|
66
|
-
ctx.strokeStyle = 'rgba(0, 0, 0, 0.25)';
|
|
67
|
-
ctx.lineWidth = 0.5;
|
|
68
|
-
ctx.beginPath();
|
|
69
|
-
if (drawCurves) {
|
|
70
|
-
for (let step = 0; step < numMarkers; step++) {
|
|
71
|
-
const t = step / numMarkers;
|
|
72
|
-
const topX = x1 + (x2 - x1) * t;
|
|
73
|
-
const bottomX = x4 + (x3 - x4) * t;
|
|
74
|
-
ctx.moveTo(topX, y1);
|
|
75
|
-
ctx.bezierCurveTo(topX, mid, bottomX, mid, bottomX, y2);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
for (let step = 0; step < numMarkers; step++) {
|
|
80
|
-
const t = step / numMarkers;
|
|
81
|
-
const topX = x1 + (x2 - x1) * t;
|
|
82
|
-
const bottomX = x4 + (x3 - x4) * t;
|
|
83
|
-
ctx.moveTo(topX, y1);
|
|
84
|
-
ctx.lineTo(bottomX, y2);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
ctx.stroke();
|
|
88
|
-
ctx.strokeStyle = prevStrokeStyle;
|
|
89
|
-
ctx.lineWidth = prevLineWidth;
|
|
90
|
-
}
|
|
91
|
-
function drawBox(ctx, x1, x2, y1, x3, x4, y2) {
|
|
92
|
-
ctx.beginPath();
|
|
93
|
-
ctx.moveTo(x1, y1);
|
|
94
|
-
ctx.lineTo(x2, y1);
|
|
95
|
-
ctx.lineTo(x3, y2);
|
|
96
|
-
ctx.lineTo(x4, y2);
|
|
97
|
-
ctx.closePath();
|
|
98
|
-
}
|
|
99
|
-
function drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid) {
|
|
100
|
-
const len1 = Math.abs(x1 - x2);
|
|
101
|
-
const len2 = Math.abs(x1 - x2);
|
|
102
|
-
if (len1 < 5 && len2 < 5 && x2 < x1 && Math.abs(x1 - x3) > 100) {
|
|
103
|
-
const tmp = x1;
|
|
104
|
-
x1 = x2;
|
|
105
|
-
x2 = tmp;
|
|
106
|
-
}
|
|
107
|
-
ctx.beginPath();
|
|
108
|
-
ctx.moveTo(x1, y1);
|
|
109
|
-
ctx.lineTo(x2, y1);
|
|
110
|
-
ctx.bezierCurveTo(x2, mid, x3, mid, x3, y2);
|
|
111
|
-
ctx.lineTo(x4, y2);
|
|
112
|
-
ctx.bezierCurveTo(x4, mid, x1, mid, x1, y1);
|
|
113
|
-
ctx.closePath();
|
|
114
|
-
}
|
|
115
|
-
function onSynClick(event, model) {
|
|
116
|
-
const view = (0, util_1.getContainingView)(model);
|
|
117
|
-
const track = (0, util_1.getContainingTrack)(model);
|
|
118
|
-
const { featPositions, numFeats, clickMapCanvas: ref1, cigarClickMapCanvas: ref2, level, } = model;
|
|
119
|
-
if (!ref1 || !ref2) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
const rect = ref1.getBoundingClientRect();
|
|
123
|
-
const ctx1 = ref1.getContext('2d');
|
|
124
|
-
const ctx2 = ref2.getContext('2d');
|
|
125
|
-
if (!ctx1 || !ctx2) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
const x = event.clientX - rect.left;
|
|
129
|
-
const y = event.clientY - rect.top;
|
|
130
|
-
const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data;
|
|
131
|
-
const unitMultiplier = Math.floor(drawSynteny_1.MAX_COLOR_RANGE / numFeats);
|
|
132
|
-
const id = (0, drawSynteny_1.getId)(r1, g1, b1, unitMultiplier);
|
|
133
|
-
const feat = featPositions[id];
|
|
134
|
-
if (feat) {
|
|
135
|
-
const { f } = feat;
|
|
136
|
-
model.setClickId(f.id());
|
|
137
|
-
const session = (0, util_1.getSession)(model);
|
|
138
|
-
if ((0, util_1.isSessionModelWithWidgets)(session)) {
|
|
139
|
-
session.showWidget(session.addWidget('SyntenyFeatureWidget', 'syntenyFeature', {
|
|
140
|
-
view,
|
|
141
|
-
track,
|
|
142
|
-
featureData: f.toJSON(),
|
|
143
|
-
level,
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return feat;
|
|
148
|
-
}
|
|
149
|
-
function onSynContextClick(event, model, setAnchorEl) {
|
|
150
|
-
event.preventDefault();
|
|
151
|
-
const ref1 = model.clickMapCanvas;
|
|
152
|
-
const ref2 = model.cigarClickMapCanvas;
|
|
153
|
-
if (!ref1 || !ref2) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
const rect = ref1.getBoundingClientRect();
|
|
157
|
-
const ctx1 = ref1.getContext('2d');
|
|
158
|
-
const ctx2 = ref2.getContext('2d');
|
|
159
|
-
if (!ctx1 || !ctx2) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const { clientX, clientY } = event;
|
|
163
|
-
const x = clientX - rect.left;
|
|
164
|
-
const y = clientY - rect.top;
|
|
165
|
-
const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data;
|
|
166
|
-
const unitMultiplier = Math.floor(drawSynteny_1.MAX_COLOR_RANGE / model.numFeats);
|
|
167
|
-
const id = (0, drawSynteny_1.getId)(r1, g1, b1, unitMultiplier);
|
|
168
|
-
const f = model.featPositions[id];
|
|
169
|
-
if (f) {
|
|
170
|
-
model.setClickId(f.f.id());
|
|
171
|
-
setAnchorEl({
|
|
172
|
-
clientX,
|
|
173
|
-
clientY,
|
|
174
|
-
feature: f,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function getTooltip({ feature, cigarOp, cigarOpLen, }) {
|
|
179
|
-
const f1 = feature.toJSON();
|
|
180
|
-
const f2 = f1.mate;
|
|
181
|
-
const l1 = f1.end - f1.start;
|
|
182
|
-
const l2 = f2.end - f2.start;
|
|
183
|
-
const identity = f1.identity;
|
|
184
|
-
const n1 = f1.name;
|
|
185
|
-
const n2 = f2.name;
|
|
186
|
-
return [
|
|
187
|
-
`Loc1: ${(0, util_1.assembleLocString)(f1)}`,
|
|
188
|
-
`Loc2: ${(0, util_1.assembleLocString)(f2)}`,
|
|
189
|
-
`Inverted: ${f1.strand === -1}`,
|
|
190
|
-
`Query len: ${l1.toLocaleString('en-US')}`,
|
|
191
|
-
`Target len: ${l2.toLocaleString('en-US')}`,
|
|
192
|
-
identity ? `Identity: ${identity.toPrecision(2)}` : '',
|
|
193
|
-
cigarOp ? `CIGAR operator: ${(0, util_1.toLocale)(+cigarOpLen)}${cigarOp}` : '',
|
|
194
|
-
n1 ? `Name 1: ${n1}` : '',
|
|
195
|
-
n2 ? `Name 2: ${n2}` : '',
|
|
196
|
-
]
|
|
197
|
-
.filter(f => !!f)
|
|
198
|
-
.join('<br/>');
|
|
199
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
trackIds: {
|
|
4
|
-
type: string;
|
|
5
|
-
defaultValue: never[];
|
|
6
|
-
};
|
|
7
|
-
middle: {
|
|
8
|
-
type: string;
|
|
9
|
-
defaultValue: boolean;
|
|
10
|
-
};
|
|
11
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
12
|
-
export default configSchemaFactory;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
7
|
-
const configSchemaF_1 = __importDefault(require("../LinearComparativeDisplay/configSchemaF"));
|
|
8
|
-
function configSchemaFactory(pluginManager) {
|
|
9
|
-
return (0, configuration_1.ConfigurationSchema)('LinearSyntenyDisplay', {
|
|
10
|
-
trackIds: {
|
|
11
|
-
type: 'stringArray',
|
|
12
|
-
defaultValue: [],
|
|
13
|
-
},
|
|
14
|
-
middle: {
|
|
15
|
-
type: 'boolean',
|
|
16
|
-
defaultValue: true,
|
|
17
|
-
},
|
|
18
|
-
}, {
|
|
19
|
-
baseConfiguration: (0, configSchemaF_1.default)(pluginManager),
|
|
20
|
-
explicitlyTyped: true,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
exports.default = configSchemaFactory;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { LinearSyntenyDisplayModel } from './model';
|
|
2
|
-
export declare const MAX_COLOR_RANGE: number;
|
|
3
|
-
export declare function getId(r: number, g: number, b: number, unitMultiplier: number): number;
|
|
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;
|