@jbrowse/plugin-linear-comparative-view 3.1.0 → 3.2.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/LinearComparativeView/components/Rubberband.js +5 -5
- package/dist/LinearComparativeView/components/VerticalGuide.js +3 -6
- package/dist/LinearComparativeView/model.d.ts +52 -4
- package/dist/LinearComparativeView/model.js +7 -2
- package/dist/LinearReadVsRef/LinearReadVsRef.js +2 -2
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +11 -0
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.js +58 -0
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +18 -52
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +1 -1
- package/dist/LinearSyntenyView/model.d.ts +53 -5
- package/dist/LinearSyntenyView/model.js +3 -3
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -2
- package/esm/LinearComparativeView/components/Rubberband.js +5 -5
- package/esm/LinearComparativeView/components/VerticalGuide.js +4 -7
- package/esm/LinearComparativeView/model.d.ts +52 -4
- package/esm/LinearComparativeView/model.js +7 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +11 -0
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.js +53 -0
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +21 -55
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +1 -1
- package/esm/LinearSyntenyView/model.d.ts +53 -5
- package/esm/LinearSyntenyView/model.js +3 -3
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -2
- package/package.json +5 -5
|
@@ -18,7 +18,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
|
18
18
|
height: '100%',
|
|
19
19
|
background: (0, material_1.alpha)(theme.palette.tertiary.main, 0.7),
|
|
20
20
|
position: 'absolute',
|
|
21
|
-
zIndex:
|
|
21
|
+
zIndex: 900,
|
|
22
22
|
textAlign: 'center',
|
|
23
23
|
overflow: 'hidden',
|
|
24
24
|
},
|
|
@@ -81,13 +81,13 @@ const LinearComparativeRubberband = (0, mobx_react_1.observer)(function Rubberba
|
|
|
81
81
|
clientY,
|
|
82
82
|
});
|
|
83
83
|
(0, mobx_1.transaction)(() => {
|
|
84
|
-
model.views
|
|
84
|
+
for (const view of model.views) {
|
|
85
85
|
const args = computeOffsets(offsetX, view);
|
|
86
86
|
if (args) {
|
|
87
87
|
const { leftOffset, rightOffset } = args;
|
|
88
88
|
view.setOffsets(leftOffset, rightOffset);
|
|
89
89
|
}
|
|
90
|
-
}
|
|
90
|
+
}
|
|
91
91
|
});
|
|
92
92
|
setGuideX(undefined);
|
|
93
93
|
}
|
|
@@ -125,9 +125,9 @@ const LinearComparativeRubberband = (0, mobx_react_1.observer)(function Rubberba
|
|
|
125
125
|
function mouseOut() {
|
|
126
126
|
setGuideX(undefined);
|
|
127
127
|
(0, mobx_1.transaction)(() => {
|
|
128
|
-
model.views
|
|
128
|
+
for (const view of model.views) {
|
|
129
129
|
view.setOffsets(undefined, undefined);
|
|
130
|
-
}
|
|
130
|
+
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
function handleClose() {
|
|
@@ -11,19 +11,16 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
11
11
|
height: '100%',
|
|
12
12
|
width: 1,
|
|
13
13
|
position: 'absolute',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
sm: {
|
|
17
|
-
fontSize: 10,
|
|
14
|
+
background: 'red',
|
|
15
|
+
zIndex: 1001,
|
|
18
16
|
},
|
|
19
17
|
});
|
|
20
18
|
const VerticalGuide = (0, mobx_react_1.observer)(function ({ model, coordX, }) {
|
|
21
19
|
const { classes } = useStyles();
|
|
22
20
|
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { open: true, placement: "top", title: model.views
|
|
23
21
|
.map(view => view.pxToBp(coordX))
|
|
24
|
-
.map((elt, idx) => ((0, jsx_runtime_1.jsx)(
|
|
22
|
+
.map((elt, idx) => ((0, jsx_runtime_1.jsx)("div", { children: (0, util_1.stringify)(elt, true) }, [JSON.stringify(elt), idx].join('-')))), arrow: true, children: (0, jsx_runtime_1.jsx)("div", { className: classes.guide, style: {
|
|
25
23
|
left: coordX,
|
|
26
|
-
background: 'red',
|
|
27
24
|
} }) }));
|
|
28
25
|
});
|
|
29
26
|
exports.default = VerticalGuide;
|
|
@@ -49,6 +49,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
49
49
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
50
50
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
51
51
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
52
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
52
53
|
}, {
|
|
53
54
|
width: number;
|
|
54
55
|
} & {
|
|
@@ -77,6 +78,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
77
78
|
readonly interRegionPaddingWidth: number;
|
|
78
79
|
readonly assemblyNames: string[];
|
|
79
80
|
readonly stickyViewHeaders: boolean;
|
|
81
|
+
readonly rubberbandTop: number;
|
|
80
82
|
readonly pinnedTracksTop: number;
|
|
81
83
|
} & {
|
|
82
84
|
scaleBarDisplayPrefix(): string | undefined;
|
|
@@ -163,6 +165,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
163
165
|
setDraggingTrackId(idx?: string): void;
|
|
164
166
|
setScaleFactor(factor: number): void;
|
|
165
167
|
clearView(): void;
|
|
168
|
+
setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState): void;
|
|
166
169
|
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
167
170
|
} & {
|
|
168
171
|
slide: (viewWidths: number) => void;
|
|
@@ -183,7 +186,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
183
186
|
readonly coarseVisibleLocStrings: string;
|
|
184
187
|
} & {
|
|
185
188
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
186
|
-
afterAttach(): void;
|
|
187
189
|
} & {
|
|
188
190
|
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
189
191
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
@@ -229,6 +231,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
229
231
|
} | undefined;
|
|
230
232
|
} & {
|
|
231
233
|
afterCreate(): void;
|
|
234
|
+
afterAttach(): void;
|
|
232
235
|
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
233
236
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
234
237
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -251,7 +254,28 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
251
254
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
252
255
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
253
256
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
254
|
-
|
|
257
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
258
|
+
}>>, {
|
|
259
|
+
id: string;
|
|
260
|
+
type: string;
|
|
261
|
+
displayName: string | undefined;
|
|
262
|
+
tracks: any[];
|
|
263
|
+
minimized: boolean;
|
|
264
|
+
displayedRegions: import("@jbrowse/core/util").Region[];
|
|
265
|
+
offsetPx: number;
|
|
266
|
+
bpPerPx: number;
|
|
267
|
+
hideHeader: boolean;
|
|
268
|
+
hideHeaderOverview: boolean;
|
|
269
|
+
hideNoTracksActive: boolean;
|
|
270
|
+
trackSelectorType: string;
|
|
271
|
+
showCenterLine: boolean;
|
|
272
|
+
showCytobandsSetting: boolean;
|
|
273
|
+
trackLabels: string;
|
|
274
|
+
showGridlines: boolean;
|
|
275
|
+
highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[];
|
|
276
|
+
colorByCDS: boolean;
|
|
277
|
+
showTrackOutlines: boolean;
|
|
278
|
+
}>>;
|
|
255
279
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
256
280
|
}, {
|
|
257
281
|
width: number;
|
|
@@ -339,6 +363,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
339
363
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
340
364
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
341
365
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
366
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
342
367
|
}, {
|
|
343
368
|
width: number;
|
|
344
369
|
} & {
|
|
@@ -367,6 +392,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
367
392
|
readonly interRegionPaddingWidth: number;
|
|
368
393
|
readonly assemblyNames: string[];
|
|
369
394
|
readonly stickyViewHeaders: boolean;
|
|
395
|
+
readonly rubberbandTop: number;
|
|
370
396
|
readonly pinnedTracksTop: number;
|
|
371
397
|
} & {
|
|
372
398
|
scaleBarDisplayPrefix(): string | undefined;
|
|
@@ -453,6 +479,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
453
479
|
setDraggingTrackId(idx?: string): void;
|
|
454
480
|
setScaleFactor(factor: number): void;
|
|
455
481
|
clearView(): void;
|
|
482
|
+
setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState): void;
|
|
456
483
|
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
457
484
|
} & {
|
|
458
485
|
slide: (viewWidths: number) => void;
|
|
@@ -473,7 +500,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
473
500
|
readonly coarseVisibleLocStrings: string;
|
|
474
501
|
} & {
|
|
475
502
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
476
|
-
afterAttach(): void;
|
|
477
503
|
} & {
|
|
478
504
|
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
479
505
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
@@ -519,6 +545,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
519
545
|
} | undefined;
|
|
520
546
|
} & {
|
|
521
547
|
afterCreate(): void;
|
|
548
|
+
afterAttach(): void;
|
|
522
549
|
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
523
550
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
524
551
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -541,7 +568,28 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
541
568
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
542
569
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
543
570
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
544
|
-
|
|
571
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
572
|
+
}>>, {
|
|
573
|
+
id: string;
|
|
574
|
+
type: string;
|
|
575
|
+
displayName: string | undefined;
|
|
576
|
+
tracks: any[];
|
|
577
|
+
minimized: boolean;
|
|
578
|
+
displayedRegions: import("@jbrowse/core/util").Region[];
|
|
579
|
+
offsetPx: number;
|
|
580
|
+
bpPerPx: number;
|
|
581
|
+
hideHeader: boolean;
|
|
582
|
+
hideHeaderOverview: boolean;
|
|
583
|
+
hideNoTracksActive: boolean;
|
|
584
|
+
trackSelectorType: string;
|
|
585
|
+
showCenterLine: boolean;
|
|
586
|
+
showCytobandsSetting: boolean;
|
|
587
|
+
trackLabels: string;
|
|
588
|
+
showGridlines: boolean;
|
|
589
|
+
highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[];
|
|
590
|
+
colorByCDS: boolean;
|
|
591
|
+
showTrackOutlines: boolean;
|
|
592
|
+
}>>;
|
|
545
593
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
546
594
|
}>>, import("mobx-state-tree")._NotCustomized>;
|
|
547
595
|
export type LinearComparativeViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -102,18 +102,23 @@ function stateModelFactory(pluginManager) {
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
onSubviewAction(actionName, path, args) {
|
|
105
|
-
self.views
|
|
105
|
+
for (const view of self.views) {
|
|
106
106
|
const ret = (0, mobx_state_tree_1.getPath)(view);
|
|
107
107
|
if (!ret.endsWith(path)) {
|
|
108
108
|
view[actionName](args === null || args === void 0 ? void 0 : args[0]);
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
}
|
|
111
111
|
},
|
|
112
112
|
setWidth(newWidth) {
|
|
113
113
|
self.width = newWidth;
|
|
114
114
|
},
|
|
115
115
|
setViews(views) {
|
|
116
116
|
self.views = (0, mobx_state_tree_1.cast)(views);
|
|
117
|
+
const levels = [];
|
|
118
|
+
for (let i = 0; i < views.length - 1; i++) {
|
|
119
|
+
levels.push({ level: i });
|
|
120
|
+
}
|
|
121
|
+
self.levels = (0, mobx_state_tree_1.cast)(levels);
|
|
117
122
|
},
|
|
118
123
|
removeView(view) {
|
|
119
124
|
self.views.remove(view);
|
|
@@ -101,12 +101,12 @@ function ReadVsRefDialog({ track, feature: preFeature, handleClose, }) {
|
|
|
101
101
|
};
|
|
102
102
|
const totalLength = flags & 2048 ? getLength(suppAlns[0].CIGAR) : getLength(cigar);
|
|
103
103
|
const features = [feat, ...suppAlns];
|
|
104
|
-
features.
|
|
104
|
+
for (const [idx, f] of features.entries()) {
|
|
105
105
|
f.refName = assembly.getCanonicalRefName(f.refName) || f.refName;
|
|
106
106
|
f.syntenyId = idx;
|
|
107
107
|
f.mate.syntenyId = idx;
|
|
108
108
|
f.mate.uniqueId = `${f.uniqueId}_mate`;
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
110
|
features.sort((a, b) => a.clipPos - b.clipPos);
|
|
111
111
|
const featSeq = feature.get('seq');
|
|
112
112
|
const configFeatureStore = [...features, ...features.map(f => f.mate)];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const LeftPanel: ({ model, selectedAssemblyNames, setSelectedAssemblyNames, selectedRow, setSelectedRow, defaultAssemblyName, onLaunch, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
selectedAssemblyNames: string[];
|
|
5
|
+
setSelectedAssemblyNames: (names: string[]) => void;
|
|
6
|
+
selectedRow: number;
|
|
7
|
+
setSelectedRow: (row: number) => void;
|
|
8
|
+
defaultAssemblyName: string;
|
|
9
|
+
onLaunch: () => void;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default LeftPanel;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 ui_1 = require("@jbrowse/core/ui");
|
|
8
|
+
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const ArrowForwardIos_1 = __importDefault(require("@mui/icons-material/ArrowForwardIos"));
|
|
10
|
+
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
12
|
+
const mobx_react_1 = require("mobx-react");
|
|
13
|
+
const mui_1 = require("tss-react/mui");
|
|
14
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
15
|
+
mb: {
|
|
16
|
+
marginBottom: 10,
|
|
17
|
+
},
|
|
18
|
+
button: {
|
|
19
|
+
margin: theme.spacing(2),
|
|
20
|
+
},
|
|
21
|
+
rel: {
|
|
22
|
+
position: 'relative',
|
|
23
|
+
},
|
|
24
|
+
synbutton: {
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
top: 30,
|
|
27
|
+
},
|
|
28
|
+
bg: {
|
|
29
|
+
background: theme.palette.divider,
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
const AssemblyRows = (0, mobx_react_1.observer)(function ({ selectedRow, selectedAssemblyNames, setSelectedRow, setSelectedAssemblyNames, model, }) {
|
|
33
|
+
const { classes, cx } = useStyles();
|
|
34
|
+
const session = (0, util_1.getSession)(model);
|
|
35
|
+
return 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: () => {
|
|
36
|
+
model.importFormRemoveRow(idx);
|
|
37
|
+
setSelectedAssemblyNames(selectedAssemblyNames
|
|
38
|
+
.map((asm, idx2) => (idx2 === idx ? undefined : asm))
|
|
39
|
+
.filter(util_1.notEmpty));
|
|
40
|
+
if (selectedRow >= selectedAssemblyNames.length - 2) {
|
|
41
|
+
setSelectedRow(0);
|
|
42
|
+
}
|
|
43
|
+
}, children: (0, jsx_runtime_1.jsx)(Close_1.default, {}) }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "", selected: assemblyName, onChange: newAssembly => {
|
|
44
|
+
setSelectedAssemblyNames(selectedAssemblyNames.map((asm, idx2) => idx2 === idx ? newAssembly : asm));
|
|
45
|
+
}, 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: () => {
|
|
46
|
+
setSelectedRow(idx);
|
|
47
|
+
}, children: (0, jsx_runtime_1.jsx)(ArrowForwardIos_1.default, {}) })) : null] }, `${assemblyName}-${idx}`)));
|
|
48
|
+
});
|
|
49
|
+
const LeftPanel = (0, mobx_react_1.observer)(function ({ model, selectedAssemblyNames, setSelectedAssemblyNames, selectedRow, setSelectedRow, defaultAssemblyName, onLaunch, }) {
|
|
50
|
+
const { classes } = useStyles();
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: classes.mb, children: "Select assemblies for linear synteny view" }), (0, jsx_runtime_1.jsx)(AssemblyRows, { model: model, selectedAssemblyNames: selectedAssemblyNames, setSelectedAssemblyNames: setSelectedAssemblyNames, selectedRow: selectedRow, setSelectedRow: setSelectedRow }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { className: classes.button, variant: "contained", color: "secondary", onClick: () => {
|
|
52
|
+
setSelectedAssemblyNames([
|
|
53
|
+
...selectedAssemblyNames,
|
|
54
|
+
defaultAssemblyName,
|
|
55
|
+
]);
|
|
56
|
+
}, children: "Add row" }), (0, jsx_runtime_1.jsx)(material_1.Button, { className: classes.button, onClick: onLaunch, variant: "contained", color: "primary", children: "Launch" })] })] }));
|
|
57
|
+
});
|
|
58
|
+
exports.default = LeftPanel;
|
|
@@ -7,37 +7,20 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
9
9
|
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const ArrowForwardIos_1 = __importDefault(require("@mui/icons-material/ArrowForwardIos"));
|
|
11
|
-
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
12
10
|
const material_1 = require("@mui/material");
|
|
13
11
|
const mobx_react_1 = require("mobx-react");
|
|
14
12
|
const mui_1 = require("tss-react/mui");
|
|
15
13
|
const ImportSyntenyTrackSelectorArea_1 = __importDefault(require("./ImportSyntenyTrackSelectorArea"));
|
|
14
|
+
const LeftPanel_1 = __importDefault(require("./LeftPanel"));
|
|
16
15
|
const doSubmit_1 = require("./doSubmit");
|
|
17
16
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
18
17
|
importFormContainer: {
|
|
19
18
|
padding: theme.spacing(4),
|
|
20
19
|
},
|
|
21
|
-
button: {
|
|
22
|
-
margin: theme.spacing(2),
|
|
23
|
-
},
|
|
24
|
-
rel: {
|
|
25
|
-
position: 'relative',
|
|
26
|
-
},
|
|
27
|
-
synbutton: {
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
top: 30,
|
|
30
|
-
},
|
|
31
20
|
flex: {
|
|
32
21
|
display: 'flex',
|
|
33
22
|
gap: 90,
|
|
34
23
|
},
|
|
35
|
-
mb: {
|
|
36
|
-
marginBottom: 10,
|
|
37
|
-
},
|
|
38
|
-
bg: {
|
|
39
|
-
background: theme.palette.divider,
|
|
40
|
-
},
|
|
41
24
|
rightPanel: {
|
|
42
25
|
flexGrow: 11,
|
|
43
26
|
},
|
|
@@ -47,7 +30,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
47
30
|
},
|
|
48
31
|
}));
|
|
49
32
|
const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
50
|
-
const { classes
|
|
33
|
+
const { classes } = useStyles();
|
|
51
34
|
const session = (0, util_1.getSession)(model);
|
|
52
35
|
const { assemblyNames } = session;
|
|
53
36
|
const defaultAssemblyName = assemblyNames[0] || '';
|
|
@@ -57,38 +40,21 @@ const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model
|
|
|
57
40
|
defaultAssemblyName,
|
|
58
41
|
]);
|
|
59
42
|
const [error, setError] = (0, react_1.useState)();
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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] })] })] })] }));
|
|
43
|
+
const handleLaunch = async () => {
|
|
44
|
+
try {
|
|
45
|
+
setError(undefined);
|
|
46
|
+
await (0, doSubmit_1.doSubmit)({
|
|
47
|
+
selectedAssemblyNames,
|
|
48
|
+
model,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
console.error(e);
|
|
53
|
+
setError(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
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.jsx)("div", { className: classes.leftPanel, children: (0, jsx_runtime_1.jsx)(LeftPanel_1.default, { model: model, selectedAssemblyNames: selectedAssemblyNames, setSelectedAssemblyNames: setSelectedAssemblyNames, selectedRow: selectedRow, setSelectedRow: setSelectedRow, defaultAssemblyName: defaultAssemblyName, onLaunch: () => {
|
|
57
|
+
handleLaunch();
|
|
58
|
+
} }) }), (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] })] })] })] }));
|
|
93
59
|
});
|
|
94
60
|
exports.default = LinearSyntenyViewImportForm;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { LinearSyntenyViewModel } from '../model';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
model: LSV;
|
|
2
|
+
declare const LinearSyntenyView: ({ model, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
5
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default LinearSyntenyView;
|
|
@@ -41,7 +41,7 @@ const react_1 = require("react");
|
|
|
41
41
|
const mobx_react_1 = require("mobx-react");
|
|
42
42
|
const LinearComparativeView_1 = __importDefault(require("../../LinearComparativeView/components/LinearComparativeView"));
|
|
43
43
|
const LinearSyntenyImportForm = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./ImportForm/LinearSyntenyImportForm'))));
|
|
44
|
-
const LinearSyntenyView = (0, mobx_react_1.observer)(function ({ model }) {
|
|
44
|
+
const LinearSyntenyView = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
45
45
|
return !model.initialized ? ((0, jsx_runtime_1.jsx)(LinearSyntenyImportForm, { model: model })) : ((0, jsx_runtime_1.jsx)(LinearComparativeView_1.default, { model: model }));
|
|
46
46
|
});
|
|
47
47
|
exports.default = LinearSyntenyView;
|
|
@@ -66,6 +66,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
66
66
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
67
67
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
68
68
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
69
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
69
70
|
}, {
|
|
70
71
|
width: number;
|
|
71
72
|
} & {
|
|
@@ -94,6 +95,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
94
95
|
readonly interRegionPaddingWidth: number;
|
|
95
96
|
readonly assemblyNames: string[];
|
|
96
97
|
readonly stickyViewHeaders: boolean;
|
|
98
|
+
readonly rubberbandTop: number;
|
|
97
99
|
readonly pinnedTracksTop: number;
|
|
98
100
|
} & {
|
|
99
101
|
scaleBarDisplayPrefix(): string | undefined;
|
|
@@ -180,6 +182,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
180
182
|
setDraggingTrackId(idx?: string): void;
|
|
181
183
|
setScaleFactor(factor: number): void;
|
|
182
184
|
clearView(): void;
|
|
185
|
+
setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState): void;
|
|
183
186
|
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
184
187
|
} & {
|
|
185
188
|
slide: (viewWidths: number) => void;
|
|
@@ -200,7 +203,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
200
203
|
readonly coarseVisibleLocStrings: string;
|
|
201
204
|
} & {
|
|
202
205
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
203
|
-
afterAttach(): void;
|
|
204
206
|
} & {
|
|
205
207
|
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
206
208
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
@@ -246,6 +248,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
246
248
|
} | undefined;
|
|
247
249
|
} & {
|
|
248
250
|
afterCreate(): void;
|
|
251
|
+
afterAttach(): void;
|
|
249
252
|
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
250
253
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
251
254
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -268,7 +271,28 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
268
271
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
269
272
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
270
273
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
271
|
-
|
|
274
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
275
|
+
}>>, {
|
|
276
|
+
id: string;
|
|
277
|
+
type: string;
|
|
278
|
+
displayName: string | undefined;
|
|
279
|
+
tracks: any[];
|
|
280
|
+
minimized: boolean;
|
|
281
|
+
displayedRegions: import("@jbrowse/core/util").Region[];
|
|
282
|
+
offsetPx: number;
|
|
283
|
+
bpPerPx: number;
|
|
284
|
+
hideHeader: boolean;
|
|
285
|
+
hideHeaderOverview: boolean;
|
|
286
|
+
hideNoTracksActive: boolean;
|
|
287
|
+
trackSelectorType: string;
|
|
288
|
+
showCenterLine: boolean;
|
|
289
|
+
showCytobandsSetting: boolean;
|
|
290
|
+
trackLabels: string;
|
|
291
|
+
showGridlines: boolean;
|
|
292
|
+
highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[];
|
|
293
|
+
colorByCDS: boolean;
|
|
294
|
+
showTrackOutlines: boolean;
|
|
295
|
+
}>>;
|
|
272
296
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
273
297
|
} & {
|
|
274
298
|
type: import("mobx-state-tree").ISimpleType<"LinearSyntenyView">;
|
|
@@ -336,10 +360,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
336
360
|
type?: undefined;
|
|
337
361
|
} | {
|
|
338
362
|
label: string;
|
|
339
|
-
onClick: () => void;
|
|
340
363
|
checked: boolean;
|
|
341
364
|
type: string;
|
|
342
365
|
description: string;
|
|
366
|
+
onClick: () => void;
|
|
343
367
|
icon?: undefined;
|
|
344
368
|
} | {
|
|
345
369
|
label: string;
|
|
@@ -423,6 +447,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
423
447
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
424
448
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
425
449
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
450
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
426
451
|
}, {
|
|
427
452
|
width: number;
|
|
428
453
|
} & {
|
|
@@ -451,6 +476,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
451
476
|
readonly interRegionPaddingWidth: number;
|
|
452
477
|
readonly assemblyNames: string[];
|
|
453
478
|
readonly stickyViewHeaders: boolean;
|
|
479
|
+
readonly rubberbandTop: number;
|
|
454
480
|
readonly pinnedTracksTop: number;
|
|
455
481
|
} & {
|
|
456
482
|
scaleBarDisplayPrefix(): string | undefined;
|
|
@@ -537,6 +563,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
537
563
|
setDraggingTrackId(idx?: string): void;
|
|
538
564
|
setScaleFactor(factor: number): void;
|
|
539
565
|
clearView(): void;
|
|
566
|
+
setInit(arg?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState): void;
|
|
540
567
|
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").ExportSvgOptions): Promise<void>;
|
|
541
568
|
} & {
|
|
542
569
|
slide: (viewWidths: number) => void;
|
|
@@ -557,7 +584,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
557
584
|
readonly coarseVisibleLocStrings: string;
|
|
558
585
|
} & {
|
|
559
586
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
560
|
-
afterAttach(): void;
|
|
561
587
|
} & {
|
|
562
588
|
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").BpOffset): void;
|
|
563
589
|
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
@@ -603,6 +629,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
603
629
|
} | undefined;
|
|
604
630
|
} & {
|
|
605
631
|
afterCreate(): void;
|
|
632
|
+
afterAttach(): void;
|
|
606
633
|
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
607
634
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
608
635
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -625,7 +652,28 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
625
652
|
highlight: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType>>, [undefined]>;
|
|
626
653
|
colorByCDS: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
627
654
|
showTrackOutlines: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
628
|
-
|
|
655
|
+
init: import("mobx-state-tree").IType<import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined, import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").InitState | undefined>;
|
|
656
|
+
}>>, {
|
|
657
|
+
id: string;
|
|
658
|
+
type: string;
|
|
659
|
+
displayName: string | undefined;
|
|
660
|
+
tracks: any[];
|
|
661
|
+
minimized: boolean;
|
|
662
|
+
displayedRegions: import("@jbrowse/core/util").Region[];
|
|
663
|
+
offsetPx: number;
|
|
664
|
+
bpPerPx: number;
|
|
665
|
+
hideHeader: boolean;
|
|
666
|
+
hideHeaderOverview: boolean;
|
|
667
|
+
hideNoTracksActive: boolean;
|
|
668
|
+
trackSelectorType: string;
|
|
669
|
+
showCenterLine: boolean;
|
|
670
|
+
showCytobandsSetting: boolean;
|
|
671
|
+
trackLabels: string;
|
|
672
|
+
showGridlines: boolean;
|
|
673
|
+
highlight: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView/types").HighlightType[];
|
|
674
|
+
colorByCDS: boolean;
|
|
675
|
+
showTrackOutlines: boolean;
|
|
676
|
+
}>>;
|
|
629
677
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
630
678
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
631
679
|
export type LinearSyntenyViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -112,12 +112,12 @@ function stateModelFactory(pluginManager) {
|
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
label: 'Draw CIGAR',
|
|
115
|
-
onClick: () => {
|
|
116
|
-
self.setDrawCIGAR(!self.drawCIGAR);
|
|
117
|
-
},
|
|
118
115
|
checked: self.drawCIGAR,
|
|
119
116
|
type: 'checkbox',
|
|
120
117
|
description: 'Draws per-base CIGAR level alignments',
|
|
118
|
+
onClick: () => {
|
|
119
|
+
self.setDrawCIGAR(!self.drawCIGAR);
|
|
120
|
+
},
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
label: 'Link views',
|
|
@@ -51,9 +51,9 @@ function linearSyntenyViewHelperModelFactory(pluginManager) {
|
|
|
51
51
|
const config = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
|
|
52
52
|
const shownTracks = self.tracks.filter(t => t.configuration === config);
|
|
53
53
|
(0, mobx_1.transaction)(() => {
|
|
54
|
-
|
|
54
|
+
for (const t of shownTracks) {
|
|
55
55
|
self.tracks.remove(t);
|
|
56
|
-
}
|
|
56
|
+
}
|
|
57
57
|
});
|
|
58
58
|
return shownTracks.length;
|
|
59
59
|
},
|