@jbrowse/plugin-alignments 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +5 -3
- package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.js +12 -4
- package/dist/AlignmentsFeatureDetail/Formatter.js +6 -2
- package/dist/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +4 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +4 -4
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.js +2 -2
- package/dist/BamAdapter/BamAdapter.js +12 -18
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/dist/CramAdapter/CramAdapter.d.ts +1 -1
- package/dist/CramAdapter/CramAdapter.js +7 -6
- package/dist/CramAdapter/CramTestAdapters.js +8 -2
- package/dist/GuessAlignmentsTypes/index.js +2 -2
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -2
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +13 -20
- package/dist/LinearAlignmentsDisplay/models/model.js +13 -3
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +7 -4
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -21
- package/dist/LinearPileupDisplay/components/{ColorByModifications.js → ColorByModificationsDialog.js} +3 -1
- package/dist/LinearPileupDisplay/components/{ColorByTag.js → ColorByTagDialog.js} +4 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +11 -0
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +129 -0
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -3
- package/dist/LinearPileupDisplay/components/{SetFeatureHeight.js → SetFeatureHeightDialog.js} +9 -3
- package/{esm/LinearPileupDisplay/components/SetMaxHeight.d.ts → dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts} +1 -1
- package/dist/LinearPileupDisplay/components/{SetMaxHeight.js → SetMaxHeightDialog.js} +6 -2
- package/dist/LinearPileupDisplay/components/{SortByTag.d.ts → SortByTagDialog.d.ts} +1 -1
- package/dist/LinearPileupDisplay/components/{SortByTag.js → SortByTagDialog.js} +7 -3
- package/dist/LinearPileupDisplay/configSchema.js +0 -1
- package/dist/LinearPileupDisplay/model.d.ts +58 -46
- package/dist/LinearPileupDisplay/model.js +69 -41
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +1 -0
- package/dist/LinearReadArcsDisplay/model.d.ts +2 -2
- package/dist/LinearReadArcsDisplay/model.js +37 -13
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +4 -1
- package/dist/LinearReadCloudDisplay/drawPairChains.js +3 -3
- package/dist/LinearReadCloudDisplay/model.d.ts +4 -8
- package/dist/LinearReadCloudDisplay/model.js +16 -6
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.js +15 -5
- package/dist/MismatchParser/index.js +11 -9
- package/dist/PileupRPC/base.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +1 -1
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +3 -3
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.js +3 -2
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/PileupRenderer/PileupRenderer.js +16 -13
- package/dist/PileupRenderer/colorBy.js +3 -5
- package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/dist/PileupRenderer/components/PileupRendering.js +65 -60
- package/dist/PileupRenderer/getAlignmentShapeColor.js +24 -16
- package/dist/PileupRenderer/layoutFeature.js +6 -1
- package/dist/PileupRenderer/layoutFeatures.js +1 -7
- package/dist/PileupRenderer/makeImageData.d.ts +1 -1
- package/dist/PileupRenderer/makeImageData.js +1 -0
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
- package/dist/PileupRenderer/renderMismatches.js +1 -1
- package/dist/PileupRenderer/renderSoftClipping.js +1 -1
- package/dist/PileupRenderer/util.js +3 -5
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +4 -10
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -2
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +2 -5
- package/dist/index.js +3 -1
- package/dist/shared/BaseDisplayComponent.js +3 -1
- package/dist/shared/{FilterByTag.js → FilterByTagDialog.js} +16 -6
- package/dist/shared/color.js +2 -2
- package/dist/shared/index.d.ts +24 -20
- package/dist/shared/index.js +4 -5
- package/dist/shared/renderSvg.js +1 -3
- package/dist/util.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +5 -3
- package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.js +12 -4
- package/esm/AlignmentsFeatureDetail/Formatter.js +6 -2
- package/esm/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +4 -2
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +4 -4
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.js +2 -2
- package/esm/BamAdapter/BamAdapter.js +12 -18
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/esm/CramAdapter/CramAdapter.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.js +7 -6
- package/esm/CramAdapter/CramTestAdapters.js +8 -2
- package/esm/GuessAlignmentsTypes/index.js +2 -2
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -2
- package/esm/LinearAlignmentsDisplay/models/model.d.ts +13 -20
- package/esm/LinearAlignmentsDisplay/models/model.js +13 -3
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +7 -4
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -21
- package/esm/LinearPileupDisplay/components/{ColorByModifications.js → ColorByModificationsDialog.js} +3 -1
- package/esm/LinearPileupDisplay/components/{ColorByTag.js → ColorByTagDialog.js} +4 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +11 -0
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +104 -0
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -3
- package/esm/LinearPileupDisplay/components/{SetFeatureHeight.js → SetFeatureHeightDialog.js} +9 -3
- package/{dist/LinearPileupDisplay/components/SetMaxHeight.d.ts → esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts} +1 -1
- package/esm/LinearPileupDisplay/components/{SetMaxHeight.js → SetMaxHeightDialog.js} +6 -2
- package/esm/LinearPileupDisplay/components/{SortByTag.d.ts → SortByTagDialog.d.ts} +1 -1
- package/esm/LinearPileupDisplay/components/{SortByTag.js → SortByTagDialog.js} +7 -3
- package/esm/LinearPileupDisplay/configSchema.js +0 -1
- package/esm/LinearPileupDisplay/model.d.ts +58 -46
- package/esm/LinearPileupDisplay/model.js +69 -41
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +1 -0
- package/esm/LinearReadArcsDisplay/model.d.ts +2 -2
- package/esm/LinearReadArcsDisplay/model.js +37 -13
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +4 -1
- package/esm/LinearReadCloudDisplay/drawPairChains.js +3 -3
- package/esm/LinearReadCloudDisplay/model.d.ts +4 -8
- package/esm/LinearReadCloudDisplay/model.js +16 -6
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.js +15 -5
- package/esm/MismatchParser/index.js +11 -9
- package/esm/PileupRPC/base.d.ts +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +1 -1
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +3 -3
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.js +3 -2
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/PileupRenderer/PileupRenderer.js +16 -13
- package/esm/PileupRenderer/colorBy.js +3 -5
- package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/esm/PileupRenderer/components/PileupRendering.js +65 -60
- package/esm/PileupRenderer/getAlignmentShapeColor.js +24 -16
- package/esm/PileupRenderer/layoutFeature.js +6 -1
- package/esm/PileupRenderer/layoutFeatures.js +1 -7
- package/esm/PileupRenderer/makeImageData.d.ts +1 -1
- package/esm/PileupRenderer/makeImageData.js +1 -0
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
- package/esm/PileupRenderer/renderMismatches.js +1 -1
- package/esm/PileupRenderer/renderSoftClipping.js +1 -1
- package/esm/PileupRenderer/util.js +3 -5
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +4 -10
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -2
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +2 -5
- package/esm/index.js +3 -1
- package/esm/shared/BaseDisplayComponent.js +3 -1
- package/esm/shared/{FilterByTag.js → FilterByTagDialog.js} +16 -6
- package/esm/shared/color.js +2 -2
- package/esm/shared/index.d.ts +24 -20
- package/esm/shared/index.js +4 -5
- package/esm/shared/renderSvg.js +1 -3
- package/esm/util.d.ts +1 -1
- package/package.json +4 -4
- /package/dist/LinearPileupDisplay/components/{ColorByModifications.d.ts → ColorByModificationsDialog.d.ts} +0 -0
- /package/dist/LinearPileupDisplay/components/{ColorByTag.d.ts → ColorByTagDialog.d.ts} +0 -0
- /package/dist/LinearPileupDisplay/components/{SetFeatureHeight.d.ts → SetFeatureHeightDialog.d.ts} +0 -0
- /package/dist/shared/{FilterByTag.d.ts → FilterByTagDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{ColorByModifications.d.ts → ColorByModificationsDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{ColorByTag.d.ts → ColorByTagDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{SetFeatureHeight.d.ts → SetFeatureHeightDialog.d.ts} +0 -0
- /package/esm/shared/{FilterByTag.d.ts → FilterByTagDialog.d.ts} +0 -0
|
@@ -19,13 +19,15 @@ const Formatter_1 = __importDefault(require("./Formatter"));
|
|
|
19
19
|
const omit = ['clipPos', 'flags'];
|
|
20
20
|
const AlignmentsFeatureDetails = (0, mobx_react_1.observer)(function (props) {
|
|
21
21
|
const { model } = props;
|
|
22
|
-
const
|
|
22
|
+
const { featureData } = model;
|
|
23
|
+
const feat = (0, clone_1.default)(featureData);
|
|
23
24
|
const SA = (0, util_1.getTag)('SA', feat);
|
|
25
|
+
const { flags } = feat;
|
|
24
26
|
return (react_1.default.createElement(material_1.Paper, { "data-testid": "alignment-side-drawer" },
|
|
25
27
|
react_1.default.createElement(BaseFeatureDetail_1.FeatureDetails, { ...props, omit: omit,
|
|
26
28
|
// @ts-expect-error
|
|
27
29
|
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 })) }),
|
|
28
|
-
SA ? react_1.default.createElement(SuppAlignments_1.default, { model: model, tag: SA, feature: feat }) : null,
|
|
29
|
-
|
|
30
|
+
SA !== undefined ? (react_1.default.createElement(SuppAlignments_1.default, { model: model, tag: SA, feature: feat })) : null,
|
|
31
|
+
flags !== undefined ? react_1.default.createElement(Flags_1.default, { feature: feat, ...props }) : null));
|
|
30
32
|
});
|
|
31
33
|
exports.default = AlignmentsFeatureDetails;
|
|
@@ -51,15 +51,21 @@ const BreakendOptionDialog = (0, mobx_react_1.observer)(function ({ model, handl
|
|
|
51
51
|
const [mirror, setMirror] = (0, react_1.useState)(true);
|
|
52
52
|
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "Breakpoint split view options" },
|
|
53
53
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
54
|
-
react_1.default.createElement(Checkbox2, { checked: copyTracks, onChange: event =>
|
|
55
|
-
|
|
54
|
+
react_1.default.createElement(Checkbox2, { checked: copyTracks, onChange: event => {
|
|
55
|
+
setCopyTracks(event.target.checked);
|
|
56
|
+
}, label: "Copy tracks into the new view" }),
|
|
57
|
+
react_1.default.createElement(Checkbox2, { checked: mirror, onChange: event => {
|
|
58
|
+
setMirror(event.target.checked);
|
|
59
|
+
}, label: "Mirror tracks vertically in vertically stacked view" })),
|
|
56
60
|
react_1.default.createElement(material_1.DialogActions, null,
|
|
57
61
|
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
58
62
|
const { view } = model;
|
|
59
63
|
const session = (0, util_1.getSession)(model);
|
|
60
64
|
try {
|
|
61
65
|
const viewSnapshot = (0, launchBreakpointSplitView_1.getBreakpointSplitView)({ view, f1, f2 });
|
|
62
|
-
const
|
|
66
|
+
const views = viewSnapshot.views;
|
|
67
|
+
const view1 = views[0];
|
|
68
|
+
const view2 = views[1];
|
|
63
69
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
64
70
|
const viewTracks = (0, mobx_state_tree_1.getSnapshot)(view.tracks);
|
|
65
71
|
session.addView('BreakpointSplitView', {
|
|
@@ -84,6 +90,8 @@ const BreakendOptionDialog = (0, mobx_react_1.observer)(function ({ model, handl
|
|
|
84
90
|
}
|
|
85
91
|
handleClose();
|
|
86
92
|
}, variant: "contained", color: "primary", autoFocus: true }, "OK"),
|
|
87
|
-
react_1.default.createElement(material_1.Button, { onClick: () =>
|
|
93
|
+
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
94
|
+
handleClose();
|
|
95
|
+
}, color: "secondary", variant: "contained" }, "Cancel"))));
|
|
88
96
|
});
|
|
89
97
|
exports.default = BreakendOptionDialog;
|
|
@@ -40,8 +40,12 @@ function Formatter({ value }) {
|
|
|
40
40
|
react_1.default.createElement("button", { type: "button", onClick: () => {
|
|
41
41
|
(0, copy_to_clipboard_1.default)(display);
|
|
42
42
|
setCopied(true);
|
|
43
|
-
setTimeout(() =>
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
setCopied(false);
|
|
45
|
+
}, 700);
|
|
44
46
|
} }, copied ? 'Copied to clipboard' : 'Copy'),
|
|
45
|
-
react_1.default.createElement("button", { type: "button", onClick: () =>
|
|
47
|
+
react_1.default.createElement("button", { type: "button", onClick: () => {
|
|
48
|
+
setShow(val => !val);
|
|
49
|
+
} }, show ? 'Show less' : 'Show more'),
|
|
46
50
|
react_1.default.createElement("div", null, show ? display : `${display.slice(0, 100)}...`))) : (react_1.default.createElement("div", null, display));
|
|
47
51
|
}
|
|
@@ -15,7 +15,7 @@ function SuppAlignmentsLocStrings({ tag, model, }) {
|
|
|
15
15
|
react_1.default.createElement("ul", null, tag
|
|
16
16
|
.split(';')
|
|
17
17
|
.filter(SA => !!SA)
|
|
18
|
-
.map((SA,
|
|
18
|
+
.map((SA, idx) => {
|
|
19
19
|
const [saRef, saStart, saStrand, saCigar] = SA.split(',');
|
|
20
20
|
const saLength = (0, MismatchParser_1.getLengthOnRef)(saCigar);
|
|
21
21
|
const extra = Math.floor(saLength / 5);
|
|
@@ -27,7 +27,9 @@ function SuppAlignmentsLocStrings({ tag, model, }) {
|
|
|
27
27
|
const displayStart = start.toLocaleString('en-US');
|
|
28
28
|
const displayEnd = end.toLocaleString('en-US');
|
|
29
29
|
const displayString = `${saRef}:${displayStart}-${displayEnd} (${saStrand}) [${saLength}bp]`;
|
|
30
|
-
return (
|
|
30
|
+
return (
|
|
31
|
+
/* biome-ignore lint/suspicious/noArrayIndexKey: */
|
|
32
|
+
react_1.default.createElement("li", { key: `${locString}-${idx}` },
|
|
31
33
|
react_1.default.createElement(material_1.Link, { href: "#", onClick: async (event) => {
|
|
32
34
|
event.preventDefault();
|
|
33
35
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -12,9 +12,9 @@ async function getSAFeatures({ view, feature, }) {
|
|
|
12
12
|
const SA = (0, util_2.getTag)(feature, 'SA') || '';
|
|
13
13
|
const readName = feature.get('name');
|
|
14
14
|
const clipPos = (0, MismatchParser_1.getClip)(cigar, 1);
|
|
15
|
-
// get the canonical refname for the read because if the
|
|
16
|
-
//
|
|
17
|
-
//
|
|
15
|
+
// get the canonical refname for the read because if the read.get('refName')
|
|
16
|
+
// is chr1 and the actual fasta refName is 1 then no tracks can be opened on
|
|
17
|
+
// the top panel of the linear read vs ref
|
|
18
18
|
const assembly = await assemblyManager.waitForAssembly(view.assemblyNames[0]);
|
|
19
19
|
if (!assembly) {
|
|
20
20
|
throw new Error('assembly not found');
|
|
@@ -30,7 +30,7 @@ async function getSAFeatures({ view, feature, }) {
|
|
|
30
30
|
};
|
|
31
31
|
const features = [feat, ...suppAlns];
|
|
32
32
|
features.forEach((f, idx) => {
|
|
33
|
-
f.refName =
|
|
33
|
+
f.refName = assembly.getCanonicalRefName(f.refName) || f.refName;
|
|
34
34
|
f.syntenyId = idx;
|
|
35
35
|
f.mate.syntenyId = idx;
|
|
36
36
|
f.mate.uniqueId = `${f.uniqueId}_mate`;
|
|
@@ -15,7 +15,7 @@ function getBreakpointSplitView({ f1, f2, view, }) {
|
|
|
15
15
|
const topRegion = assembly.regions.find(f => f.refName === f1.refName);
|
|
16
16
|
const bottomRegion = assembly.regions.find(f => f.refName === f2.refName);
|
|
17
17
|
if (!topRegion || !bottomRegion) {
|
|
18
|
-
throw new Error(
|
|
18
|
+
throw new Error('unable to find the refName for the top or bottom of the breakpoint view');
|
|
19
19
|
}
|
|
20
20
|
const topMarkedRegion = [{ ...topRegion }, { ...topRegion }];
|
|
21
21
|
const bottomMarkedRegion = [{ ...bottomRegion }, { ...bottomRegion }];
|
|
@@ -44,6 +44,6 @@ function getBreakpointSplitView({ f1, f2, view, }) {
|
|
|
44
44
|
offsetPx: (bottomRegion.start + e) / bpPerPx,
|
|
45
45
|
},
|
|
46
46
|
],
|
|
47
|
-
displayName:
|
|
47
|
+
displayName: 'breakend split detail',
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -13,8 +13,8 @@ const rxjs_2 = require("rxjs");
|
|
|
13
13
|
// locals
|
|
14
14
|
const BamSlightlyLazyFeature_1 = __importDefault(require("./BamSlightlyLazyFeature"));
|
|
15
15
|
class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
16
|
-
// derived classes may not use the same configuration so a custom
|
|
17
|
-
//
|
|
16
|
+
// derived classes may not use the same configuration so a custom configure
|
|
17
|
+
// method allows derived classes to override this behavior
|
|
18
18
|
async configurePre() {
|
|
19
19
|
const bamLocation = this.getConf('bamLocation');
|
|
20
20
|
const location = this.getConf(['index', 'location']);
|
|
@@ -25,10 +25,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
25
25
|
bamFilehandle: (0, io_1.openLocation)(bamLocation, pm),
|
|
26
26
|
csiFilehandle: csi ? (0, io_1.openLocation)(location, pm) : undefined,
|
|
27
27
|
baiFilehandle: !csi ? (0, io_1.openLocation)(location, pm) : undefined,
|
|
28
|
-
|
|
29
|
-
// helpful, and have given overly large values on the ultra long
|
|
30
|
-
// nanopore reads even with 500MB limits, so disabled with infinity
|
|
31
|
-
yieldThreadTime: Infinity,
|
|
28
|
+
yieldThreadTime: Number.POSITIVE_INFINITY,
|
|
32
29
|
});
|
|
33
30
|
const adapterConfig = this.getConf('sequenceAdapter');
|
|
34
31
|
if (adapterConfig && this.getSubAdapter) {
|
|
@@ -38,13 +35,11 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
38
35
|
sequenceAdapter: dataAdapter,
|
|
39
36
|
};
|
|
40
37
|
}
|
|
41
|
-
|
|
42
|
-
return { bam };
|
|
43
|
-
}
|
|
38
|
+
return { bam };
|
|
44
39
|
}
|
|
45
40
|
async configure() {
|
|
46
41
|
if (!this.configureP) {
|
|
47
|
-
this.configureP = this.configurePre().catch(e => {
|
|
42
|
+
this.configureP = this.configurePre().catch((e) => {
|
|
48
43
|
this.configureP = undefined;
|
|
49
44
|
throw e;
|
|
50
45
|
});
|
|
@@ -79,7 +74,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
79
74
|
}
|
|
80
75
|
async setup(opts) {
|
|
81
76
|
if (!this.setupP) {
|
|
82
|
-
this.setupP = this.setupPre(opts).catch(e => {
|
|
77
|
+
this.setupP = this.setupPre(opts).catch((e) => {
|
|
83
78
|
this.setupP = undefined;
|
|
84
79
|
throw e;
|
|
85
80
|
});
|
|
@@ -142,10 +137,11 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
142
137
|
continue;
|
|
143
138
|
}
|
|
144
139
|
if (tagFilter) {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
140
|
+
const readVal = record.get(tagFilter.tag);
|
|
141
|
+
const filterVal = tagFilter.value;
|
|
142
|
+
if (filterVal === '*'
|
|
143
|
+
? readVal !== undefined
|
|
144
|
+
: `${readVal}` !== `${filterVal}`) {
|
|
149
145
|
continue;
|
|
150
146
|
}
|
|
151
147
|
}
|
|
@@ -166,9 +162,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
166
162
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
167
163
|
return { bytes, fetchSizeLimit };
|
|
168
164
|
}
|
|
169
|
-
|
|
170
|
-
return super.getMultiRegionFeatureDensityStats(regions, opts);
|
|
171
|
-
}
|
|
165
|
+
return super.getMultiRegionFeatureDensityStats(regions, opts);
|
|
172
166
|
}
|
|
173
167
|
freeResources( /* { region } */) { }
|
|
174
168
|
// depends on setup being called before the BAM constructor
|
|
@@ -29,7 +29,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
29
29
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
30
30
|
refNameToId(refName: string): number | undefined;
|
|
31
31
|
refIdToName(refId: number): string | undefined;
|
|
32
|
-
refIdToOriginalName(refId: number): string;
|
|
32
|
+
refIdToOriginalName(refId: number): string | undefined;
|
|
33
33
|
getFeatures(region: Region & {
|
|
34
34
|
originalRefName?: string;
|
|
35
35
|
}, opts?: BaseOptions & {
|
|
@@ -44,7 +44,7 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
44
44
|
}
|
|
45
45
|
async configure() {
|
|
46
46
|
if (!this.configureP) {
|
|
47
|
-
this.configureP = this.configurePre().catch(e => {
|
|
47
|
+
this.configureP = this.configurePre().catch((e) => {
|
|
48
48
|
this.configureP = undefined;
|
|
49
49
|
throw e;
|
|
50
50
|
});
|
|
@@ -118,7 +118,7 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
118
118
|
}
|
|
119
119
|
async setup(opts) {
|
|
120
120
|
if (!this.setupP) {
|
|
121
|
-
this.setupP = this.setupPre(opts).catch(e => {
|
|
121
|
+
this.setupP = this.setupPre(opts).catch((e) => {
|
|
122
122
|
this.setupP = undefined;
|
|
123
123
|
throw e;
|
|
124
124
|
});
|
|
@@ -177,12 +177,13 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
177
177
|
continue;
|
|
178
178
|
}
|
|
179
179
|
if (tagFilter) {
|
|
180
|
-
const
|
|
180
|
+
const readVal = tagFilter.tag === 'RG'
|
|
181
181
|
? (_a = samHeader.readGroups) === null || _a === void 0 ? void 0 : _a[record.readGroupId]
|
|
182
182
|
: record.tags[tagFilter.tag];
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
const filterVal = tagFilter.value;
|
|
184
|
+
if (filterVal === '*'
|
|
185
|
+
? readVal !== undefined
|
|
186
|
+
: `${readVal}` !== `${filterVal}`) {
|
|
186
187
|
continue;
|
|
187
188
|
}
|
|
188
189
|
}
|
|
@@ -19,7 +19,11 @@ function parseSmallFasta(text) {
|
|
|
19
19
|
const [id, ...descriptionLines] = defLine.split(' ');
|
|
20
20
|
const description = descriptionLines.join(' ');
|
|
21
21
|
const sequence = seqLines.join('').replaceAll(/\s/g, '');
|
|
22
|
-
return {
|
|
22
|
+
return {
|
|
23
|
+
id: id,
|
|
24
|
+
description,
|
|
25
|
+
sequence,
|
|
26
|
+
};
|
|
23
27
|
});
|
|
24
28
|
}
|
|
25
29
|
class FetchableSmallFasta {
|
|
@@ -71,7 +75,9 @@ class SequenceAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
71
75
|
}));
|
|
72
76
|
observer.complete();
|
|
73
77
|
})
|
|
74
|
-
.catch(e =>
|
|
78
|
+
.catch((e) => {
|
|
79
|
+
observer.error(e);
|
|
80
|
+
});
|
|
75
81
|
return { unsubscribe: () => { } };
|
|
76
82
|
});
|
|
77
83
|
}
|
|
@@ -16,7 +16,7 @@ function GuessAlignmentsTypesF(pluginManager) {
|
|
|
16
16
|
if (regexGuess.test(fileName) && !adapterHint) {
|
|
17
17
|
return obj;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
if (adapterHint === adapterName) {
|
|
20
20
|
return obj;
|
|
21
21
|
}
|
|
22
22
|
return adapterGuesser(file, index, adapterHint);
|
|
@@ -39,7 +39,7 @@ function GuessAlignmentsTypesF(pluginManager) {
|
|
|
39
39
|
if (regexGuess.test(fileName) && !adapterHint) {
|
|
40
40
|
return obj;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
if (adapterHint === adapterName) {
|
|
43
43
|
return obj;
|
|
44
44
|
}
|
|
45
45
|
return adapterGuesser(file, index, adapterHint);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { LinearAlignmentsDisplayModel } from '../models/model';
|
|
3
3
|
declare const AlignmentsDisplay: ({ model, }: {
|
|
4
|
-
model:
|
|
4
|
+
model: LinearAlignmentsDisplayModel;
|
|
5
5
|
}) => React.JSX.Element | null;
|
|
6
6
|
export default AlignmentsDisplay;
|
|
@@ -4,6 +4,7 @@ import { AnyConfigurationModel, AnyConfigurationSchemaType } from '@jbrowse/core
|
|
|
4
4
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
5
5
|
import { MenuItem } from '@jbrowse/core/ui';
|
|
6
6
|
import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
7
|
+
import { IFilter } from '../../shared';
|
|
7
8
|
/**
|
|
8
9
|
* #stateModel LinearAlignmentsDisplay
|
|
9
10
|
* extends
|
|
@@ -46,7 +47,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
46
47
|
error: unknown;
|
|
47
48
|
message: string | undefined;
|
|
48
49
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
49
|
-
onHorizontalScroll?:
|
|
50
|
+
onHorizontalScroll?: () => void;
|
|
50
51
|
blockState?: Record<string, any>;
|
|
51
52
|
}>;
|
|
52
53
|
readonly DisplayBlurb: React.FC<{
|
|
@@ -59,26 +60,14 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
59
60
|
error: unknown;
|
|
60
61
|
message: string | undefined;
|
|
61
62
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
62
|
-
id: import("mobx-state-tree").IOptionalIType<import(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*/
|
|
66
|
-
"mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
67
|
-
type: import("mobx-state-tree" /**
|
|
68
|
-
* #getter
|
|
69
|
-
*/).ISimpleType<string>;
|
|
70
|
-
rpcDriverName: import("mobx-state-tree" /**
|
|
71
|
-
* #getter
|
|
72
|
-
*/).IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
63
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
64
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
65
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
73
66
|
}, {
|
|
74
67
|
rendererTypeName: string;
|
|
75
68
|
error: unknown;
|
|
76
69
|
message: string | undefined;
|
|
77
|
-
}, import("mobx-state-tree")._NotCustomized, import(
|
|
78
|
-
/**
|
|
79
|
-
* #getter
|
|
80
|
-
*/
|
|
81
|
-
"mobx-state-tree")._NotCustomized>>;
|
|
70
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
82
71
|
}> | null;
|
|
83
72
|
readonly adapterConfig: any;
|
|
84
73
|
readonly parentTrack: any;
|
|
@@ -131,7 +120,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
131
120
|
*/
|
|
132
121
|
readonly features: any;
|
|
133
122
|
/**
|
|
134
|
-
* #
|
|
123
|
+
* #getteralignmentsdisplaymodel
|
|
135
124
|
*/
|
|
136
125
|
readonly DisplayBlurb: any;
|
|
137
126
|
/**
|
|
@@ -159,6 +148,10 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
159
148
|
* #action
|
|
160
149
|
*/
|
|
161
150
|
setHeight(n: number): number;
|
|
151
|
+
/**
|
|
152
|
+
* #action
|
|
153
|
+
*/
|
|
154
|
+
setFilterBy(filter: IFilter): void;
|
|
162
155
|
/**
|
|
163
156
|
* #action
|
|
164
157
|
*/
|
|
@@ -195,5 +188,5 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
195
188
|
lowerPanelType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
196
189
|
}>>, import("mobx-state-tree")._NotCustomized>;
|
|
197
190
|
export default stateModelFactory;
|
|
198
|
-
export type
|
|
199
|
-
export type
|
|
191
|
+
export type LinearAlignmentsDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
192
|
+
export type LinearAlignmentsDisplayModel = Instance<LinearAlignmentsDisplayStateModel>;
|
|
@@ -116,7 +116,7 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
116
116
|
return self.PileupDisplay.features;
|
|
117
117
|
},
|
|
118
118
|
/**
|
|
119
|
-
* #
|
|
119
|
+
* #getteralignmentsdisplaymodel
|
|
120
120
|
*/
|
|
121
121
|
get DisplayBlurb() {
|
|
122
122
|
var _a;
|
|
@@ -173,6 +173,13 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
173
173
|
self.heightPreConfig = Math.max(n, minDisplayHeight);
|
|
174
174
|
return self.heightPreConfig;
|
|
175
175
|
},
|
|
176
|
+
/**
|
|
177
|
+
* #action
|
|
178
|
+
*/
|
|
179
|
+
setFilterBy(filter) {
|
|
180
|
+
self.PileupDisplay.setFilterBy(filter);
|
|
181
|
+
self.SNPCoverageDisplay.setFilterBy(filter);
|
|
182
|
+
},
|
|
176
183
|
/**
|
|
177
184
|
* #action
|
|
178
185
|
*/
|
|
@@ -244,7 +251,9 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
244
251
|
type: 'radio',
|
|
245
252
|
label: d.displayName,
|
|
246
253
|
checked: d.name === self.PileupDisplay.type,
|
|
247
|
-
onClick: () =>
|
|
254
|
+
onClick: () => {
|
|
255
|
+
self.setLowerPanelType(d.name);
|
|
256
|
+
},
|
|
248
257
|
}));
|
|
249
258
|
return [
|
|
250
259
|
...superTrackMenuItems(),
|
|
@@ -260,7 +269,7 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
260
269
|
},
|
|
261
270
|
{
|
|
262
271
|
type: 'subMenu',
|
|
263
|
-
label:
|
|
272
|
+
label: 'Replace lower panel with...',
|
|
264
273
|
subMenu: extra,
|
|
265
274
|
},
|
|
266
275
|
];
|
|
@@ -268,6 +277,7 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
268
277
|
};
|
|
269
278
|
})
|
|
270
279
|
.preProcessSnapshot(snap => {
|
|
280
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
271
281
|
if (!snap) {
|
|
272
282
|
return snap;
|
|
273
283
|
}
|
|
@@ -138,7 +138,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
138
138
|
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
139
139
|
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
140
140
|
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
141
|
-
value: import("mobx-state-tree").ISimpleType<string
|
|
141
|
+
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
142
142
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
143
143
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
144
144
|
/**
|
|
@@ -168,7 +168,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
168
168
|
error: unknown;
|
|
169
169
|
message: string | undefined;
|
|
170
170
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
171
|
-
onHorizontalScroll?:
|
|
171
|
+
onHorizontalScroll?: () => void;
|
|
172
172
|
blockState?: Record<string, any>;
|
|
173
173
|
}>;
|
|
174
174
|
readonly DisplayBlurb: import("react").FC<{
|
|
@@ -181,7 +181,9 @@ 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"
|
|
184
|
+
id: import("mobx-state-tree" /**
|
|
185
|
+
* #property
|
|
186
|
+
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
185
187
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
186
188
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
187
189
|
}, {
|
|
@@ -284,7 +286,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
284
286
|
/**
|
|
285
287
|
* #action
|
|
286
288
|
*/
|
|
287
|
-
setMaxHeight(n
|
|
289
|
+
setMaxHeight(n?: number): void;
|
|
288
290
|
/**
|
|
289
291
|
* #action
|
|
290
292
|
*/
|
|
@@ -417,6 +419,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
417
419
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
418
420
|
muiName: string;
|
|
419
421
|
};
|
|
422
|
+
priority: number;
|
|
420
423
|
onClick: () => void;
|
|
421
424
|
})[];
|
|
422
425
|
} & {
|
|
@@ -45,11 +45,11 @@ const LinearPileupDisplayBlurb_1 = __importDefault(require("./components/LinearP
|
|
|
45
45
|
const shared_1 = require("../shared");
|
|
46
46
|
const util_2 = require("../util");
|
|
47
47
|
const color_1 = require("../shared/color");
|
|
48
|
-
//
|
|
49
|
-
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/
|
|
50
|
-
const ColorByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/
|
|
51
|
-
const SetFeatureHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/
|
|
52
|
-
const SetMaxHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/
|
|
48
|
+
// lazies
|
|
49
|
+
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/FilterByTagDialog'))));
|
|
50
|
+
const ColorByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ColorByTagDialog'))));
|
|
51
|
+
const SetFeatureHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetFeatureHeightDialog'))));
|
|
52
|
+
const SetMaxHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetMaxHeightDialog'))));
|
|
53
53
|
// using a map because it preserves order
|
|
54
54
|
const rendererTypes = new Map([
|
|
55
55
|
['pileup', 'PileupRenderer'],
|
|
@@ -291,18 +291,14 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
291
291
|
icon: MenuOpen_1.default,
|
|
292
292
|
onClick: () => {
|
|
293
293
|
self.clearFeatureSelection();
|
|
294
|
-
|
|
295
|
-
self.selectFeature(feat);
|
|
296
|
-
}
|
|
294
|
+
self.selectFeature(feat);
|
|
297
295
|
},
|
|
298
296
|
},
|
|
299
297
|
{
|
|
300
298
|
label: 'Copy info to clipboard',
|
|
301
299
|
icon: Icons_1.ContentCopy,
|
|
302
300
|
onClick: () => {
|
|
303
|
-
|
|
304
|
-
self.copyFeatureToClipboard(feat);
|
|
305
|
-
}
|
|
301
|
+
self.copyFeatureToClipboard(feat);
|
|
306
302
|
},
|
|
307
303
|
},
|
|
308
304
|
]
|
|
@@ -395,27 +391,39 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
395
391
|
return [
|
|
396
392
|
{
|
|
397
393
|
label: 'Normal',
|
|
398
|
-
onClick: () =>
|
|
394
|
+
onClick: () => {
|
|
395
|
+
self.setColorScheme({ type: 'normal' });
|
|
396
|
+
},
|
|
399
397
|
},
|
|
400
398
|
{
|
|
401
399
|
label: 'Mapping quality',
|
|
402
|
-
onClick: () =>
|
|
400
|
+
onClick: () => {
|
|
401
|
+
self.setColorScheme({ type: 'mappingQuality' });
|
|
402
|
+
},
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
label: 'Strand',
|
|
406
|
-
onClick: () =>
|
|
406
|
+
onClick: () => {
|
|
407
|
+
self.setColorScheme({ type: 'strand' });
|
|
408
|
+
},
|
|
407
409
|
},
|
|
408
410
|
{
|
|
409
411
|
label: 'Per-base quality',
|
|
410
|
-
onClick: () =>
|
|
412
|
+
onClick: () => {
|
|
413
|
+
self.setColorScheme({ type: 'perBaseQuality' });
|
|
414
|
+
},
|
|
411
415
|
},
|
|
412
416
|
{
|
|
413
417
|
label: 'Per-base lettering',
|
|
414
|
-
onClick: () =>
|
|
418
|
+
onClick: () => {
|
|
419
|
+
self.setColorScheme({ type: 'perBaseLettering' });
|
|
420
|
+
},
|
|
415
421
|
},
|
|
416
422
|
{
|
|
417
423
|
label: 'First-of-pair strand',
|
|
418
|
-
onClick: () =>
|
|
424
|
+
onClick: () => {
|
|
425
|
+
self.setColorScheme({ type: 'stranded' });
|
|
426
|
+
},
|
|
419
427
|
},
|
|
420
428
|
{
|
|
421
429
|
label: 'Color by tag...',
|
|
@@ -435,8 +443,9 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
435
443
|
return [
|
|
436
444
|
...superTrackMenuItems(),
|
|
437
445
|
{
|
|
438
|
-
label: 'Filter by',
|
|
446
|
+
label: 'Filter by...',
|
|
439
447
|
icon: ClearAll_1.default,
|
|
448
|
+
priority: -1,
|
|
440
449
|
onClick: () => {
|
|
441
450
|
(0, util_1.getSession)(self).queueDialog(doneCallback => [
|
|
442
451
|
FilterByTagDialog,
|
|
@@ -445,7 +454,8 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
445
454
|
},
|
|
446
455
|
},
|
|
447
456
|
{
|
|
448
|
-
label: 'Set feature height',
|
|
457
|
+
label: 'Set feature height...',
|
|
458
|
+
priority: -1,
|
|
449
459
|
subMenu: [
|
|
450
460
|
{
|
|
451
461
|
label: 'Normal',
|
|
@@ -500,7 +510,11 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
500
510
|
const { colorBy, tagsReady } = self;
|
|
501
511
|
const { staticBlocks } = view;
|
|
502
512
|
if ((colorBy === null || colorBy === void 0 ? void 0 : colorBy.tag) && !tagsReady) {
|
|
503
|
-
const vals = await (0, shared_1.getUniqueTagValues)(
|
|
513
|
+
const vals = await (0, shared_1.getUniqueTagValues)({
|
|
514
|
+
self,
|
|
515
|
+
tag: colorBy.tag,
|
|
516
|
+
blocks: staticBlocks,
|
|
517
|
+
});
|
|
504
518
|
self.updateColorTagMap(vals);
|
|
505
519
|
}
|
|
506
520
|
self.setTagsReady(true);
|
|
@@ -530,7 +544,8 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
530
544
|
// feature.id that was returned e.g. that the user hasn't
|
|
531
545
|
// moused over to a new position during the async operation
|
|
532
546
|
// above
|
|
533
|
-
if (
|
|
547
|
+
if (feature &&
|
|
548
|
+
self.featureIdUnderMouse === feature.uniqueId) {
|
|
534
549
|
self.setFeatureUnderMouse(new util_1.SimpleFeature(feature));
|
|
535
550
|
}
|
|
536
551
|
}
|
|
@@ -34,6 +34,8 @@ const ColorByModificationsDialog = (0, mobx_react_1.observer)(function ({ model,
|
|
|
34
34
|
model.setColorScheme({ type: 'methylation' });
|
|
35
35
|
handleClose();
|
|
36
36
|
} }, "Methylation"),
|
|
37
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () =>
|
|
37
|
+
react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
38
|
+
handleClose();
|
|
39
|
+
} }, "Cancel")))));
|
|
38
40
|
});
|
|
39
41
|
exports.default = ColorByModificationsDialog;
|