@jbrowse/plugin-linear-genome-view 1.6.4 → 1.6.7
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/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -1
- package/dist/LinearBareDisplay/configSchema.d.ts +1 -1
- package/dist/LinearBasicDisplay/configSchema.d.ts +1 -1
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +2 -0
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/dist/LinearGenomeView/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/plugin-linear-genome-view.cjs.development.js +147 -249
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +149 -251
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +2 -4
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -8
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +11 -3
- package/src/LinearBasicDisplay/model.ts +1 -1
- package/src/LinearGenomeView/components/HelpDialog.tsx +14 -1
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +1 -13
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +7 -3
- package/src/LinearGenomeView/components/TrackContainer.tsx +35 -38
- package/src/LinearGenomeView/components/TrackLabel.tsx +5 -5
- package/src/LinearGenomeView/components/TracksContainer.tsx +0 -1
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +23 -26
- package/src/LinearGenomeView/index.test.ts +44 -42
- package/src/LinearGenomeView/index.tsx +167 -242
- package/src/LinearGenomeView/volvoxDisplayedRegions.json +16 -0
- package/dist/LinearGenomeView/components/ReturnToImportFormDialog.d.ts +0 -9
- package/src/LinearGenomeView/components/ReturnToImportFormDialog.tsx +0 -83
|
@@ -6,15 +6,15 @@ import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
|
6
6
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
7
7
|
import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType';
|
|
8
8
|
import Plugin from '@jbrowse/core/Plugin';
|
|
9
|
-
import { getContainingView, getContainingDisplay, makeAbortableReaction, assembleLocString, getSession, isSessionModelWithWidgets, isSelectionContainer, isAbortException, stringify, useDebounce, measureText, useDebouncedCallback, viewBpToPx, clamp, isViewContainer, parseLocString, findLastIndex, springAnimate, isAbstractMenuManager } from '@jbrowse/core/util';
|
|
9
|
+
import { getContainingView, getContainingDisplay, makeAbortableReaction, assembleLocString, getSession, isSessionModelWithWidgets, isSelectionContainer, isAbortException, stringify, getBpDisplayStr, useDebounce, measureText, useDebouncedCallback, viewBpToPx, clamp, isViewContainer, parseLocString, findLastIndex, springAnimate, isAbstractMenuManager } from '@jbrowse/core/util';
|
|
10
10
|
import LineStyleIcon from '@material-ui/icons/LineStyle';
|
|
11
|
-
import { useTheme, makeStyles as makeStyles$1, alpha, Portal, Typography as Typography$1, Button as Button$1, Popover, Tooltip as Tooltip$1, TextField, Popper, CircularProgress, InputAdornment, IconButton, Dialog, DialogTitle, DialogContent, FormControlLabel, Checkbox, DialogActions,
|
|
11
|
+
import { useTheme, makeStyles as makeStyles$1, alpha, Portal, Typography as Typography$1, Button as Button$1, Popover, Tooltip as Tooltip$1, TextField, Popper, CircularProgress, InputAdornment, IconButton, Dialog, DialogTitle, DialogContent, FormControlLabel, Checkbox, DialogActions, FormGroup, Paper, Container, Grid, Divider, TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
|
|
12
12
|
import CompositeMap from '@jbrowse/core/util/compositeMap';
|
|
13
13
|
import { isFeature } from '@jbrowse/core/util/simpleFeature';
|
|
14
14
|
import { getParentRenderProps, getTrackAssemblyNames, getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
15
15
|
import { getParent, types, cast, isAlive, addDisposer, getEnv, resolveIdentifier, getRoot, getSnapshot } from 'mobx-state-tree';
|
|
16
16
|
import MenuOpenIcon from '@material-ui/icons/MenuOpen';
|
|
17
|
-
import { Menu, ResizeHandle } from '@jbrowse/core/ui';
|
|
17
|
+
import { Menu, ResizeHandle, ReturnToImportFormDialog } from '@jbrowse/core/ui';
|
|
18
18
|
import { observer, PropTypes } from 'mobx-react';
|
|
19
19
|
import { usePopper } from 'react-popper';
|
|
20
20
|
import { makeStyles } from '@material-ui/core/styles';
|
|
@@ -1305,8 +1305,7 @@ var RenderedBlocks = /*#__PURE__*/observer(function (_ref) {
|
|
|
1305
1305
|
function LinearBlocks(_ref2) {
|
|
1306
1306
|
var model = _ref2.model;
|
|
1307
1307
|
var classes = useStyles$1();
|
|
1308
|
-
var blockDefinitions = model.blockDefinitions;
|
|
1309
|
-
|
|
1308
|
+
var blockDefinitions = model.blockDefinitions;
|
|
1310
1309
|
var viewModel = getContainingView(model);
|
|
1311
1310
|
return /*#__PURE__*/React.createElement("div", {
|
|
1312
1311
|
"data-testid": "Blockset",
|
|
@@ -1318,10 +1317,6 @@ function LinearBlocks(_ref2) {
|
|
|
1318
1317
|
model: model
|
|
1319
1318
|
}));
|
|
1320
1319
|
}
|
|
1321
|
-
|
|
1322
|
-
LinearBlocks.propTypes = {
|
|
1323
|
-
model: PropTypes.observableObject.isRequired
|
|
1324
|
-
};
|
|
1325
1320
|
var LinearBlocks$1 = /*#__PURE__*/observer(LinearBlocks);
|
|
1326
1321
|
|
|
1327
1322
|
function round(value) {
|
|
@@ -1346,7 +1341,7 @@ var useStyles$2 = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
1346
1341
|
color: theme.palette.common.white,
|
|
1347
1342
|
fontFamily: theme.typography.fontFamily,
|
|
1348
1343
|
padding: '4px 8px',
|
|
1349
|
-
fontSize: theme.typography.pxToRem(
|
|
1344
|
+
fontSize: theme.typography.pxToRem(12),
|
|
1350
1345
|
lineHeight: "".concat(round(14 / 10), "em"),
|
|
1351
1346
|
maxWidth: 300,
|
|
1352
1347
|
wordWrap: 'break-word'
|
|
@@ -2324,9 +2319,10 @@ var BaseLinearDisplay$1 = /*#__PURE__*/types.compose('BaseLinearDisplay', BaseDi
|
|
|
2324
2319
|
case 0:
|
|
2325
2320
|
self.setError();
|
|
2326
2321
|
aborter = new AbortController();
|
|
2327
|
-
view = getContainingView(self);
|
|
2322
|
+
view = getContainingView(self); // extra check for contentBlocks.length
|
|
2323
|
+
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
2328
2324
|
|
|
2329
|
-
if (view.initialized) {
|
|
2325
|
+
if (!(!view.initialized || !view.staticBlocks.contentBlocks.length)) {
|
|
2330
2326
|
_context.next = 5;
|
|
2331
2327
|
break;
|
|
2332
2328
|
}
|
|
@@ -2377,7 +2373,7 @@ var BaseLinearDisplay$1 = /*#__PURE__*/types.compose('BaseLinearDisplay', BaseDi
|
|
|
2377
2373
|
afterAttach: function afterAttach() {
|
|
2378
2374
|
// this autorun performs stats estimation
|
|
2379
2375
|
//
|
|
2380
|
-
// the chain of events calls
|
|
2376
|
+
// the chain of events calls estimateRegionsStats against the data
|
|
2381
2377
|
// adapter which by default uses featureDensity, but can also respond
|
|
2382
2378
|
// with a byte size estimate and fetch size limit (data adapter can
|
|
2383
2379
|
// define what is too much data)
|
|
@@ -2390,9 +2386,10 @@ var BaseLinearDisplay$1 = /*#__PURE__*/types.compose('BaseLinearDisplay', BaseDi
|
|
|
2390
2386
|
case 0:
|
|
2391
2387
|
_context2.prev = 0;
|
|
2392
2388
|
aborter = new AbortController();
|
|
2393
|
-
view = getContainingView(self);
|
|
2389
|
+
view = getContainingView(self); // extra check for contentBlocks.length
|
|
2390
|
+
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
2394
2391
|
|
|
2395
|
-
if (view.initialized) {
|
|
2392
|
+
if (!(!view.initialized || !view.staticBlocks.contentBlocks.length)) {
|
|
2396
2393
|
_context2.next = 5;
|
|
2397
2394
|
break;
|
|
2398
2395
|
}
|
|
@@ -3241,7 +3238,8 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3241
3238
|
var overview = _ref2.overview,
|
|
3242
3239
|
block = _ref2.block,
|
|
3243
3240
|
assembly = _ref2.assembly;
|
|
3244
|
-
var offsetPx = block.offsetPx
|
|
3241
|
+
var offsetPx = block.offsetPx,
|
|
3242
|
+
reversed = block.reversed;
|
|
3245
3243
|
var cytobands = assembly === null || assembly === void 0 ? void 0 : (_assembly$cytobands = assembly.cytobands) === null || _assembly$cytobands === void 0 ? void 0 : _assembly$cytobands.map(function (f) {
|
|
3246
3244
|
return {
|
|
3247
3245
|
refName: assembly.getCanonicalRefName(f.get('refName')),
|
|
@@ -3264,6 +3262,9 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3264
3262
|
coord: end
|
|
3265
3263
|
}), type];
|
|
3266
3264
|
});
|
|
3265
|
+
var arr = cytobands || [];
|
|
3266
|
+
var lcap = reversed ? arr.length - 1 : 0;
|
|
3267
|
+
var rcap = reversed ? 0 : arr.length - 1;
|
|
3267
3268
|
var firstCent = true;
|
|
3268
3269
|
return cytobands ? /*#__PURE__*/React.createElement("g", {
|
|
3269
3270
|
transform: "translate(-".concat(offsetPx, ")")
|
|
@@ -3292,13 +3293,13 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3292
3293
|
});
|
|
3293
3294
|
}
|
|
3294
3295
|
|
|
3295
|
-
if (
|
|
3296
|
+
if (lcap === index) {
|
|
3296
3297
|
return /*#__PURE__*/React.createElement("path", {
|
|
3297
3298
|
key: key,
|
|
3298
3299
|
d: leftRoundedRect(Math.min(start, end), 0, Math.abs(end - start), HEADER_OVERVIEW_HEIGHT, 8),
|
|
3299
3300
|
fill: colorMap[type]
|
|
3300
3301
|
});
|
|
3301
|
-
} else if (
|
|
3302
|
+
} else if (rcap === index) {
|
|
3302
3303
|
return /*#__PURE__*/React.createElement("path", {
|
|
3303
3304
|
key: key,
|
|
3304
3305
|
d: rightRoundedRect(Math.min(start, end), 0, Math.abs(end - start) - 2, HEADER_OVERVIEW_HEIGHT, 8),
|
|
@@ -3477,20 +3478,6 @@ function OverviewScaleBar(_ref7) {
|
|
|
3477
3478
|
|
|
3478
3479
|
var OverviewScaleBar$1 = /*#__PURE__*/observer(OverviewScaleBar);
|
|
3479
3480
|
|
|
3480
|
-
function getBpDisplayStr(totalBp) {
|
|
3481
|
-
var displayBp;
|
|
3482
|
-
|
|
3483
|
-
if (Math.floor(totalBp / 1000000) > 0) {
|
|
3484
|
-
displayBp = "".concat(parseFloat((totalBp / 1000000).toPrecision(3)), "Mbp");
|
|
3485
|
-
} else if (Math.floor(totalBp / 1000) > 0) {
|
|
3486
|
-
displayBp = "".concat(parseFloat((totalBp / 1000).toPrecision(3)), "Kbp");
|
|
3487
|
-
} else {
|
|
3488
|
-
displayBp = "".concat(Math.floor(totalBp), "bp");
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
return displayBp;
|
|
3492
|
-
}
|
|
3493
|
-
|
|
3494
3481
|
function ScaleBar$1(_ref) {
|
|
3495
3482
|
var model = _ref.model,
|
|
3496
3483
|
fontSize = _ref.fontSize;
|
|
@@ -4373,51 +4360,7 @@ function ExportSvgDlg(_ref) {
|
|
|
4373
4360
|
}, "Submit")));
|
|
4374
4361
|
}
|
|
4375
4362
|
|
|
4376
|
-
var useStyles$9 = /*#__PURE__*/makeStyles(
|
|
4377
|
-
return {
|
|
4378
|
-
closeButton: {
|
|
4379
|
-
position: 'absolute',
|
|
4380
|
-
right: theme.spacing(1),
|
|
4381
|
-
top: theme.spacing(1),
|
|
4382
|
-
color: theme.palette.grey[500]
|
|
4383
|
-
}
|
|
4384
|
-
};
|
|
4385
|
-
});
|
|
4386
|
-
|
|
4387
|
-
function ReturnToImportFormDialog(_ref) {
|
|
4388
|
-
var model = _ref.model,
|
|
4389
|
-
handleClose = _ref.handleClose;
|
|
4390
|
-
var classes = useStyles$9();
|
|
4391
|
-
return /*#__PURE__*/React.createElement(Dialog, {
|
|
4392
|
-
maxWidth: "xl",
|
|
4393
|
-
open: true,
|
|
4394
|
-
onClose: handleClose
|
|
4395
|
-
}, /*#__PURE__*/React.createElement(DialogTitle, null, "Reference sequence", handleClose ? /*#__PURE__*/React.createElement(IconButton, {
|
|
4396
|
-
className: classes.closeButton,
|
|
4397
|
-
onClick: function onClick() {
|
|
4398
|
-
handleClose();
|
|
4399
|
-
}
|
|
4400
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(Typography$1, null, "Are you sure you want to return to the import form? This will lose your current view")), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
4401
|
-
onClick: function onClick() {
|
|
4402
|
-
model.clearView();
|
|
4403
|
-
handleClose();
|
|
4404
|
-
},
|
|
4405
|
-
variant: "contained",
|
|
4406
|
-
color: "primary",
|
|
4407
|
-
autoFocus: true
|
|
4408
|
-
}, "OK"), /*#__PURE__*/React.createElement(Button$1, {
|
|
4409
|
-
onClick: function onClick() {
|
|
4410
|
-
handleClose();
|
|
4411
|
-
},
|
|
4412
|
-
color: "secondary",
|
|
4413
|
-
variant: "contained",
|
|
4414
|
-
autoFocus: true
|
|
4415
|
-
}, "Cancel")));
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
var ReturnToImportFormDlg = /*#__PURE__*/observer(ReturnToImportFormDialog);
|
|
4419
|
-
|
|
4420
|
-
var useStyles$a = /*#__PURE__*/makeStyles({
|
|
4363
|
+
var useStyles$9 = /*#__PURE__*/makeStyles({
|
|
4421
4364
|
container: {
|
|
4422
4365
|
display: 'flex',
|
|
4423
4366
|
flexDirection: 'row',
|
|
@@ -4430,7 +4373,7 @@ var useStyles$a = /*#__PURE__*/makeStyles({
|
|
|
4430
4373
|
|
|
4431
4374
|
function ZoomControls(_ref) {
|
|
4432
4375
|
var model = _ref.model;
|
|
4433
|
-
var classes = useStyles$
|
|
4376
|
+
var classes = useStyles$9();
|
|
4434
4377
|
var maxBpPerPx = model.maxBpPerPx,
|
|
4435
4378
|
minBpPerPx = model.minBpPerPx,
|
|
4436
4379
|
bpPerPx = model.bpPerPx,
|
|
@@ -4477,7 +4420,7 @@ function ZoomControls(_ref) {
|
|
|
4477
4420
|
|
|
4478
4421
|
var ZoomControls$1 = /*#__PURE__*/observer(ZoomControls);
|
|
4479
4422
|
|
|
4480
|
-
var useStyles$
|
|
4423
|
+
var useStyles$a = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
4481
4424
|
return {
|
|
4482
4425
|
headerBar: {
|
|
4483
4426
|
height: HEADER_BAR_HEIGHT,
|
|
@@ -4512,7 +4455,7 @@ var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4512
4455
|
});
|
|
4513
4456
|
var HeaderButtons = /*#__PURE__*/observer(function (_ref) {
|
|
4514
4457
|
var model = _ref.model;
|
|
4515
|
-
var classes = useStyles$
|
|
4458
|
+
var classes = useStyles$a();
|
|
4516
4459
|
return /*#__PURE__*/React.createElement(Button$1, {
|
|
4517
4460
|
onClick: model.activateTrackSelector,
|
|
4518
4461
|
className: classes.toggleButton,
|
|
@@ -4526,7 +4469,7 @@ var HeaderButtons = /*#__PURE__*/observer(function (_ref) {
|
|
|
4526
4469
|
|
|
4527
4470
|
function PanControls(_ref2) {
|
|
4528
4471
|
var model = _ref2.model;
|
|
4529
|
-
var classes = useStyles$
|
|
4472
|
+
var classes = useStyles$a();
|
|
4530
4473
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
4531
4474
|
variant: "outlined",
|
|
4532
4475
|
className: classes.panButton,
|
|
@@ -4544,7 +4487,7 @@ function PanControls(_ref2) {
|
|
|
4544
4487
|
|
|
4545
4488
|
var RegionWidth = /*#__PURE__*/observer(function (_ref3) {
|
|
4546
4489
|
var model = _ref3.model;
|
|
4547
|
-
var classes = useStyles$
|
|
4490
|
+
var classes = useStyles$a();
|
|
4548
4491
|
var coarseTotalBp = model.coarseTotalBp;
|
|
4549
4492
|
return /*#__PURE__*/React.createElement(Typography$1, {
|
|
4550
4493
|
variant: "body2",
|
|
@@ -4555,7 +4498,7 @@ var RegionWidth = /*#__PURE__*/observer(function (_ref3) {
|
|
|
4555
4498
|
|
|
4556
4499
|
var Controls = function Controls(_ref4) {
|
|
4557
4500
|
var model = _ref4.model;
|
|
4558
|
-
var classes = useStyles$
|
|
4501
|
+
var classes = useStyles$a();
|
|
4559
4502
|
return /*#__PURE__*/React.createElement("div", {
|
|
4560
4503
|
className: classes.headerBar
|
|
4561
4504
|
}, /*#__PURE__*/React.createElement(HeaderButtons, {
|
|
@@ -4589,7 +4532,7 @@ var LinearGenomeViewHeader = /*#__PURE__*/observer(function (_ref5) {
|
|
|
4589
4532
|
}));
|
|
4590
4533
|
});
|
|
4591
4534
|
|
|
4592
|
-
var useStyles$
|
|
4535
|
+
var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
4593
4536
|
return {
|
|
4594
4537
|
root: {
|
|
4595
4538
|
background: alpha(theme.palette.background.paper, 0.8),
|
|
@@ -4623,7 +4566,7 @@ var useStyles$c = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4623
4566
|
var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4624
4567
|
var _session$getTrackActi;
|
|
4625
4568
|
|
|
4626
|
-
var classes = useStyles$
|
|
4569
|
+
var classes = useStyles$b();
|
|
4627
4570
|
|
|
4628
4571
|
var _React$useState = React.useState(null),
|
|
4629
4572
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -4674,7 +4617,9 @@ var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4674
4617
|
handleClose();
|
|
4675
4618
|
}
|
|
4676
4619
|
|
|
4677
|
-
var items = track.trackMenuItems()
|
|
4620
|
+
var items = [].concat(_toConsumableArray((_session$getTrackActi = session.getTrackActionMenuItems) === null || _session$getTrackActi === void 0 ? void 0 : _session$getTrackActi.call(session, trackConf)), _toConsumableArray(track.trackMenuItems())).sort(function (a, b) {
|
|
4621
|
+
return (b.priority || 0) - (a.priority || 0);
|
|
4622
|
+
});
|
|
4678
4623
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Paper, {
|
|
4679
4624
|
ref: ref,
|
|
4680
4625
|
className: clsx(className, classes.root)
|
|
@@ -4710,16 +4655,16 @@ var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4710
4655
|
onMenuItemClick: handleMenuItemClick,
|
|
4711
4656
|
open: Boolean(anchorEl),
|
|
4712
4657
|
onClose: handleClose,
|
|
4713
|
-
menuItems:
|
|
4714
|
-
return (b.priority || 0) - (a.priority || 0);
|
|
4715
|
-
})
|
|
4658
|
+
menuItems: items
|
|
4716
4659
|
}));
|
|
4717
4660
|
});
|
|
4718
4661
|
var TrackLabel$1 = /*#__PURE__*/observer(TrackLabel);
|
|
4719
4662
|
|
|
4720
|
-
var useStyles$
|
|
4663
|
+
var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
4721
4664
|
return {
|
|
4722
|
-
root: {
|
|
4665
|
+
root: {
|
|
4666
|
+
margin: 2
|
|
4667
|
+
},
|
|
4723
4668
|
resizeHandle: {
|
|
4724
4669
|
height: RESIZE_HANDLE_HEIGHT,
|
|
4725
4670
|
boxSizing: 'border-box',
|
|
@@ -4735,16 +4680,8 @@ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4735
4680
|
zIndex: 3,
|
|
4736
4681
|
borderRadius: theme.shape.borderRadius
|
|
4737
4682
|
},
|
|
4738
|
-
renderingComponentContainer: {
|
|
4739
|
-
position: 'absolute',
|
|
4740
|
-
// -1 offset because of the 1px border of the Paper
|
|
4741
|
-
left: -1,
|
|
4742
|
-
height: '100%',
|
|
4743
|
-
width: '100%'
|
|
4744
|
-
},
|
|
4745
4683
|
trackLabel: {
|
|
4746
|
-
zIndex: 3
|
|
4747
|
-
margin: theme.spacing(1)
|
|
4684
|
+
zIndex: 3
|
|
4748
4685
|
},
|
|
4749
4686
|
trackLabelInline: {
|
|
4750
4687
|
position: 'relative',
|
|
@@ -4765,16 +4702,26 @@ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4765
4702
|
};
|
|
4766
4703
|
});
|
|
4767
4704
|
|
|
4768
|
-
function
|
|
4769
|
-
var
|
|
4770
|
-
|
|
4771
|
-
|
|
4705
|
+
function TrackContainerLabel(_ref) {
|
|
4706
|
+
var model = _ref.model,
|
|
4707
|
+
view = _ref.view;
|
|
4708
|
+
var classes = useStyles$c();
|
|
4709
|
+
var labelStyle = view.trackLabels === 'overlapping' ? classes.trackLabelOverlap : classes.trackLabelInline;
|
|
4710
|
+
return view.trackLabels !== 'hidden' ? /*#__PURE__*/React.createElement(TrackLabel$1, {
|
|
4711
|
+
track: model,
|
|
4712
|
+
className: clsx(classes.trackLabel, labelStyle)
|
|
4713
|
+
}) : null;
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4716
|
+
function TrackContainer(_ref2) {
|
|
4717
|
+
var model = _ref2.model,
|
|
4718
|
+
track = _ref2.track;
|
|
4719
|
+
var classes = useStyles$c();
|
|
4772
4720
|
var display = track.displays[0];
|
|
4773
4721
|
var horizontalScroll = model.horizontalScroll,
|
|
4774
4722
|
draggingTrackId = model.draggingTrackId,
|
|
4775
4723
|
moveTrack = model.moveTrack;
|
|
4776
4724
|
var height = display.height;
|
|
4777
|
-
var view = getContainingView(display);
|
|
4778
4725
|
var trackId = getConf(track, 'trackId');
|
|
4779
4726
|
var ref = useRef(null);
|
|
4780
4727
|
useEffect(function () {
|
|
@@ -4797,13 +4744,13 @@ function TrackContainer(props) {
|
|
|
4797
4744
|
var RenderingComponent = display.RenderingComponent,
|
|
4798
4745
|
DisplayBlurb = display.DisplayBlurb;
|
|
4799
4746
|
var dimmed = draggingTrackId !== undefined && draggingTrackId !== display.id;
|
|
4800
|
-
return /*#__PURE__*/React.createElement(
|
|
4801
|
-
className: classes.root
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4747
|
+
return /*#__PURE__*/React.createElement(Paper$1, {
|
|
4748
|
+
className: classes.root,
|
|
4749
|
+
variant: "outlined"
|
|
4750
|
+
}, /*#__PURE__*/React.createElement(TrackContainerLabel, {
|
|
4751
|
+
model: track,
|
|
4752
|
+
view: model
|
|
4753
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
4807
4754
|
className: classes.trackRenderingContainer,
|
|
4808
4755
|
style: {
|
|
4809
4756
|
height: height
|
|
@@ -4813,17 +4760,15 @@ function TrackContainer(props) {
|
|
|
4813
4760
|
display.setScrollTop(target.scrollTop);
|
|
4814
4761
|
},
|
|
4815
4762
|
onDragEnter: debouncedOnDragEnter,
|
|
4816
|
-
"data-testid": "trackRenderingContainer-".concat(
|
|
4763
|
+
"data-testid": "trackRenderingContainer-".concat(model.id, "-").concat(trackId),
|
|
4817
4764
|
role: "presentation"
|
|
4818
4765
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4819
4766
|
ref: ref,
|
|
4820
|
-
className: classes.renderingComponentContainer,
|
|
4821
4767
|
style: {
|
|
4822
4768
|
transform: "scaleX(".concat(model.scaleFactor, ")")
|
|
4823
4769
|
}
|
|
4824
4770
|
}, /*#__PURE__*/React.createElement(RenderingComponent, {
|
|
4825
4771
|
model: display,
|
|
4826
|
-
blockState: {},
|
|
4827
4772
|
onHorizontalScroll: horizontalScroll
|
|
4828
4773
|
})), DisplayBlurb ? /*#__PURE__*/React.createElement("div", {
|
|
4829
4774
|
style: {
|
|
@@ -4831,7 +4776,7 @@ function TrackContainer(props) {
|
|
|
4831
4776
|
left: 0,
|
|
4832
4777
|
top: display.height - 20
|
|
4833
4778
|
}
|
|
4834
|
-
},
|
|
4779
|
+
}, /*#__PURE__*/React.createElement(DisplayBlurb, {
|
|
4835
4780
|
model: display
|
|
4836
4781
|
})) : null), /*#__PURE__*/React.createElement("div", {
|
|
4837
4782
|
className: classes.overlay,
|
|
@@ -4848,7 +4793,7 @@ function TrackContainer(props) {
|
|
|
4848
4793
|
|
|
4849
4794
|
var TrackContainer$1 = /*#__PURE__*/observer(TrackContainer);
|
|
4850
4795
|
|
|
4851
|
-
var useStyles$
|
|
4796
|
+
var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
4852
4797
|
var background = theme.palette.tertiary ? alpha$1(theme.palette.tertiary.main, 0.7) : alpha$1(theme.palette.primary.main, 0.7);
|
|
4853
4798
|
return {
|
|
4854
4799
|
rubberBand: {
|
|
@@ -4887,7 +4832,7 @@ var useStyles$e = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4887
4832
|
var VerticalGuide = /*#__PURE__*/observer(function (_ref) {
|
|
4888
4833
|
var model = _ref.model,
|
|
4889
4834
|
coordX = _ref.coordX;
|
|
4890
|
-
var classes = useStyles$
|
|
4835
|
+
var classes = useStyles$d();
|
|
4891
4836
|
return /*#__PURE__*/React.createElement(Tooltip$2, {
|
|
4892
4837
|
open: true,
|
|
4893
4838
|
placement: "top",
|
|
@@ -4931,7 +4876,7 @@ function RubberBand(_ref2) {
|
|
|
4931
4876
|
|
|
4932
4877
|
var controlsRef = useRef(null);
|
|
4933
4878
|
var rubberBandRef = useRef(null);
|
|
4934
|
-
var classes = useStyles$
|
|
4879
|
+
var classes = useStyles$d();
|
|
4935
4880
|
var mouseDragging = startX !== undefined && anchorPosition === undefined;
|
|
4936
4881
|
var setOffsets = model.setOffsets,
|
|
4937
4882
|
pxToBp = model.pxToBp;
|
|
@@ -5134,7 +5079,7 @@ RubberBand.defaultProps = {
|
|
|
5134
5079
|
var RubberBand$1 = /*#__PURE__*/observer(RubberBand);
|
|
5135
5080
|
|
|
5136
5081
|
var _excluded$1 = ["model", "style", "className"];
|
|
5137
|
-
var useStyles$
|
|
5082
|
+
var useStyles$e = /*#__PURE__*/makeStyles(function (theme) {
|
|
5138
5083
|
return {
|
|
5139
5084
|
scaleBarContainer: {
|
|
5140
5085
|
overflow: 'hidden',
|
|
@@ -5178,7 +5123,7 @@ var useStyles$f = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5178
5123
|
});
|
|
5179
5124
|
var RenderedRefNameLabels = /*#__PURE__*/observer(function (_ref) {
|
|
5180
5125
|
var model = _ref.model;
|
|
5181
|
-
var classes = useStyles$
|
|
5126
|
+
var classes = useStyles$e(); // find the block that needs pinning to the left side for context
|
|
5182
5127
|
|
|
5183
5128
|
var lastLeftBlock = 0;
|
|
5184
5129
|
model.staticBlocks.forEach(function (block, i) {
|
|
@@ -5200,7 +5145,7 @@ var RenderedRefNameLabels = /*#__PURE__*/observer(function (_ref) {
|
|
|
5200
5145
|
});
|
|
5201
5146
|
var RenderedScaleBarLabels = /*#__PURE__*/observer(function (_ref2) {
|
|
5202
5147
|
var model = _ref2.model;
|
|
5203
|
-
var classes = useStyles$
|
|
5148
|
+
var classes = useStyles$e();
|
|
5204
5149
|
return /*#__PURE__*/React.createElement(React.Fragment, null, model.staticBlocks.map(function (block, index) {
|
|
5205
5150
|
if (block instanceof ContentBlock$1) {
|
|
5206
5151
|
var ticks = makeTicks(block.start, block.end, model.bpPerPx, true, false);
|
|
@@ -5253,7 +5198,7 @@ var ScaleBar$2 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
5253
5198
|
className = _ref3.className,
|
|
5254
5199
|
other = _objectWithoutProperties(_ref3, _excluded$1);
|
|
5255
5200
|
|
|
5256
|
-
var classes = useStyles$
|
|
5201
|
+
var classes = useStyles$e();
|
|
5257
5202
|
var offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
|
|
5258
5203
|
return /*#__PURE__*/React.createElement(Paper$1, Object.assign({
|
|
5259
5204
|
"data-resizer": "true" // used to avoid click-and-drag scrolls on trackscontainer
|
|
@@ -5281,7 +5226,7 @@ var ScaleBar$2 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
5281
5226
|
});
|
|
5282
5227
|
var ScaleBar$3 = /*#__PURE__*/observer(ScaleBar$2);
|
|
5283
5228
|
|
|
5284
|
-
var useStyles$
|
|
5229
|
+
var useStyles$f = /*#__PURE__*/makeStyles(function (theme) {
|
|
5285
5230
|
return {
|
|
5286
5231
|
verticalGuidesZoomContainer: {
|
|
5287
5232
|
position: 'absolute',
|
|
@@ -5312,7 +5257,7 @@ var useStyles$g = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5312
5257
|
});
|
|
5313
5258
|
var RenderedVerticalGuides = /*#__PURE__*/observer(function (_ref) {
|
|
5314
5259
|
var model = _ref.model;
|
|
5315
|
-
var classes = useStyles$
|
|
5260
|
+
var classes = useStyles$f();
|
|
5316
5261
|
return /*#__PURE__*/React.createElement(React.Fragment, null, model.staticBlocks.map(function (block, index) {
|
|
5317
5262
|
if (block instanceof ContentBlock$1) {
|
|
5318
5263
|
var ticks = makeTicks(block.start, block.end, model.bpPerPx);
|
|
@@ -5352,7 +5297,7 @@ var RenderedVerticalGuides = /*#__PURE__*/observer(function (_ref) {
|
|
|
5352
5297
|
|
|
5353
5298
|
function VerticalGuides(_ref2) {
|
|
5354
5299
|
var model = _ref2.model;
|
|
5355
|
-
var classes = useStyles$
|
|
5300
|
+
var classes = useStyles$f(); // find the block that needs pinning to the left side for context
|
|
5356
5301
|
|
|
5357
5302
|
var offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
|
|
5358
5303
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -5373,7 +5318,7 @@ function VerticalGuides(_ref2) {
|
|
|
5373
5318
|
|
|
5374
5319
|
var VerticalGuides$1 = /*#__PURE__*/observer(VerticalGuides);
|
|
5375
5320
|
|
|
5376
|
-
var useStyles$
|
|
5321
|
+
var useStyles$g = /*#__PURE__*/makeStyles(function () {
|
|
5377
5322
|
return {
|
|
5378
5323
|
centerLineContainer: {
|
|
5379
5324
|
background: 'transparent',
|
|
@@ -5402,7 +5347,7 @@ function CenterLine(_ref) {
|
|
|
5402
5347
|
tracks = model.tracks,
|
|
5403
5348
|
width = model.width;
|
|
5404
5349
|
var ref = useRef(null);
|
|
5405
|
-
var classes = useStyles$
|
|
5350
|
+
var classes = useStyles$g();
|
|
5406
5351
|
var startingPosition = width / 2;
|
|
5407
5352
|
return tracks.length ? /*#__PURE__*/React.createElement("div", {
|
|
5408
5353
|
"data-testid": "centerline_container",
|
|
@@ -5429,7 +5374,7 @@ CenterLine.propTypes = {
|
|
|
5429
5374
|
};
|
|
5430
5375
|
var CenterLine$1 = /*#__PURE__*/observer(CenterLine);
|
|
5431
5376
|
|
|
5432
|
-
var useStyles$
|
|
5377
|
+
var useStyles$h = /*#__PURE__*/makeStyles(function (theme) {
|
|
5433
5378
|
return {
|
|
5434
5379
|
tracksContainer: {
|
|
5435
5380
|
position: 'relative',
|
|
@@ -5446,7 +5391,7 @@ var useStyles$i = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5446
5391
|
function TracksContainer(_ref) {
|
|
5447
5392
|
var children = _ref.children,
|
|
5448
5393
|
model = _ref.model;
|
|
5449
|
-
var classes = useStyles$
|
|
5394
|
+
var classes = useStyles$h(); // refs are to store these variables to avoid repeated rerenders associated
|
|
5450
5395
|
// with useState/setState
|
|
5451
5396
|
|
|
5452
5397
|
var delta = useRef(0);
|
|
@@ -5602,8 +5547,6 @@ function TracksContainer(_ref) {
|
|
|
5602
5547
|
boxSizing: 'border-box'
|
|
5603
5548
|
}
|
|
5604
5549
|
})
|
|
5605
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
5606
|
-
className: classes.spacer
|
|
5607
5550
|
}), children);
|
|
5608
5551
|
}
|
|
5609
5552
|
|
|
@@ -5612,7 +5555,7 @@ var TracksContainer$1 = /*#__PURE__*/observer(TracksContainer);
|
|
|
5612
5555
|
var SearchResultsDialog = /*#__PURE__*/lazy(function () {
|
|
5613
5556
|
return Promise.resolve().then(function () { return SearchResultsDialog$2; });
|
|
5614
5557
|
});
|
|
5615
|
-
var useStyles$
|
|
5558
|
+
var useStyles$i = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
5616
5559
|
return {
|
|
5617
5560
|
importFormContainer: {
|
|
5618
5561
|
padding: theme.spacing(2)
|
|
@@ -5626,7 +5569,7 @@ var ImportForm = /*#__PURE__*/observer(function (_ref) {
|
|
|
5626
5569
|
var _regions$;
|
|
5627
5570
|
|
|
5628
5571
|
var model = _ref.model;
|
|
5629
|
-
var classes = useStyles$
|
|
5572
|
+
var classes = useStyles$i();
|
|
5630
5573
|
var session = getSession(model);
|
|
5631
5574
|
var assemblyNames = session.assemblyNames,
|
|
5632
5575
|
assemblyManager = session.assemblyManager,
|
|
@@ -5926,7 +5869,7 @@ var MiniControls = /*#__PURE__*/observer(function (props) {
|
|
|
5926
5869
|
}));
|
|
5927
5870
|
});
|
|
5928
5871
|
|
|
5929
|
-
var useStyles$
|
|
5872
|
+
var useStyles$j = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
5930
5873
|
return {
|
|
5931
5874
|
loadingMessage: {
|
|
5932
5875
|
padding: theme.spacing(5)
|
|
@@ -6022,7 +5965,7 @@ function _fetchSequence() {
|
|
|
6022
5965
|
function SequenceDialog(_ref) {
|
|
6023
5966
|
var model = _ref.model,
|
|
6024
5967
|
handleClose = _ref.handleClose;
|
|
6025
|
-
var classes = useStyles$
|
|
5968
|
+
var classes = useStyles$j();
|
|
6026
5969
|
var session = getSession(model);
|
|
6027
5970
|
|
|
6028
5971
|
var _useState = useState(),
|
|
@@ -6187,7 +6130,7 @@ function SequenceDialog(_ref) {
|
|
|
6187
6130
|
|
|
6188
6131
|
var SequenceDialog$1 = /*#__PURE__*/observer(SequenceDialog);
|
|
6189
6132
|
|
|
6190
|
-
var useStyles$
|
|
6133
|
+
var useStyles$k = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
6191
6134
|
return {
|
|
6192
6135
|
dialogContent: {
|
|
6193
6136
|
width: '80em'
|
|
@@ -6206,7 +6149,7 @@ function SearchResultsDialog$1(_ref) {
|
|
|
6206
6149
|
var model = _ref.model,
|
|
6207
6150
|
optAssemblyName = _ref.optAssemblyName,
|
|
6208
6151
|
handleClose = _ref.handleClose;
|
|
6209
|
-
var classes = useStyles$
|
|
6152
|
+
var classes = useStyles$k();
|
|
6210
6153
|
var session = getSession(model);
|
|
6211
6154
|
|
|
6212
6155
|
var _getEnv = getEnv(session),
|
|
@@ -6327,11 +6270,11 @@ function SearchResultsDialog$1(_ref) {
|
|
|
6327
6270
|
|
|
6328
6271
|
var SearchResultsDialog$2 = {
|
|
6329
6272
|
__proto__: null,
|
|
6330
|
-
useStyles: useStyles$
|
|
6273
|
+
useStyles: useStyles$k,
|
|
6331
6274
|
'default': SearchResultsDialog$1
|
|
6332
6275
|
};
|
|
6333
6276
|
|
|
6334
|
-
var useStyles$
|
|
6277
|
+
var useStyles$l = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
6335
6278
|
return {
|
|
6336
6279
|
note: {
|
|
6337
6280
|
textAlign: 'center',
|
|
@@ -6367,7 +6310,7 @@ var LinearGenomeView = /*#__PURE__*/observer(function (_ref) {
|
|
|
6367
6310
|
hideHeader = model.hideHeader,
|
|
6368
6311
|
initialized = model.initialized,
|
|
6369
6312
|
hasDisplayedRegions = model.hasDisplayedRegions;
|
|
6370
|
-
var classes = useStyles$
|
|
6313
|
+
var classes = useStyles$l();
|
|
6371
6314
|
|
|
6372
6315
|
if (!initialized && !error) {
|
|
6373
6316
|
return /*#__PURE__*/React.createElement(Typography$1, {
|
|
@@ -6448,7 +6391,7 @@ function calculateVisibleLocStrings(contentBlocks) {
|
|
|
6448
6391
|
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName
|
|
6449
6392
|
}));
|
|
6450
6393
|
});
|
|
6451
|
-
return locs.join('
|
|
6394
|
+
return locs.join(' ');
|
|
6452
6395
|
}
|
|
6453
6396
|
|
|
6454
6397
|
var HEADER_BAR_HEIGHT = 48;
|
|
@@ -6481,11 +6424,11 @@ function stateModelFactory$1(pluginManager) {
|
|
|
6481
6424
|
}),
|
|
6482
6425
|
showCenterLine: types.optional(types["boolean"], function () {
|
|
6483
6426
|
var setting = localStorageGetItem('lgv-showCenterLine');
|
|
6484
|
-
return setting !== undefined ?
|
|
6427
|
+
return setting !== undefined && setting !== null ? !!+setting : false;
|
|
6485
6428
|
}),
|
|
6486
6429
|
showCytobandsSetting: types.optional(types["boolean"], function () {
|
|
6487
6430
|
var setting = localStorageGetItem('lgv-showCytobands');
|
|
6488
|
-
return setting !== undefined ?
|
|
6431
|
+
return setting !== undefined && setting !== null ? !!+setting : true;
|
|
6489
6432
|
})
|
|
6490
6433
|
}))["volatile"](function () {
|
|
6491
6434
|
return {
|
|
@@ -7012,100 +6955,73 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7012
6955
|
throw new Error("invalid track selector type ".concat(self.trackSelectorType));
|
|
7013
6956
|
},
|
|
7014
6957
|
navToLocString: function navToLocString(locString, optAssemblyName) {
|
|
6958
|
+
var assemblyNames = self.assemblyNames;
|
|
6959
|
+
|
|
7015
6960
|
var _getSession3 = getSession(self),
|
|
7016
6961
|
assemblyManager = _getSession3.assemblyManager;
|
|
7017
6962
|
|
|
7018
6963
|
var isValidRefName = assemblyManager.isValidRefName;
|
|
7019
|
-
var
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
6964
|
+
var assemblyName = optAssemblyName || assemblyNames[0];
|
|
6965
|
+
var parsedLocStrings = locString.split(' ').filter(function (f) {
|
|
6966
|
+
return !!f.trim();
|
|
6967
|
+
}).map(function (l) {
|
|
6968
|
+
return parseLocString(l, function (ref) {
|
|
6969
|
+
return isValidRefName(ref, assemblyName);
|
|
7024
6970
|
});
|
|
7025
|
-
this.navToMultiple(locations);
|
|
7026
|
-
return;
|
|
7027
|
-
}
|
|
7028
|
-
|
|
7029
|
-
var assemblyName = optAssemblyName;
|
|
7030
|
-
var defaultRefName = '';
|
|
7031
|
-
|
|
7032
|
-
if (self.displayedRegions.length !== 0) {
|
|
7033
|
-
// defaults
|
|
7034
|
-
assemblyName = self.displayedRegions[0].assemblyName;
|
|
7035
|
-
defaultRefName = self.displayedRegions[0].refName;
|
|
7036
|
-
}
|
|
7037
|
-
|
|
7038
|
-
var assembly = assemblyName && assemblyManager.get(assemblyName);
|
|
7039
|
-
|
|
7040
|
-
if (!assembly) {
|
|
7041
|
-
throw new Error("Could not find assembly ".concat(assemblyName));
|
|
7042
|
-
}
|
|
7043
|
-
|
|
7044
|
-
var _assembly = assembly,
|
|
7045
|
-
regions = _assembly.regions;
|
|
7046
|
-
|
|
7047
|
-
if (!regions) {
|
|
7048
|
-
throw new Error("Regions for assembly ".concat(assemblyName, " not yet loaded"));
|
|
7049
|
-
}
|
|
7050
|
-
|
|
7051
|
-
if (locStrings.length > 1) {
|
|
7052
|
-
throw new Error('Navigating to multiple locations is not allowed when viewing a whole chromosome');
|
|
7053
|
-
}
|
|
7054
|
-
|
|
7055
|
-
var parsedLocString = parseLocString(locStrings[0], function (refName) {
|
|
7056
|
-
return isValidRefName(refName, assemblyName);
|
|
7057
6971
|
});
|
|
7058
|
-
var
|
|
6972
|
+
var locations = parsedLocStrings.map(function (region) {
|
|
6973
|
+
var asmName = region.assemblyName || assemblyName;
|
|
6974
|
+
var asm = assemblyManager.get(asmName);
|
|
6975
|
+
var refName = region.refName;
|
|
7059
6976
|
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
if (!newAssembly) {
|
|
7064
|
-
throw new Error("Could not find assembly ".concat(parsedLocString.assemblyName));
|
|
6977
|
+
if (!asm) {
|
|
6978
|
+
throw new Error("assembly ".concat(asmName, " not found"));
|
|
7065
6979
|
}
|
|
7066
6980
|
|
|
7067
|
-
|
|
7068
|
-
changedAssembly = true;
|
|
7069
|
-
var newRegions = newAssembly.regions;
|
|
6981
|
+
var regions = asm.regions;
|
|
7070
6982
|
|
|
7071
|
-
if (!
|
|
7072
|
-
throw new Error("
|
|
6983
|
+
if (!regions) {
|
|
6984
|
+
throw new Error("regions not loaded yet for ".concat(asmName));
|
|
7073
6985
|
}
|
|
7074
6986
|
|
|
7075
|
-
|
|
7076
|
-
}
|
|
7077
|
-
|
|
7078
|
-
var canonicalRefName = assembly.getCanonicalRefName(parsedLocString.refName);
|
|
6987
|
+
var canonicalRefName = asm.getCanonicalRefName(region.refName);
|
|
7079
6988
|
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
6989
|
+
if (!canonicalRefName) {
|
|
6990
|
+
throw new Error("Could not find refName ".concat(refName, " in ").concat(asm.name));
|
|
6991
|
+
}
|
|
7083
6992
|
|
|
7084
|
-
|
|
7085
|
-
var newDisplayedRegion = regions.find(function (region) {
|
|
6993
|
+
var parentRegion = regions.find(function (region) {
|
|
7086
6994
|
return region.refName === canonicalRefName;
|
|
7087
6995
|
});
|
|
7088
6996
|
|
|
7089
|
-
if (
|
|
7090
|
-
|
|
7091
|
-
} else {
|
|
7092
|
-
throw new Error("Could not find refName ".concat(parsedLocString.refName, " in ").concat(assembly.name));
|
|
6997
|
+
if (!parentRegion) {
|
|
6998
|
+
throw new Error("Could not find refName ".concat(refName, " in ").concat(asmName));
|
|
7093
6999
|
}
|
|
7094
|
-
}
|
|
7095
7000
|
|
|
7096
|
-
|
|
7097
|
-
|
|
7001
|
+
return _objectSpread2(_objectSpread2({}, region), {}, {
|
|
7002
|
+
assemblyName: asmName,
|
|
7003
|
+
parentRegion: parentRegion
|
|
7004
|
+
});
|
|
7098
7005
|
});
|
|
7099
7006
|
|
|
7100
|
-
if (
|
|
7101
|
-
var
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7007
|
+
if (locations.length === 1) {
|
|
7008
|
+
var loc = locations[0];
|
|
7009
|
+
this.setDisplayedRegions([_objectSpread2({
|
|
7010
|
+
reversed: loc.reversed
|
|
7011
|
+
}, loc.parentRegion)]);
|
|
7012
|
+
var start = loc.start,
|
|
7013
|
+
end = loc.end,
|
|
7014
|
+
parentRegion = loc.parentRegion;
|
|
7015
|
+
this.navTo(_objectSpread2(_objectSpread2({}, loc), {}, {
|
|
7016
|
+
start: clamp(start !== null && start !== void 0 ? start : 0, 0, parentRegion.end),
|
|
7017
|
+
end: clamp(end !== null && end !== void 0 ? end : parentRegion.end, 0, parentRegion.end)
|
|
7018
|
+
}));
|
|
7019
|
+
} else {
|
|
7020
|
+
this.setDisplayedRegions( // @ts-ignore
|
|
7021
|
+
locations.map(function (r) {
|
|
7022
|
+
return r.start === undefined ? r.parentRegion : r;
|
|
7108
7023
|
}));
|
|
7024
|
+
this.showAllRegions();
|
|
7109
7025
|
}
|
|
7110
7026
|
},
|
|
7111
7027
|
|
|
@@ -7227,26 +7143,6 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7227
7143
|
if (location.refName !== region.refName) {
|
|
7228
7144
|
throw new Error("Entered location ".concat(assembleLocString(location), " does not match with displayed regions"));
|
|
7229
7145
|
}
|
|
7230
|
-
|
|
7231
|
-
if (locationIndex > 0) {
|
|
7232
|
-
// does it reach the left side?
|
|
7233
|
-
var matchesLeft = region.reversed ? locationEnd === region.end : locationStart === region.start;
|
|
7234
|
-
|
|
7235
|
-
if (!matchesLeft) {
|
|
7236
|
-
throw new Error("".concat(region.reversed ? 'End' : 'Start', " of region ").concat(assembleLocString(location), " should be ").concat((region.reversed ? region.end : region.start + 1).toLocaleString('en-US'), ", but it is not"));
|
|
7237
|
-
}
|
|
7238
|
-
}
|
|
7239
|
-
|
|
7240
|
-
var isLast = locationIndex === locations.length - 1;
|
|
7241
|
-
|
|
7242
|
-
if (!isLast) {
|
|
7243
|
-
// does it reach the right side?
|
|
7244
|
-
var matchesRight = region.reversed ? locationStart === region.start : locationEnd === region.end;
|
|
7245
|
-
|
|
7246
|
-
if (!matchesRight) {
|
|
7247
|
-
throw new Error("".concat(region.reversed ? 'Start' : 'End', " of region ").concat(assembleLocString(location), " should be ").concat((region.reversed ? region.start + 1 : region.end).toLocaleString('en-US'), ", but it is not"));
|
|
7248
|
-
}
|
|
7249
|
-
}
|
|
7250
7146
|
}
|
|
7251
7147
|
|
|
7252
7148
|
locationIndex -= 1;
|
|
@@ -7534,8 +7430,6 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7534
7430
|
|
|
7535
7431
|
};
|
|
7536
7432
|
}).views(function (self) {
|
|
7537
|
-
var currentlyCalculatedStaticBlocks;
|
|
7538
|
-
var stringifiedCurrentlyCalculatedStaticBlocks = '';
|
|
7539
7433
|
return {
|
|
7540
7434
|
menuItems: function menuItems() {
|
|
7541
7435
|
var canShowCytobands = self.canShowCytobands,
|
|
@@ -7543,10 +7437,10 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7543
7437
|
var menuItems = [{
|
|
7544
7438
|
label: 'Return to import form',
|
|
7545
7439
|
onClick: function onClick() {
|
|
7546
|
-
getSession(self).queueDialog(function (
|
|
7547
|
-
return [
|
|
7440
|
+
getSession(self).queueDialog(function (handleClose) {
|
|
7441
|
+
return [ReturnToImportFormDialog, {
|
|
7548
7442
|
model: self,
|
|
7549
|
-
handleClose:
|
|
7443
|
+
handleClose: handleClose
|
|
7550
7444
|
}];
|
|
7551
7445
|
});
|
|
7552
7446
|
},
|
|
@@ -7555,10 +7449,10 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7555
7449
|
label: 'Export SVG',
|
|
7556
7450
|
icon: PhotoCameraIcon,
|
|
7557
7451
|
onClick: function onClick() {
|
|
7558
|
-
getSession(self).queueDialog(function (
|
|
7452
|
+
getSession(self).queueDialog(function (handleClose) {
|
|
7559
7453
|
return [ExportSvgDlg, {
|
|
7560
7454
|
model: self,
|
|
7561
|
-
handleClose:
|
|
7455
|
+
handleClose: handleClose
|
|
7562
7456
|
}];
|
|
7563
7457
|
});
|
|
7564
7458
|
}
|
|
@@ -7658,8 +7552,12 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7658
7552
|
}
|
|
7659
7553
|
|
|
7660
7554
|
return menuItems;
|
|
7661
|
-
}
|
|
7662
|
-
|
|
7555
|
+
}
|
|
7556
|
+
};
|
|
7557
|
+
}).views(function (self) {
|
|
7558
|
+
var currentlyCalculatedStaticBlocks;
|
|
7559
|
+
var stringifiedCurrentlyCalculatedStaticBlocks = '';
|
|
7560
|
+
return {
|
|
7663
7561
|
get staticBlocks() {
|
|
7664
7562
|
var ret = calculateStaticBlocks(self);
|
|
7665
7563
|
var sret = JSON.stringify(ret);
|
|
@@ -8081,7 +7979,7 @@ var LinearGenomeViewPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
8081
7979
|
return LinearGenomeViewPlugin;
|
|
8082
7980
|
}(Plugin);
|
|
8083
7981
|
|
|
8084
|
-
var useStyles$
|
|
7982
|
+
var useStyles$m = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
8085
7983
|
return {
|
|
8086
7984
|
closeButton: {
|
|
8087
7985
|
position: 'absolute',
|
|
@@ -8093,7 +7991,7 @@ var useStyles$n = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
8093
7991
|
});
|
|
8094
7992
|
function HelpDialog$1(_ref) {
|
|
8095
7993
|
var handleClose = _ref.handleClose;
|
|
8096
|
-
var classes = useStyles$
|
|
7994
|
+
var classes = useStyles$m();
|
|
8097
7995
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
8098
7996
|
open: true,
|
|
8099
7997
|
maxWidth: "xl",
|
|
@@ -8104,7 +8002,7 @@ function HelpDialog$1(_ref) {
|
|
|
8104
8002
|
onClick: function onClick() {
|
|
8105
8003
|
handleClose();
|
|
8106
8004
|
}
|
|
8107
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement("h3", null, "Searching"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."), /*#__PURE__*/React.createElement("li", null, "Jump to a specific region by typing the region into the location box as: ", /*#__PURE__*/React.createElement("code", null, "ref:start..end"), " or ", /*#__PURE__*/React.createElement("code", null, "ref:start-end"), ". Commas are allowed in the start and end coordinates.")), /*#__PURE__*/React.createElement("h3", null, "Example Searches"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "BRCA"), " - searches for the feature named BRCA"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4"), " - jumps to chromosome 4"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4:79,500,000..80,000,000"), " - jumps the region on chromosome 4 between 79.5Mb and 80Mb."))), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8005
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement("h3", null, "Searching"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."), /*#__PURE__*/React.createElement("li", null, "Jump to a specific region by typing the region into the location box as: ", /*#__PURE__*/React.createElement("code", null, "ref:start..end"), " or ", /*#__PURE__*/React.createElement("code", null, "ref:start-end"), ". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time")), /*#__PURE__*/React.createElement("h3", null, "Example Searches"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "BRCA"), " - searches for the feature named BRCA"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4"), " - jumps to chromosome 4"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4:79,500,000..80,000,000"), " - jumps the region on chromosome 4 between 79.5Mb and 80Mb."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1:1-100 chr2:1-100"), " - create a split view of chr1:1-100 and chr2:1-100"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1 chr2 chr3"), " - open up multiple chromosomes at once"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1:1-100[rev] chr2:1-100"), " - open up the first region in the horizontally flipped orientation"))), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8108
8006
|
onClick: function onClick() {
|
|
8109
8007
|
return handleClose();
|
|
8110
8008
|
},
|
|
@@ -8114,11 +8012,11 @@ function HelpDialog$1(_ref) {
|
|
|
8114
8012
|
|
|
8115
8013
|
var HelpDialog$2 = {
|
|
8116
8014
|
__proto__: null,
|
|
8117
|
-
useStyles: useStyles$
|
|
8015
|
+
useStyles: useStyles$m,
|
|
8118
8016
|
'default': HelpDialog$1
|
|
8119
8017
|
};
|
|
8120
8018
|
|
|
8121
|
-
var useStyles$
|
|
8019
|
+
var useStyles$n = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
8122
8020
|
return {
|
|
8123
8021
|
root: {
|
|
8124
8022
|
width: 500
|
|
@@ -8138,7 +8036,7 @@ var useStyles$o = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
8138
8036
|
function SetMaxHeightDlg$1(props) {
|
|
8139
8037
|
var model = props.model,
|
|
8140
8038
|
handleClose = props.handleClose;
|
|
8141
|
-
var classes = useStyles$
|
|
8039
|
+
var classes = useStyles$n();
|
|
8142
8040
|
var _model$maxHeight = model.maxHeight,
|
|
8143
8041
|
maxHeight = _model$maxHeight === void 0 ? '' : _model$maxHeight;
|
|
8144
8042
|
|