@jbrowse/plugin-variants 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/LinearVariantDisplay/configSchema.d.ts +1 -1
- package/dist/LinearVariantDisplay/model.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VcfAdapter/configSchema.d.ts +1 -1
- package/dist/VcfTabixAdapter/configSchema.d.ts +1 -1
- package/dist/plugin-variants.cjs.development.js +30 -20
- package/dist/plugin-variants.cjs.development.js.map +1 -1
- package/dist/plugin-variants.cjs.production.min.js +1 -1
- package/dist/plugin-variants.cjs.production.min.js.map +1 -1
- package/dist/plugin-variants.esm.js +30 -20
- package/dist/plugin-variants.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +21 -23
- package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +11 -7
- package/src/index.ts +4 -1
|
@@ -22,11 +22,10 @@ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
|
22
22
|
import { TabixIndexedFile } from '@gmod/tabix';
|
|
23
23
|
import IntervalTree from '@flatten-js/interval-tree';
|
|
24
24
|
import { unzip } from '@gmod/bgzf-filehandle';
|
|
25
|
-
import { Dialog, DialogTitle, IconButton, Divider, DialogContent, FormControlLabel, Checkbox, DialogActions, Button, Paper, Typography, TextField, Link } from '@material-ui/core';
|
|
25
|
+
import { Dialog, DialogTitle, IconButton, Divider, DialogContent, FormControlLabel, Checkbox, DialogActions, Button, makeStyles, Paper, Typography, TextField, Link } from '@material-ui/core';
|
|
26
26
|
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
27
27
|
import { DataGrid } from '@mui/x-data-grid';
|
|
28
28
|
import { FeatureDetails, BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
29
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
30
29
|
import CloseIcon from '@material-ui/icons/Close';
|
|
31
30
|
|
|
32
31
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -1838,7 +1837,7 @@ var VariantsPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
1838
1837
|
});
|
|
1839
1838
|
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', function (trackTypeGuesser) {
|
|
1840
1839
|
return function (adapterName) {
|
|
1841
|
-
if (adapterName === 'VcfTabixAdapter') {
|
|
1840
|
+
if (adapterName === 'VcfTabixAdapter' || adapterName === 'VcfAdapter') {
|
|
1842
1841
|
return 'VariantTrack';
|
|
1843
1842
|
}
|
|
1844
1843
|
|
|
@@ -2619,7 +2618,7 @@ function BreakendOptionDialog(_ref) {
|
|
|
2619
2618
|
}, /*#__PURE__*/React.createElement(DialogTitle, null, "Breakpoint split view options", handleClose ? /*#__PURE__*/React.createElement(IconButton, {
|
|
2620
2619
|
className: classes.closeButton,
|
|
2621
2620
|
onClick: function onClick() {
|
|
2622
|
-
handleClose();
|
|
2621
|
+
return handleClose();
|
|
2623
2622
|
}
|
|
2624
2623
|
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
2625
2624
|
className: classes.block,
|
|
@@ -2647,14 +2646,21 @@ function BreakendOptionDialog(_ref) {
|
|
|
2647
2646
|
onClick: function onClick() {
|
|
2648
2647
|
var view = model.view;
|
|
2649
2648
|
var session = getSession(model);
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2649
|
+
|
|
2650
|
+
try {
|
|
2651
|
+
var viewSnapshot = viewType.snapshotFromBreakendFeature(feature, view);
|
|
2652
|
+
viewSnapshot.views[0].offsetPx -= view.width / 2 + 100;
|
|
2653
|
+
viewSnapshot.views[1].offsetPx -= view.width / 2 + 100;
|
|
2654
|
+
viewSnapshot.featureData = feature;
|
|
2655
|
+
var viewTracks = getSnapshot(view.tracks);
|
|
2656
|
+
viewSnapshot.views[0].tracks = viewTracks;
|
|
2657
|
+
viewSnapshot.views[1].tracks = mirrorTracks ? viewTracks.slice().reverse() : viewTracks;
|
|
2658
|
+
session.addView('BreakpointSplitView', viewSnapshot);
|
|
2659
|
+
} catch (e) {
|
|
2660
|
+
console.error(e);
|
|
2661
|
+
session.notify("".concat(e));
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2658
2664
|
handleClose();
|
|
2659
2665
|
},
|
|
2660
2666
|
variant: "contained",
|
|
@@ -2662,11 +2668,10 @@ function BreakendOptionDialog(_ref) {
|
|
|
2662
2668
|
autoFocus: true
|
|
2663
2669
|
}, "OK"), /*#__PURE__*/React.createElement(Button, {
|
|
2664
2670
|
onClick: function onClick() {
|
|
2665
|
-
handleClose();
|
|
2671
|
+
return handleClose();
|
|
2666
2672
|
},
|
|
2667
2673
|
color: "secondary",
|
|
2668
|
-
variant: "contained"
|
|
2669
|
-
autoFocus: true
|
|
2674
|
+
variant: "contained"
|
|
2670
2675
|
}, "Cancel")));
|
|
2671
2676
|
}
|
|
2672
2677
|
|
|
@@ -2799,12 +2804,17 @@ function BreakendPanel(props) {
|
|
|
2799
2804
|
event.preventDefault();
|
|
2800
2805
|
var view = model.view;
|
|
2801
2806
|
|
|
2802
|
-
|
|
2803
|
-
|
|
2807
|
+
try {
|
|
2808
|
+
if (view) {
|
|
2809
|
+
var _view$navToLocString;
|
|
2804
2810
|
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2811
|
+
(_view$navToLocString = view.navToLocString) === null || _view$navToLocString === void 0 ? void 0 : _view$navToLocString.call(view, locString);
|
|
2812
|
+
} else {
|
|
2813
|
+
throw new Error('No view associated with this feature detail panel anymore');
|
|
2814
|
+
}
|
|
2815
|
+
} catch (e) {
|
|
2816
|
+
console.error(e);
|
|
2817
|
+
session.notify("".concat(e));
|
|
2808
2818
|
}
|
|
2809
2819
|
}
|
|
2810
2820
|
}, "LGV - ".concat(locString)));
|