@jbrowse/plugin-linear-comparative-view 3.7.0 → 4.0.1
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,238 +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
|
-
const react_1 = require("react");
|
|
40
|
-
const BaseViewModel_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/models/BaseViewModel"));
|
|
41
|
-
const util_1 = require("@jbrowse/core/util");
|
|
42
|
-
const mst_1 = require("@jbrowse/core/util/types/mst");
|
|
43
|
-
const FolderOpen_1 = __importDefault(require("@mui/icons-material/FolderOpen"));
|
|
44
|
-
const mobx_1 = require("mobx");
|
|
45
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
46
|
-
const ReturnToImportFormDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@jbrowse/core/ui/ReturnToImportFormDialog'))));
|
|
47
|
-
function stateModelFactory(pluginManager) {
|
|
48
|
-
var _a;
|
|
49
|
-
const LinearSyntenyViewHelper = (_a = pluginManager.getViewType('LinearSyntenyViewHelper')) === null || _a === void 0 ? void 0 : _a.stateModel;
|
|
50
|
-
return mobx_state_tree_1.types
|
|
51
|
-
.compose('LinearComparativeView', BaseViewModel_1.default, mobx_state_tree_1.types.model({
|
|
52
|
-
id: mst_1.ElementId,
|
|
53
|
-
type: mobx_state_tree_1.types.literal('LinearComparativeView'),
|
|
54
|
-
trackSelectorType: 'hierarchical',
|
|
55
|
-
showIntraviewLinks: true,
|
|
56
|
-
linkViews: false,
|
|
57
|
-
interactiveOverlay: false,
|
|
58
|
-
showDynamicControls: true,
|
|
59
|
-
levels: mobx_state_tree_1.types.array(LinearSyntenyViewHelper),
|
|
60
|
-
views: mobx_state_tree_1.types.array(pluginManager.getViewType('LinearGenomeView')
|
|
61
|
-
.stateModel),
|
|
62
|
-
viewTrackConfigs: mobx_state_tree_1.types.array(pluginManager.pluggableConfigSchemaType('track')),
|
|
63
|
-
}))
|
|
64
|
-
.volatile(() => ({
|
|
65
|
-
width: undefined,
|
|
66
|
-
}))
|
|
67
|
-
.views(self => ({
|
|
68
|
-
get initialized() {
|
|
69
|
-
return (self.width !== undefined &&
|
|
70
|
-
self.views.length > 0 &&
|
|
71
|
-
self.views.every(view => view.initialized));
|
|
72
|
-
},
|
|
73
|
-
get refNames() {
|
|
74
|
-
return self.views.map(v => [
|
|
75
|
-
...new Set(v.staticBlocks.map(m => m.refName)),
|
|
76
|
-
]);
|
|
77
|
-
},
|
|
78
|
-
get assemblyNames() {
|
|
79
|
-
return [...new Set(self.views.flatMap(v => v.assemblyNames))];
|
|
80
|
-
},
|
|
81
|
-
}))
|
|
82
|
-
.actions(self => ({
|
|
83
|
-
afterAttach() {
|
|
84
|
-
const actions = new Set([
|
|
85
|
-
'horizontalScroll',
|
|
86
|
-
'zoomTo',
|
|
87
|
-
'setScaleFactor',
|
|
88
|
-
]);
|
|
89
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_state_tree_1.onAction)(self, param => {
|
|
90
|
-
if (self.linkViews) {
|
|
91
|
-
const { name, path, args } = param;
|
|
92
|
-
if (actions.has(name) && path) {
|
|
93
|
-
this.onSubviewAction(name, path, args);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}));
|
|
97
|
-
},
|
|
98
|
-
beforeDestroy() {
|
|
99
|
-
var _a;
|
|
100
|
-
const session = (0, util_1.getSession)(self);
|
|
101
|
-
for (const name of self.assemblyNames) {
|
|
102
|
-
(_a = session.removeTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, name);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
onSubviewAction(actionName, path, args) {
|
|
106
|
-
for (const view of self.views) {
|
|
107
|
-
const ret = (0, mobx_state_tree_1.getPath)(view);
|
|
108
|
-
if (!ret.endsWith(path)) {
|
|
109
|
-
view[actionName](args === null || args === void 0 ? void 0 : args[0]);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
setWidth(newWidth) {
|
|
114
|
-
self.width = newWidth;
|
|
115
|
-
},
|
|
116
|
-
setViews(views) {
|
|
117
|
-
self.views = (0, mobx_state_tree_1.cast)(views);
|
|
118
|
-
const levels = [];
|
|
119
|
-
for (let i = 0; i < views.length - 1; i++) {
|
|
120
|
-
levels.push({ level: i });
|
|
121
|
-
}
|
|
122
|
-
self.levels = (0, mobx_state_tree_1.cast)(levels);
|
|
123
|
-
},
|
|
124
|
-
removeView(view) {
|
|
125
|
-
self.views.remove(view);
|
|
126
|
-
},
|
|
127
|
-
setLevelHeight(newHeight, level = 0) {
|
|
128
|
-
const l = self.levels[level];
|
|
129
|
-
l.setHeight(newHeight);
|
|
130
|
-
return l.height;
|
|
131
|
-
},
|
|
132
|
-
setLinkViews(arg) {
|
|
133
|
-
self.linkViews = arg;
|
|
134
|
-
},
|
|
135
|
-
setShowDynamicControls(arg) {
|
|
136
|
-
self.showDynamicControls = arg;
|
|
137
|
-
},
|
|
138
|
-
activateTrackSelector(level) {
|
|
139
|
-
if (self.trackSelectorType === 'hierarchical') {
|
|
140
|
-
const session = (0, util_1.getSession)(self);
|
|
141
|
-
if ((0, util_1.isSessionModelWithWidgets)(session)) {
|
|
142
|
-
const selector = session.addWidget('HierarchicalTrackSelectorWidget', 'hierarchicalTrackSelector', {
|
|
143
|
-
view: self.levels[level],
|
|
144
|
-
});
|
|
145
|
-
session.showWidget(selector);
|
|
146
|
-
return selector;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
throw new Error(`invalid track selector type ${self.trackSelectorType}`);
|
|
150
|
-
},
|
|
151
|
-
toggleTrack(trackId, level = 0) {
|
|
152
|
-
var _a;
|
|
153
|
-
(_a = self.levels[level]) === null || _a === void 0 ? void 0 : _a.toggleTrack(trackId);
|
|
154
|
-
},
|
|
155
|
-
showTrack(trackId, level = 0, initialSnapshot = {}) {
|
|
156
|
-
if (!self.levels[level]) {
|
|
157
|
-
self.levels[level] = (0, mobx_state_tree_1.cast)({ level });
|
|
158
|
-
}
|
|
159
|
-
self.levels[level].showTrack(trackId, initialSnapshot);
|
|
160
|
-
},
|
|
161
|
-
hideTrack(trackId, level = 0) {
|
|
162
|
-
var _a;
|
|
163
|
-
(_a = self.levels[level]) === null || _a === void 0 ? void 0 : _a.hideTrack(trackId);
|
|
164
|
-
},
|
|
165
|
-
squareView() {
|
|
166
|
-
const average = (0, util_1.avg)(self.views.map(v => v.bpPerPx));
|
|
167
|
-
for (const view of self.views) {
|
|
168
|
-
const center = view.pxToBp(view.width / 2);
|
|
169
|
-
view.setNewView(average, view.offsetPx);
|
|
170
|
-
if (center.refName) {
|
|
171
|
-
view.centerAt(center.coord, center.refName, center.index);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
clearView() {
|
|
176
|
-
self.views = (0, mobx_state_tree_1.cast)([]);
|
|
177
|
-
self.levels = (0, mobx_state_tree_1.cast)([]);
|
|
178
|
-
},
|
|
179
|
-
}))
|
|
180
|
-
.views(() => ({
|
|
181
|
-
headerMenuItems() {
|
|
182
|
-
return [];
|
|
183
|
-
},
|
|
184
|
-
}))
|
|
185
|
-
.views(self => ({
|
|
186
|
-
menuItems() {
|
|
187
|
-
return [
|
|
188
|
-
{
|
|
189
|
-
label: 'Return to import form',
|
|
190
|
-
onClick: () => {
|
|
191
|
-
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
192
|
-
ReturnToImportFormDialog,
|
|
193
|
-
{
|
|
194
|
-
model: self,
|
|
195
|
-
handleClose,
|
|
196
|
-
},
|
|
197
|
-
]);
|
|
198
|
-
},
|
|
199
|
-
icon: FolderOpen_1.default,
|
|
200
|
-
},
|
|
201
|
-
];
|
|
202
|
-
},
|
|
203
|
-
rubberBandMenuItems() {
|
|
204
|
-
return [
|
|
205
|
-
{
|
|
206
|
-
label: 'Zoom to region(s)',
|
|
207
|
-
onClick: () => {
|
|
208
|
-
for (const view of self.views) {
|
|
209
|
-
const { leftOffset, rightOffset } = view;
|
|
210
|
-
if (leftOffset && rightOffset) {
|
|
211
|
-
view.moveTo(leftOffset, rightOffset);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
];
|
|
217
|
-
},
|
|
218
|
-
}))
|
|
219
|
-
.actions(self => ({
|
|
220
|
-
afterAttach() {
|
|
221
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
222
|
-
if (self.width) {
|
|
223
|
-
for (const view of self.views) {
|
|
224
|
-
view.setWidth(self.width);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}));
|
|
228
|
-
},
|
|
229
|
-
}))
|
|
230
|
-
.preProcessSnapshot(snap => {
|
|
231
|
-
const { tracks, levels = [{ tracks, level: 0 }], ...rest } = snap || {};
|
|
232
|
-
return {
|
|
233
|
-
...rest,
|
|
234
|
-
levels,
|
|
235
|
-
};
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
exports.default = stateModelFactory;
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = ReadVsRefDialog;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
7
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
10
|
-
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
11
|
-
const material_1 = require("@mui/material");
|
|
12
|
-
const mui_1 = require("tss-react/mui");
|
|
13
|
-
const { featurizeSA, getClip, getLength, getLengthSansClipping, getTag } = plugin_alignments_1.MismatchParser;
|
|
14
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
-
root: {
|
|
16
|
-
width: 300,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
function ReadVsRefDialog({ track, feature: preFeature, handleClose, }) {
|
|
20
|
-
const { classes } = useStyles();
|
|
21
|
-
const [windowSizeText, setWindowSize] = (0, react_1.useState)('0');
|
|
22
|
-
const [error, setError] = (0, react_1.useState)();
|
|
23
|
-
const [primaryFeature, setPrimaryFeature] = (0, react_1.useState)();
|
|
24
|
-
const windowSize = +windowSizeText;
|
|
25
|
-
(0, react_1.useEffect)(() => {
|
|
26
|
-
;
|
|
27
|
-
(async () => {
|
|
28
|
-
setError(undefined);
|
|
29
|
-
try {
|
|
30
|
-
if (preFeature.get('flags') & 2048) {
|
|
31
|
-
const SA = getTag(preFeature, 'SA') || '';
|
|
32
|
-
const primaryAln = SA.split(';')[0];
|
|
33
|
-
const [saRef, saStart] = primaryAln.split(',');
|
|
34
|
-
const { rpcManager } = (0, util_1.getSession)(track);
|
|
35
|
-
const adapterConfig = (0, configuration_1.getConf)(track, 'adapter');
|
|
36
|
-
const sessionId = (0, tracks_1.getRpcSessionId)(track);
|
|
37
|
-
const feats = (await rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
38
|
-
adapterConfig,
|
|
39
|
-
sessionId,
|
|
40
|
-
regions: [
|
|
41
|
-
{
|
|
42
|
-
refName: saRef,
|
|
43
|
-
start: +saStart - 1,
|
|
44
|
-
end: +saStart,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
}));
|
|
48
|
-
const result = feats.find(f => f.get('name') === preFeature.get('name') &&
|
|
49
|
-
!(f.get('flags') & 2048) &&
|
|
50
|
-
!(f.get('flags') & 256));
|
|
51
|
-
if (result) {
|
|
52
|
-
setPrimaryFeature(result);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
throw new Error('primary feature not found');
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
setPrimaryFeature(preFeature);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (e) {
|
|
63
|
-
console.error(e);
|
|
64
|
-
setError(e);
|
|
65
|
-
}
|
|
66
|
-
})();
|
|
67
|
-
}, [preFeature, track]);
|
|
68
|
-
function onSubmit() {
|
|
69
|
-
var _a;
|
|
70
|
-
try {
|
|
71
|
-
if (!primaryFeature) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const feature = primaryFeature;
|
|
75
|
-
const session = (0, util_1.getSession)(track);
|
|
76
|
-
const view = (0, util_1.getContainingView)(track);
|
|
77
|
-
const cigar = feature.get('CIGAR');
|
|
78
|
-
const flags = feature.get('flags');
|
|
79
|
-
const origStrand = feature.get('strand');
|
|
80
|
-
const SA = getTag(feature, 'SA') || '';
|
|
81
|
-
const readName = feature.get('name');
|
|
82
|
-
const clipPos = getClip(cigar, 1);
|
|
83
|
-
const readAssembly = `${readName}_assembly_${Date.now()}`;
|
|
84
|
-
const [trackAssembly] = (0, configuration_1.getConf)(track, 'assemblyNames');
|
|
85
|
-
const assemblyNames = [trackAssembly, readAssembly];
|
|
86
|
-
const trackId = `track-${Date.now()}`;
|
|
87
|
-
const trackName = `${readName}_vs_${trackAssembly}`;
|
|
88
|
-
const { assemblyManager } = session;
|
|
89
|
-
const assembly = assemblyManager.get(trackAssembly);
|
|
90
|
-
if (!assembly) {
|
|
91
|
-
throw new Error('assembly not found');
|
|
92
|
-
}
|
|
93
|
-
const suppAlns = featurizeSA(SA, feature.id(), origStrand, readName, true);
|
|
94
|
-
const feat = feature.toJSON();
|
|
95
|
-
feat.clipPos = clipPos;
|
|
96
|
-
feat.strand = 1;
|
|
97
|
-
feat.mate = {
|
|
98
|
-
refName: readName,
|
|
99
|
-
start: clipPos,
|
|
100
|
-
end: clipPos + getLengthSansClipping(cigar),
|
|
101
|
-
};
|
|
102
|
-
const totalLength = flags & 2048 ? getLength(suppAlns[0].CIGAR) : getLength(cigar);
|
|
103
|
-
const features = [feat, ...suppAlns];
|
|
104
|
-
for (const [idx, f] of features.entries()) {
|
|
105
|
-
f.refName = assembly.getCanonicalRefName(f.refName) || f.refName;
|
|
106
|
-
f.syntenyId = idx;
|
|
107
|
-
f.mate.syntenyId = idx;
|
|
108
|
-
f.mate.uniqueId = `${f.uniqueId}_mate`;
|
|
109
|
-
}
|
|
110
|
-
features.sort((a, b) => a.clipPos - b.clipPos);
|
|
111
|
-
const featSeq = feature.get('seq');
|
|
112
|
-
const configFeatureStore = [...features, ...features.map(f => f.mate)];
|
|
113
|
-
const expand = 2 * windowSize;
|
|
114
|
-
const refLen = features.reduce((a, f) => a + f.end - f.start + expand, 0);
|
|
115
|
-
const seqTrackId = `${readName}_${Date.now()}`;
|
|
116
|
-
const sequenceTrackConf = (0, configuration_1.getConf)(assembly, 'sequence');
|
|
117
|
-
const lgvRegions = (0, util_1.gatherOverlaps)(features.map(f => ({
|
|
118
|
-
...f,
|
|
119
|
-
start: Math.max(0, f.start - windowSize),
|
|
120
|
-
end: f.end + windowSize,
|
|
121
|
-
assemblyName: trackAssembly,
|
|
122
|
-
})));
|
|
123
|
-
(_a = session.addTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, {
|
|
124
|
-
name: readAssembly,
|
|
125
|
-
sequence: {
|
|
126
|
-
type: 'ReferenceSequenceTrack',
|
|
127
|
-
name: 'Read sequence',
|
|
128
|
-
trackId: seqTrackId,
|
|
129
|
-
assemblyNames: [readAssembly],
|
|
130
|
-
adapter: {
|
|
131
|
-
type: 'FromConfigSequenceAdapter',
|
|
132
|
-
noAssemblyManager: true,
|
|
133
|
-
features: [
|
|
134
|
-
{
|
|
135
|
-
start: 0,
|
|
136
|
-
end: totalLength,
|
|
137
|
-
seq: featSeq || '',
|
|
138
|
-
refName: readName,
|
|
139
|
-
uniqueId: `${Math.random()}`,
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
session.addView('LinearSyntenyView', {
|
|
146
|
-
type: 'LinearSyntenyView',
|
|
147
|
-
views: [
|
|
148
|
-
{
|
|
149
|
-
type: 'LinearGenomeView',
|
|
150
|
-
hideHeader: true,
|
|
151
|
-
offsetPx: 0,
|
|
152
|
-
bpPerPx: refLen / view.width,
|
|
153
|
-
displayedRegions: lgvRegions,
|
|
154
|
-
tracks: [
|
|
155
|
-
{
|
|
156
|
-
id: `${Math.random()}`,
|
|
157
|
-
type: 'ReferenceSequenceTrack',
|
|
158
|
-
assemblyNames: [trackAssembly],
|
|
159
|
-
configuration: sequenceTrackConf.trackId,
|
|
160
|
-
displays: [
|
|
161
|
-
{
|
|
162
|
-
id: `${Math.random()}`,
|
|
163
|
-
type: 'LinearReferenceSequenceDisplay',
|
|
164
|
-
showReverse: true,
|
|
165
|
-
showTranslation: false,
|
|
166
|
-
height: 35,
|
|
167
|
-
configuration: `${seqTrackId}-LinearReferenceSequenceDisplay`,
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
type: 'LinearGenomeView',
|
|
175
|
-
hideHeader: true,
|
|
176
|
-
offsetPx: 0,
|
|
177
|
-
bpPerPx: totalLength / view.width,
|
|
178
|
-
displayedRegions: [
|
|
179
|
-
{
|
|
180
|
-
assemblyName: readAssembly,
|
|
181
|
-
start: 0,
|
|
182
|
-
end: totalLength,
|
|
183
|
-
refName: readName,
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
tracks: [
|
|
187
|
-
{
|
|
188
|
-
id: `${Math.random()}`,
|
|
189
|
-
type: 'ReferenceSequenceTrack',
|
|
190
|
-
configuration: seqTrackId,
|
|
191
|
-
displays: [
|
|
192
|
-
{
|
|
193
|
-
id: `${Math.random()}`,
|
|
194
|
-
type: 'LinearReferenceSequenceDisplay',
|
|
195
|
-
showReverse: true,
|
|
196
|
-
showTranslation: false,
|
|
197
|
-
height: 35,
|
|
198
|
-
configuration: `${seqTrackId}-LinearReferenceSequenceDisplay`,
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
viewTrackConfigs: [
|
|
206
|
-
{
|
|
207
|
-
type: 'SyntenyTrack',
|
|
208
|
-
assemblyNames,
|
|
209
|
-
adapter: {
|
|
210
|
-
type: 'FromConfigAdapter',
|
|
211
|
-
features: configFeatureStore,
|
|
212
|
-
},
|
|
213
|
-
trackId,
|
|
214
|
-
name: trackName,
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
tracks: [
|
|
218
|
-
{
|
|
219
|
-
configuration: trackId,
|
|
220
|
-
type: 'SyntenyTrack',
|
|
221
|
-
displays: [
|
|
222
|
-
{
|
|
223
|
-
type: 'LinearSyntenyDisplay',
|
|
224
|
-
configuration: `${trackId}-LinearSyntenyDisplay`,
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
displayName: `${readName} vs ${trackAssembly}`,
|
|
230
|
-
});
|
|
231
|
-
handleClose();
|
|
232
|
-
}
|
|
233
|
-
catch (e) {
|
|
234
|
-
console.error(e);
|
|
235
|
-
setError(e);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { open: true, onClose: handleClose, title: "Set window size", children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: error ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { color: "error", children: `${error}` })) : !primaryFeature ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "To accurately perform comparison we are fetching the primary alignment. Loading primary feature..." }), (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})] })) : ((0, jsx_runtime_1.jsxs)("div", { className: classes.root, children: [primaryFeature.get('flags') & 256 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { style: { color: 'orange' }, children: "Note: You selected a secondary alignment (which generally does not have SA tags or SEQ fields) so do a full reconstruction of the alignment" })) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Show an extra window size around each part of the split alignment. Using a larger value can allow you to see more genomic context." }), (0, jsx_runtime_1.jsx)(material_1.TextField, { value: windowSize, onChange: event => {
|
|
239
|
-
setWindowSize(event.target.value);
|
|
240
|
-
}, label: "Set window size" })] })) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: handleClose, children: "Cancel" }), (0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !primaryFeature, variant: "contained", color: "primary", onClick: onSubmit, children: "Submit" })] })] }));
|
|
241
|
-
}
|
|
@@ -1,86 +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 = LinearReadVsRefMenuItemF;
|
|
40
|
-
const react_1 = require("react");
|
|
41
|
-
const util_1 = require("@jbrowse/core/util");
|
|
42
|
-
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
43
|
-
const ReadVsRefDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./LinearReadVsRef'))));
|
|
44
|
-
function isDisplay(elt) {
|
|
45
|
-
return elt.name === 'LinearPileupDisplay';
|
|
46
|
-
}
|
|
47
|
-
function LinearReadVsRefMenuItemF(pm) {
|
|
48
|
-
pm.addToExtensionPoint('Core-extendPluggableElement', (pluggableElement) => {
|
|
49
|
-
if (!isDisplay(pluggableElement)) {
|
|
50
|
-
return pluggableElement;
|
|
51
|
-
}
|
|
52
|
-
pluggableElement.stateModel = pluggableElement.stateModel.extend(self => {
|
|
53
|
-
const superContextMenuItems = self.contextMenuItems;
|
|
54
|
-
return {
|
|
55
|
-
views: {
|
|
56
|
-
contextMenuItems() {
|
|
57
|
-
const feature = self.contextMenuFeature;
|
|
58
|
-
const track = (0, util_1.getContainingTrack)(self);
|
|
59
|
-
return [
|
|
60
|
-
...superContextMenuItems(),
|
|
61
|
-
...(feature
|
|
62
|
-
? [
|
|
63
|
-
{
|
|
64
|
-
label: 'Linear read vs ref',
|
|
65
|
-
icon: Add_1.default,
|
|
66
|
-
onClick: () => {
|
|
67
|
-
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
68
|
-
ReadVsRefDialog,
|
|
69
|
-
{
|
|
70
|
-
track,
|
|
71
|
-
feature,
|
|
72
|
-
handleClose,
|
|
73
|
-
},
|
|
74
|
-
]);
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
]
|
|
78
|
-
: []),
|
|
79
|
-
];
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
return pluggableElement;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.doAfterAttach = doAfterAttach;
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
|
|
6
|
-
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
7
|
-
const mobx_1 = require("mobx");
|
|
8
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
|
-
const drawSynteny_1 = require("./drawSynteny");
|
|
10
|
-
function doAfterAttach(self) {
|
|
11
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
const view = (0, util_1.getContainingView)(self);
|
|
14
|
-
if (!view.initialized ||
|
|
15
|
-
!view.views.every(a => a.displayedRegions.length > 0 && a.initialized)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const ctx1 = (_a = self.mainCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
19
|
-
const ctx3 = (_b = self.cigarClickMapCanvas) === null || _b === void 0 ? void 0 : _b.getContext('2d');
|
|
20
|
-
if (!ctx1 || !ctx3) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const { alpha } = self;
|
|
24
|
-
const height = self.height;
|
|
25
|
-
const width = view.width;
|
|
26
|
-
ctx1.clearRect(0, 0, width, height);
|
|
27
|
-
(0, drawSynteny_1.drawRef)(self, ctx1);
|
|
28
|
-
(0, drawSynteny_1.drawCigarClickMap)(self, ctx3);
|
|
29
|
-
}));
|
|
30
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
31
|
-
const view = (0, util_1.getContainingView)(self);
|
|
32
|
-
if (!view.initialized ||
|
|
33
|
-
!view.views.every(a => a.displayedRegions.length > 0 && a.initialized)) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const { clickId, mouseoverId } = self;
|
|
37
|
-
(0, drawSynteny_1.drawMouseoverClickMap)(self);
|
|
38
|
-
}));
|
|
39
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.reaction)(() => {
|
|
40
|
-
const view = (0, util_1.getContainingView)(self);
|
|
41
|
-
return {
|
|
42
|
-
bpPerPx: view.views.map(v => v.bpPerPx),
|
|
43
|
-
displayedRegions: JSON.stringify(view.views.map(v => v.displayedRegions)),
|
|
44
|
-
features: self.features,
|
|
45
|
-
initialized: view.initialized &&
|
|
46
|
-
view.views.every(a => a.displayedRegions.length > 0 && a.initialized),
|
|
47
|
-
};
|
|
48
|
-
}, ({ initialized }) => {
|
|
49
|
-
if (!initialized) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const { level } = self;
|
|
53
|
-
const { assemblyManager } = (0, util_1.getSession)(self);
|
|
54
|
-
const view = (0, util_1.getContainingView)(self);
|
|
55
|
-
const viewSnaps = view.views.map(view => ({
|
|
56
|
-
...(0, mobx_state_tree_1.getSnapshot)(view),
|
|
57
|
-
width: view.width,
|
|
58
|
-
staticBlocks: view.staticBlocks,
|
|
59
|
-
interRegionPaddingWidth: view.interRegionPaddingWidth,
|
|
60
|
-
minimumBlockWidth: view.minimumBlockWidth,
|
|
61
|
-
}));
|
|
62
|
-
const map = [];
|
|
63
|
-
const feats = self.features || [];
|
|
64
|
-
for (const f of feats) {
|
|
65
|
-
const mate = f.get('mate');
|
|
66
|
-
let f1s = f.get('start');
|
|
67
|
-
let f1e = f.get('end');
|
|
68
|
-
const f2s = mate.start;
|
|
69
|
-
const f2e = mate.end;
|
|
70
|
-
if (f.get('strand') === -1) {
|
|
71
|
-
;
|
|
72
|
-
[f1e, f1s] = [f1s, f1e];
|
|
73
|
-
}
|
|
74
|
-
const a1 = assemblyManager.get(f.get('assemblyName'));
|
|
75
|
-
const a2 = assemblyManager.get(mate.assemblyName);
|
|
76
|
-
const r1 = f.get('refName');
|
|
77
|
-
const r2 = mate.refName;
|
|
78
|
-
const ref1 = (a1 === null || a1 === void 0 ? void 0 : a1.getCanonicalRefName(r1)) || r1;
|
|
79
|
-
const ref2 = (a2 === null || a2 === void 0 ? void 0 : a2.getCanonicalRefName(r2)) || r2;
|
|
80
|
-
const v1 = viewSnaps[level];
|
|
81
|
-
const v2 = viewSnaps[level + 1];
|
|
82
|
-
const p11 = (0, Base1DUtils_1.bpToPx)({ self: v1, refName: ref1, coord: f1s });
|
|
83
|
-
const p12 = (0, Base1DUtils_1.bpToPx)({ self: v1, refName: ref1, coord: f1e });
|
|
84
|
-
const p21 = (0, Base1DUtils_1.bpToPx)({ self: v2, refName: ref2, coord: f2s });
|
|
85
|
-
const p22 = (0, Base1DUtils_1.bpToPx)({ self: v2, refName: ref2, coord: f2e });
|
|
86
|
-
if (p11 === undefined ||
|
|
87
|
-
p12 === undefined ||
|
|
88
|
-
p21 === undefined ||
|
|
89
|
-
p22 === undefined) {
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
const cigar = f.get('CIGAR');
|
|
93
|
-
map.push({
|
|
94
|
-
p11,
|
|
95
|
-
p12,
|
|
96
|
-
p21,
|
|
97
|
-
p22,
|
|
98
|
-
f,
|
|
99
|
-
cigar: plugin_alignments_1.MismatchParser.parseCigar(cigar),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
self.setFeatPositions(map);
|
|
103
|
-
}, { fireImmediately: true }));
|
|
104
|
-
}
|