@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,470 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_COLOR_RANGE = void 0;
|
|
4
|
-
exports.getId = getId;
|
|
5
|
-
exports.drawCigarClickMap = drawCigarClickMap;
|
|
6
|
-
exports.drawRef = drawRef;
|
|
7
|
-
exports.drawMouseoverClickMap = drawMouseoverClickMap;
|
|
8
|
-
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const colord_1 = require("@jbrowse/core/util/colord");
|
|
11
|
-
const util_2 = require("./components/util");
|
|
12
|
-
exports.MAX_COLOR_RANGE = 255 * 255 * 255;
|
|
13
|
-
function makeColor(idx) {
|
|
14
|
-
const r = Math.floor(idx / (255 * 255)) % 255;
|
|
15
|
-
const g = Math.floor(idx / 255) % 255;
|
|
16
|
-
const b = idx % 255;
|
|
17
|
-
return `rgb(${r},${g},${b})`;
|
|
18
|
-
}
|
|
19
|
-
function hashString(str) {
|
|
20
|
-
let hash = 0;
|
|
21
|
-
for (let i = 0; i < str.length; i++) {
|
|
22
|
-
const char = str.charCodeAt(i);
|
|
23
|
-
hash = (hash << 5) - hash + char;
|
|
24
|
-
hash = hash & hash;
|
|
25
|
-
}
|
|
26
|
-
return Math.abs(hash);
|
|
27
|
-
}
|
|
28
|
-
function getQueryColor(queryName) {
|
|
29
|
-
const hash = hashString(queryName);
|
|
30
|
-
return colors_1.category10[hash % colors_1.category10.length];
|
|
31
|
-
}
|
|
32
|
-
const defaultCigarColors = {
|
|
33
|
-
I: '#ff03',
|
|
34
|
-
N: '#0a03',
|
|
35
|
-
D: '#00f3',
|
|
36
|
-
X: 'brown',
|
|
37
|
-
M: '#f003',
|
|
38
|
-
'=': '#f003',
|
|
39
|
-
};
|
|
40
|
-
const strandCigarColors = {
|
|
41
|
-
I: '#ff03',
|
|
42
|
-
N: '#a020f0',
|
|
43
|
-
D: '#a020f0',
|
|
44
|
-
X: 'brown',
|
|
45
|
-
M: '#f003',
|
|
46
|
-
'=': '#f003',
|
|
47
|
-
};
|
|
48
|
-
const colorSchemes = {
|
|
49
|
-
default: {
|
|
50
|
-
cigarColors: defaultCigarColors,
|
|
51
|
-
},
|
|
52
|
-
strand: {
|
|
53
|
-
posColor: 'red',
|
|
54
|
-
negColor: 'blue',
|
|
55
|
-
cigarColors: strandCigarColors,
|
|
56
|
-
},
|
|
57
|
-
query: {
|
|
58
|
-
cigarColors: defaultCigarColors,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
function applyAlpha(color, alpha) {
|
|
62
|
-
if (alpha === 1) {
|
|
63
|
-
return color;
|
|
64
|
-
}
|
|
65
|
-
return (0, colord_1.colord)(color).alpha(alpha).toHex();
|
|
66
|
-
}
|
|
67
|
-
const lineLimit = 3;
|
|
68
|
-
const oobLimit = 1600;
|
|
69
|
-
function getId(r, g, b, unitMultiplier) {
|
|
70
|
-
return Math.floor((r * 255 * 255 + g * 255 + b - 1) / unitMultiplier);
|
|
71
|
-
}
|
|
72
|
-
function drawCigarClickMap(model, cigarClickMapCanvas) {
|
|
73
|
-
const view = (0, util_1.getContainingView)(model);
|
|
74
|
-
const drawCurves = view.drawCurves;
|
|
75
|
-
const drawCIGAR = view.drawCIGAR;
|
|
76
|
-
const drawCIGARMatchesOnly = view.drawCIGARMatchesOnly;
|
|
77
|
-
const { level, height, featPositions } = model;
|
|
78
|
-
const width = view.width;
|
|
79
|
-
const bpPerPxs = view.views.map(v => v.bpPerPx);
|
|
80
|
-
cigarClickMapCanvas.imageSmoothingEnabled = false;
|
|
81
|
-
cigarClickMapCanvas.clearRect(0, 0, width, height);
|
|
82
|
-
const offsets = view.views.map(v => v.offsetPx);
|
|
83
|
-
const bpPerPxInv0 = 1 / bpPerPxs[level];
|
|
84
|
-
const bpPerPxInv1 = 1 / bpPerPxs[level + 1];
|
|
85
|
-
for (const { p11, p12, p21, p22, f, cigar } of featPositions) {
|
|
86
|
-
const x11 = p11.offsetPx - offsets[level];
|
|
87
|
-
const x12 = p12.offsetPx - offsets[level];
|
|
88
|
-
const x21 = p21.offsetPx - offsets[level + 1];
|
|
89
|
-
const x22 = p22.offsetPx - offsets[level + 1];
|
|
90
|
-
const l1 = Math.abs(x12 - x11);
|
|
91
|
-
const l2 = Math.abs(x22 - x21);
|
|
92
|
-
const minX = Math.min(x21, x22);
|
|
93
|
-
const maxX = Math.max(x21, x22);
|
|
94
|
-
const y1 = 0;
|
|
95
|
-
const y2 = height;
|
|
96
|
-
const mid = (y2 - y1) / 2;
|
|
97
|
-
if (!(l1 <= lineLimit && l2 <= lineLimit) &&
|
|
98
|
-
(0, util_1.doesIntersect2)(minX, maxX, -oobLimit, view.width + oobLimit)) {
|
|
99
|
-
const s1 = f.get('strand');
|
|
100
|
-
const k1 = s1 === -1 ? x12 : x11;
|
|
101
|
-
const k2 = s1 === -1 ? x11 : x12;
|
|
102
|
-
const rev1 = k1 < k2 ? 1 : -1;
|
|
103
|
-
const rev2 = (x21 < x22 ? 1 : -1) * s1;
|
|
104
|
-
let cx1 = k1;
|
|
105
|
-
let cx2 = s1 === -1 ? x22 : x21;
|
|
106
|
-
if (cigar.length && drawCIGAR) {
|
|
107
|
-
let continuingFlag = false;
|
|
108
|
-
let px1 = 0;
|
|
109
|
-
let px2 = 0;
|
|
110
|
-
const unitMultiplier2 = Math.floor(exports.MAX_COLOR_RANGE / cigar.length);
|
|
111
|
-
for (let j = 0; j < cigar.length; j += 2) {
|
|
112
|
-
const len = +cigar[j];
|
|
113
|
-
const op = cigar[j + 1];
|
|
114
|
-
if (!continuingFlag) {
|
|
115
|
-
px1 = cx1;
|
|
116
|
-
px2 = cx2;
|
|
117
|
-
}
|
|
118
|
-
const d1 = len * bpPerPxInv0;
|
|
119
|
-
const d2 = len * bpPerPxInv1;
|
|
120
|
-
if (op === 'M' || op === '=' || op === 'X') {
|
|
121
|
-
cx1 += d1 * rev1;
|
|
122
|
-
cx2 += d2 * rev2;
|
|
123
|
-
}
|
|
124
|
-
else if (op === 'D' || op === 'N') {
|
|
125
|
-
cx1 += d1 * rev1;
|
|
126
|
-
}
|
|
127
|
-
else if (op === 'I') {
|
|
128
|
-
cx2 += d2 * rev2;
|
|
129
|
-
}
|
|
130
|
-
if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
|
|
131
|
-
Math.min(px1, px2, cx1, cx2) > width)) {
|
|
132
|
-
const isNotLast = j < cigar.length - 2;
|
|
133
|
-
if (Math.abs(cx1 - px1) <= 1 &&
|
|
134
|
-
Math.abs(cx2 - px2) <= 1 &&
|
|
135
|
-
isNotLast) {
|
|
136
|
-
continuingFlag = true;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
continuingFlag = false;
|
|
140
|
-
const shouldDraw = !drawCIGARMatchesOnly ||
|
|
141
|
-
((op === 'M' || op === '=' || op === 'X') &&
|
|
142
|
-
Math.abs(cx1 - px1) > 1 &&
|
|
143
|
-
Math.abs(cx2 - px2) > 1);
|
|
144
|
-
if (shouldDraw) {
|
|
145
|
-
const idx = j * unitMultiplier2 + 1;
|
|
146
|
-
cigarClickMapCanvas.fillStyle = makeColor(idx);
|
|
147
|
-
(0, util_2.draw)(cigarClickMapCanvas, px1, cx1, y1, cx2, px2, y2, mid, drawCurves);
|
|
148
|
-
cigarClickMapCanvas.fill();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function drawRef(model, mainCanvas) {
|
|
158
|
-
var _a;
|
|
159
|
-
const view = (0, util_1.getContainingView)(model);
|
|
160
|
-
const drawCurves = view.drawCurves;
|
|
161
|
-
const drawCIGAR = view.drawCIGAR;
|
|
162
|
-
const drawCIGARMatchesOnly = view.drawCIGARMatchesOnly;
|
|
163
|
-
const drawLocationMarkersEnabled = view.drawLocationMarkers;
|
|
164
|
-
const { level, height, featPositions, alpha, minAlignmentLength, colorBy } = model;
|
|
165
|
-
const width = view.width;
|
|
166
|
-
const bpPerPxs = view.views.map(v => v.bpPerPx);
|
|
167
|
-
const queryTotalLengths = new Map();
|
|
168
|
-
if (minAlignmentLength > 0) {
|
|
169
|
-
for (const { f } of featPositions) {
|
|
170
|
-
const queryName = f.get('name') || f.get('id') || f.id();
|
|
171
|
-
const alignmentLength = Math.abs(f.get('end') - f.get('start'));
|
|
172
|
-
const currentTotal = queryTotalLengths.get(queryName) || 0;
|
|
173
|
-
queryTotalLengths.set(queryName, currentTotal + alignmentLength);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
const schemeConfig = colorSchemes[colorBy] || colorSchemes.default;
|
|
177
|
-
const activeColorMap = schemeConfig.cigarColors;
|
|
178
|
-
const posColor = colorBy === 'strand' ? colorSchemes.strand.posColor : 'red';
|
|
179
|
-
const negColor = colorBy === 'strand' ? colorSchemes.strand.negColor : 'blue';
|
|
180
|
-
const colorMapWithAlpha = {
|
|
181
|
-
I: applyAlpha(activeColorMap.I, alpha),
|
|
182
|
-
N: applyAlpha(activeColorMap.N, alpha),
|
|
183
|
-
D: applyAlpha(activeColorMap.D, alpha),
|
|
184
|
-
X: applyAlpha(activeColorMap.X, alpha),
|
|
185
|
-
M: applyAlpha(activeColorMap.M, alpha),
|
|
186
|
-
'=': applyAlpha(activeColorMap['='], alpha),
|
|
187
|
-
};
|
|
188
|
-
const posColorWithAlpha = applyAlpha(posColor, alpha);
|
|
189
|
-
const negColorWithAlpha = applyAlpha(negColor, alpha);
|
|
190
|
-
const queryColorCache = new Map();
|
|
191
|
-
const getQueryColorWithAlpha = (queryName) => {
|
|
192
|
-
if (!queryColorCache.has(queryName)) {
|
|
193
|
-
const color = getQueryColor(queryName);
|
|
194
|
-
queryColorCache.set(queryName, applyAlpha(color, alpha));
|
|
195
|
-
}
|
|
196
|
-
return queryColorCache.get(queryName);
|
|
197
|
-
};
|
|
198
|
-
mainCanvas.beginPath();
|
|
199
|
-
const offsets = view.views.map(v => v.offsetPx);
|
|
200
|
-
const offsetsL0 = offsets[level];
|
|
201
|
-
const offsetsL1 = offsets[level + 1];
|
|
202
|
-
const unitMultiplier = Math.floor(exports.MAX_COLOR_RANGE / featPositions.length);
|
|
203
|
-
const y1 = 0;
|
|
204
|
-
const y2 = height;
|
|
205
|
-
const mid = (y2 - y1) / 2;
|
|
206
|
-
const useStrandColorThin = colorBy === 'strand';
|
|
207
|
-
const useQueryColorThin = colorBy === 'query';
|
|
208
|
-
mainCanvas.fillStyle = colorMapWithAlpha.M;
|
|
209
|
-
mainCanvas.strokeStyle = colorMapWithAlpha.M;
|
|
210
|
-
const thinLinesByColor = new Map();
|
|
211
|
-
for (const { p11, p12, p21, p22, f } of featPositions) {
|
|
212
|
-
if (minAlignmentLength > 0) {
|
|
213
|
-
const queryName = f.get('name') || f.get('id') || f.id();
|
|
214
|
-
const totalLength = queryTotalLengths.get(queryName) || 0;
|
|
215
|
-
if (totalLength < minAlignmentLength) {
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
const x11 = p11.offsetPx - offsetsL0;
|
|
220
|
-
const x12 = p12.offsetPx - offsetsL0;
|
|
221
|
-
const x21 = p21.offsetPx - offsetsL1;
|
|
222
|
-
const x22 = p22.offsetPx - offsetsL1;
|
|
223
|
-
const l1 = Math.abs(x12 - x11);
|
|
224
|
-
const l2 = Math.abs(x22 - x21);
|
|
225
|
-
if (l1 <= lineLimit &&
|
|
226
|
-
l2 <= lineLimit &&
|
|
227
|
-
x21 < width + oobLimit &&
|
|
228
|
-
x21 > -oobLimit) {
|
|
229
|
-
let colorKey = 'default';
|
|
230
|
-
if (useStrandColorThin) {
|
|
231
|
-
const strand = f.get('strand');
|
|
232
|
-
colorKey = strand === -1 ? 'neg' : 'pos';
|
|
233
|
-
}
|
|
234
|
-
else if (useQueryColorThin) {
|
|
235
|
-
colorKey = f.get('refName');
|
|
236
|
-
}
|
|
237
|
-
if (!thinLinesByColor.has(colorKey)) {
|
|
238
|
-
thinLinesByColor.set(colorKey, []);
|
|
239
|
-
}
|
|
240
|
-
thinLinesByColor.get(colorKey).push({ x11, x21, y1, y2, mid });
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
for (const [colorKey, lines] of thinLinesByColor) {
|
|
244
|
-
if (colorKey === 'pos') {
|
|
245
|
-
mainCanvas.strokeStyle = posColorWithAlpha;
|
|
246
|
-
}
|
|
247
|
-
else if (colorKey === 'neg') {
|
|
248
|
-
mainCanvas.strokeStyle = negColorWithAlpha;
|
|
249
|
-
}
|
|
250
|
-
else if (colorKey !== 'default') {
|
|
251
|
-
mainCanvas.strokeStyle = getQueryColorWithAlpha(colorKey);
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
mainCanvas.strokeStyle = colorMapWithAlpha.M;
|
|
255
|
-
}
|
|
256
|
-
mainCanvas.beginPath();
|
|
257
|
-
if (drawCurves) {
|
|
258
|
-
for (const { x11, x21, y1, y2, mid } of lines) {
|
|
259
|
-
mainCanvas.moveTo(x11, y1);
|
|
260
|
-
mainCanvas.bezierCurveTo(x11, mid, x21, mid, x21, y2);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
for (const { x11, x21, y1, y2 } of lines) {
|
|
265
|
-
mainCanvas.moveTo(x11, y1);
|
|
266
|
-
mainCanvas.lineTo(x21, y2);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
mainCanvas.stroke();
|
|
270
|
-
}
|
|
271
|
-
const bpPerPx0 = bpPerPxs[level];
|
|
272
|
-
const bpPerPx1 = bpPerPxs[level + 1];
|
|
273
|
-
const bpPerPxInv0 = 1 / bpPerPx0;
|
|
274
|
-
const bpPerPxInv1 = 1 / bpPerPx1;
|
|
275
|
-
const useStrandColor = colorBy === 'strand';
|
|
276
|
-
const useQueryColor = colorBy === 'query';
|
|
277
|
-
mainCanvas.fillStyle = colorMapWithAlpha.M;
|
|
278
|
-
mainCanvas.strokeStyle = colorMapWithAlpha.M;
|
|
279
|
-
for (const { p11, p12, p21, p22, f, cigar } of featPositions) {
|
|
280
|
-
const strand = f.get('strand');
|
|
281
|
-
const refName = f.get('refName');
|
|
282
|
-
if (minAlignmentLength > 0) {
|
|
283
|
-
const queryName = f.get('name') || f.get('id') || f.id();
|
|
284
|
-
const totalLength = queryTotalLengths.get(queryName) || 0;
|
|
285
|
-
if (totalLength < minAlignmentLength) {
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
const x11 = p11.offsetPx - offsetsL0;
|
|
290
|
-
const x12 = p12.offsetPx - offsetsL0;
|
|
291
|
-
const x21 = p21.offsetPx - offsetsL1;
|
|
292
|
-
const x22 = p22.offsetPx - offsetsL1;
|
|
293
|
-
const l1 = Math.abs(x12 - x11);
|
|
294
|
-
const l2 = Math.abs(x22 - x21);
|
|
295
|
-
const minX = Math.min(x21, x22);
|
|
296
|
-
const maxX = Math.max(x21, x22);
|
|
297
|
-
if (!(l1 <= lineLimit && l2 <= lineLimit) &&
|
|
298
|
-
(0, util_1.doesIntersect2)(minX, maxX, -oobLimit, view.width + oobLimit)) {
|
|
299
|
-
const s1 = strand;
|
|
300
|
-
const k1 = s1 === -1 ? x12 : x11;
|
|
301
|
-
const k2 = s1 === -1 ? x11 : x12;
|
|
302
|
-
const rev1 = k1 < k2 ? 1 : -1;
|
|
303
|
-
const rev2 = (x21 < x22 ? 1 : -1) * s1;
|
|
304
|
-
let cx1 = k1;
|
|
305
|
-
let cx2 = s1 === -1 ? x22 : x21;
|
|
306
|
-
if (cigar.length && drawCIGAR) {
|
|
307
|
-
let continuingFlag = false;
|
|
308
|
-
let px1 = 0;
|
|
309
|
-
let px2 = 0;
|
|
310
|
-
for (let j = 0; j < cigar.length; j += 2) {
|
|
311
|
-
const len = +cigar[j];
|
|
312
|
-
const op = cigar[j + 1];
|
|
313
|
-
if (!continuingFlag) {
|
|
314
|
-
px1 = cx1;
|
|
315
|
-
px2 = cx2;
|
|
316
|
-
}
|
|
317
|
-
const d1 = len * bpPerPxInv0;
|
|
318
|
-
const d2 = len * bpPerPxInv1;
|
|
319
|
-
if (op === 'M' || op === '=' || op === 'X') {
|
|
320
|
-
cx1 += d1 * rev1;
|
|
321
|
-
cx2 += d2 * rev2;
|
|
322
|
-
}
|
|
323
|
-
else if (op === 'D' || op === 'N') {
|
|
324
|
-
cx1 += d1 * rev1;
|
|
325
|
-
}
|
|
326
|
-
else if (op === 'I') {
|
|
327
|
-
cx2 += d2 * rev2;
|
|
328
|
-
}
|
|
329
|
-
if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
|
|
330
|
-
Math.min(px1, px2, cx1, cx2) > width)) {
|
|
331
|
-
const isNotLast = j < cigar.length - 2;
|
|
332
|
-
if (Math.abs(cx1 - px1) <= 1 &&
|
|
333
|
-
Math.abs(cx2 - px2) <= 1 &&
|
|
334
|
-
isNotLast) {
|
|
335
|
-
continuingFlag = true;
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
const letter = (continuingFlag && d1 > 1) || d2 > 1 ? op : 'M';
|
|
339
|
-
const isInsertionOrDeletion = letter === 'I' || letter === 'D' || letter === 'N';
|
|
340
|
-
if (useStrandColor && !isInsertionOrDeletion) {
|
|
341
|
-
mainCanvas.fillStyle =
|
|
342
|
-
strand === -1 ? negColorWithAlpha : posColorWithAlpha;
|
|
343
|
-
}
|
|
344
|
-
else if (useQueryColor && !isInsertionOrDeletion) {
|
|
345
|
-
mainCanvas.fillStyle = getQueryColorWithAlpha(refName);
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
mainCanvas.fillStyle = colorMapWithAlpha[letter];
|
|
349
|
-
}
|
|
350
|
-
continuingFlag = false;
|
|
351
|
-
if (drawCIGARMatchesOnly) {
|
|
352
|
-
if (letter === 'M') {
|
|
353
|
-
(0, util_2.draw)(mainCanvas, px1, cx1, y1, cx2, px2, y2, mid, drawCurves);
|
|
354
|
-
mainCanvas.fill();
|
|
355
|
-
if (drawLocationMarkersEnabled) {
|
|
356
|
-
(0, util_2.drawLocationMarkers)(mainCanvas, px1, cx1, y1, cx2, px2, y2, mid, bpPerPx0, bpPerPx1, drawCurves);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
(0, util_2.draw)(mainCanvas, px1, cx1, y1, cx2, px2, y2, mid, drawCurves);
|
|
362
|
-
mainCanvas.fill();
|
|
363
|
-
if (drawLocationMarkersEnabled) {
|
|
364
|
-
(0, util_2.drawLocationMarkers)(mainCanvas, px1, cx1, y1, cx2, px2, y2, mid, bpPerPx0, bpPerPx1, drawCurves);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
if (useStrandColor) {
|
|
373
|
-
mainCanvas.fillStyle =
|
|
374
|
-
strand === -1 ? negColorWithAlpha : posColorWithAlpha;
|
|
375
|
-
}
|
|
376
|
-
else if (useQueryColor) {
|
|
377
|
-
mainCanvas.fillStyle = getQueryColorWithAlpha(refName);
|
|
378
|
-
}
|
|
379
|
-
(0, util_2.draw)(mainCanvas, x11, x12, y1, x22, x21, y2, mid, drawCurves);
|
|
380
|
-
mainCanvas.fill();
|
|
381
|
-
if (useStrandColor || useQueryColor) {
|
|
382
|
-
mainCanvas.fillStyle = colorMapWithAlpha.M;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
const ctx2 = (_a = model.clickMapCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
388
|
-
if (!ctx2) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
ctx2.imageSmoothingEnabled = false;
|
|
392
|
-
ctx2.clearRect(0, 0, width, height);
|
|
393
|
-
for (let i = 0; i < featPositions.length; i++) {
|
|
394
|
-
const feature = featPositions[i];
|
|
395
|
-
if (minAlignmentLength > 0) {
|
|
396
|
-
const queryName = feature.f.get('name') || feature.f.get('id') || feature.f.id();
|
|
397
|
-
const totalLength = queryTotalLengths.get(queryName) || 0;
|
|
398
|
-
if (totalLength < minAlignmentLength) {
|
|
399
|
-
continue;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
const idx = i * unitMultiplier + 1;
|
|
403
|
-
ctx2.fillStyle = makeColor(idx);
|
|
404
|
-
(0, util_2.drawMatchSimple)({
|
|
405
|
-
cb: ctx => {
|
|
406
|
-
ctx.fill();
|
|
407
|
-
},
|
|
408
|
-
feature,
|
|
409
|
-
ctx: ctx2,
|
|
410
|
-
drawCurves,
|
|
411
|
-
level,
|
|
412
|
-
offsets,
|
|
413
|
-
oobLimit,
|
|
414
|
-
viewWidth: view.width,
|
|
415
|
-
hideTiny: true,
|
|
416
|
-
height,
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
function drawMouseoverClickMap(model) {
|
|
421
|
-
var _a;
|
|
422
|
-
const { level, clickId, mouseoverId } = model;
|
|
423
|
-
const highResolutionScaling = 1;
|
|
424
|
-
const view = (0, util_1.getContainingView)(model);
|
|
425
|
-
const drawCurves = view.drawCurves;
|
|
426
|
-
const height = model.height;
|
|
427
|
-
const width = view.width;
|
|
428
|
-
const ctx = (_a = model.mouseoverCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
429
|
-
const offsets = view.views.map(v => v.offsetPx);
|
|
430
|
-
if (!ctx) {
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
ctx.resetTransform();
|
|
434
|
-
ctx.scale(highResolutionScaling, highResolutionScaling);
|
|
435
|
-
ctx.clearRect(0, 0, width, height);
|
|
436
|
-
ctx.strokeStyle = 'rgba(0, 0, 0, 0.9)';
|
|
437
|
-
ctx.fillStyle = 'rgba(0, 0, 0, 0.1)';
|
|
438
|
-
const feature1 = model.featMap[mouseoverId || ''];
|
|
439
|
-
if (feature1) {
|
|
440
|
-
(0, util_2.drawMatchSimple)({
|
|
441
|
-
cb: ctx => {
|
|
442
|
-
ctx.fill();
|
|
443
|
-
},
|
|
444
|
-
feature: feature1,
|
|
445
|
-
level,
|
|
446
|
-
ctx,
|
|
447
|
-
oobLimit,
|
|
448
|
-
viewWidth: view.width,
|
|
449
|
-
drawCurves,
|
|
450
|
-
offsets,
|
|
451
|
-
height,
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
const feature2 = model.featMap[clickId || ''];
|
|
455
|
-
if (feature2) {
|
|
456
|
-
(0, util_2.drawMatchSimple)({
|
|
457
|
-
cb: ctx => {
|
|
458
|
-
ctx.stroke();
|
|
459
|
-
},
|
|
460
|
-
feature: feature2,
|
|
461
|
-
ctx,
|
|
462
|
-
level,
|
|
463
|
-
oobLimit,
|
|
464
|
-
viewWidth: view.width,
|
|
465
|
-
drawCurves,
|
|
466
|
-
offsets,
|
|
467
|
-
height,
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.default = LinearSyntenyDisplayF;
|
|
40
|
-
const react_1 = require("react");
|
|
41
|
-
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
42
|
-
const configSchemaF_1 = __importDefault(require("./configSchemaF"));
|
|
43
|
-
const model_1 = __importDefault(require("./model"));
|
|
44
|
-
function LinearSyntenyDisplayF(pluginManager) {
|
|
45
|
-
pluginManager.addDisplayType(() => {
|
|
46
|
-
const configSchema = (0, configSchemaF_1.default)(pluginManager);
|
|
47
|
-
return new DisplayType_1.default({
|
|
48
|
-
name: 'LinearSyntenyDisplay',
|
|
49
|
-
configSchema,
|
|
50
|
-
stateModel: (0, model_1.default)(configSchema),
|
|
51
|
-
trackType: 'SyntenyTrack',
|
|
52
|
-
viewType: 'LinearSyntenyViewHelper',
|
|
53
|
-
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/Component')))),
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}
|