@jbrowse/plugin-dotplot-view 2.18.0 → 3.0.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/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
- package/dist/DotplotDisplay/components/DotplotDisplay.js +6 -11
- package/dist/DotplotDisplay/stateModelFactory.d.ts +1 -2
- package/dist/DotplotDisplay/stateModelFactory.js +2 -3
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +3 -3
- package/dist/DotplotRenderer/DotplotRenderer.js +17 -7
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotView/components/Axes.d.ts +4 -5
- package/dist/DotplotView/components/Axes.js +23 -36
- package/dist/DotplotView/components/CursorIcon.d.ts +2 -3
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +1 -2
- package/dist/DotplotView/components/DotplotControls.js +89 -91
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
- package/dist/DotplotView/components/DotplotTooltipClick.js +2 -6
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +3 -7
- package/dist/DotplotView/components/DotplotView.d.ts +1 -2
- package/dist/DotplotView/components/DotplotView.js +75 -80
- package/dist/DotplotView/components/DotplotWarnings.d.ts +1 -2
- package/dist/DotplotView/components/DotplotWarnings.js +26 -20
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +1 -2
- package/dist/DotplotView/components/ExportSvgDialog.js +31 -64
- package/dist/DotplotView/components/Grid.d.ts +2 -3
- package/dist/DotplotView/components/Grid.js +17 -28
- package/dist/DotplotView/components/Header.d.ts +1 -2
- package/dist/DotplotView/components/Header.js +2 -21
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +3 -5
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -38
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
- package/dist/DotplotView/components/ImportForm/index.d.ts +2 -3
- package/dist/DotplotView/components/ImportForm/index.js +43 -92
- package/dist/DotplotView/components/PanButtons.d.ts +1 -2
- package/dist/DotplotView/components/PanButtons.js +14 -32
- package/dist/DotplotView/components/WarningDialog.d.ts +1 -2
- package/dist/DotplotView/components/WarningDialog.js +2 -9
- package/dist/DotplotView/index.js +17 -7
- package/dist/DotplotView/model.d.ts +6 -4
- package/dist/DotplotView/model.js +40 -30
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +2 -5
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/ServerSideRenderedBlockContent.d.ts +1 -2
- package/dist/ServerSideRenderedBlockContent.js +9 -34
- package/dist/ServerSideSyntenyRendering.d.ts +1 -2
- package/dist/ServerSideSyntenyRendering.js +3 -25
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
- package/esm/DotplotDisplay/components/DotplotDisplay.js +6 -8
- package/esm/DotplotDisplay/stateModelFactory.d.ts +1 -2
- package/esm/DotplotDisplay/stateModelFactory.js +2 -3
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +3 -3
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotView/components/Axes.d.ts +4 -5
- package/esm/DotplotView/components/Axes.js +23 -33
- package/esm/DotplotView/components/CursorIcon.d.ts +2 -3
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -2
- package/esm/DotplotView/components/DotplotControls.js +89 -91
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
- package/esm/DotplotView/components/DotplotTooltipClick.js +2 -6
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +3 -7
- package/esm/DotplotView/components/DotplotView.d.ts +1 -2
- package/esm/DotplotView/components/DotplotView.js +58 -73
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -2
- package/esm/DotplotView/components/DotplotWarnings.js +9 -13
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -2
- package/esm/DotplotView/components/ExportSvgDialog.js +31 -41
- package/esm/DotplotView/components/Grid.d.ts +2 -3
- package/esm/DotplotView/components/Grid.js +17 -25
- package/esm/DotplotView/components/Header.d.ts +1 -2
- package/esm/DotplotView/components/Header.js +2 -21
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +3 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -15
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
- package/esm/DotplotView/components/ImportForm/index.d.ts +2 -3
- package/esm/DotplotView/components/ImportForm/index.js +45 -71
- package/esm/DotplotView/components/PanButtons.d.ts +1 -2
- package/esm/DotplotView/components/PanButtons.js +14 -32
- package/esm/DotplotView/components/WarningDialog.d.ts +1 -2
- package/esm/DotplotView/components/WarningDialog.js +2 -6
- package/esm/DotplotView/model.d.ts +6 -4
- package/esm/DotplotView/model.js +25 -25
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +2 -2
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/ServerSideRenderedBlockContent.d.ts +1 -2
- package/esm/ServerSideRenderedBlockContent.js +9 -11
- package/esm/ServerSideSyntenyRendering.d.ts +1 -2
- package/esm/ServerSideSyntenyRendering.js +3 -2
- package/package.json +10 -10
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
+
const Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
12
|
+
const getAdapter_1 = require("./getAdapter");
|
|
13
|
+
const util_1 = require("./util");
|
|
14
|
+
const ImportSyntenyOpenCustomTrack = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, }) {
|
|
15
|
+
const [swap, setSwap] = (0, react_1.useState)(false);
|
|
16
|
+
const [bed2Location, setBed2Location] = (0, react_1.useState)();
|
|
17
|
+
const [bed1Location, setBed1Location] = (0, react_1.useState)();
|
|
18
|
+
const [fileLocation, setFileLocation] = (0, react_1.useState)();
|
|
19
|
+
const [indexFileLocation, setIndexFileLocation] = (0, react_1.useState)();
|
|
20
|
+
const [value, setValue] = (0, react_1.useState)('');
|
|
21
|
+
const [error, setError] = (0, react_1.useState)();
|
|
22
|
+
const fileName = (0, util_1.getName)(fileLocation);
|
|
23
|
+
const radioOption = value || (fileName ? (0, util_1.extName)((0, util_1.stripGz)(fileName)) : '');
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
try {
|
|
26
|
+
if (fileLocation) {
|
|
27
|
+
const fn = fileName ? (0, util_1.basename)(fileName) : 'MyTrack';
|
|
28
|
+
const trackId = `${fn}-${Date.now()}-sessionTrack`;
|
|
29
|
+
setError(undefined);
|
|
30
|
+
model.setImportFormSyntenyTrack(0, {
|
|
31
|
+
type: 'userOpened',
|
|
32
|
+
value: {
|
|
33
|
+
trackId,
|
|
34
|
+
name: fn,
|
|
35
|
+
assemblyNames: [assembly2, assembly1],
|
|
36
|
+
type: 'SyntenyTrack',
|
|
37
|
+
adapter: (0, getAdapter_1.getAdapter)({
|
|
38
|
+
radioOption,
|
|
39
|
+
assembly1: swap ? assembly2 : assembly1,
|
|
40
|
+
assembly2: swap ? assembly1 : assembly2,
|
|
41
|
+
fileLocation,
|
|
42
|
+
indexFileLocation,
|
|
43
|
+
bed1Location,
|
|
44
|
+
bed2Location,
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
console.error(e);
|
|
52
|
+
setError(e);
|
|
53
|
+
}
|
|
54
|
+
}, [
|
|
55
|
+
swap,
|
|
56
|
+
model,
|
|
57
|
+
fileName,
|
|
58
|
+
assembly1,
|
|
59
|
+
assembly2,
|
|
60
|
+
bed1Location,
|
|
61
|
+
bed2Location,
|
|
62
|
+
fileLocation,
|
|
63
|
+
indexFileLocation,
|
|
64
|
+
radioOption,
|
|
65
|
+
]);
|
|
66
|
+
const helpStrings = {
|
|
67
|
+
'.paf': 'minimap2 target.fa query.fa',
|
|
68
|
+
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
69
|
+
'.out': 'mashmap target.fa query.fa',
|
|
70
|
+
'.delta': 'mummer target.fa query.fa',
|
|
71
|
+
'.chain': 'e.g. queryToTarget.chain',
|
|
72
|
+
};
|
|
73
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, { style: { textAlign: 'center' }, children: "Add a .paf (minimap2), .delta (Mummer), .chain (UCSC liftover), .anchors or .anchors.simple (MCScan), or .pif.gz (jbrowse CLI make-pif) file to view. These file types can also be gzipped." }), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { value: radioOption, onChange: event => {
|
|
74
|
+
setValue(event.target.value);
|
|
75
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Grid2, { container: true, justifyContent: "center", children: [
|
|
76
|
+
'.paf',
|
|
77
|
+
'.delta',
|
|
78
|
+
'.out',
|
|
79
|
+
'.chain',
|
|
80
|
+
'.anchors',
|
|
81
|
+
'.anchors.simple',
|
|
82
|
+
'.pif.gz',
|
|
83
|
+
].map(extension => ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: extension, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: extension }, extension))) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
84
|
+
radioOption === '.out' ||
|
|
85
|
+
radioOption === '.delta' ||
|
|
86
|
+
radioOption === '.chain' ||
|
|
87
|
+
radioOption === '.pif.gz' ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
88
|
+
display: 'flex',
|
|
89
|
+
flexDirection: 'column',
|
|
90
|
+
gap: 10,
|
|
91
|
+
}, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
92
|
+
setFileLocation(loc);
|
|
93
|
+
} }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Verify or click swap", (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsx)("code", { children: helpStrings[radioOption] }), children: (0, jsx_runtime_1.jsx)(Help_1.default, {}) })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
94
|
+
display: 'flex',
|
|
95
|
+
gap: 20,
|
|
96
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
97
|
+
display: 'grid',
|
|
98
|
+
gridTemplateColumns: '1fr 1fr',
|
|
99
|
+
gap: 4,
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: "query assembly" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: "target assembly" })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
102
|
+
setSwap(!swap);
|
|
103
|
+
}, children: "Swap?" })] })] })] })) : value === '.anchors' || value === '.anchors.simple' ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: { margin: 20 }, children: ["Open the ", value, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: value, location: fileLocation, setLocation: loc => {
|
|
104
|
+
setFileLocation(loc);
|
|
105
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
106
|
+
setBed1Location(loc);
|
|
107
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
108
|
+
setBed2Location(loc);
|
|
109
|
+
} })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
110
|
+
margin: 'auto',
|
|
111
|
+
display: 'flex',
|
|
112
|
+
justifyContent: 'center',
|
|
113
|
+
gap: 20,
|
|
114
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
115
|
+
display: 'grid',
|
|
116
|
+
gridTemplateColumns: '1fr 1fr',
|
|
117
|
+
gap: 4,
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: "bed1 assembly" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: "bed2 assembly" })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
120
|
+
setSwap(!swap);
|
|
121
|
+
}, children: "Swap?" })] })] })) : value === '.pif.gz' ? ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${value} location`, description: "", location: fileLocation, setLocation: loc => {
|
|
122
|
+
setFileLocation(loc);
|
|
123
|
+
} }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${value} index location`, description: "", location: indexFileLocation, setLocation: loc => {
|
|
124
|
+
setIndexFileLocation(loc);
|
|
125
|
+
} }) })] })) : ((0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
126
|
+
setFileLocation(loc);
|
|
127
|
+
} })) })] }));
|
|
128
|
+
});
|
|
129
|
+
exports.default = ImportSyntenyOpenCustomTrack;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotViewModel } from '../../model';
|
|
3
|
-
declare const
|
|
2
|
+
declare const ImportSyntenyTrackSelector: ({ model, assembly1, assembly2, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
4
|
assembly1: string;
|
|
6
5
|
assembly2: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export default Selector;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ImportSyntenyTrackSelector;
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
27
5
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
28
6
|
const ui_1 = require("@jbrowse/core/ui");
|
|
29
7
|
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
@@ -37,7 +15,7 @@ function f(track, assembly1, assembly2) {
|
|
|
37
15
|
assemblyNames.includes(assembly2) &&
|
|
38
16
|
track.type.includes('Synteny'));
|
|
39
17
|
}
|
|
40
|
-
const
|
|
18
|
+
const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, }) {
|
|
41
19
|
var _a;
|
|
42
20
|
const session = (0, util_1.getSession)(model);
|
|
43
21
|
const { tracks, sessionTracks } = session;
|
|
@@ -52,17 +30,13 @@ const Selector = (0, mobx_react_1.observer)(({ model, assembly1, assembly2, setS
|
|
|
52
30
|
setValue(resetTrack);
|
|
53
31
|
}, [resetTrack]);
|
|
54
32
|
(0, react_1.useEffect)(() => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
react_1.default.createElement(Icons_1.TrackSelector, null)),
|
|
64
|
-
filteredTracks.length ? (react_1.default.createElement(material_1.Select, { value: value, onChange: event => {
|
|
65
|
-
setValue(event.target.value);
|
|
66
|
-
} }, filteredTracks.map(track => (react_1.default.createElement(material_1.MenuItem, { key: track.trackId, value: track.trackId }, (0, tracks_1.getTrackName)(track, session)))))) : (react_1.default.createElement(ui_1.ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))));
|
|
33
|
+
model.setImportFormSyntenyTrack(0, {
|
|
34
|
+
type: 'preConfigured',
|
|
35
|
+
value,
|
|
36
|
+
});
|
|
37
|
+
}, [model, value]);
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { children: ["Select a track from the select box below, the track will be shown when you hit \"Launch\". Note: there is a track selector ", (0, jsx_runtime_1.jsx)("i", { children: "inside" }), " the DotplotView, which can turn on one or more SyntenyTracks (more than one can be displayed at once). Look for the track selector icon", ' ', (0, jsx_runtime_1.jsx)(Icons_1.TrackSelector, {})] }), filteredTracks.length ? ((0, jsx_runtime_1.jsx)(material_1.Select, { value: value, onChange: event => {
|
|
39
|
+
setValue(event.target.value);
|
|
40
|
+
}, children: filteredTracks.map(track => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: track.trackId, children: (0, tracks_1.getTrackName)(track, session) }, track.trackId))) })) : ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))] }));
|
|
67
41
|
});
|
|
68
|
-
exports.default =
|
|
42
|
+
exports.default = ImportSyntenyTrackSelector;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DotplotViewModel } from '../../model';
|
|
2
|
+
declare const TrackSelector: ({ assembly1, assembly2, model, }: {
|
|
3
|
+
model: DotplotViewModel;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default TrackSelector;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
|
+
const ImportSyntenyOpenCustomTrack_1 = __importDefault(require("./ImportSyntenyOpenCustomTrack"));
|
|
11
|
+
const ImportSyntenyTrackSelector_1 = __importDefault(require("./ImportSyntenyTrackSelector"));
|
|
12
|
+
const TrackSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, model, }) {
|
|
13
|
+
const [choice, setChoice] = (0, react_1.useState)('tracklist');
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
if (choice === 'none') {
|
|
16
|
+
model.setImportFormSyntenyTrack(0, { type: 'none' });
|
|
17
|
+
}
|
|
18
|
+
}, [model, choice]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, { id: "group-label", children: "(Optional) Select or add a synteny track" }), (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { row: true, value: choice, onChange: event => {
|
|
20
|
+
setChoice(event.target.value);
|
|
21
|
+
}, "aria-labelledby": "group-label", children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "none", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "None" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "tracklist", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "Existing track" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "custom", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "New track" })] })] }), choice === 'custom' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyOpenCustomTrack_1.default, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
22
|
+
});
|
|
23
|
+
exports.default = TrackSelector;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { FileLocation } from '@jbrowse/core/util';
|
|
2
|
+
export declare function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }: {
|
|
3
|
+
radioOption: string;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
fileLocation?: FileLocation;
|
|
7
|
+
indexFileLocation?: FileLocation;
|
|
8
|
+
bed1Location?: FileLocation;
|
|
9
|
+
bed2Location?: FileLocation;
|
|
10
|
+
}): {
|
|
11
|
+
type: string;
|
|
12
|
+
pafLocation: FileLocation | undefined;
|
|
13
|
+
queryAssembly: string;
|
|
14
|
+
targetAssembly: string;
|
|
15
|
+
outLocation?: undefined;
|
|
16
|
+
deltaLocation?: undefined;
|
|
17
|
+
chainLocation?: undefined;
|
|
18
|
+
mcscanAnchorsLocation?: undefined;
|
|
19
|
+
bed1Location?: undefined;
|
|
20
|
+
bed2Location?: undefined;
|
|
21
|
+
assemblyNames?: undefined;
|
|
22
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
23
|
+
pifGzLocation?: undefined;
|
|
24
|
+
index?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
type: string;
|
|
27
|
+
outLocation: FileLocation | undefined;
|
|
28
|
+
queryAssembly: string;
|
|
29
|
+
targetAssembly: string;
|
|
30
|
+
pafLocation?: undefined;
|
|
31
|
+
deltaLocation?: undefined;
|
|
32
|
+
chainLocation?: undefined;
|
|
33
|
+
mcscanAnchorsLocation?: undefined;
|
|
34
|
+
bed1Location?: undefined;
|
|
35
|
+
bed2Location?: undefined;
|
|
36
|
+
assemblyNames?: undefined;
|
|
37
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
38
|
+
pifGzLocation?: undefined;
|
|
39
|
+
index?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
type: string;
|
|
42
|
+
deltaLocation: FileLocation | undefined;
|
|
43
|
+
queryAssembly: string;
|
|
44
|
+
targetAssembly: string;
|
|
45
|
+
pafLocation?: undefined;
|
|
46
|
+
outLocation?: undefined;
|
|
47
|
+
chainLocation?: undefined;
|
|
48
|
+
mcscanAnchorsLocation?: undefined;
|
|
49
|
+
bed1Location?: undefined;
|
|
50
|
+
bed2Location?: undefined;
|
|
51
|
+
assemblyNames?: undefined;
|
|
52
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
53
|
+
pifGzLocation?: undefined;
|
|
54
|
+
index?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
type: string;
|
|
57
|
+
chainLocation: FileLocation | undefined;
|
|
58
|
+
queryAssembly: string;
|
|
59
|
+
targetAssembly: string;
|
|
60
|
+
pafLocation?: undefined;
|
|
61
|
+
outLocation?: undefined;
|
|
62
|
+
deltaLocation?: undefined;
|
|
63
|
+
mcscanAnchorsLocation?: undefined;
|
|
64
|
+
bed1Location?: undefined;
|
|
65
|
+
bed2Location?: undefined;
|
|
66
|
+
assemblyNames?: undefined;
|
|
67
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
68
|
+
pifGzLocation?: undefined;
|
|
69
|
+
index?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
type: string;
|
|
72
|
+
mcscanAnchorsLocation: FileLocation | undefined;
|
|
73
|
+
bed1Location: FileLocation | undefined;
|
|
74
|
+
bed2Location: FileLocation | undefined;
|
|
75
|
+
assemblyNames: string[];
|
|
76
|
+
pafLocation?: undefined;
|
|
77
|
+
queryAssembly?: undefined;
|
|
78
|
+
targetAssembly?: undefined;
|
|
79
|
+
outLocation?: undefined;
|
|
80
|
+
deltaLocation?: undefined;
|
|
81
|
+
chainLocation?: undefined;
|
|
82
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
83
|
+
pifGzLocation?: undefined;
|
|
84
|
+
index?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
type: string;
|
|
87
|
+
mcscanSimpleAnchorsLocation: FileLocation | undefined;
|
|
88
|
+
bed1Location: FileLocation | undefined;
|
|
89
|
+
bed2Location: FileLocation | undefined;
|
|
90
|
+
assemblyNames: string[];
|
|
91
|
+
pafLocation?: undefined;
|
|
92
|
+
queryAssembly?: undefined;
|
|
93
|
+
targetAssembly?: undefined;
|
|
94
|
+
outLocation?: undefined;
|
|
95
|
+
deltaLocation?: undefined;
|
|
96
|
+
chainLocation?: undefined;
|
|
97
|
+
mcscanAnchorsLocation?: undefined;
|
|
98
|
+
pifGzLocation?: undefined;
|
|
99
|
+
index?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
type: string;
|
|
102
|
+
pifGzLocation: FileLocation | undefined;
|
|
103
|
+
index: {
|
|
104
|
+
location: FileLocation | undefined;
|
|
105
|
+
};
|
|
106
|
+
assemblyNames: string[];
|
|
107
|
+
pafLocation?: undefined;
|
|
108
|
+
queryAssembly?: undefined;
|
|
109
|
+
targetAssembly?: undefined;
|
|
110
|
+
outLocation?: undefined;
|
|
111
|
+
deltaLocation?: undefined;
|
|
112
|
+
chainLocation?: undefined;
|
|
113
|
+
mcscanAnchorsLocation?: undefined;
|
|
114
|
+
bed1Location?: undefined;
|
|
115
|
+
bed2Location?: undefined;
|
|
116
|
+
mcscanSimpleAnchorsLocation?: undefined;
|
|
117
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAdapter = getAdapter;
|
|
4
|
+
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
|
|
5
|
+
if (radioOption === '.paf') {
|
|
6
|
+
return {
|
|
7
|
+
type: 'PAFAdapter',
|
|
8
|
+
pafLocation: fileLocation,
|
|
9
|
+
queryAssembly: assembly1,
|
|
10
|
+
targetAssembly: assembly2,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
else if (radioOption === '.out') {
|
|
14
|
+
return {
|
|
15
|
+
type: 'MashMapAdapter',
|
|
16
|
+
outLocation: fileLocation,
|
|
17
|
+
queryAssembly: assembly1,
|
|
18
|
+
targetAssembly: assembly2,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else if (radioOption === '.delta') {
|
|
22
|
+
return {
|
|
23
|
+
type: 'DeltaAdapter',
|
|
24
|
+
deltaLocation: fileLocation,
|
|
25
|
+
queryAssembly: assembly1,
|
|
26
|
+
targetAssembly: assembly2,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
else if (radioOption === '.chain') {
|
|
30
|
+
return {
|
|
31
|
+
type: 'ChainAdapter',
|
|
32
|
+
chainLocation: fileLocation,
|
|
33
|
+
queryAssembly: assembly1,
|
|
34
|
+
targetAssembly: assembly2,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
else if (radioOption === '.anchors') {
|
|
38
|
+
return {
|
|
39
|
+
type: 'MCScanAnchorsAdapter',
|
|
40
|
+
mcscanAnchorsLocation: fileLocation,
|
|
41
|
+
bed1Location,
|
|
42
|
+
bed2Location,
|
|
43
|
+
assemblyNames: [assembly1, assembly2],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
else if (radioOption === '.anchors.simple') {
|
|
47
|
+
return {
|
|
48
|
+
type: 'MCScanSimpleAnchorsAdapter',
|
|
49
|
+
mcscanSimpleAnchorsLocation: fileLocation,
|
|
50
|
+
bed1Location,
|
|
51
|
+
bed2Location,
|
|
52
|
+
assemblyNames: [assembly1, assembly2],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
else if (radioOption === '.pif.gz') {
|
|
56
|
+
return {
|
|
57
|
+
type: 'PairwiseIndexedPAFAdapter',
|
|
58
|
+
pifGzLocation: fileLocation,
|
|
59
|
+
index: {
|
|
60
|
+
location: indexFileLocation,
|
|
61
|
+
},
|
|
62
|
+
assemblyNames: [assembly1, assembly2],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
throw new Error(`Unknown to detect type ${radioOption} from filename (select radio button to clarify)`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotViewModel } from '../../model';
|
|
3
|
-
declare const DotplotImportForm: ({ model }: {
|
|
2
|
+
declare const DotplotImportForm: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DotplotImportForm;
|
|
@@ -1,40 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
30
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
9
|
const util_1 = require("@jbrowse/core/util");
|
|
32
10
|
const material_1 = require("@mui/material");
|
|
33
11
|
const mobx_1 = require("mobx");
|
|
34
12
|
const mobx_react_1 = require("mobx-react");
|
|
35
13
|
const mui_1 = require("tss-react/mui");
|
|
36
|
-
const
|
|
37
|
-
const ImportSyntenyTrackSelector_1 = __importDefault(require("./ImportSyntenyTrackSelector"));
|
|
14
|
+
const TrackSelector_1 = __importDefault(require("./TrackSelector"));
|
|
38
15
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
39
16
|
importFormContainer: {
|
|
40
17
|
padding: theme.spacing(4),
|
|
@@ -45,81 +22,55 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
45
22
|
margin: '0 auto',
|
|
46
23
|
},
|
|
47
24
|
}));
|
|
48
|
-
function
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
25
|
+
function doSubmit({ model, assembly1, assembly2, }) {
|
|
26
|
+
const session = (0, util_1.getSession)(model);
|
|
27
|
+
const { importFormSyntenyTrackSelections } = model;
|
|
28
|
+
model.setError(undefined);
|
|
29
|
+
(0, mobx_1.transaction)(() => {
|
|
30
|
+
if ((0, util_1.isSessionWithAddTracks)(session)) {
|
|
31
|
+
(0, mobx_1.toJS)(importFormSyntenyTrackSelections).map((f, idx) => {
|
|
32
|
+
var _a;
|
|
33
|
+
if (f.type === 'userOpened') {
|
|
34
|
+
session.addTrackConf(f.value);
|
|
35
|
+
model.toggleTrack((_a = f.value) === null || _a === void 0 ? void 0 : _a.trackId);
|
|
36
|
+
}
|
|
37
|
+
else if (f.type === 'preConfigured') {
|
|
38
|
+
model.showTrack(f.value, idx);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
react_1.default.createElement(material_1.FormLabel, { id: "group-label" }, "(Optional) Select or add a synteny track"),
|
|
59
|
-
react_1.default.createElement(material_1.RadioGroup, { row: true, value: choice, onChange: event => {
|
|
60
|
-
setChoice(event.target.value);
|
|
61
|
-
}, "aria-labelledby": "group-label" },
|
|
62
|
-
react_1.default.createElement(material_1.FormControlLabel, { value: "none", control: react_1.default.createElement(material_1.Radio, null), label: "None" }),
|
|
63
|
-
react_1.default.createElement(material_1.FormControlLabel, { value: "tracklist", control: react_1.default.createElement(material_1.Radio, null), label: "Existing track" }),
|
|
64
|
-
react_1.default.createElement(material_1.FormControlLabel, { value: "custom", control: react_1.default.createElement(material_1.Radio, null), label: "New track" }))),
|
|
65
|
-
choice === 'custom' ? (react_1.default.createElement(ImportCustomTrack_1.default, { setSessionTrackData: setSessionTrackData, sessionTrackData: sessionTrackData, assembly2: assembly2, assembly1: assembly1 })) : null,
|
|
66
|
-
choice === 'tracklist' ? (react_1.default.createElement(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2, setShowTrackId: setShowTrackId })) : null));
|
|
42
|
+
model.showAllRegions();
|
|
43
|
+
model.setAssemblyNames(assembly2, assembly1);
|
|
44
|
+
});
|
|
67
45
|
}
|
|
68
|
-
const DotplotImportForm = (0, mobx_react_1.observer)(({ model })
|
|
46
|
+
const DotplotImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
69
47
|
const { classes } = useStyles();
|
|
70
48
|
const session = (0, util_1.getSession)(model);
|
|
71
49
|
const { assemblyNames } = session;
|
|
72
50
|
const [assembly2, setAssembly2] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
73
51
|
const [assembly1, setAssembly1] = (0, react_1.useState)(assemblyNames[0] || '');
|
|
74
52
|
const [error, setError] = (0, react_1.useState)();
|
|
75
|
-
const [sessionTrackData, setSessionTrackData] = (0, react_1.useState)();
|
|
76
|
-
const [showTrackId, setShowTrackId] = (0, react_1.useState)();
|
|
77
|
-
function onOpenClick() {
|
|
78
|
-
try {
|
|
79
|
-
if (!(0, util_1.isSessionWithAddTracks)(session)) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
setError(undefined);
|
|
83
|
-
model.setError(undefined);
|
|
84
|
-
(0, mobx_1.transaction)(() => {
|
|
85
|
-
if (sessionTrackData) {
|
|
86
|
-
session.addTrackConf(sessionTrackData);
|
|
87
|
-
model.toggleTrack(sessionTrackData.trackId);
|
|
88
|
-
}
|
|
89
|
-
else if (showTrackId) {
|
|
90
|
-
model.showTrack(showTrackId);
|
|
91
|
-
}
|
|
92
|
-
model.setViews([
|
|
93
|
-
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
94
|
-
{ bpPerPx: 0.1, offsetPx: 0 },
|
|
95
|
-
]);
|
|
96
|
-
model.setAssemblyNames(assembly2, assembly1);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
catch (e) {
|
|
100
|
-
console.error(e);
|
|
101
|
-
setError(e);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
53
|
const displayError = error || model.error;
|
|
105
|
-
return (
|
|
106
|
-
displayError ? react_1.default.createElement(ui_1.ErrorMessage, { error: displayError }) : null,
|
|
107
|
-
react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", className: classes.assemblySelector },
|
|
108
|
-
react_1.default.createElement(material_1.Grid, { item: true },
|
|
109
|
-
react_1.default.createElement(material_1.Paper, { style: { padding: 12 } },
|
|
110
|
-
react_1.default.createElement(material_1.Typography, { style: { textAlign: 'center' } }, "Select assemblies for dotplot view"),
|
|
111
|
-
react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center" },
|
|
112
|
-
react_1.default.createElement(material_1.Grid, { item: true },
|
|
113
|
-
react_1.default.createElement(ui_1.AssemblySelector, { selected: assembly1, onChange: val => {
|
|
114
|
-
setAssembly1(val);
|
|
115
|
-
}, session: session })),
|
|
116
|
-
react_1.default.createElement(material_1.Grid, { item: true },
|
|
117
|
-
react_1.default.createElement(ui_1.AssemblySelector, { selected: assembly2, onChange: val => {
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [displayError ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: displayError }) : null, (0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { style: { textAlign: 'center' }, children: "Select assemblies for dotplot view" }), (0, jsx_runtime_1.jsxs)(material_1.Grid2, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "x-axis assembly", selected: assembly2, session: session, onChange: val => {
|
|
118
55
|
setAssembly2(val);
|
|
119
|
-
}, session: session
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
56
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "y-axis assembly", selected: assembly1, session: session, onChange: val => {
|
|
57
|
+
setAssembly1(val);
|
|
58
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
|
|
59
|
+
;
|
|
60
|
+
(async () => {
|
|
61
|
+
try {
|
|
62
|
+
setError(undefined);
|
|
63
|
+
doSubmit({
|
|
64
|
+
assembly1,
|
|
65
|
+
assembly2,
|
|
66
|
+
model,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
console.error(e);
|
|
71
|
+
setError(e);
|
|
72
|
+
}
|
|
73
|
+
})();
|
|
74
|
+
}, variant: "contained", color: "primary", children: "Launch" }) })] }), (0, jsx_runtime_1.jsx)(TrackSelector_1.default, { assembly2: assembly2, assembly1: assembly1, model: model })] })] }));
|
|
124
75
|
});
|
|
125
76
|
exports.default = DotplotImportForm;
|