@jbrowse/plugin-alignments 2.15.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 +14 -15
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +30 -18
- 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/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 +14 -15
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +30 -18
- 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/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/shared/color.d.ts +3 -0
- package/esm/shared/color.js +20 -10
- package/package.json +3 -2
- 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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { lazy, useEffect, useState } from 'react';
|
|
2
|
+
import { Typography, Link } from '@mui/material';
|
|
3
|
+
import { SimpleFeature, getSession, toLocale, } from '@jbrowse/core/util';
|
|
4
|
+
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
5
|
+
import { getSAFeatures } from './getSAFeatures';
|
|
6
|
+
// lazies
|
|
7
|
+
const BreakendMultiLevelOptionDialog = lazy(() => import('./BreakendMultiLevelOptionDialog'));
|
|
8
|
+
const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
|
|
9
|
+
export default function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
|
|
10
|
+
const session = getSession(model);
|
|
11
|
+
const { view } = model;
|
|
12
|
+
const [res, setRes] = useState();
|
|
13
|
+
const [error, setError] = useState();
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
16
|
+
;
|
|
17
|
+
(async () => {
|
|
18
|
+
try {
|
|
19
|
+
const feats = await getSAFeatures({
|
|
20
|
+
view,
|
|
21
|
+
feature: new SimpleFeature(feature),
|
|
22
|
+
});
|
|
23
|
+
setRes(feats);
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
setError(e);
|
|
27
|
+
console.error(e);
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
30
|
+
}, [feature, view]);
|
|
31
|
+
const ret = [];
|
|
32
|
+
if (res) {
|
|
33
|
+
for (let i = 0; i < res.length - 1; i++) {
|
|
34
|
+
ret.push([res[i], res[i + 1]]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return ret.length ? (React.createElement("div", null,
|
|
38
|
+
React.createElement(Typography, null, "Launch split view"),
|
|
39
|
+
error ? React.createElement(ErrorMessage, { error: error }) : null,
|
|
40
|
+
React.createElement("ul", null, ret.map((arg, index) => {
|
|
41
|
+
const [f1, f2] = arg;
|
|
42
|
+
return (React.createElement("li", { key: `${JSON.stringify(arg)}-${index}` },
|
|
43
|
+
f1.refName,
|
|
44
|
+
":",
|
|
45
|
+
toLocale(f1.strand === 1 ? f1.end : f1.start),
|
|
46
|
+
" ->",
|
|
47
|
+
' ',
|
|
48
|
+
f2.refName,
|
|
49
|
+
":",
|
|
50
|
+
toLocale(f2.strand === 1 ? f2.start : f2.end),
|
|
51
|
+
' ',
|
|
52
|
+
React.createElement(Link, { href: "#", onClick: event => {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
session.queueDialog(handleClose => [
|
|
55
|
+
BreakendMultiLevelOptionDialog,
|
|
56
|
+
{
|
|
57
|
+
handleClose,
|
|
58
|
+
model,
|
|
59
|
+
feature: new SimpleFeature({ ...f1, mate: f2 }),
|
|
60
|
+
// @ts-expect-error
|
|
61
|
+
viewType,
|
|
62
|
+
view: model.view,
|
|
63
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
64
|
+
},
|
|
65
|
+
]);
|
|
66
|
+
} }, "(top/bottom)"),
|
|
67
|
+
' ',
|
|
68
|
+
React.createElement(Link, { href: "#", onClick: event => {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
session.queueDialog(handleClose => [
|
|
71
|
+
BreakendSingleLevelOptionDialog,
|
|
72
|
+
{
|
|
73
|
+
handleClose,
|
|
74
|
+
model,
|
|
75
|
+
feature: new SimpleFeature({ ...f1, mate: f2 }),
|
|
76
|
+
// @ts-expect-error
|
|
77
|
+
viewType,
|
|
78
|
+
view: model.view,
|
|
79
|
+
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
80
|
+
},
|
|
81
|
+
]);
|
|
82
|
+
} }, "(single row)")));
|
|
83
|
+
})))) : null;
|
|
84
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
3
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
4
|
+
import LaunchPairedEndBreakpointSplitViewPanel from './LaunchPairedEndBreakpointSplitViewPanel';
|
|
5
|
+
export default function SuppAlignments(props) {
|
|
6
|
+
const { model, feature } = props;
|
|
7
|
+
const session = getSession(model);
|
|
8
|
+
const { pluginManager } = getEnv(session);
|
|
9
|
+
let viewType;
|
|
10
|
+
try {
|
|
11
|
+
viewType = pluginManager.getViewType('BreakpointSplitView');
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
// ignore
|
|
15
|
+
}
|
|
16
|
+
return (React.createElement(BaseCard, { ...props, title: "Supplementary alignments" }, viewType ? (React.createElement(LaunchPairedEndBreakpointSplitViewPanel, { viewType: viewType, model: model, feature: feature })) : null));
|
|
17
|
+
}
|
|
@@ -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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
3
3
|
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
4
|
-
import
|
|
5
|
-
import LaunchBreakpointSplitViewPanel from './
|
|
6
|
-
export default function
|
|
4
|
+
import SupplementaryAlignmentsLocStrings from './SupplementaryAlignmentsLocStrings';
|
|
5
|
+
import LaunchBreakpointSplitViewPanel from './LaunchSupplementaryAlignmentBreakpointSplitViewPanel';
|
|
6
|
+
export default function SupplementaryAlignments(props) {
|
|
7
7
|
const { model, tag, feature } = props;
|
|
8
8
|
const session = getSession(model);
|
|
9
9
|
const { pluginManager } = getEnv(session);
|
|
@@ -15,6 +15,6 @@ export default function SuppAlignments(props) {
|
|
|
15
15
|
// ignore
|
|
16
16
|
}
|
|
17
17
|
return (React.createElement(BaseCard, { ...props, title: "Supplementary alignments" },
|
|
18
|
-
React.createElement(
|
|
18
|
+
React.createElement(SupplementaryAlignmentsLocStrings, { model: model, tag: tag }),
|
|
19
19
|
viewType ? (React.createElement(LaunchBreakpointSplitViewPanel, { viewType: viewType, model: model, feature: feature })) : null));
|
|
20
20
|
}
|
|
@@ -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,7 +3,7 @@ import { Typography, Link } from '@mui/material';
|
|
|
3
3
|
// locals
|
|
4
4
|
import { getLengthOnRef } from '../MismatchParser';
|
|
5
5
|
import { navToLoc } from './util';
|
|
6
|
-
export default function
|
|
6
|
+
export default function SupplementaryAlignmentsLocStrings({ tag, model, }) {
|
|
7
7
|
return (React.createElement("div", null,
|
|
8
8
|
React.createElement(Typography, null, "List of supplementary alignment locations"),
|
|
9
9
|
React.createElement("ul", null, tag
|
|
@@ -6,13 +6,12 @@ import { getLowerPanelDisplays } from './util';
|
|
|
6
6
|
* #stateModel LinearAlignmentsDisplayMixin
|
|
7
7
|
*/
|
|
8
8
|
export function LinearAlignmentsDisplayMixin(pluginManager, configSchema) {
|
|
9
|
-
const lowerPanelDisplays = getLowerPanelDisplays(pluginManager).map(f => f.stateModel);
|
|
10
9
|
return types.model({
|
|
11
10
|
/**
|
|
12
11
|
* #property
|
|
13
12
|
* refers to LinearPileupDisplay sub-display model
|
|
14
13
|
*/
|
|
15
|
-
PileupDisplay: types.maybe(types.union(...
|
|
14
|
+
PileupDisplay: types.maybe(types.union(...getLowerPanelDisplays(pluginManager).map(f => f.stateModel))),
|
|
16
15
|
/**
|
|
17
16
|
* #property
|
|
18
17
|
* refers to LinearSNPCoverageDisplay sub-display model
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export function getLowerPanelDisplays(pluginManager) {
|
|
2
|
-
return
|
|
2
|
+
return pluginManager
|
|
3
3
|
.getDisplayElements()
|
|
4
|
-
// @ts-expect-error
|
|
5
4
|
.filter(f => { var _a; return ((_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.type) === 'LinearAlignmentsDisplay'; })
|
|
6
|
-
|
|
7
|
-
.filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; }));
|
|
5
|
+
.filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; });
|
|
8
6
|
}
|
|
@@ -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;
|
|
@@ -194,7 +194,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
194
194
|
readonly parentTrack: any;
|
|
195
195
|
renderProps(): any;
|
|
196
196
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
197
|
-
readonly DisplayMessageComponent: undefined |
|
|
197
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
198
198
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
199
199
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
200
200
|
regionCannotBeRendered(): null;
|
|
@@ -240,13 +240,13 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
240
240
|
featureIdUnderMouse: undefined | string;
|
|
241
241
|
contextMenuFeature: undefined | Feature;
|
|
242
242
|
} & {
|
|
243
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
243
244
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
244
245
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
245
246
|
} & {
|
|
246
247
|
readonly renderDelay: number;
|
|
247
|
-
readonly TooltipComponent: import("
|
|
248
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
248
249
|
readonly selectedFeatureId: string | undefined;
|
|
249
|
-
readonly DisplayMessageComponent: undefined | import("react").FC<any>;
|
|
250
250
|
} & {
|
|
251
251
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
252
252
|
readonly featureUnderMouse: Feature | undefined;
|
|
@@ -421,7 +421,6 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
421
421
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
422
422
|
muiName: string;
|
|
423
423
|
};
|
|
424
|
-
priority: number;
|
|
425
424
|
onClick: () => void;
|
|
426
425
|
})[];
|
|
427
426
|
} & {
|
|
@@ -458,7 +457,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
458
457
|
}, {
|
|
459
458
|
renderInProgress: AbortController | undefined;
|
|
460
459
|
filled: boolean;
|
|
461
|
-
reactElement:
|
|
460
|
+
reactElement: React.ReactElement | undefined;
|
|
462
461
|
features: Map<string, Feature> | undefined;
|
|
463
462
|
layout: any;
|
|
464
463
|
status: string;
|
|
@@ -469,10 +468,10 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
469
468
|
model: {
|
|
470
469
|
error?: unknown;
|
|
471
470
|
reload: () => void;
|
|
472
|
-
message:
|
|
471
|
+
message: React.ReactNode;
|
|
473
472
|
filled?: boolean;
|
|
474
473
|
status?: string;
|
|
475
|
-
reactElement?:
|
|
474
|
+
reactElement?: React.ReactElement;
|
|
476
475
|
};
|
|
477
476
|
}) => import("react").JSX.Element | undefined;
|
|
478
477
|
renderProps: any;
|
|
@@ -483,7 +482,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
483
482
|
setLoading(abortController: AbortController): void;
|
|
484
483
|
setMessage(messageText: string): void;
|
|
485
484
|
setRendered(props: {
|
|
486
|
-
reactElement:
|
|
485
|
+
reactElement: React.ReactElement;
|
|
487
486
|
features: Map<string, Feature>;
|
|
488
487
|
layout: any;
|
|
489
488
|
maxHeightReached: boolean;
|
|
@@ -525,8 +524,8 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
|
|
|
525
524
|
type: string;
|
|
526
525
|
id: string;
|
|
527
526
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
528
|
-
rpcDriverName: string | undefined;
|
|
529
527
|
heightPreConfig: number | undefined;
|
|
528
|
+
rpcDriverName: string | undefined;
|
|
530
529
|
userBpPerPxLimit: number | undefined;
|
|
531
530
|
userByteSizeLimit: number | undefined;
|
|
532
531
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -403,9 +403,12 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
403
403
|
{
|
|
404
404
|
label: 'Color by tag...',
|
|
405
405
|
onClick: () => {
|
|
406
|
-
getSession(self).queueDialog(
|
|
406
|
+
getSession(self).queueDialog(handleClose => [
|
|
407
407
|
ColorByTagDialog,
|
|
408
|
-
{
|
|
408
|
+
{
|
|
409
|
+
model: self,
|
|
410
|
+
handleClose,
|
|
411
|
+
},
|
|
409
412
|
]);
|
|
410
413
|
},
|
|
411
414
|
},
|
|
@@ -417,20 +420,9 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
417
420
|
trackMenuItems() {
|
|
418
421
|
return [
|
|
419
422
|
...superTrackMenuItems(),
|
|
420
|
-
{
|
|
421
|
-
label: 'Filter by...',
|
|
422
|
-
icon: FilterListIcon,
|
|
423
|
-
priority: -1,
|
|
424
|
-
onClick: () => {
|
|
425
|
-
getSession(self).queueDialog(doneCallback => [
|
|
426
|
-
FilterByTagDialog,
|
|
427
|
-
{ model: self, handleClose: doneCallback },
|
|
428
|
-
]);
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
423
|
{
|
|
432
424
|
label: 'Set feature height...',
|
|
433
|
-
priority:
|
|
425
|
+
priority: 1,
|
|
434
426
|
subMenu: [
|
|
435
427
|
{
|
|
436
428
|
label: 'Normal',
|
|
@@ -449,9 +441,12 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
449
441
|
{
|
|
450
442
|
label: 'Manually set height',
|
|
451
443
|
onClick: () => {
|
|
452
|
-
getSession(self).queueDialog(
|
|
444
|
+
getSession(self).queueDialog(handleClose => [
|
|
453
445
|
SetFeatureHeightDialog,
|
|
454
|
-
{
|
|
446
|
+
{
|
|
447
|
+
model: self,
|
|
448
|
+
handleClose,
|
|
449
|
+
},
|
|
455
450
|
]);
|
|
456
451
|
},
|
|
457
452
|
},
|
|
@@ -459,10 +454,27 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
459
454
|
},
|
|
460
455
|
{
|
|
461
456
|
label: 'Set max height...',
|
|
457
|
+
priority: -1,
|
|
462
458
|
onClick: () => {
|
|
463
|
-
getSession(self).queueDialog(
|
|
459
|
+
getSession(self).queueDialog(handleClose => [
|
|
464
460
|
SetMaxHeightDialog,
|
|
465
|
-
{
|
|
461
|
+
{
|
|
462
|
+
model: self,
|
|
463
|
+
handleClose,
|
|
464
|
+
},
|
|
465
|
+
]);
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
label: 'Filter by...',
|
|
470
|
+
icon: FilterListIcon,
|
|
471
|
+
onClick: () => {
|
|
472
|
+
getSession(self).queueDialog(handleClose => [
|
|
473
|
+
FilterByTagDialog,
|
|
474
|
+
{
|
|
475
|
+
model: self,
|
|
476
|
+
handleClose,
|
|
477
|
+
},
|
|
466
478
|
]);
|
|
467
479
|
},
|
|
468
480
|
},
|
|
@@ -34,7 +34,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
34
34
|
}, {
|
|
35
35
|
renderInProgress: AbortController | undefined;
|
|
36
36
|
filled: boolean;
|
|
37
|
-
reactElement:
|
|
37
|
+
reactElement: React.ReactElement | undefined;
|
|
38
38
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
39
39
|
layout: any;
|
|
40
40
|
status: string;
|
|
@@ -45,12 +45,12 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
45
45
|
model: {
|
|
46
46
|
error?: unknown;
|
|
47
47
|
reload: () => void;
|
|
48
|
-
message:
|
|
48
|
+
message: React.ReactNode;
|
|
49
49
|
filled?: boolean;
|
|
50
50
|
status?: string;
|
|
51
51
|
reactElement? /**
|
|
52
52
|
* #property
|
|
53
|
-
*/:
|
|
53
|
+
*/: React.ReactElement;
|
|
54
54
|
};
|
|
55
55
|
}) => import("react").JSX.Element | undefined;
|
|
56
56
|
renderProps: any;
|
|
@@ -61,7 +61,11 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
61
61
|
setLoading(abortController: AbortController): void;
|
|
62
62
|
setMessage(messageText: string): void;
|
|
63
63
|
setRendered(props: {
|
|
64
|
-
reactElement:
|
|
64
|
+
reactElement: React.
|
|
65
|
+
/**
|
|
66
|
+
* #action
|
|
67
|
+
*/
|
|
68
|
+
ReactElement;
|
|
65
69
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
66
70
|
layout: any;
|
|
67
71
|
maxHeightReached: boolean;
|
|
@@ -137,7 +141,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
137
141
|
error: unknown;
|
|
138
142
|
message: string | undefined;
|
|
139
143
|
} & {
|
|
140
|
-
readonly RenderingComponent:
|
|
144
|
+
readonly RenderingComponent: React.FC<{
|
|
141
145
|
model: {
|
|
142
146
|
id: string;
|
|
143
147
|
type: string;
|
|
@@ -160,7 +164,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
160
164
|
onHorizontalScroll?: () => void;
|
|
161
165
|
blockState?: Record<string, any>;
|
|
162
166
|
}>;
|
|
163
|
-
readonly DisplayBlurb:
|
|
167
|
+
readonly DisplayBlurb: React.FC<{
|
|
164
168
|
model: {
|
|
165
169
|
id: string;
|
|
166
170
|
type: string;
|
|
@@ -185,7 +189,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
185
189
|
readonly parentTrack: any;
|
|
186
190
|
renderProps(): any;
|
|
187
191
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
188
|
-
readonly DisplayMessageComponent: undefined |
|
|
192
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
189
193
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
190
194
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
191
195
|
regionCannotBeRendered(): null;
|
|
@@ -231,13 +235,13 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
231
235
|
featureIdUnderMouse: undefined | string;
|
|
232
236
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
233
237
|
} & {
|
|
238
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
234
239
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
235
240
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
236
241
|
} & {
|
|
237
242
|
readonly renderDelay: number;
|
|
238
|
-
readonly TooltipComponent: import("
|
|
243
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
239
244
|
readonly selectedFeatureId: string | undefined;
|
|
240
|
-
readonly DisplayMessageComponent: undefined | import("react").FC<any>;
|
|
241
245
|
} & {
|
|
242
246
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
243
247
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
@@ -335,7 +339,6 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
335
339
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
336
340
|
muiName: string;
|
|
337
341
|
};
|
|
338
|
-
priority: number;
|
|
339
342
|
onClick: () => void;
|
|
340
343
|
})[];
|
|
341
344
|
} & {
|
|
@@ -428,6 +431,22 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
428
431
|
* #method
|
|
429
432
|
*/
|
|
430
433
|
trackMenuItems(): readonly [...import("@jbrowse/core/ui").MenuItem[], {
|
|
434
|
+
readonly label: "Sort by...";
|
|
435
|
+
readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
436
|
+
muiName: string;
|
|
437
|
+
};
|
|
438
|
+
readonly disabled: boolean;
|
|
439
|
+
readonly subMenu: readonly [...{
|
|
440
|
+
label: string;
|
|
441
|
+
onClick: () => void;
|
|
442
|
+
}[], {
|
|
443
|
+
readonly label: "Sort by tag...";
|
|
444
|
+
readonly onClick: () => void;
|
|
445
|
+
}, {
|
|
446
|
+
readonly label: "Clear sort";
|
|
447
|
+
readonly onClick: () => void;
|
|
448
|
+
}];
|
|
449
|
+
}, {
|
|
431
450
|
readonly label: "Color by...";
|
|
432
451
|
readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
433
452
|
muiName: string;
|
|
@@ -445,22 +464,6 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
445
464
|
label: string;
|
|
446
465
|
onClick: () => void;
|
|
447
466
|
}[]];
|
|
448
|
-
}, {
|
|
449
|
-
readonly label: "Sort by...";
|
|
450
|
-
readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
451
|
-
muiName: string;
|
|
452
|
-
};
|
|
453
|
-
readonly disabled: boolean;
|
|
454
|
-
readonly subMenu: readonly [...{
|
|
455
|
-
label: string;
|
|
456
|
-
onClick: () => void;
|
|
457
|
-
}[], {
|
|
458
|
-
readonly label: "Sort by tag...";
|
|
459
|
-
readonly onClick: () => void;
|
|
460
|
-
}, {
|
|
461
|
-
readonly label: "Clear sort";
|
|
462
|
-
readonly onClick: () => void;
|
|
463
|
-
}];
|
|
464
467
|
}, {
|
|
465
468
|
readonly label: "Group by...";
|
|
466
469
|
readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
@@ -223,59 +223,65 @@ function stateModelFactory(configSchema) {
|
|
|
223
223
|
return [
|
|
224
224
|
...superTrackMenuItems(),
|
|
225
225
|
{
|
|
226
|
-
label: '
|
|
227
|
-
icon:
|
|
226
|
+
label: 'Sort by...',
|
|
227
|
+
icon: SortIcon,
|
|
228
|
+
disabled: self.showSoftClipping,
|
|
228
229
|
subMenu: [
|
|
229
|
-
{
|
|
230
|
-
label:
|
|
230
|
+
...['Start location', 'Read strand', 'Base pair'].map(option => ({
|
|
231
|
+
label: option,
|
|
231
232
|
onClick: () => {
|
|
232
|
-
self.
|
|
233
|
+
self.setSortedBy(option);
|
|
233
234
|
},
|
|
234
|
-
},
|
|
235
|
+
})),
|
|
235
236
|
{
|
|
236
|
-
label: '
|
|
237
|
+
label: 'Sort by tag...',
|
|
237
238
|
onClick: () => {
|
|
238
|
-
getSession(self).queueDialog(
|
|
239
|
-
|
|
240
|
-
{
|
|
239
|
+
getSession(self).queueDialog(handleClose => [
|
|
240
|
+
SortByTagDialog,
|
|
241
|
+
{
|
|
242
|
+
model: self,
|
|
243
|
+
handleClose,
|
|
244
|
+
},
|
|
241
245
|
]);
|
|
242
246
|
},
|
|
243
247
|
},
|
|
244
248
|
{
|
|
245
|
-
label: '
|
|
249
|
+
label: 'Clear sort',
|
|
246
250
|
onClick: () => {
|
|
247
|
-
self.
|
|
251
|
+
self.clearSelected();
|
|
248
252
|
},
|
|
249
253
|
},
|
|
250
|
-
...superColorSchemeSubMenuItems(),
|
|
251
254
|
],
|
|
252
255
|
},
|
|
253
256
|
{
|
|
254
|
-
label: '
|
|
255
|
-
icon:
|
|
256
|
-
disabled: self.showSoftClipping,
|
|
257
|
+
label: 'Color by...',
|
|
258
|
+
icon: ColorLensIcon,
|
|
257
259
|
subMenu: [
|
|
258
|
-
|
|
259
|
-
label:
|
|
260
|
+
{
|
|
261
|
+
label: 'Pair orientation',
|
|
260
262
|
onClick: () => {
|
|
261
|
-
self.
|
|
263
|
+
self.setColorScheme({ type: 'pairOrientation' });
|
|
262
264
|
},
|
|
263
|
-
}
|
|
265
|
+
},
|
|
264
266
|
{
|
|
265
|
-
label: '
|
|
267
|
+
label: 'Modifications or methylation',
|
|
266
268
|
onClick: () => {
|
|
267
|
-
getSession(self).queueDialog(
|
|
268
|
-
|
|
269
|
-
{
|
|
269
|
+
getSession(self).queueDialog(doneCallback => [
|
|
270
|
+
ModificationsDialog,
|
|
271
|
+
{
|
|
272
|
+
model: self,
|
|
273
|
+
handleClose: doneCallback,
|
|
274
|
+
},
|
|
270
275
|
]);
|
|
271
276
|
},
|
|
272
277
|
},
|
|
273
278
|
{
|
|
274
|
-
label: '
|
|
279
|
+
label: 'Insert size',
|
|
275
280
|
onClick: () => {
|
|
276
|
-
self.
|
|
281
|
+
self.setColorScheme({ type: 'insertSize' });
|
|
277
282
|
},
|
|
278
283
|
},
|
|
284
|
+
...superColorSchemeSubMenuItems(),
|
|
279
285
|
],
|
|
280
286
|
},
|
|
281
287
|
{
|
|
@@ -321,8 +327,7 @@ function stateModelFactory(configSchema) {
|
|
|
321
327
|
if (!self.autorunReady) {
|
|
322
328
|
return;
|
|
323
329
|
}
|
|
324
|
-
|
|
325
|
-
self.setCurrSortBpPerPx(bpPerPx);
|
|
330
|
+
self.setCurrSortBpPerPx(view.bpPerPx);
|
|
326
331
|
}, { delay: 1000 });
|
|
327
332
|
createAutorun(self, async () => {
|
|
328
333
|
const { rpcManager } = getSession(self);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
2
2
|
// locals
|
|
3
|
-
import ReactComponent from './components/ReactComponent';
|
|
4
3
|
import configSchemaF from './configSchema';
|
|
5
4
|
import stateModelF from './model';
|
|
5
|
+
import { lazy } from 'react';
|
|
6
6
|
export default function register(pluginManager) {
|
|
7
7
|
pluginManager.addDisplayType(() => {
|
|
8
8
|
const configSchema = configSchemaF(pluginManager);
|
|
@@ -14,7 +14,7 @@ export default function register(pluginManager) {
|
|
|
14
14
|
trackType: 'AlignmentsTrack',
|
|
15
15
|
viewType: 'LinearGenomeView',
|
|
16
16
|
subDisplay: { type: 'LinearAlignmentsDisplay', lowerPanel: true },
|
|
17
|
-
ReactComponent,
|
|
17
|
+
ReactComponent: lazy(() => import('./components/ReactComponent')),
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
}
|