@jbrowse/plugin-arc 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/ArcRenderer/ArcRendering.d.ts +1 -1
- package/esm/ArcRenderer/ArcRendering.js +31 -54
- package/esm/ArcRenderer/configSchema.d.ts +3 -3
- package/esm/ArcRenderer/configSchema.js +1 -1
- package/esm/ArcRenderer/index.js +4 -4
- package/esm/ArcTooltip.d.ts +1 -1
- package/esm/ArcTooltip.js +1 -1
- package/esm/LinearArcDisplay/configSchema.d.ts +4 -4
- package/esm/LinearArcDisplay/configSchema.js +1 -1
- package/esm/LinearArcDisplay/index.js +2 -2
- package/esm/LinearArcDisplay/model.d.ts +961 -107
- package/esm/LinearArcDisplay/model.js +4 -7
- package/esm/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/afterAttach.js +2 -2
- package/esm/LinearPairedArcDisplay/components/Arcs.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/Arcs.js +9 -11
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.js +7 -25
- package/esm/LinearPairedArcDisplay/components/ErrorActions.d.ts +4 -0
- package/esm/LinearPairedArcDisplay/components/ErrorActions.js +20 -0
- package/esm/LinearPairedArcDisplay/components/ErrorMessage.d.ts +5 -0
- package/esm/LinearPairedArcDisplay/components/ErrorMessage.js +9 -0
- package/esm/LinearPairedArcDisplay/components/LoadingBar.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/LoadingBar.js +4 -4
- package/esm/LinearPairedArcDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/ReactComponent.js +3 -3
- package/esm/LinearPairedArcDisplay/components/util.js +6 -8
- package/esm/LinearPairedArcDisplay/configSchema.d.ts +3 -3
- package/esm/LinearPairedArcDisplay/fetchChains.d.ts +2 -2
- package/esm/LinearPairedArcDisplay/fetchChains.js +3 -1
- package/esm/LinearPairedArcDisplay/index.js +5 -4
- package/esm/LinearPairedArcDisplay/model.d.ts +143 -31
- package/esm/LinearPairedArcDisplay/model.js +4 -5
- package/esm/LinearPairedArcDisplay/renderSvg.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/renderSvg.js +1 -1
- package/esm/LinearPairedArcDisplay/util.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/util.js +3 -5
- package/esm/index.js +9 -12
- package/package.json +27 -31
- package/dist/ArcRenderer/ArcRenderer.d.ts +0 -3
- package/dist/ArcRenderer/ArcRenderer.js +0 -9
- package/dist/ArcRenderer/ArcRendering.d.ts +0 -15
- package/dist/ArcRenderer/ArcRendering.js +0 -120
- package/dist/ArcRenderer/configSchema.d.ts +0 -39
- package/dist/ArcRenderer/configSchema.js +0 -44
- package/dist/ArcRenderer/index.d.ts +0 -2
- package/dist/ArcRenderer/index.js +0 -17
- package/dist/ArcTooltip.d.ts +0 -4
- package/dist/ArcTooltip.js +0 -17
- package/dist/LinearArcDisplay/configSchema.d.ts +0 -31
- package/dist/LinearArcDisplay/configSchema.js +0 -14
- package/dist/LinearArcDisplay/index.d.ts +0 -2
- package/dist/LinearArcDisplay/index.js +0 -21
- package/dist/LinearArcDisplay/model.d.ts +0 -342
- package/dist/LinearArcDisplay/model.js +0 -91
- package/dist/LinearPairedArcDisplay/afterAttach.d.ts +0 -2
- package/dist/LinearPairedArcDisplay/afterAttach.js +0 -10
- package/dist/LinearPairedArcDisplay/components/Arcs.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/components/Arcs.js +0 -106
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.js +0 -70
- package/dist/LinearPairedArcDisplay/components/LoadingBar.d.ts +0 -5
- package/dist/LinearPairedArcDisplay/components/LoadingBar.js +0 -25
- package/dist/LinearPairedArcDisplay/components/ReactComponent.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/components/ReactComponent.js +0 -13
- package/dist/LinearPairedArcDisplay/components/util.d.ts +0 -17
- package/dist/LinearPairedArcDisplay/components/util.js +0 -66
- package/dist/LinearPairedArcDisplay/configSchema.d.ts +0 -35
- package/dist/LinearPairedArcDisplay/configSchema.js +0 -18
- package/dist/LinearPairedArcDisplay/fetchChains.d.ts +0 -27
- package/dist/LinearPairedArcDisplay/fetchChains.js +0 -21
- package/dist/LinearPairedArcDisplay/index.d.ts +0 -2
- package/dist/LinearPairedArcDisplay/index.js +0 -54
- package/dist/LinearPairedArcDisplay/model.d.ts +0 -129
- package/dist/LinearPairedArcDisplay/model.js +0 -105
- package/dist/LinearPairedArcDisplay/renderSvg.d.ts +0 -4
- package/dist/LinearPairedArcDisplay/renderSvg.js +0 -17
- package/dist/LinearPairedArcDisplay/util.d.ts +0 -27
- package/dist/LinearPairedArcDisplay/util.js +0 -119
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -43
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
2
|
-
import {
|
|
2
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
3
3
|
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
-
import { types } from 'mobx-state-tree';
|
|
5
4
|
export function stateModelFactory(configSchema) {
|
|
6
5
|
return types
|
|
7
6
|
.compose('LinearArcDisplay', BaseLinearDisplay, types.model({
|
|
@@ -22,18 +21,17 @@ export function stateModelFactory(configSchema) {
|
|
|
22
21
|
}))
|
|
23
22
|
.views(self => ({
|
|
24
23
|
get displayModeSetting() {
|
|
25
|
-
|
|
26
|
-
return (_a = self.displayMode) !== null && _a !== void 0 ? _a : getConf(self, ['renderer', 'displayMode']);
|
|
24
|
+
return self.displayMode ?? getConf(self, ['renderer', 'displayMode']);
|
|
27
25
|
},
|
|
28
26
|
}))
|
|
29
27
|
.views(self => ({
|
|
30
28
|
get rendererConfig() {
|
|
31
29
|
const configBlob = getConf(self, ['renderer']) || {};
|
|
32
30
|
const config = configBlob;
|
|
33
|
-
return
|
|
31
|
+
return {
|
|
34
32
|
...config,
|
|
35
33
|
displayMode: self.displayModeSetting,
|
|
36
|
-
}
|
|
34
|
+
};
|
|
37
35
|
},
|
|
38
36
|
}))
|
|
39
37
|
.views(self => {
|
|
@@ -42,7 +40,6 @@ export function stateModelFactory(configSchema) {
|
|
|
42
40
|
renderProps() {
|
|
43
41
|
return {
|
|
44
42
|
...superRenderProps(),
|
|
45
|
-
rpcDriverName: self.rpcDriverName,
|
|
46
43
|
config: self.rendererConfig,
|
|
47
44
|
height: self.height,
|
|
48
45
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
1
|
+
import type { IAnyStateTreeNode } from '@jbrowse/mobx-state-tree';
|
|
2
2
|
export declare function doAfterAttach<T extends IAnyStateTreeNode>(self: T): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { fetchChains } from
|
|
2
|
-
import { createAutorun } from
|
|
1
|
+
import { fetchChains } from "./fetchChains.js";
|
|
2
|
+
import { createAutorun } from "./util.js";
|
|
3
3
|
export function doAfterAttach(self) {
|
|
4
4
|
createAutorun(self, async () => {
|
|
5
5
|
await fetchChains(self);
|
|
@@ -3,10 +3,9 @@ import { Suspense, lazy, useRef, useState } from 'react';
|
|
|
3
3
|
import { getConf } from '@jbrowse/core/configuration';
|
|
4
4
|
import { getContainingView, getSession, getStrokeProps, } from '@jbrowse/core/util';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
import { makeFeaturePair, makeSummary } from
|
|
7
|
-
const ArcTooltip = lazy(() => import(
|
|
8
|
-
const Arc = observer(function ({ model, feature, alt, assembly, view, }) {
|
|
9
|
-
var _a, _b;
|
|
6
|
+
import { makeFeaturePair, makeSummary } from "./util.js";
|
|
7
|
+
const ArcTooltip = lazy(() => import("../../ArcTooltip.js"));
|
|
8
|
+
const Arc = observer(function Arc({ model, feature, alt, assembly, view, }) {
|
|
10
9
|
const [mouseOvered, setMouseOvered] = useState(false);
|
|
11
10
|
const { height } = model;
|
|
12
11
|
const { k1, k2 } = makeFeaturePair(feature, alt);
|
|
@@ -16,8 +15,8 @@ const Arc = observer(function ({ model, feature, alt, assembly, view, }) {
|
|
|
16
15
|
const ra2 = assembly.getCanonicalRefName(k2.refName) || k2.refName;
|
|
17
16
|
const p1 = k1.start;
|
|
18
17
|
const p2 = k2.start;
|
|
19
|
-
const r1 =
|
|
20
|
-
const r2 =
|
|
18
|
+
const r1 = view.bpToPx({ refName: ra1, coord: p1 })?.offsetPx;
|
|
19
|
+
const r2 = view.bpToPx({ refName: ra2, coord: p2 })?.offsetPx;
|
|
21
20
|
if (r1 !== undefined && r2 !== undefined) {
|
|
22
21
|
const radius = (r2 - r1) / 2;
|
|
23
22
|
const absrad = Math.abs(radius);
|
|
@@ -50,22 +49,21 @@ const Arc = observer(function ({ model, feature, alt, assembly, view, }) {
|
|
|
50
49
|
}
|
|
51
50
|
return null;
|
|
52
51
|
});
|
|
53
|
-
const Wrapper = observer(function ({ model, exportSVG, children, }) {
|
|
52
|
+
const Wrapper = observer(function Wrapper({ model, exportSVG, children, }) {
|
|
54
53
|
const { height } = model;
|
|
55
54
|
const view = getContainingView(model);
|
|
56
55
|
const width = Math.round(view.dynamicBlocks.totalWidthPx);
|
|
57
56
|
return exportSVG ? (children) : (_jsx("svg", { width: width, height: height, children: children }));
|
|
58
57
|
});
|
|
59
|
-
const Arcs = observer(function ({ model, exportSVG, }) {
|
|
58
|
+
const Arcs = observer(function Arcs({ model, exportSVG, }) {
|
|
60
59
|
const view = getContainingView(model);
|
|
61
60
|
const session = getSession(model);
|
|
62
61
|
const { assemblyManager } = session;
|
|
63
62
|
const { features } = model;
|
|
64
63
|
const assembly = assemblyManager.get(view.assemblyNames[0]);
|
|
65
|
-
return assembly ? (_jsx(Wrapper, { model: model, exportSVG: exportSVG, children: features
|
|
66
|
-
var _a;
|
|
64
|
+
return assembly ? (_jsx(Wrapper, { model: model, exportSVG: exportSVG, children: features?.map(f => {
|
|
67
65
|
const alts = f.get('ALT');
|
|
68
|
-
return (
|
|
66
|
+
return (alts?.map(a => (_jsx(Arc, { session: session, feature: f, alt: a, view: view, model: model, assembly: assembly }, `${f.id()}-${a}`))) ?? (_jsx(Arc, { session: session, feature: f, view: view, model: model, assembly: assembly }, f.id())));
|
|
69
67
|
}) })) : null;
|
|
70
68
|
});
|
|
71
69
|
export default Arcs;
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import { lazy } from 'react';
|
|
3
|
-
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import { BlockMsg } from '@jbrowse/plugin-linear-genome-view';
|
|
5
|
-
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
6
|
-
import ReportIcon from '@mui/icons-material/Report';
|
|
7
|
-
import { IconButton, Tooltip } from '@mui/material';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy } from 'react';
|
|
8
3
|
import { observer } from 'mobx-react';
|
|
9
|
-
import LoadingBar from
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
13
|
-
model.reload();
|
|
14
|
-
}, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
|
|
15
|
-
getSession(model).queueDialog(onClose => [
|
|
16
|
-
ErrorMessageStackTraceDialog,
|
|
17
|
-
{
|
|
18
|
-
onClose,
|
|
19
|
-
error: model.error,
|
|
20
|
-
},
|
|
21
|
-
]);
|
|
22
|
-
}, children: _jsx(ReportIcon, {}) }) })] }));
|
|
23
|
-
}
|
|
24
|
-
const BaseDisplayComponent = observer(function ({ model, children, }) {
|
|
4
|
+
import LoadingBar from "./LoadingBar.js";
|
|
5
|
+
const ErrorMessage = lazy(() => import("./ErrorMessage.js"));
|
|
6
|
+
const BaseDisplayComponent = observer(function BaseDisplayComponent({ model, children, }) {
|
|
25
7
|
const { error, regionTooLarge } = model;
|
|
26
|
-
return error ? (_jsx(
|
|
8
|
+
return error ? (_jsx(Suspense, { fallback: null, children: _jsx(ErrorMessage, { model: model }) })) : regionTooLarge ? (model.regionCannotBeRendered()) : (_jsx(DataDisplay, { model: model, children: children }));
|
|
27
9
|
});
|
|
28
|
-
const DataDisplay = observer(function ({ model, children, }) {
|
|
10
|
+
const DataDisplay = observer(function DataDisplay({ model, children, }) {
|
|
29
11
|
const { loading } = model;
|
|
30
12
|
return (_jsxs("div", { children: [children, loading ? _jsx(LoadingBar, { model: model }) : null] }));
|
|
31
13
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
3
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
|
+
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
5
|
+
import ReportIcon from '@mui/icons-material/Report';
|
|
6
|
+
import { IconButton, Tooltip } from '@mui/material';
|
|
7
|
+
const ErrorMessageStackTraceDialog = lazy(() => import('@jbrowse/core/ui/ErrorMessageStackTraceDialog'));
|
|
8
|
+
export default function ErrorActions({ model, }) {
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
10
|
+
model.reload();
|
|
11
|
+
}, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
|
|
12
|
+
getSession(model).queueDialog(onClose => [
|
|
13
|
+
ErrorMessageStackTraceDialog,
|
|
14
|
+
{
|
|
15
|
+
onClose,
|
|
16
|
+
error: model.error,
|
|
17
|
+
},
|
|
18
|
+
]);
|
|
19
|
+
}, children: _jsx(ReportIcon, {}) }) })] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BlockMsg } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import ErrorActions from "./ErrorActions.js";
|
|
5
|
+
const ErrorMessage = observer(function ErrorMessage({ model, }) {
|
|
6
|
+
const { error } = model;
|
|
7
|
+
return (_jsx(BlockMsg, { message: `${error}`, severity: "error", action: _jsx(ErrorActions, { model: model }) }));
|
|
8
|
+
});
|
|
9
|
+
export default ErrorMessage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingEllipses } from '@jbrowse/core/ui';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
5
|
const useStyles = makeStyles()(theme => ({
|
|
6
6
|
loading: {
|
|
7
7
|
backgroundColor: theme.palette.background.default,
|
|
@@ -15,9 +15,9 @@ const useStyles = makeStyles()(theme => ({
|
|
|
15
15
|
textAlign: 'center',
|
|
16
16
|
},
|
|
17
17
|
}));
|
|
18
|
-
const LoadingBar = observer(function ({ model, }) {
|
|
18
|
+
const LoadingBar = observer(function LoadingBar({ model, }) {
|
|
19
19
|
const { classes } = useStyles();
|
|
20
|
-
const {
|
|
21
|
-
return (_jsx("div", { className: classes.loading, children: _jsx(LoadingEllipses, { message:
|
|
20
|
+
const { statusMessage } = model;
|
|
21
|
+
return (_jsx("div", { className: classes.loading, children: _jsx(LoadingEllipses, { message: statusMessage }) }));
|
|
22
22
|
});
|
|
23
23
|
export default LoadingBar;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import Arcs from
|
|
4
|
-
import BaseDisplayComponent from
|
|
5
|
-
const LinearArcReactComponent = observer(function ({ model, exportSVG, }) {
|
|
3
|
+
import Arcs from "./Arcs.js";
|
|
4
|
+
import BaseDisplayComponent from "./BaseDisplayComponent.js";
|
|
5
|
+
const LinearArcReactComponent = observer(function LinearArcReactComponent({ model, exportSVG, }) {
|
|
6
6
|
return (_jsx(BaseDisplayComponent, { model: model, children: _jsx(Arcs, { model: model, exportSVG: exportSVG }) }));
|
|
7
7
|
});
|
|
8
8
|
export default LinearArcReactComponent;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { parseBreakend } from '@gmod/vcf';
|
|
2
2
|
import { assembleLocString } from '@jbrowse/core/util';
|
|
3
3
|
export function makeFeaturePair(feature, alt) {
|
|
4
|
-
var _a, _b, _c, _d;
|
|
5
4
|
const bnd = alt ? parseBreakend(alt) : undefined;
|
|
6
5
|
const start = feature.get('start');
|
|
7
6
|
let end = feature.get('end');
|
|
@@ -14,15 +13,15 @@ export function makeFeaturePair(feature, alt) {
|
|
|
14
13
|
let joinDirection = 0;
|
|
15
14
|
let mateDirection = 0;
|
|
16
15
|
const symbolicAlleles = ['<TRA', '<DEL', '<INV', '<INS', '<DUP', '<CNV'];
|
|
17
|
-
if (symbolicAlleles.some(a => alt
|
|
16
|
+
if (symbolicAlleles.some(a => alt?.startsWith(a))) {
|
|
18
17
|
const info = feature.get('INFO');
|
|
19
|
-
const e =
|
|
20
|
-
mateRefName =
|
|
18
|
+
const e = info?.END?.[0] ?? end;
|
|
19
|
+
mateRefName = info?.CHR2?.[0] ?? refName;
|
|
21
20
|
mateEnd = e;
|
|
22
21
|
mateStart = e - 1;
|
|
23
22
|
end = start + 1;
|
|
24
23
|
}
|
|
25
|
-
else if (bnd
|
|
24
|
+
else if (bnd?.MatePosition) {
|
|
26
25
|
const matePosition = bnd.MatePosition.split(':');
|
|
27
26
|
mateDirection = bnd.MateDirection === 'left' ? 1 : -1;
|
|
28
27
|
joinDirection = bnd.Join === 'left' ? -1 : 1;
|
|
@@ -38,7 +37,7 @@ export function makeFeaturePair(feature, alt) {
|
|
|
38
37
|
strand,
|
|
39
38
|
mateDirection,
|
|
40
39
|
},
|
|
41
|
-
k2: mate
|
|
40
|
+
k2: mate ?? {
|
|
42
41
|
refName: mateRefName || 'unknown',
|
|
43
42
|
end: mateEnd,
|
|
44
43
|
start: mateStart,
|
|
@@ -47,14 +46,13 @@ export function makeFeaturePair(feature, alt) {
|
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
export function makeSummary(feature, alt) {
|
|
50
|
-
var _a;
|
|
51
49
|
const { k1, k2 } = makeFeaturePair(feature, alt);
|
|
52
50
|
return [
|
|
53
51
|
feature.get('name'),
|
|
54
52
|
feature.get('id'),
|
|
55
53
|
assembleLocString(k1),
|
|
56
54
|
assembleLocString(k2),
|
|
57
|
-
|
|
55
|
+
feature.get('INFO')?.SVTYPE,
|
|
58
56
|
alt,
|
|
59
57
|
]
|
|
60
58
|
.filter(f => !!f)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare function configSchemaFactory(): import("
|
|
1
|
+
export declare function configSchemaFactory(): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
2
|
color: {
|
|
3
3
|
type: string;
|
|
4
4
|
description: string;
|
|
5
5
|
defaultValue: string;
|
|
6
6
|
contextVariable: string[];
|
|
7
7
|
};
|
|
8
|
-
}, import("
|
|
8
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
9
9
|
maxFeatureScreenDensity: {
|
|
10
10
|
type: string;
|
|
11
11
|
description: string;
|
|
@@ -32,4 +32,4 @@ export declare function configSchemaFactory(): import("@jbrowse/core/configurati
|
|
|
32
32
|
description: string;
|
|
33
33
|
defaultValue: never[];
|
|
34
34
|
};
|
|
35
|
-
}, import("
|
|
35
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearArcDisplayModel } from './model';
|
|
1
|
+
import type { LinearArcDisplayModel } from './model.ts';
|
|
2
2
|
export interface ReducedFeature {
|
|
3
3
|
name: string;
|
|
4
4
|
strand: number;
|
|
@@ -11,7 +11,7 @@ export interface ReducedFeature {
|
|
|
11
11
|
pair_orientation: string;
|
|
12
12
|
next_ref?: string;
|
|
13
13
|
next_pos?: number;
|
|
14
|
-
|
|
14
|
+
clipLengthAtStartOfRead: number;
|
|
15
15
|
SA?: string;
|
|
16
16
|
}
|
|
17
17
|
export interface ChainStats {
|
|
@@ -4,7 +4,9 @@ export async function fetchChains(self) {
|
|
|
4
4
|
const sessionId = getRpcSessionId(self);
|
|
5
5
|
const { rpcManager } = getSession(self);
|
|
6
6
|
const view = getContainingView(self);
|
|
7
|
-
if (!view.initialized ||
|
|
7
|
+
if (!view.initialized ||
|
|
8
|
+
self.error ||
|
|
9
|
+
!self.featureDensityStatsReadyAndRegionNotTooLarge) {
|
|
8
10
|
return;
|
|
9
11
|
}
|
|
10
12
|
self.setLoading(true);
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
3
|
-
import { configSchemaFactory } from
|
|
4
|
-
import { stateModelFactory } from
|
|
3
|
+
import { configSchemaFactory } from "./configSchema.js";
|
|
4
|
+
import { stateModelFactory } from "./model.js";
|
|
5
5
|
export default function LinearPairedArcDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaFactory();
|
|
8
8
|
return new DisplayType({
|
|
9
9
|
name: 'LinearPairedArcDisplay',
|
|
10
|
-
displayName: '
|
|
10
|
+
displayName: 'Variant display arcs',
|
|
11
|
+
helpText: 'Can display arcs connecting SVs and breakends in VCF format or BEDPE pairs',
|
|
11
12
|
configSchema,
|
|
12
13
|
stateModel: stateModelFactory(configSchema),
|
|
13
14
|
trackType: 'VariantTrack',
|
|
14
15
|
viewType: 'LinearGenomeView',
|
|
15
|
-
ReactComponent: lazy(() => import(
|
|
16
|
+
ReactComponent: lazy(() => import("./components/ReactComponent.js")),
|
|
16
17
|
});
|
|
17
18
|
});
|
|
18
19
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
import type { Instance } from 'mobx-state-tree';
|
|
5
|
-
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
6
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
4
|
+
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
5
|
+
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
6
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
8
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
9
9
|
} & {
|
|
10
|
-
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
10
|
+
heightPreConfig: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
11
11
|
} & {
|
|
12
|
-
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
13
|
-
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
12
|
+
userBpPerPxLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
13
|
+
userByteSizeLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
14
14
|
} & {
|
|
15
|
-
type: import("mobx-state-tree").ISimpleType<"LinearPairedArcDisplay">;
|
|
15
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<"LinearPairedArcDisplay">;
|
|
16
16
|
configuration: AnyConfigurationSchemaType;
|
|
17
|
-
displayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
17
|
+
displayMode: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
18
18
|
}, {
|
|
19
19
|
rendererTypeName: string;
|
|
20
20
|
error: unknown;
|
|
21
|
-
|
|
21
|
+
statusMessage: string | undefined;
|
|
22
22
|
} & {
|
|
23
23
|
readonly RenderingComponent: React.FC<{
|
|
24
24
|
model: {
|
|
25
25
|
id: string;
|
|
26
26
|
type: string;
|
|
27
27
|
rpcDriverName: string | undefined;
|
|
28
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
28
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
29
29
|
rendererTypeName: string;
|
|
30
30
|
error: unknown;
|
|
31
|
-
|
|
32
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
33
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
34
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
35
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
31
|
+
statusMessage: string | undefined;
|
|
32
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
33
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
34
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
35
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
36
36
|
}, {
|
|
37
37
|
rendererTypeName: string;
|
|
38
38
|
error: unknown;
|
|
39
|
-
|
|
40
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
39
|
+
statusMessage: string | undefined;
|
|
40
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
41
41
|
onHorizontalScroll?: () => void;
|
|
42
42
|
blockState?: Record<string, any>;
|
|
43
43
|
}>;
|
|
@@ -46,30 +46,142 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
46
46
|
id: string;
|
|
47
47
|
type: string;
|
|
48
48
|
rpcDriverName: string | undefined;
|
|
49
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
49
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
50
50
|
rendererTypeName: string;
|
|
51
51
|
error: unknown;
|
|
52
|
-
|
|
53
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
54
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
55
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
56
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
52
|
+
statusMessage: string | undefined;
|
|
53
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
54
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
55
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
56
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
57
57
|
}, {
|
|
58
58
|
rendererTypeName: string;
|
|
59
59
|
error: unknown;
|
|
60
|
-
|
|
61
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
60
|
+
statusMessage: string | undefined;
|
|
61
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
62
62
|
}> | null;
|
|
63
63
|
readonly adapterConfig: any;
|
|
64
|
-
readonly parentTrack:
|
|
64
|
+
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
65
|
+
readonly parentDisplay: any;
|
|
66
|
+
readonly effectiveRpcDriverName: any;
|
|
67
|
+
} & {
|
|
65
68
|
renderProps(): any;
|
|
69
|
+
renderingProps(): {
|
|
70
|
+
displayModel: {
|
|
71
|
+
id: string;
|
|
72
|
+
type: string;
|
|
73
|
+
rpcDriverName: string | undefined;
|
|
74
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
75
|
+
rendererTypeName: string;
|
|
76
|
+
error: unknown;
|
|
77
|
+
statusMessage: string | undefined;
|
|
78
|
+
} & {
|
|
79
|
+
readonly RenderingComponent: React.FC<{
|
|
80
|
+
model: {
|
|
81
|
+
id: string;
|
|
82
|
+
type: string;
|
|
83
|
+
rpcDriverName: string | undefined;
|
|
84
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
85
|
+
rendererTypeName: string;
|
|
86
|
+
error: unknown;
|
|
87
|
+
statusMessage: string | undefined;
|
|
88
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
89
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
90
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
91
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
92
|
+
}, {
|
|
93
|
+
rendererTypeName: string;
|
|
94
|
+
error: unknown;
|
|
95
|
+
statusMessage: string | undefined;
|
|
96
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
97
|
+
onHorizontalScroll?: () => void;
|
|
98
|
+
blockState?: Record<string, any>;
|
|
99
|
+
}>;
|
|
100
|
+
readonly DisplayBlurb: React.FC<{
|
|
101
|
+
model: {
|
|
102
|
+
id: string;
|
|
103
|
+
type: string;
|
|
104
|
+
rpcDriverName: string | undefined;
|
|
105
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
106
|
+
rendererTypeName: string;
|
|
107
|
+
error: unknown;
|
|
108
|
+
statusMessage: string | undefined;
|
|
109
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
110
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
111
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
112
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
113
|
+
}, {
|
|
114
|
+
rendererTypeName: string;
|
|
115
|
+
error: unknown;
|
|
116
|
+
statusMessage: string | undefined;
|
|
117
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
118
|
+
}> | null;
|
|
119
|
+
readonly adapterConfig: any;
|
|
120
|
+
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
121
|
+
readonly parentDisplay: any;
|
|
122
|
+
readonly effectiveRpcDriverName: any;
|
|
123
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
124
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
125
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
126
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
127
|
+
}, {
|
|
128
|
+
rendererTypeName: string;
|
|
129
|
+
error: unknown;
|
|
130
|
+
statusMessage: string | undefined;
|
|
131
|
+
} & {
|
|
132
|
+
readonly RenderingComponent: React.FC<{
|
|
133
|
+
model: {
|
|
134
|
+
id: string;
|
|
135
|
+
type: string;
|
|
136
|
+
rpcDriverName: string | undefined;
|
|
137
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
138
|
+
rendererTypeName: string;
|
|
139
|
+
error: unknown;
|
|
140
|
+
statusMessage: string | undefined;
|
|
141
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
142
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
143
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
144
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
145
|
+
}, {
|
|
146
|
+
rendererTypeName: string;
|
|
147
|
+
error: unknown;
|
|
148
|
+
statusMessage: string | undefined;
|
|
149
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
150
|
+
onHorizontalScroll?: () => void;
|
|
151
|
+
blockState?: Record<string, any>;
|
|
152
|
+
}>;
|
|
153
|
+
readonly DisplayBlurb: React.FC<{
|
|
154
|
+
model: {
|
|
155
|
+
id: string;
|
|
156
|
+
type: string;
|
|
157
|
+
rpcDriverName: string | undefined;
|
|
158
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
159
|
+
rendererTypeName: string;
|
|
160
|
+
error: unknown;
|
|
161
|
+
statusMessage: string | undefined;
|
|
162
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
163
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
164
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
165
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
166
|
+
}, {
|
|
167
|
+
rendererTypeName: string;
|
|
168
|
+
error: unknown;
|
|
169
|
+
statusMessage: string | undefined;
|
|
170
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
171
|
+
}> | null;
|
|
172
|
+
readonly adapterConfig: any;
|
|
173
|
+
readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
|
|
174
|
+
readonly parentDisplay: any;
|
|
175
|
+
readonly effectiveRpcDriverName: any;
|
|
176
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
177
|
+
};
|
|
66
178
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
67
179
|
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
68
180
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
69
181
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
70
182
|
regionCannotBeRendered(): null;
|
|
71
183
|
} & {
|
|
72
|
-
|
|
184
|
+
setStatusMessage(arg?: string): void;
|
|
73
185
|
setError(error?: unknown): void;
|
|
74
186
|
setRpcDriverName(rpcDriverName: string): void;
|
|
75
187
|
reload(): void;
|
|
@@ -104,7 +216,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
104
216
|
readonly regionTooLarge: boolean;
|
|
105
217
|
readonly regionTooLargeReason: string;
|
|
106
218
|
} & {
|
|
107
|
-
readonly
|
|
219
|
+
readonly featureDensityStatsReadyAndRegionNotTooLarge: boolean;
|
|
108
220
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
109
221
|
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
110
222
|
} & {
|
|
@@ -124,6 +236,6 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
124
236
|
renderSvg(opts: {
|
|
125
237
|
rasterizeLayers?: boolean;
|
|
126
238
|
}): Promise<React.ReactNode>;
|
|
127
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
239
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
128
240
|
export type LinearArcDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
129
241
|
export type LinearArcDisplayModel = Instance<LinearArcDisplayStateModel>;
|