@jbrowse/plugin-arc 2.17.0 → 3.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/dist/ArcRenderer/ArcRendering.d.ts +3 -4
- package/dist/ArcRenderer/ArcRendering.js +37 -37
- package/dist/ArcRenderer/configSchema.d.ts +0 -18
- package/dist/ArcRenderer/configSchema.js +1 -22
- package/dist/ArcRenderer/index.d.ts +1 -1
- package/dist/ArcRenderer/index.js +1 -1
- package/dist/ArcTooltip.d.ts +1 -2
- package/dist/ArcTooltip.js +6 -30
- package/dist/LinearArcDisplay/configSchema.d.ts +1 -7
- package/dist/LinearArcDisplay/configSchema.js +1 -10
- package/dist/LinearArcDisplay/index.d.ts +1 -1
- package/dist/LinearArcDisplay/model.d.ts +18 -87
- package/dist/LinearArcDisplay/model.js +2 -40
- package/dist/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/dist/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/Arcs.js +46 -40
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.js +33 -32
- package/dist/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/dist/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/components/util.js +1 -7
- package/dist/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/configSchema.js +0 -9
- package/dist/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/dist/LinearPairedArcDisplay/index.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/index.js +18 -8
- package/dist/LinearPairedArcDisplay/model.d.ts +9 -53
- package/dist/LinearPairedArcDisplay/model.js +19 -48
- package/dist/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/dist/LinearPairedArcDisplay/util.d.ts +4 -4
- package/dist/LinearPairedArcDisplay/util.js +3 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/esm/ArcRenderer/ArcRendering.d.ts +3 -4
- package/esm/ArcRenderer/ArcRendering.js +21 -31
- package/esm/ArcRenderer/configSchema.d.ts +0 -18
- package/esm/ArcRenderer/configSchema.js +1 -22
- package/esm/ArcRenderer/index.d.ts +1 -1
- package/esm/ArcRenderer/index.js +1 -1
- package/esm/ArcTooltip.d.ts +1 -2
- package/esm/ArcTooltip.js +6 -7
- package/esm/LinearArcDisplay/configSchema.d.ts +1 -7
- package/esm/LinearArcDisplay/configSchema.js +1 -10
- package/esm/LinearArcDisplay/index.d.ts +1 -1
- package/esm/LinearArcDisplay/model.d.ts +18 -87
- package/esm/LinearArcDisplay/model.js +3 -41
- package/esm/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/esm/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/Arcs.js +29 -33
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.js +16 -25
- package/esm/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/esm/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/util.js +1 -7
- package/esm/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/esm/LinearPairedArcDisplay/configSchema.js +0 -9
- package/esm/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/esm/LinearPairedArcDisplay/index.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/index.js +1 -1
- package/esm/LinearPairedArcDisplay/model.d.ts +9 -53
- package/esm/LinearPairedArcDisplay/model.js +3 -42
- package/esm/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/esm/LinearPairedArcDisplay/util.d.ts +4 -4
- package/esm/LinearPairedArcDisplay/util.js +3 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -3
- package/package.json +2 -2
|
@@ -2,63 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stateModelFactory = stateModelFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
|
-
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
5
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* extends
|
|
11
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
12
|
-
*/
|
|
6
|
+
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
13
8
|
function stateModelFactory(configSchema) {
|
|
14
9
|
return mobx_state_tree_1.types
|
|
15
10
|
.compose('LinearArcDisplay', plugin_linear_genome_view_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
16
|
-
/**
|
|
17
|
-
* #property
|
|
18
|
-
*/
|
|
19
11
|
type: mobx_state_tree_1.types.literal('LinearArcDisplay'),
|
|
20
|
-
/**
|
|
21
|
-
* #property
|
|
22
|
-
*/
|
|
23
12
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
13
|
displayMode: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
28
14
|
}))
|
|
29
15
|
.views(self => ({
|
|
30
|
-
/**
|
|
31
|
-
* #getter
|
|
32
|
-
*/
|
|
33
16
|
get blockType() {
|
|
34
17
|
return 'staticBlocks';
|
|
35
18
|
},
|
|
36
|
-
/**
|
|
37
|
-
* #getter
|
|
38
|
-
*/
|
|
39
19
|
get renderDelay() {
|
|
40
20
|
return 500;
|
|
41
21
|
},
|
|
42
|
-
/**
|
|
43
|
-
* #getter
|
|
44
|
-
*/
|
|
45
22
|
get rendererTypeName() {
|
|
46
23
|
return self.configuration.renderer.type;
|
|
47
24
|
},
|
|
48
25
|
}))
|
|
49
26
|
.views(self => ({
|
|
50
|
-
/**
|
|
51
|
-
* #getter
|
|
52
|
-
*/
|
|
53
27
|
get displayModeSetting() {
|
|
54
28
|
var _a;
|
|
55
29
|
return (_a = self.displayMode) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, ['renderer', 'displayMode']);
|
|
56
30
|
},
|
|
57
31
|
}))
|
|
58
32
|
.views(self => ({
|
|
59
|
-
/**
|
|
60
|
-
* #getter
|
|
61
|
-
*/
|
|
62
33
|
get rendererConfig() {
|
|
63
34
|
const configBlob = (0, configuration_1.getConf)(self, ['renderer']) || {};
|
|
64
35
|
const config = configBlob;
|
|
@@ -71,9 +42,6 @@ function stateModelFactory(configSchema) {
|
|
|
71
42
|
.views(self => {
|
|
72
43
|
const { renderProps: superRenderProps } = self;
|
|
73
44
|
return {
|
|
74
|
-
/**
|
|
75
|
-
* #method
|
|
76
|
-
*/
|
|
77
45
|
renderProps() {
|
|
78
46
|
return {
|
|
79
47
|
...superRenderProps(),
|
|
@@ -85,9 +53,6 @@ function stateModelFactory(configSchema) {
|
|
|
85
53
|
};
|
|
86
54
|
})
|
|
87
55
|
.actions(self => ({
|
|
88
|
-
/**
|
|
89
|
-
* #action
|
|
90
|
-
*/
|
|
91
56
|
setDisplayMode(flag) {
|
|
92
57
|
self.displayMode = flag;
|
|
93
58
|
},
|
|
@@ -95,9 +60,6 @@ function stateModelFactory(configSchema) {
|
|
|
95
60
|
.views(self => {
|
|
96
61
|
const superMenuItems = self.trackMenuItems;
|
|
97
62
|
return {
|
|
98
|
-
/**
|
|
99
|
-
* #method
|
|
100
|
-
*/
|
|
101
63
|
trackMenuItems() {
|
|
102
64
|
return [
|
|
103
65
|
...superMenuItems(),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
1
|
+
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
2
|
export declare function doAfterAttach<T extends IAnyStateTreeNode>(self: T): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.doAfterAttach = doAfterAttach;
|
|
4
|
-
const util_1 = require("./util");
|
|
5
4
|
const fetchChains_1 = require("./fetchChains");
|
|
5
|
+
const util_1 = require("./util");
|
|
6
6
|
function doAfterAttach(self) {
|
|
7
7
|
(0, util_1.createAutorun)(self, async () => {
|
|
8
8
|
await (0, fetchChains_1.fetchChains)(self);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const Arcs: ({ model, exportSVG, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
exportSVG?: boolean;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default Arcs;
|
|
@@ -15,18 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const util_1 = require("@jbrowse/core/util");
|
|
36
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
|
+
const react_1 = require("react");
|
|
29
38
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
39
|
+
const util_1 = require("@jbrowse/core/util");
|
|
40
|
+
const mobx_react_1 = require("mobx-react");
|
|
30
41
|
const util_2 = require("./util");
|
|
31
42
|
const ArcTooltip = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../../ArcTooltip'))));
|
|
32
43
|
const Arc = (0, mobx_react_1.observer)(function ({ model, feature, alt, assembly, view, }) {
|
|
@@ -52,30 +63,25 @@ const Arc = (0, mobx_react_1.observer)(function ({ model, feature, alt, assembly
|
|
|
52
63
|
const right = p2;
|
|
53
64
|
const col = mouseOvered ? 'black' : c;
|
|
54
65
|
const sw = 3;
|
|
55
|
-
return absrad > 1 ? (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, onClick: () => {
|
|
75
|
-
model.selectFeature(feature);
|
|
76
|
-
}, x1: right, x2: right + k2.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null,
|
|
77
|
-
mouseOvered ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
|
|
78
|
-
react_1.default.createElement(ArcTooltip, { contents: (0, util_2.makeSummary)(feature, alt) }))) : null)) : null;
|
|
66
|
+
return absrad > 1 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: `M ${left} 0 C ${left} ${destY}, ${right} ${destY}, ${right} 0`, ref: ref, ...(0, util_1.getStrokeProps)(col), strokeWidth: sw, onMouseOut: () => {
|
|
67
|
+
setMouseOvered(false);
|
|
68
|
+
}, onMouseOver: () => {
|
|
69
|
+
setMouseOvered(true);
|
|
70
|
+
}, onClick: () => {
|
|
71
|
+
model.selectFeature(feature);
|
|
72
|
+
}, fill: "none", pointerEvents: "stroke" }), k1.mateDirection ? ((0, jsx_runtime_1.jsx)("line", { ...(0, util_1.getStrokeProps)(col), strokeWidth: sw, onMouseOut: () => {
|
|
73
|
+
setMouseOvered(false);
|
|
74
|
+
}, onMouseOver: () => {
|
|
75
|
+
setMouseOvered(true);
|
|
76
|
+
}, onClick: () => {
|
|
77
|
+
model.selectFeature(feature);
|
|
78
|
+
}, x1: left, x2: left + k1.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null, k2.mateDirection ? ((0, jsx_runtime_1.jsx)("line", { ...(0, util_1.getStrokeProps)(col), strokeWidth: sw, onMouseOut: () => {
|
|
79
|
+
setMouseOvered(false);
|
|
80
|
+
}, onMouseOver: () => {
|
|
81
|
+
setMouseOvered(true);
|
|
82
|
+
}, onClick: () => {
|
|
83
|
+
model.selectFeature(feature);
|
|
84
|
+
}, x1: right, x2: right + k2.mateDirection * 20, y1: 1.5, y2: 1.5 })) : null, mouseOvered ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(ArcTooltip, { contents: (0, util_2.makeSummary)(feature, alt) }) })) : null] })) : null;
|
|
79
85
|
}
|
|
80
86
|
return null;
|
|
81
87
|
});
|
|
@@ -83,7 +89,7 @@ const Wrapper = (0, mobx_react_1.observer)(function ({ model, exportSVG, childre
|
|
|
83
89
|
const { height } = model;
|
|
84
90
|
const view = (0, util_1.getContainingView)(model);
|
|
85
91
|
const width = Math.round(view.dynamicBlocks.totalWidthPx);
|
|
86
|
-
return exportSVG ? (children) : (
|
|
92
|
+
return exportSVG ? (children) : ((0, jsx_runtime_1.jsx)("svg", { width: width, height: height, children: children }));
|
|
87
93
|
});
|
|
88
94
|
const Arcs = (0, mobx_react_1.observer)(function ({ model, exportSVG, }) {
|
|
89
95
|
const view = (0, util_1.getContainingView)(model);
|
|
@@ -91,10 +97,10 @@ const Arcs = (0, mobx_react_1.observer)(function ({ model, exportSVG, }) {
|
|
|
91
97
|
const { assemblyManager } = session;
|
|
92
98
|
const { features } = model;
|
|
93
99
|
const assembly = assemblyManager.get(view.assemblyNames[0]);
|
|
94
|
-
return assembly ? (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
return assembly ? ((0, jsx_runtime_1.jsx)(Wrapper, { model: model, exportSVG: exportSVG, children: features === null || features === void 0 ? void 0 : features.map(f => {
|
|
101
|
+
var _a;
|
|
102
|
+
const alts = f.get('ALT');
|
|
103
|
+
return ((_a = alts === null || alts === void 0 ? void 0 : alts.map(a => ((0, jsx_runtime_1.jsx)(Arc, { session: session, feature: f, alt: a, view: view, model: model, assembly: assembly }, `${f.id()}-${a}`)))) !== null && _a !== void 0 ? _a : ((0, jsx_runtime_1.jsx)(Arc, { session: session, feature: f, view: view, model: model, assembly: assembly }, f.id())));
|
|
104
|
+
}) })) : null;
|
|
99
105
|
});
|
|
100
106
|
exports.default = Arcs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const BaseDisplayComponent: ({ model, children, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
children?: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default BaseDisplayComponent;
|
|
@@ -15,27 +15,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
30
|
-
const
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const react_1 = require("react");
|
|
31
41
|
const ui_1 = require("@jbrowse/core/ui");
|
|
42
|
+
const util_1 = require("@jbrowse/core/util");
|
|
32
43
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
33
|
-
const mui_1 = require("tss-react/mui");
|
|
34
|
-
const mobx_react_1 = require("mobx-react");
|
|
35
|
-
// icons
|
|
36
44
|
const Refresh_1 = __importDefault(require("@mui/icons-material/Refresh"));
|
|
37
45
|
const Report_1 = __importDefault(require("@mui/icons-material/Report"));
|
|
38
|
-
const
|
|
46
|
+
const material_1 = require("@mui/material");
|
|
47
|
+
const mobx_react_1 = require("mobx-react");
|
|
48
|
+
const mui_1 = require("tss-react/mui");
|
|
39
49
|
const ErrorMessageStackTraceDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@jbrowse/core/ui/ErrorMessageStackTraceDialog'))));
|
|
40
50
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
41
51
|
loading: {
|
|
@@ -52,31 +62,22 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
52
62
|
}));
|
|
53
63
|
const BaseDisplayComponent = (0, mobx_react_1.observer)(function ({ model, children, }) {
|
|
54
64
|
const { error, regionTooLarge } = model;
|
|
55
|
-
return error ? (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
(0, util_1.getSession)(model).queueDialog(onClose => [
|
|
64
|
-
ErrorMessageStackTraceDialog,
|
|
65
|
-
{ onClose, error: model.error },
|
|
66
|
-
]);
|
|
67
|
-
} },
|
|
68
|
-
react_1.default.createElement(Report_1.default, null)))) })) : regionTooLarge ? (model.regionCannotBeRendered()) : (react_1.default.createElement(DataDisplay, { model: model }, children));
|
|
65
|
+
return error ? ((0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.BlockMsg, { message: `${error}`, severity: "error", action: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Reload", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
66
|
+
model.reload();
|
|
67
|
+
}, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Show stack trace", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
68
|
+
(0, util_1.getSession)(model).queueDialog(onClose => [
|
|
69
|
+
ErrorMessageStackTraceDialog,
|
|
70
|
+
{ onClose, error: model.error },
|
|
71
|
+
]);
|
|
72
|
+
}, children: (0, jsx_runtime_1.jsx)(Report_1.default, {}) }) })] }) })) : regionTooLarge ? (model.regionCannotBeRendered()) : ((0, jsx_runtime_1.jsx)(DataDisplay, { model: model, children: children }));
|
|
69
73
|
});
|
|
70
74
|
const DataDisplay = (0, mobx_react_1.observer)(function ({ model, children, }) {
|
|
71
75
|
const { loading } = model;
|
|
72
|
-
return (
|
|
73
|
-
children,
|
|
74
|
-
loading ? react_1.default.createElement(LoadingBar, { model: model }) : null));
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [children, loading ? (0, jsx_runtime_1.jsx)(LoadingBar, { model: model }) : null] }));
|
|
75
77
|
});
|
|
76
78
|
const LoadingBar = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
77
79
|
const { classes } = useStyles();
|
|
78
80
|
const { message } = model;
|
|
79
|
-
return (
|
|
80
|
-
react_1.default.createElement(ui_1.LoadingEllipses, { message: message })));
|
|
81
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes.loading, children: (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { message: message }) }));
|
|
81
82
|
});
|
|
82
83
|
exports.default = BaseDisplayComponent;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearArcDisplayModel } from '../model';
|
|
1
|
+
import type { LinearArcDisplayModel } from '../model';
|
|
3
2
|
declare const LinearArcReactComponent: ({ model, exportSVG, }: {
|
|
4
3
|
model: LinearArcDisplayModel;
|
|
5
4
|
exportSVG?: boolean;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default LinearArcReactComponent;
|
|
@@ -3,12 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const mobx_react_1 = require("mobx-react");
|
|
8
|
-
const BaseDisplayComponent_1 = __importDefault(require("./BaseDisplayComponent"));
|
|
9
8
|
const Arcs_1 = __importDefault(require("./Arcs"));
|
|
9
|
+
const BaseDisplayComponent_1 = __importDefault(require("./BaseDisplayComponent"));
|
|
10
10
|
const LinearArcReactComponent = (0, mobx_react_1.observer)(function ({ model, exportSVG, }) {
|
|
11
|
-
return (
|
|
12
|
-
react_1.default.createElement(Arcs_1.default, { model: model, exportSVG: exportSVG })));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(BaseDisplayComponent_1.default, { model: model, children: (0, jsx_runtime_1.jsx)(Arcs_1.default, { model: model, exportSVG: exportSVG }) }));
|
|
13
12
|
});
|
|
14
13
|
exports.default = LinearArcReactComponent;
|
|
@@ -17,19 +17,13 @@ function makeFeaturePair(feature, alt) {
|
|
|
17
17
|
let mateStart = 0;
|
|
18
18
|
let joinDirection = 0;
|
|
19
19
|
let mateDirection = 0;
|
|
20
|
-
// one sided bracket used, because there could be <INS:ME> and we just check
|
|
21
|
-
// startswith below
|
|
22
20
|
const symbolicAlleles = ['<TRA', '<DEL', '<INV', '<INS', '<DUP', '<CNV'];
|
|
23
21
|
if (symbolicAlleles.some(a => alt === null || alt === void 0 ? void 0 : alt.startsWith(a))) {
|
|
24
|
-
// END is defined to be a single value, not an array. CHR2 not defined in
|
|
25
|
-
// VCF spec, but should be similar
|
|
26
22
|
const info = feature.get('INFO');
|
|
27
23
|
const e = (_b = (_a = info === null || info === void 0 ? void 0 : info.END) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : end;
|
|
28
24
|
mateRefName = (_d = (_c = info === null || info === void 0 ? void 0 : info.CHR2) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : refName;
|
|
29
25
|
mateEnd = e;
|
|
30
26
|
mateStart = e - 1;
|
|
31
|
-
// re-adjust the arc to be from start to end of feature by re-assigning end
|
|
32
|
-
// to the 'mate'
|
|
33
27
|
end = start + 1;
|
|
34
28
|
}
|
|
35
29
|
else if (bnd === null || bnd === void 0 ? void 0 : bnd.MatePosition) {
|
|
@@ -68,5 +62,5 @@ function makeSummary(feature, alt) {
|
|
|
68
62
|
alt,
|
|
69
63
|
]
|
|
70
64
|
.filter(f => !!f)
|
|
71
|
-
.join('
|
|
65
|
+
.join('<br/>');
|
|
72
66
|
}
|
|
@@ -3,14 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.configSchemaFactory = configSchemaFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
5
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
6
|
-
/**
|
|
7
|
-
* #config LinearPairedArcDisplay
|
|
8
|
-
*/
|
|
9
6
|
function configSchemaFactory() {
|
|
10
7
|
return (0, configuration_1.ConfigurationSchema)('LinearPairedArcDisplay', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
color: {
|
|
15
9
|
type: 'color',
|
|
16
10
|
description: 'the color of the arcs',
|
|
@@ -18,9 +12,6 @@ function configSchemaFactory() {
|
|
|
18
12
|
contextVariable: ['feature', 'alt'],
|
|
19
13
|
},
|
|
20
14
|
}, {
|
|
21
|
-
/**
|
|
22
|
-
* #baseConfiguration
|
|
23
|
-
*/
|
|
24
15
|
baseConfiguration: plugin_linear_genome_view_1.baseLinearDisplayConfigSchema,
|
|
25
16
|
explicitlyTyped: true,
|
|
26
17
|
});
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchChains = fetchChains;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
async function fetchChains(self) {
|
|
6
|
-
// @ts-expect-error
|
|
7
6
|
const { rpcSessionId: sessionId } = (0, util_1.getContainingTrack)(self);
|
|
8
7
|
const { rpcManager } = (0, util_1.getSession)(self);
|
|
9
8
|
const view = (0, util_1.getContainingView)(self);
|
|
10
|
-
if (!view.initialized || self.error || self.
|
|
9
|
+
if (!view.initialized || self.error || !self.statsReadyAndRegionNotTooLarge) {
|
|
11
10
|
return;
|
|
12
11
|
}
|
|
13
12
|
self.setLoading(true);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearPairedArcDisplayF(pluginManager: PluginManager): void;
|
|
@@ -15,19 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.default = LinearPairedArcDisplayF;
|
|
37
|
+
const react_1 = require("react");
|
|
27
38
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
28
39
|
const configSchema_1 = require("./configSchema");
|
|
29
40
|
const model_1 = require("./model");
|
|
30
|
-
const react_1 = require("react");
|
|
31
41
|
function LinearPairedArcDisplayF(pluginManager) {
|
|
32
42
|
pluginManager.addDisplayType(() => {
|
|
33
43
|
const configSchema = (0, configSchema_1.configSchemaFactory)();
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
/**
|
|
6
|
-
* #stateModel LinearPairedArcDisplay
|
|
7
|
-
* this is a non-block-based track type, and can connect arcs across multiple
|
|
8
|
-
* displayedRegions
|
|
9
|
-
*
|
|
10
|
-
* extends
|
|
11
|
-
* - [BaseDisplay](../basedisplay)
|
|
12
|
-
* - [TrackHeightMixin](../trackheightmixin)
|
|
13
|
-
* - [FeatureDensityMixin](../featuredensitymixin)
|
|
14
|
-
*/
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
import type { Instance } from 'mobx-state-tree';
|
|
15
5
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
16
6
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
17
7
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -22,17 +12,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
22
12
|
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
23
13
|
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
24
14
|
} & {
|
|
25
|
-
/**
|
|
26
|
-
* #property
|
|
27
|
-
*/
|
|
28
15
|
type: import("mobx-state-tree").ISimpleType<"LinearPairedArcDisplay">;
|
|
29
|
-
/**
|
|
30
|
-
* #property
|
|
31
|
-
*/
|
|
32
16
|
configuration: AnyConfigurationSchemaType;
|
|
33
|
-
/**
|
|
34
|
-
* #property
|
|
35
|
-
*/
|
|
36
17
|
displayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
37
18
|
}, {
|
|
38
19
|
rendererTypeName: string;
|
|
@@ -49,22 +30,14 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
49
30
|
error: unknown;
|
|
50
31
|
message: string | undefined;
|
|
51
32
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
52
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree"
|
|
53
|
-
* #property
|
|
54
|
-
*/).ISimpleType<string>, [undefined]>;
|
|
33
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
55
34
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
56
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import(
|
|
57
|
-
/**
|
|
58
|
-
* #getter
|
|
59
|
-
*/
|
|
60
|
-
"mobx-state-tree").ISimpleType<string>>;
|
|
35
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
61
36
|
}, {
|
|
62
37
|
rendererTypeName: string;
|
|
63
38
|
error: unknown;
|
|
64
39
|
message: string | undefined;
|
|
65
|
-
}, import("mobx-state-tree"
|
|
66
|
-
* #action
|
|
67
|
-
*/)._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
40
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
68
41
|
onHorizontalScroll?: () => void;
|
|
69
42
|
blockState?: Record<string, any>;
|
|
70
43
|
}>;
|
|
@@ -131,40 +104,23 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
131
104
|
readonly regionTooLarge: boolean;
|
|
132
105
|
readonly regionTooLargeReason: string;
|
|
133
106
|
} & {
|
|
107
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
134
108
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
135
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region):
|
|
109
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
136
110
|
} & {
|
|
137
111
|
lastDrawnOffsetPx: number;
|
|
138
112
|
features: Feature[] | undefined;
|
|
139
113
|
loading: boolean;
|
|
140
114
|
drawn: boolean;
|
|
141
115
|
} & {
|
|
142
|
-
/**
|
|
143
|
-
* #getter
|
|
144
|
-
*/
|
|
145
116
|
readonly displayModeSetting: any;
|
|
146
117
|
} & {
|
|
147
|
-
/**
|
|
148
|
-
* #action
|
|
149
|
-
*/
|
|
150
118
|
selectFeature(feature: Feature): void;
|
|
151
|
-
/**
|
|
152
|
-
* #action
|
|
153
|
-
*/
|
|
154
119
|
setLoading(flag: boolean): void;
|
|
155
|
-
/**
|
|
156
|
-
* #action
|
|
157
|
-
*/
|
|
158
120
|
setFeatures(f: Feature[]): void;
|
|
159
|
-
/**
|
|
160
|
-
* #action
|
|
161
|
-
*/
|
|
162
121
|
setDisplayMode(flag: string): void;
|
|
163
122
|
} & {
|
|
164
123
|
afterAttach(): void;
|
|
165
|
-
/**
|
|
166
|
-
* #action
|
|
167
|
-
*/
|
|
168
124
|
renderSvg(opts: {
|
|
169
125
|
rasterizeLayers?: boolean;
|
|
170
126
|
}): Promise<React.ReactNode>;
|