@jbrowse/plugin-linear-comparative-view 2.18.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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -58
- package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/dist/LGVSyntenyDisplay/components/util.js +6 -12
- package/dist/LGVSyntenyDisplay/model.d.ts +21 -7
- package/dist/LGVSyntenyDisplay/model.js +19 -8
- package/dist/LinearComparativeView/components/Header.d.ts +1 -2
- package/dist/LinearComparativeView/components/Header.js +52 -81
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -2
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +2 -11
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -2
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +13 -21
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +1 -2
- package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -5
- package/dist/LinearComparativeView/components/Rubberband.d.ts +1 -2
- package/dist/LinearComparativeView/components/Rubberband.js +20 -51
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +1 -2
- package/dist/LinearComparativeView/components/VerticalGuide.js +4 -8
- package/dist/LinearComparativeView/index.js +17 -7
- package/dist/LinearComparativeView/model.d.ts +32 -28
- package/dist/LinearComparativeView/model.js +37 -8
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +1 -2
- package/dist/LinearReadVsRef/LinearReadVsRef.js +5 -36
- package/dist/LinearReadVsRef/index.js +17 -7
- package/dist/LinearSyntenyDisplay/afterAttach.js +6 -3
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/Component.js +9 -32
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +89 -84
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +2 -5
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +2 -3
- package/dist/LinearSyntenyDisplay/index.js +17 -7
- package/dist/LinearSyntenyDisplay/model.js +17 -7
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -2
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +34 -73
- package/dist/LinearSyntenyView/components/Icons.d.ts +2 -3
- package/dist/LinearSyntenyView/components/Icons.js +3 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +130 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +39 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +22 -0
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -2
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +44 -143
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +43 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +68 -0
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -2
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -9
- package/dist/LinearSyntenyView/index.js +17 -7
- package/dist/LinearSyntenyView/model.d.ts +49 -30
- package/dist/LinearSyntenyView/model.js +57 -15
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -5
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -10
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +4 -16
- package/dist/LinearSyntenyView/types.d.ts +12 -0
- package/dist/LinearSyntenyView/types.js +2 -0
- package/dist/LinearSyntenyViewHelper/index.js +2 -2
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +87 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +3 -79
- package/dist/SyntenyFeatureDetail/index.js +17 -7
- package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
- package/dist/SyntenyFeatureDetail/types.js +2 -0
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -34
- package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/esm/LGVSyntenyDisplay/components/util.js +6 -12
- package/esm/LGVSyntenyDisplay/model.d.ts +21 -7
- package/esm/LGVSyntenyDisplay/model.js +2 -1
- package/esm/LinearComparativeView/components/Header.d.ts +1 -2
- package/esm/LinearComparativeView/components/Header.js +52 -58
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -2
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -8
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -2
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +13 -18
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -2
- package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -5
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -2
- package/esm/LinearComparativeView/components/Rubberband.js +20 -28
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -2
- package/esm/LinearComparativeView/components/VerticalGuide.js +4 -5
- package/esm/LinearComparativeView/model.d.ts +32 -28
- package/esm/LinearComparativeView/model.js +21 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +1 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.js +5 -13
- package/esm/LinearSyntenyDisplay/afterAttach.js +6 -3
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/Component.js +9 -9
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +72 -77
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +2 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +2 -3
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -2
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +34 -50
- package/esm/LinearSyntenyView/components/Icons.d.ts +2 -3
- package/esm/LinearSyntenyView/components/Icons.js +3 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +125 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +37 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +16 -0
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -2
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +45 -121
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +40 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.js +65 -0
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -2
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -2
- package/esm/LinearSyntenyView/model.d.ts +49 -30
- package/esm/LinearSyntenyView/model.js +41 -9
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -7
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +4 -16
- package/esm/LinearSyntenyView/types.d.ts +12 -0
- package/esm/LinearSyntenyView/types.js +1 -0
- package/esm/LinearSyntenyViewHelper/index.js +2 -2
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +52 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -57
- package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
- package/esm/SyntenyFeatureDetail/types.js +1 -0
- package/package.json +2 -2
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -194
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -57
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -52
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -169
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.js +0 -4
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -32
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
|
@@ -0,0 +1,130 @@
|
|
|
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, selectedRow, }) {
|
|
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(selectedRow, {
|
|
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
|
+
selectedRow,
|
|
58
|
+
fileName,
|
|
59
|
+
assembly1,
|
|
60
|
+
assembly2,
|
|
61
|
+
bed1Location,
|
|
62
|
+
bed2Location,
|
|
63
|
+
fileLocation,
|
|
64
|
+
indexFileLocation,
|
|
65
|
+
radioOption,
|
|
66
|
+
]);
|
|
67
|
+
const helpStrings = {
|
|
68
|
+
'.paf': 'minimap2 target.fa query.fa',
|
|
69
|
+
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
70
|
+
'.out': 'mashmap target.fa query.fa',
|
|
71
|
+
'.delta': 'mummer target.fa query.fa',
|
|
72
|
+
'.chain': 'e.g. queryToTarget.chain',
|
|
73
|
+
};
|
|
74
|
+
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 => {
|
|
75
|
+
setValue(event.target.value);
|
|
76
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Grid2, { container: true, justifyContent: "center", children: [
|
|
77
|
+
'.paf',
|
|
78
|
+
'.delta',
|
|
79
|
+
'.out',
|
|
80
|
+
'.chain',
|
|
81
|
+
'.anchors',
|
|
82
|
+
'.anchors.simple',
|
|
83
|
+
'.pif.gz',
|
|
84
|
+
].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' ||
|
|
85
|
+
radioOption === '.out' ||
|
|
86
|
+
radioOption === '.delta' ||
|
|
87
|
+
radioOption === '.chain' ||
|
|
88
|
+
radioOption === '.pif.gz' ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexDirection: 'column',
|
|
91
|
+
gap: 10,
|
|
92
|
+
}, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
93
|
+
setFileLocation(loc);
|
|
94
|
+
} }), (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: {
|
|
95
|
+
display: 'flex',
|
|
96
|
+
gap: 20,
|
|
97
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
98
|
+
display: 'grid',
|
|
99
|
+
gridTemplateColumns: '1fr 1fr',
|
|
100
|
+
gap: 4,
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
}, 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: () => {
|
|
103
|
+
setSwap(!swap);
|
|
104
|
+
}, 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 => {
|
|
105
|
+
setFileLocation(loc);
|
|
106
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
107
|
+
setBed1Location(loc);
|
|
108
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
109
|
+
setBed2Location(loc);
|
|
110
|
+
} })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
111
|
+
margin: 'auto',
|
|
112
|
+
display: 'flex',
|
|
113
|
+
justifyContent: 'center',
|
|
114
|
+
gap: 20,
|
|
115
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
116
|
+
display: 'grid',
|
|
117
|
+
gridTemplateColumns: '1fr 1fr',
|
|
118
|
+
gap: 4,
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
}, 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: () => {
|
|
121
|
+
setSwap(!swap);
|
|
122
|
+
}, 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 => {
|
|
123
|
+
setFileLocation(loc);
|
|
124
|
+
} }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${value} index location`, description: "", location: indexFileLocation, setLocation: loc => {
|
|
125
|
+
setIndexFileLocation(loc);
|
|
126
|
+
} }) })] })) : ((0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
127
|
+
setFileLocation(loc);
|
|
128
|
+
} })) })] }));
|
|
129
|
+
});
|
|
130
|
+
exports.default = ImportSyntenyOpenCustomTrack;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const ImportSyntenyTrackSelector: ({ model, selectedRow, assembly1, assembly2, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
selectedRow: number;
|
|
5
|
+
assembly1: string;
|
|
6
|
+
assembly2: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImportSyntenyTrackSelector;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const mobx_react_1 = require("mobx-react");
|
|
11
|
+
const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, selectedRow, assembly1, assembly2, }) {
|
|
12
|
+
var _a;
|
|
13
|
+
const session = (0, util_1.getSession)(model);
|
|
14
|
+
const { importFormSyntenyTrackSelections } = model;
|
|
15
|
+
const { tracks = [], sessionTracks = [] } = session;
|
|
16
|
+
const allTracks = [...tracks, ...sessionTracks];
|
|
17
|
+
const filteredTracks = allTracks.filter(track => {
|
|
18
|
+
const assemblyNames = (0, configuration_1.readConfObject)(track, 'assemblyNames');
|
|
19
|
+
return (assemblyNames.includes(assembly1) &&
|
|
20
|
+
assemblyNames.includes(assembly2) &&
|
|
21
|
+
track.type.includes('Synteny'));
|
|
22
|
+
});
|
|
23
|
+
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
24
|
+
const r = importFormSyntenyTrackSelections[selectedRow];
|
|
25
|
+
const value = (r === null || r === void 0 ? void 0 : r.type) === 'preConfigured' ? r.value : undefined;
|
|
26
|
+
(0, react_1.useEffect)(() => {
|
|
27
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
28
|
+
type: 'preConfigured',
|
|
29
|
+
value: resetTrack,
|
|
30
|
+
});
|
|
31
|
+
}, [assembly2, assembly1, resetTrack, selectedRow, model]);
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Select a track from the select box below, the track will be shown when you hit \"Launch\"." }), value && filteredTracks.map(r => r.trackId).includes(value) ? ((0, jsx_runtime_1.jsx)(material_1.Select, { value: value, onChange: event => {
|
|
33
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
34
|
+
type: 'preConfigured',
|
|
35
|
+
value: event.target.value,
|
|
36
|
+
});
|
|
37
|
+
}, 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}` }))] }));
|
|
38
|
+
});
|
|
39
|
+
exports.default = ImportSyntenyTrackSelector;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
export default function ImportSyntenyTrackSelectorArea({ model, assembly1, assembly2, selectedRow, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
selectedRow: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
exports.default = ImportSyntenyTrackSelectorArea;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const ImportSyntenyOpenCustomTrack_1 = __importDefault(require("./ImportSyntenyOpenCustomTrack"));
|
|
11
|
+
const ImportSyntenyPreConfigured_1 = __importDefault(require("./ImportSyntenyPreConfigured"));
|
|
12
|
+
function ImportSyntenyTrackSelectorArea({ model, assembly1, assembly2, selectedRow, }) {
|
|
13
|
+
const [choice, setChoice] = (0, react_1.useState)('tracklist');
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
if (choice === 'none') {
|
|
16
|
+
model.setImportFormSyntenyTrack(selectedRow, { type: 'none' });
|
|
17
|
+
}
|
|
18
|
+
}, [choice, model, selectedRow]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { row: true, value: choice, "aria-labelledby": "group-label", onChange: event => {
|
|
20
|
+
setChoice(event.target.value);
|
|
21
|
+
}, 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, selectedRow: selectedRow, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyPreConfigured_1.default, { model: model, selectedRow: selectedRow, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
22
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearSyntenyViewModel } from '../../model';
|
|
3
2
|
declare const LinearSyntenyViewImportForm: ({ model, }: {
|
|
4
3
|
model: LinearSyntenyViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default LinearSyntenyViewImportForm;
|
|
@@ -1,32 +1,10 @@
|
|
|
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 ArrowForwardIos_1 = __importDefault(require("@mui/icons-material/ArrowForwardIos"));
|
|
@@ -34,8 +12,8 @@ const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
|
34
12
|
const material_1 = require("@mui/material");
|
|
35
13
|
const mobx_react_1 = require("mobx-react");
|
|
36
14
|
const mui_1 = require("tss-react/mui");
|
|
37
|
-
const
|
|
38
|
-
const
|
|
15
|
+
const ImportSyntenyTrackSelectorArea_1 = __importDefault(require("./ImportSyntenyTrackSelectorArea"));
|
|
16
|
+
const doSubmit_1 = require("./doSubmit");
|
|
39
17
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
40
18
|
importFormContainer: {
|
|
41
19
|
padding: theme.spacing(4),
|
|
@@ -52,6 +30,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
52
30
|
},
|
|
53
31
|
flex: {
|
|
54
32
|
display: 'flex',
|
|
33
|
+
gap: 90,
|
|
55
34
|
},
|
|
56
35
|
mb: {
|
|
57
36
|
marginBottom: 10,
|
|
@@ -59,8 +38,12 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
59
38
|
bg: {
|
|
60
39
|
background: theme.palette.divider,
|
|
61
40
|
},
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
rightPanel: {
|
|
42
|
+
flexGrow: 11,
|
|
43
|
+
},
|
|
44
|
+
leftPanel: {
|
|
45
|
+
flexGrow: 4,
|
|
46
|
+
flexShrink: 0,
|
|
64
47
|
},
|
|
65
48
|
}));
|
|
66
49
|
const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
@@ -74,120 +57,38 @@ const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model
|
|
|
74
57
|
defaultAssemblyName,
|
|
75
58
|
]);
|
|
76
59
|
const [error, setError] = (0, react_1.useState)();
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} },
|
|
111
|
-
react_1.default.createElement(ArrowForwardIos_1.default, null))) : null))),
|
|
112
|
-
react_1.default.createElement("div", null,
|
|
113
|
-
react_1.default.createElement(material_1.Button, { className: classes.button, variant: "contained", color: "secondary", onClick: () => {
|
|
114
|
-
setSelectedAssemblyNames([
|
|
115
|
-
...selectedAssemblyNames,
|
|
116
|
-
defaultAssemblyName,
|
|
117
|
-
]);
|
|
118
|
-
} }, "Add row"),
|
|
119
|
-
react_1.default.createElement(material_1.Button, { className: classes.button, onClick: () => {
|
|
120
|
-
;
|
|
121
|
-
(async () => {
|
|
122
|
-
try {
|
|
123
|
-
setError(undefined);
|
|
124
|
-
await doSubmit({
|
|
125
|
-
userOpenedSyntenyTracksToShow,
|
|
126
|
-
preConfiguredSyntenyTracksToShow,
|
|
127
|
-
selectedAssemblyNames,
|
|
128
|
-
model,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
catch (e) {
|
|
132
|
-
console.error(e);
|
|
133
|
-
setError(e);
|
|
134
|
-
}
|
|
135
|
-
})();
|
|
136
|
-
}, variant: "contained", color: "primary" }, "Launch"))),
|
|
137
|
-
react_1.default.createElement(Spacer_1.default, null),
|
|
138
|
-
react_1.default.createElement("div", { className: classes.fixedWidth },
|
|
139
|
-
react_1.default.createElement("div", null,
|
|
140
|
-
"Synteny dataset to display between row ",
|
|
141
|
-
selectedRow + 1,
|
|
142
|
-
" and",
|
|
143
|
-
' ',
|
|
144
|
-
selectedRow + 2),
|
|
145
|
-
react_1.default.createElement(TrackSelectorUtil_1.default, { model: model, preConfiguredSyntenyTrack: preConfiguredSyntenyTracksToShow[selectedRow], assembly1: selectedAssemblyNames[selectedRow], assembly2: selectedAssemblyNames[selectedRow + 1], setPreConfiguredSyntenyTrack: arg => {
|
|
146
|
-
const clone = [...preConfiguredSyntenyTracksToShow];
|
|
147
|
-
clone[selectedRow] = arg;
|
|
148
|
-
setPreConfiguredSyntenyTracksToShow(clone);
|
|
149
|
-
}, setUserOpenedSyntenyTrack: arg => {
|
|
150
|
-
const clone = [...userOpenedSyntenyTracksToShow];
|
|
151
|
-
clone[selectedRow] = arg;
|
|
152
|
-
setUserOpenedSyntenyTracksToShow(clone);
|
|
153
|
-
} }))),
|
|
154
|
-
react_1.default.createElement(Spacer_1.default, null)));
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsxs)("div", { className: classes.flex, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.leftPanel, children: [(0, jsx_runtime_1.jsx)("div", { className: classes.mb, children: "Select assemblies for linear synteny view" }), selectedAssemblyNames.map((assemblyName, idx) => ((0, jsx_runtime_1.jsxs)("div", { className: classes.rel, children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Row ", idx + 1, ": "] }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { disabled: selectedAssemblyNames.length <= 2, onClick: () => {
|
|
61
|
+
model.importFormRemoveRow(idx);
|
|
62
|
+
setSelectedAssemblyNames(selectedAssemblyNames
|
|
63
|
+
.map((asm, idx2) => (idx2 === idx ? undefined : asm))
|
|
64
|
+
.filter(util_1.notEmpty));
|
|
65
|
+
if (selectedRow >= selectedAssemblyNames.length - 2) {
|
|
66
|
+
setSelectedRow(0);
|
|
67
|
+
}
|
|
68
|
+
}, children: (0, jsx_runtime_1.jsx)(Close_1.default, {}) }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "", selected: assemblyName, onChange: newAssembly => {
|
|
69
|
+
setSelectedAssemblyNames(selectedAssemblyNames.map((asm, idx2) => idx2 === idx ? newAssembly : asm));
|
|
70
|
+
}, session: session }), idx !== selectedAssemblyNames.length - 1 ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { "data-testid": "synbutton", className: cx(classes.synbutton, idx === selectedRow ? classes.bg : undefined), onClick: () => {
|
|
71
|
+
setSelectedRow(idx);
|
|
72
|
+
}, children: (0, jsx_runtime_1.jsx)(ArrowForwardIos_1.default, {}) })) : null] }, `${assemblyName}-${idx}`))), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { className: classes.button, variant: "contained", color: "secondary", onClick: () => {
|
|
73
|
+
setSelectedAssemblyNames([
|
|
74
|
+
...selectedAssemblyNames,
|
|
75
|
+
defaultAssemblyName,
|
|
76
|
+
]);
|
|
77
|
+
}, children: "Add row" }), (0, jsx_runtime_1.jsx)(material_1.Button, { className: classes.button, onClick: () => {
|
|
78
|
+
;
|
|
79
|
+
(async () => {
|
|
80
|
+
try {
|
|
81
|
+
setError(undefined);
|
|
82
|
+
await (0, doSubmit_1.doSubmit)({
|
|
83
|
+
selectedAssemblyNames,
|
|
84
|
+
model,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
console.error(e);
|
|
89
|
+
setError(e);
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
}, variant: "contained", color: "primary", children: "Launch" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: classes.rightPanel, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Synteny dataset to display between row ", selectedRow + 1, " and", ' ', selectedRow + 2] }), (0, jsx_runtime_1.jsx)(ImportSyntenyTrackSelectorArea_1.default, { model: model, selectedRow: selectedRow, assembly1: selectedAssemblyNames[selectedRow], assembly2: selectedAssemblyNames[selectedRow + 1] })] })] })] }));
|
|
155
93
|
});
|
|
156
|
-
async function doSubmit({ selectedAssemblyNames, model, preConfiguredSyntenyTracksToShow, userOpenedSyntenyTracksToShow, }) {
|
|
157
|
-
const session = (0, util_1.getSession)(model);
|
|
158
|
-
const { assemblyManager } = session;
|
|
159
|
-
model.setViews(await Promise.all(selectedAssemblyNames.map(async (assemblyName) => {
|
|
160
|
-
const asm = await assemblyManager.waitForAssembly(assemblyName);
|
|
161
|
-
if (!asm) {
|
|
162
|
-
throw new Error(`Assembly "${assemblyName}" failed to load`);
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
type: 'LinearGenomeView',
|
|
166
|
-
bpPerPx: 1,
|
|
167
|
-
offsetPx: 0,
|
|
168
|
-
hideHeader: true,
|
|
169
|
-
displayedRegions: asm.regions,
|
|
170
|
-
};
|
|
171
|
-
})));
|
|
172
|
-
for (const view of model.views) {
|
|
173
|
-
view.setWidth(model.width);
|
|
174
|
-
view.showAllRegions();
|
|
175
|
-
}
|
|
176
|
-
if (!(0, util_1.isSessionWithAddTracks)(session)) {
|
|
177
|
-
session.notify("Can't add tracks", 'warning');
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
userOpenedSyntenyTracksToShow.map((f, idx) => {
|
|
181
|
-
if (f) {
|
|
182
|
-
session.addTrackConf(f);
|
|
183
|
-
model.toggleTrack(f.trackId, idx);
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
preConfiguredSyntenyTracksToShow.map((f, idx) => {
|
|
188
|
-
if (f) {
|
|
189
|
-
model.showTrack(f, idx);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
94
|
exports.default = LinearSyntenyViewImportForm;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.doSubmit = doSubmit;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const mobx_1 = require("mobx");
|
|
6
|
+
async function doSubmit({ selectedAssemblyNames, model, }) {
|
|
7
|
+
const session = (0, util_1.getSession)(model);
|
|
8
|
+
const { assemblyManager } = session;
|
|
9
|
+
const { importFormSyntenyTrackSelections } = model;
|
|
10
|
+
model.setViews(await Promise.all(selectedAssemblyNames.map(async (assemblyName) => {
|
|
11
|
+
const asm = await assemblyManager.waitForAssembly(assemblyName);
|
|
12
|
+
if (!asm) {
|
|
13
|
+
throw new Error(`Assembly "${assemblyName}" failed to load`);
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
type: 'LinearGenomeView',
|
|
17
|
+
bpPerPx: 1,
|
|
18
|
+
offsetPx: 0,
|
|
19
|
+
hideHeader: true,
|
|
20
|
+
displayedRegions: asm.regions,
|
|
21
|
+
};
|
|
22
|
+
})));
|
|
23
|
+
for (const view of model.views) {
|
|
24
|
+
view.setWidth(model.width);
|
|
25
|
+
view.showAllRegions();
|
|
26
|
+
}
|
|
27
|
+
if (!(0, util_1.isSessionWithAddTracks)(session)) {
|
|
28
|
+
session.notify("Can't add tracks", 'warning');
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
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, idx);
|
|
36
|
+
}
|
|
37
|
+
else if (f.type === 'preConfigured') {
|
|
38
|
+
model.showTrack(f.value, idx);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
model.clearImportFormSyntenyTracks();
|
|
43
|
+
}
|
|
@@ -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
|
+
};
|