@jbrowse/plugin-alignments 2.14.0 → 2.15.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/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +29 -3
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +1 -0
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +6 -0
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +1 -0
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +6 -0
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +9 -0
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +92 -0
- package/dist/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.js → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js} +43 -18
- package/dist/AlignmentsFeatureDetail/{SuppAlignments.d.ts → LinkedPairedAlignments.d.ts} +0 -1
- package/dist/AlignmentsFeatureDetail/{SuppAlignments.js → LinkedPairedAlignments.js} +3 -6
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +8 -0
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +26 -0
- package/{esm/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.d.ts → dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts} +1 -1
- package/dist/AlignmentsFeatureDetail/{SuppAlignmentsLocStrings.js → SupplementaryAlignmentsLocStrings.js} +2 -2
- package/dist/LinearAlignmentsDisplay/models/alignmentsModel.js +1 -2
- package/dist/LinearAlignmentsDisplay/models/util.js +2 -4
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +20 -19
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +35 -19
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/dist/LinearPileupDisplay/model.d.ts +29 -26
- package/dist/LinearPileupDisplay/model.js +33 -28
- package/dist/LinearReadArcsDisplay/index.js +25 -2
- package/dist/LinearReadCloudDisplay/index.js +25 -2
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +4 -4
- package/dist/LinearSNPCoverageDisplay/models/model.js +27 -2
- package/dist/MismatchParser/index.js +1 -1
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/shared/color.d.ts +3 -0
- package/dist/shared/color.js +21 -10
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -3
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +1 -0
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +2 -0
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +1 -0
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +2 -0
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +9 -0
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +66 -0
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +84 -0
- package/esm/AlignmentsFeatureDetail/{SuppAlignments.d.ts → LinkedPairedAlignments.d.ts} +0 -1
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +17 -0
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +8 -0
- package/esm/AlignmentsFeatureDetail/{SuppAlignments.js → SupplementaryAlignments.js} +4 -4
- package/{dist/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.d.ts → esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts} +1 -1
- package/esm/AlignmentsFeatureDetail/{SuppAlignmentsLocStrings.js → SupplementaryAlignmentsLocStrings.js} +1 -1
- package/esm/LinearAlignmentsDisplay/models/alignmentsModel.js +1 -2
- package/esm/LinearAlignmentsDisplay/models/util.js +2 -4
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +20 -19
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -20
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/esm/LinearPileupDisplay/model.d.ts +29 -26
- package/esm/LinearPileupDisplay/model.js +33 -28
- package/esm/LinearReadArcsDisplay/index.js +2 -2
- package/esm/LinearReadCloudDisplay/index.js +2 -2
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +4 -4
- package/esm/LinearSNPCoverageDisplay/models/model.js +3 -1
- package/esm/MismatchParser/index.js +1 -1
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/shared/color.d.ts +3 -0
- package/esm/shared/color.js +20 -10
- package/package.json +5 -4
- package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.d.ts +0 -12
- package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.js +0 -97
- package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.d.ts +0 -12
- package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.js +0 -72
- package/esm/AlignmentsFeatureDetail/LaunchBreakpointSplitViewPanel.js +0 -59
- /package/dist/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.d.ts → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts} +0 -0
- /package/esm/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.d.ts → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts} +0 -0
|
@@ -1,9 +1,32 @@
|
|
|
1
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 =
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
7
30
|
const material_1 = require("@mui/material");
|
|
8
31
|
const mobx_react_1 = require("mobx-react");
|
|
9
32
|
const clone_1 = __importDefault(require("clone"));
|
|
@@ -12,10 +35,12 @@ const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeature
|
|
|
12
35
|
const util_1 = require("./util");
|
|
13
36
|
const tagInfo_1 = require("./tagInfo");
|
|
14
37
|
// local components
|
|
15
|
-
const SuppAlignments_1 = __importDefault(require("./SuppAlignments"));
|
|
16
38
|
const Flags_1 = __importDefault(require("./Flags"));
|
|
17
39
|
const PairLink_1 = __importDefault(require("./PairLink"));
|
|
18
40
|
const Formatter_1 = __importDefault(require("./Formatter"));
|
|
41
|
+
// lazies
|
|
42
|
+
const SupplementaryAlignments = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./SupplementaryAlignments'))));
|
|
43
|
+
const LinkedPairedAlignments = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./LinkedPairedAlignments'))));
|
|
19
44
|
const omit = ['clipPos', 'flags'];
|
|
20
45
|
const AlignmentsFeatureDetails = (0, mobx_react_1.observer)(function (props) {
|
|
21
46
|
const { model } = props;
|
|
@@ -27,7 +52,8 @@ const AlignmentsFeatureDetails = (0, mobx_react_1.observer)(function (props) {
|
|
|
27
52
|
react_1.default.createElement(BaseFeatureDetail_1.FeatureDetails, { ...props, omit: omit,
|
|
28
53
|
// @ts-expect-error
|
|
29
54
|
descriptions: { ...tagInfo_1.tags, tags: tagInfo_1.tags }, feature: feat, formatter: (value, key) => key === 'next_segment_position' ? (react_1.default.createElement(PairLink_1.default, { model: model, locString: value })) : (react_1.default.createElement(Formatter_1.default, { value: value })) }),
|
|
30
|
-
SA !== undefined ? (react_1.default.createElement(
|
|
55
|
+
SA !== undefined ? (react_1.default.createElement(SupplementaryAlignments, { model: model, tag: SA, feature: feat })) : null,
|
|
56
|
+
flags & 1 ? (react_1.default.createElement(LinkedPairedAlignments, { model: model, feature: feat })) : null,
|
|
31
57
|
flags !== undefined ? react_1.default.createElement(Flags_1.default, { feature: feat, ...props }) : null));
|
|
32
58
|
});
|
|
33
59
|
exports.default = AlignmentsFeatureDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreakendMultiLevelOptionDialog as default } from '@jbrowse/sv-core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
// re-exported for react lazy
|
|
5
|
+
var sv_core_1 = require("@jbrowse/sv-core");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return sv_core_1.BreakendMultiLevelOptionDialog; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreakendSingleLevelOptionDialog as default } from '@jbrowse/sv-core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
// re-exported for react lazy
|
|
5
|
+
var sv_core_1 = require("@jbrowse/sv-core");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return sv_core_1.BreakendSingleLevelOptionDialog; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
+
import { ViewType } from '@jbrowse/core/pluggableElementTypes';
|
|
4
|
+
import { AlignmentFeatureWidgetModel } from './stateModelFactory';
|
|
5
|
+
export default function LaunchPairedEndBreakpointSplitViewPanel({ model, feature, viewType, }: {
|
|
6
|
+
model: AlignmentFeatureWidgetModel;
|
|
7
|
+
feature: SimpleFeatureSerialized;
|
|
8
|
+
viewType: ViewType;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.default = LaunchPairedEndBreakpointSplitViewPanel;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const material_1 = require("@mui/material");
|
|
29
|
+
const util_1 = require("@jbrowse/core/util");
|
|
30
|
+
// lazies
|
|
31
|
+
const BreakendMultiLevelOptionDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./BreakendMultiLevelOptionDialog'))));
|
|
32
|
+
const BreakendSingleLevelOptionDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./BreakendSingleLevelOptionDialog'))));
|
|
33
|
+
function LaunchPairedEndBreakpointSplitViewPanel({ model, feature, viewType, }) {
|
|
34
|
+
const session = (0, util_1.getSession)(model);
|
|
35
|
+
const f1 = {
|
|
36
|
+
uniqueId: feature.uniqueId,
|
|
37
|
+
refName: feature.refName,
|
|
38
|
+
start: feature.start,
|
|
39
|
+
end: feature.end,
|
|
40
|
+
strand: feature.strand,
|
|
41
|
+
};
|
|
42
|
+
const f2 = {
|
|
43
|
+
uniqueId: `${feature.id}-mate`,
|
|
44
|
+
refName: feature.next_ref,
|
|
45
|
+
start: feature.next_pos,
|
|
46
|
+
end: feature.next_pos + 1,
|
|
47
|
+
strand: feature.strand,
|
|
48
|
+
};
|
|
49
|
+
return (react_1.default.createElement("div", null,
|
|
50
|
+
react_1.default.createElement(material_1.Typography, null, "Launch split view"),
|
|
51
|
+
react_1.default.createElement("ul", null,
|
|
52
|
+
react_1.default.createElement("li", null,
|
|
53
|
+
f1.refName,
|
|
54
|
+
":",
|
|
55
|
+
(0, util_1.toLocale)(f1.start),
|
|
56
|
+
" -> ",
|
|
57
|
+
f2.refName,
|
|
58
|
+
":",
|
|
59
|
+
(0, util_1.toLocale)(f2.start),
|
|
60
|
+
' ',
|
|
61
|
+
react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
session.queueDialog(handleClose => [
|
|
64
|
+
BreakendMultiLevelOptionDialog,
|
|
65
|
+
{
|
|
66
|
+
handleClose,
|
|
67
|
+
model,
|
|
68
|
+
feature: new util_1.SimpleFeature({ ...f1, mate: f2 }),
|
|
69
|
+
// @ts-expect-error
|
|
70
|
+
viewType,
|
|
71
|
+
view: model.view,
|
|
72
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
} }, "(top/bottom)"),
|
|
76
|
+
' ',
|
|
77
|
+
react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
session.queueDialog(handleClose => [
|
|
80
|
+
BreakendSingleLevelOptionDialog,
|
|
81
|
+
{
|
|
82
|
+
handleClose,
|
|
83
|
+
model,
|
|
84
|
+
feature: new util_1.SimpleFeature({ ...f1, mate: f2 }),
|
|
85
|
+
// @ts-expect-error
|
|
86
|
+
viewType,
|
|
87
|
+
view: model.view,
|
|
88
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
89
|
+
},
|
|
90
|
+
]);
|
|
91
|
+
} }, "(single row)")))));
|
|
92
|
+
}
|
|
@@ -30,7 +30,8 @@ const util_1 = require("@jbrowse/core/util");
|
|
|
30
30
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
31
|
const getSAFeatures_1 = require("./getSAFeatures");
|
|
32
32
|
// lazies
|
|
33
|
-
const
|
|
33
|
+
const BreakendMultiLevelOptionDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./BreakendMultiLevelOptionDialog'))));
|
|
34
|
+
const BreakendSingleLevelOptionDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./BreakendSingleLevelOptionDialog'))));
|
|
34
35
|
function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
|
|
35
36
|
const session = (0, util_1.getSession)(model);
|
|
36
37
|
const { view } = model;
|
|
@@ -60,26 +61,50 @@ function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
return ret.length ? (react_1.default.createElement("div", null,
|
|
63
|
-
react_1.default.createElement(material_1.Typography, null, "Launch split
|
|
64
|
+
react_1.default.createElement(material_1.Typography, null, "Launch split view"),
|
|
64
65
|
error ? react_1.default.createElement(ui_1.ErrorMessage, { error: error }) : null,
|
|
65
66
|
react_1.default.createElement("ul", null, ret.map((arg, index) => {
|
|
66
67
|
const [f1, f2] = arg;
|
|
67
68
|
return (react_1.default.createElement("li", { key: `${JSON.stringify(arg)}-${index}` },
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
69
|
+
f1.refName,
|
|
70
|
+
":",
|
|
71
|
+
(0, util_1.toLocale)(f1.strand === 1 ? f1.end : f1.start),
|
|
72
|
+
" ->",
|
|
73
|
+
' ',
|
|
74
|
+
f2.refName,
|
|
75
|
+
":",
|
|
76
|
+
(0, util_1.toLocale)(f2.strand === 1 ? f2.start : f2.end),
|
|
77
|
+
' ',
|
|
78
|
+
react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
session.queueDialog(handleClose => [
|
|
81
|
+
BreakendMultiLevelOptionDialog,
|
|
82
|
+
{
|
|
83
|
+
handleClose,
|
|
84
|
+
model,
|
|
85
|
+
feature: new util_1.SimpleFeature({ ...f1, mate: f2 }),
|
|
86
|
+
// @ts-expect-error
|
|
87
|
+
viewType,
|
|
88
|
+
view: model.view,
|
|
89
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
} }, "(top/bottom)"),
|
|
93
|
+
' ',
|
|
94
|
+
react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
session.queueDialog(handleClose => [
|
|
97
|
+
BreakendSingleLevelOptionDialog,
|
|
98
|
+
{
|
|
99
|
+
handleClose,
|
|
100
|
+
model,
|
|
101
|
+
feature: new util_1.SimpleFeature({ ...f1, mate: f2 }),
|
|
102
|
+
// @ts-expect-error
|
|
103
|
+
viewType,
|
|
104
|
+
view: model.view,
|
|
105
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
106
|
+
},
|
|
107
|
+
]);
|
|
108
|
+
} }, "(single row)")));
|
|
84
109
|
})))) : null;
|
|
85
110
|
}
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
3
|
import { AlignmentFeatureWidgetModel } from './stateModelFactory';
|
|
4
4
|
export default function SuppAlignments(props: {
|
|
5
|
-
tag: string;
|
|
6
5
|
model: AlignmentFeatureWidgetModel;
|
|
7
6
|
feature: SimpleFeatureSerialized;
|
|
8
7
|
}): React.JSX.Element;
|
|
@@ -7,10 +7,9 @@ exports.default = SuppAlignments;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
9
9
|
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const
|
|
11
|
-
const LaunchBreakpointSplitViewPanel_1 = __importDefault(require("./LaunchBreakpointSplitViewPanel"));
|
|
10
|
+
const LaunchPairedEndBreakpointSplitViewPanel_1 = __importDefault(require("./LaunchPairedEndBreakpointSplitViewPanel"));
|
|
12
11
|
function SuppAlignments(props) {
|
|
13
|
-
const { model,
|
|
12
|
+
const { model, feature } = props;
|
|
14
13
|
const session = (0, util_1.getSession)(model);
|
|
15
14
|
const { pluginManager } = (0, util_1.getEnv)(session);
|
|
16
15
|
let viewType;
|
|
@@ -20,7 +19,5 @@ function SuppAlignments(props) {
|
|
|
20
19
|
catch (e) {
|
|
21
20
|
// ignore
|
|
22
21
|
}
|
|
23
|
-
return (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { ...props, title: "Supplementary alignments" },
|
|
24
|
-
react_1.default.createElement(SuppAlignmentsLocStrings_1.default, { model: model, tag: tag }),
|
|
25
|
-
viewType ? (react_1.default.createElement(LaunchBreakpointSplitViewPanel_1.default, { viewType: viewType, model: model, feature: feature })) : null));
|
|
22
|
+
return (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { ...props, title: "Supplementary alignments" }, viewType ? (react_1.default.createElement(LaunchPairedEndBreakpointSplitViewPanel_1.default, { viewType: viewType, model: model, feature: feature })) : null));
|
|
26
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
+
import { AlignmentFeatureWidgetModel } from './stateModelFactory';
|
|
4
|
+
export default function SupplementaryAlignments(props: {
|
|
5
|
+
tag: string;
|
|
6
|
+
model: AlignmentFeatureWidgetModel;
|
|
7
|
+
feature: SimpleFeatureSerialized;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
exports.default = SupplementaryAlignments;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
9
|
+
const util_1 = require("@jbrowse/core/util");
|
|
10
|
+
const SupplementaryAlignmentsLocStrings_1 = __importDefault(require("./SupplementaryAlignmentsLocStrings"));
|
|
11
|
+
const LaunchSupplementaryAlignmentBreakpointSplitViewPanel_1 = __importDefault(require("./LaunchSupplementaryAlignmentBreakpointSplitViewPanel"));
|
|
12
|
+
function SupplementaryAlignments(props) {
|
|
13
|
+
const { model, tag, feature } = props;
|
|
14
|
+
const session = (0, util_1.getSession)(model);
|
|
15
|
+
const { pluginManager } = (0, util_1.getEnv)(session);
|
|
16
|
+
let viewType;
|
|
17
|
+
try {
|
|
18
|
+
viewType = pluginManager.getViewType('BreakpointSplitView');
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
// ignore
|
|
22
|
+
}
|
|
23
|
+
return (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { ...props, title: "Supplementary alignments" },
|
|
24
|
+
react_1.default.createElement(SupplementaryAlignmentsLocStrings_1.default, { model: model, tag: tag }),
|
|
25
|
+
viewType ? (react_1.default.createElement(LaunchSupplementaryAlignmentBreakpointSplitViewPanel_1.default, { viewType: viewType, model: model, feature: feature })) : null));
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AlignmentFeatureWidgetModel } from './stateModelFactory';
|
|
3
|
-
export default function
|
|
3
|
+
export default function SupplementaryAlignmentsLocStrings({ tag, model, }: {
|
|
4
4
|
tag: string;
|
|
5
5
|
model: AlignmentFeatureWidgetModel;
|
|
6
6
|
}): React.JSX.Element;
|
|
@@ -3,13 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = SupplementaryAlignmentsLocStrings;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const material_1 = require("@mui/material");
|
|
9
9
|
// locals
|
|
10
10
|
const MismatchParser_1 = require("../MismatchParser");
|
|
11
11
|
const util_1 = require("./util");
|
|
12
|
-
function
|
|
12
|
+
function SupplementaryAlignmentsLocStrings({ tag, model, }) {
|
|
13
13
|
return (react_1.default.createElement("div", null,
|
|
14
14
|
react_1.default.createElement(material_1.Typography, null, "List of supplementary alignment locations"),
|
|
15
15
|
react_1.default.createElement("ul", null, tag
|
|
@@ -9,13 +9,12 @@ const util_1 = require("./util");
|
|
|
9
9
|
* #stateModel LinearAlignmentsDisplayMixin
|
|
10
10
|
*/
|
|
11
11
|
function LinearAlignmentsDisplayMixin(pluginManager, configSchema) {
|
|
12
|
-
const lowerPanelDisplays = (0, util_1.getLowerPanelDisplays)(pluginManager).map(f => f.stateModel);
|
|
13
12
|
return mobx_state_tree_1.types.model({
|
|
14
13
|
/**
|
|
15
14
|
* #property
|
|
16
15
|
* refers to LinearPileupDisplay sub-display model
|
|
17
16
|
*/
|
|
18
|
-
PileupDisplay: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.union(...
|
|
17
|
+
PileupDisplay: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.union(...(0, util_1.getLowerPanelDisplays)(pluginManager).map(f => f.stateModel))),
|
|
19
18
|
/**
|
|
20
19
|
* #property
|
|
21
20
|
* refers to LinearSNPCoverageDisplay sub-display model
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLowerPanelDisplays = getLowerPanelDisplays;
|
|
4
4
|
function getLowerPanelDisplays(pluginManager) {
|
|
5
|
-
return
|
|
5
|
+
return pluginManager
|
|
6
6
|
.getDisplayElements()
|
|
7
|
-
// @ts-expect-error
|
|
8
7
|
.filter(f => { var _a; return ((_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.type) === 'LinearAlignmentsDisplay'; })
|
|
9
|
-
|
|
10
|
-
.filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; }));
|
|
8
|
+
.filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; });
|
|
11
9
|
}
|
|
@@ -37,7 +37,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
37
37
|
}, {
|
|
38
38
|
renderInProgress: AbortController | undefined;
|
|
39
39
|
filled: boolean;
|
|
40
|
-
reactElement:
|
|
40
|
+
reactElement: React.ReactElement | undefined;
|
|
41
41
|
features: Map<string, Feature> | undefined;
|
|
42
42
|
layout: any;
|
|
43
43
|
status: string;
|
|
@@ -48,10 +48,10 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
48
48
|
model: {
|
|
49
49
|
error?: unknown;
|
|
50
50
|
reload: () => void;
|
|
51
|
-
message:
|
|
51
|
+
message: React.ReactNode;
|
|
52
52
|
filled?: boolean;
|
|
53
53
|
status?: string;
|
|
54
|
-
reactElement?:
|
|
54
|
+
reactElement?: React.ReactElement;
|
|
55
55
|
};
|
|
56
56
|
}) => import("react").JSX.Element | undefined;
|
|
57
57
|
renderProps: any;
|
|
@@ -62,7 +62,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
62
62
|
setLoading(abortController: AbortController): void;
|
|
63
63
|
setMessage(messageText: string): void;
|
|
64
64
|
setRendered(props: {
|
|
65
|
-
reactElement:
|
|
65
|
+
reactElement: React.ReactElement;
|
|
66
66
|
features: Map<string, Feature>;
|
|
67
67
|
layout: any;
|
|
68
68
|
maxHeightReached: boolean;
|
|
@@ -150,7 +150,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
150
150
|
error: unknown;
|
|
151
151
|
message: string | undefined;
|
|
152
152
|
} & {
|
|
153
|
-
readonly RenderingComponent:
|
|
153
|
+
readonly RenderingComponent: React.FC<{
|
|
154
154
|
model: {
|
|
155
155
|
id: string;
|
|
156
156
|
type: string;
|
|
@@ -171,7 +171,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
171
171
|
onHorizontalScroll?: () => void;
|
|
172
172
|
blockState?: Record<string, any>;
|
|
173
173
|
}>;
|
|
174
|
-
readonly DisplayBlurb:
|
|
174
|
+
readonly DisplayBlurb: React.FC<{
|
|
175
175
|
model: {
|
|
176
176
|
id: string;
|
|
177
177
|
type: string;
|
|
@@ -181,9 +181,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
181
181
|
error: unknown;
|
|
182
182
|
message: string | undefined;
|
|
183
183
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
184
|
-
id: import("mobx-state-tree"
|
|
185
|
-
* #property
|
|
186
|
-
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
184
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
187
185
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
188
186
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
189
187
|
}, {
|
|
@@ -196,7 +194,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
196
194
|
readonly parentTrack: any;
|
|
197
195
|
renderProps(): any;
|
|
198
196
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
199
|
-
readonly DisplayMessageComponent: undefined |
|
|
197
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
200
198
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
201
199
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
202
200
|
regionCannotBeRendered(): null;
|
|
@@ -242,13 +240,13 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
242
240
|
featureIdUnderMouse: undefined | string;
|
|
243
241
|
contextMenuFeature: undefined | Feature;
|
|
244
242
|
} & {
|
|
243
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
245
244
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
246
245
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
247
246
|
} & {
|
|
248
247
|
readonly renderDelay: number;
|
|
249
|
-
readonly TooltipComponent: import("
|
|
248
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
250
249
|
readonly selectedFeatureId: string | undefined;
|
|
251
|
-
readonly DisplayMessageComponent: undefined | import("react").FC<any>;
|
|
252
250
|
} & {
|
|
253
251
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
254
252
|
readonly featureUnderMouse: Feature | undefined;
|
|
@@ -345,7 +343,11 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
345
343
|
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
346
344
|
[x: string]: any;
|
|
347
345
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
348
|
-
} & import("mobx-state-tree"
|
|
346
|
+
} & import("mobx-state-tree" /**
|
|
347
|
+
* #stateModel SharedLinearPileupDisplayMixin
|
|
348
|
+
* #category display
|
|
349
|
+
* extends `BaseLinearDisplay`
|
|
350
|
+
*/).IStateTreeNode<AnyConfigurationSchemaType>);
|
|
349
351
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
350
352
|
} & {
|
|
351
353
|
/**
|
|
@@ -419,7 +421,6 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
419
421
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
420
422
|
muiName: string;
|
|
421
423
|
};
|
|
422
|
-
priority: number;
|
|
423
424
|
onClick: () => void;
|
|
424
425
|
})[];
|
|
425
426
|
} & {
|
|
@@ -456,7 +457,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
456
457
|
}, {
|
|
457
458
|
renderInProgress: AbortController | undefined;
|
|
458
459
|
filled: boolean;
|
|
459
|
-
reactElement:
|
|
460
|
+
reactElement: React.ReactElement | undefined;
|
|
460
461
|
features: Map<string, Feature> | undefined;
|
|
461
462
|
layout: any;
|
|
462
463
|
status: string;
|
|
@@ -467,10 +468,10 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
467
468
|
model: {
|
|
468
469
|
error?: unknown;
|
|
469
470
|
reload: () => void;
|
|
470
|
-
message:
|
|
471
|
+
message: React.ReactNode;
|
|
471
472
|
filled?: boolean;
|
|
472
473
|
status?: string;
|
|
473
|
-
reactElement?:
|
|
474
|
+
reactElement?: React.ReactElement;
|
|
474
475
|
};
|
|
475
476
|
}) => import("react").JSX.Element | undefined;
|
|
476
477
|
renderProps: any;
|
|
@@ -481,7 +482,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
481
482
|
setLoading(abortController: AbortController): void;
|
|
482
483
|
setMessage(messageText: string): void;
|
|
483
484
|
setRendered(props: {
|
|
484
|
-
reactElement:
|
|
485
|
+
reactElement: React.ReactElement;
|
|
485
486
|
features: Map<string, Feature>;
|
|
486
487
|
layout: any;
|
|
487
488
|
maxHeightReached: boolean;
|
|
@@ -523,8 +524,8 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
523
524
|
type: string;
|
|
524
525
|
id: string;
|
|
525
526
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
526
|
-
rpcDriverName: string | undefined;
|
|
527
527
|
heightPreConfig: number | undefined;
|
|
528
|
+
rpcDriverName: string | undefined;
|
|
528
529
|
userBpPerPxLimit: number | undefined;
|
|
529
530
|
userByteSizeLimit: number | undefined;
|
|
530
531
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -182,7 +182,11 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
182
182
|
selectFeature(feature) {
|
|
183
183
|
const session = (0, util_1.getSession)(self);
|
|
184
184
|
if ((0, util_1.isSessionModelWithWidgets)(session)) {
|
|
185
|
-
const featureWidget = session.addWidget('AlignmentsFeatureWidget', 'alignmentFeature', {
|
|
185
|
+
const featureWidget = session.addWidget('AlignmentsFeatureWidget', 'alignmentFeature', {
|
|
186
|
+
featureData: feature.toJSON(),
|
|
187
|
+
view: (0, util_1.getContainingView)(self),
|
|
188
|
+
track: (0, util_1.getContainingTrack)(self),
|
|
189
|
+
});
|
|
186
190
|
session.showWidget(featureWidget);
|
|
187
191
|
}
|
|
188
192
|
session.setSelection(feature);
|
|
@@ -428,9 +432,12 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
428
432
|
{
|
|
429
433
|
label: 'Color by tag...',
|
|
430
434
|
onClick: () => {
|
|
431
|
-
(0, util_1.getSession)(self).queueDialog(
|
|
435
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
432
436
|
ColorByTagDialog,
|
|
433
|
-
{
|
|
437
|
+
{
|
|
438
|
+
model: self,
|
|
439
|
+
handleClose,
|
|
440
|
+
},
|
|
434
441
|
]);
|
|
435
442
|
},
|
|
436
443
|
},
|
|
@@ -442,20 +449,9 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
442
449
|
trackMenuItems() {
|
|
443
450
|
return [
|
|
444
451
|
...superTrackMenuItems(),
|
|
445
|
-
{
|
|
446
|
-
label: 'Filter by...',
|
|
447
|
-
icon: ClearAll_1.default,
|
|
448
|
-
priority: -1,
|
|
449
|
-
onClick: () => {
|
|
450
|
-
(0, util_1.getSession)(self).queueDialog(doneCallback => [
|
|
451
|
-
FilterByTagDialog,
|
|
452
|
-
{ model: self, handleClose: doneCallback },
|
|
453
|
-
]);
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
452
|
{
|
|
457
453
|
label: 'Set feature height...',
|
|
458
|
-
priority:
|
|
454
|
+
priority: 1,
|
|
459
455
|
subMenu: [
|
|
460
456
|
{
|
|
461
457
|
label: 'Normal',
|
|
@@ -474,9 +470,12 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
474
470
|
{
|
|
475
471
|
label: 'Manually set height',
|
|
476
472
|
onClick: () => {
|
|
477
|
-
(0, util_1.getSession)(self).queueDialog(
|
|
473
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
478
474
|
SetFeatureHeightDialog,
|
|
479
|
-
{
|
|
475
|
+
{
|
|
476
|
+
model: self,
|
|
477
|
+
handleClose,
|
|
478
|
+
},
|
|
480
479
|
]);
|
|
481
480
|
},
|
|
482
481
|
},
|
|
@@ -484,10 +483,27 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
484
483
|
},
|
|
485
484
|
{
|
|
486
485
|
label: 'Set max height...',
|
|
486
|
+
priority: -1,
|
|
487
487
|
onClick: () => {
|
|
488
|
-
(0, util_1.getSession)(self).queueDialog(
|
|
488
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
489
489
|
SetMaxHeightDialog,
|
|
490
|
-
{
|
|
490
|
+
{
|
|
491
|
+
model: self,
|
|
492
|
+
handleClose,
|
|
493
|
+
},
|
|
494
|
+
]);
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
label: 'Filter by...',
|
|
499
|
+
icon: ClearAll_1.default,
|
|
500
|
+
onClick: () => {
|
|
501
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
502
|
+
FilterByTagDialog,
|
|
503
|
+
{
|
|
504
|
+
model: self,
|
|
505
|
+
handleClose,
|
|
506
|
+
},
|
|
491
507
|
]);
|
|
492
508
|
},
|
|
493
509
|
},
|
|
@@ -38,10 +38,10 @@ const SetMaxHeightDialog = (0, mobx_react_1.observer)(function (props) {
|
|
|
38
38
|
const { classes } = useStyles();
|
|
39
39
|
const { maxHeight = '' } = model;
|
|
40
40
|
const [max, setMax] = (0, react_1.useState)(`${maxHeight}`);
|
|
41
|
-
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "
|
|
41
|
+
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "Set max height" },
|
|
42
42
|
react_1.default.createElement(material_1.DialogContent, { className: classes.root },
|
|
43
43
|
react_1.default.createElement(material_1.Typography, null, "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\""),
|
|
44
|
-
react_1.default.createElement(material_1.TextField, { value: max, onChange: event => {
|
|
44
|
+
react_1.default.createElement(material_1.TextField, { value: max, autoFocus: true, onChange: event => {
|
|
45
45
|
setMax(event.target.value);
|
|
46
46
|
}, placeholder: "Enter max height for layout" }),
|
|
47
47
|
react_1.default.createElement(material_1.DialogActions, null,
|