@jbrowse/plugin-wiggle 1.5.7 → 1.6.2
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/BigWigAdapter/BigWigAdapter.d.ts +5 -3
- package/dist/LinearWiggleDisplay/components/SetColorDialog.d.ts +4 -2
- package/dist/LinearWiggleDisplay/models/model.d.ts +35 -6
- package/dist/index.d.ts +104 -18
- package/dist/plugin-wiggle.cjs.development.js +176 -106
- package/dist/plugin-wiggle.cjs.development.js.map +1 -1
- package/dist/plugin-wiggle.cjs.production.min.js +1 -1
- package/dist/plugin-wiggle.cjs.production.min.js.map +1 -1
- package/dist/plugin-wiggle.esm.js +178 -108
- package/dist/plugin-wiggle.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/BigWigAdapter/BigWigAdapter.ts +17 -13
- package/src/DensityRenderer/index.ts +3 -4
- package/src/LinearWiggleDisplay/components/SetColorDialog.tsx +84 -45
- package/src/LinearWiggleDisplay/components/WiggleDisplayComponent.tsx +2 -2
- package/src/LinearWiggleDisplay/models/configSchema.ts +1 -0
- package/src/LinearWiggleDisplay/models/model.tsx +34 -18
- package/src/index.ts +10 -5
- package/src/util.ts +1 -4
|
@@ -154,14 +154,14 @@ function _inherits(subClass, superClass) {
|
|
|
154
154
|
throw new TypeError("Super expression must either be null or a function");
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
158
|
+
constructor: {
|
|
159
|
+
value: subClass,
|
|
160
|
+
writable: true,
|
|
161
|
+
configurable: true
|
|
162
|
+
}
|
|
163
|
+
});
|
|
157
164
|
Object.defineProperty(subClass, "prototype", {
|
|
158
|
-
value: Object.create(superClass && superClass.prototype, {
|
|
159
|
-
constructor: {
|
|
160
|
-
value: subClass,
|
|
161
|
-
writable: true,
|
|
162
|
-
configurable: true
|
|
163
|
-
}
|
|
164
|
-
}),
|
|
165
165
|
writable: false
|
|
166
166
|
});
|
|
167
167
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
@@ -1334,8 +1334,7 @@ function getScale(_ref) {
|
|
|
1334
1334
|
throw new Error('undefined scaleType');
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
-
scale.domain(pivotValue !== undefined ? [min, pivotValue, max] : [min, max]);
|
|
1338
|
-
|
|
1337
|
+
scale.domain(pivotValue !== undefined ? [min, pivotValue, max] : [min, max]);
|
|
1339
1338
|
scale.nice();
|
|
1340
1339
|
|
|
1341
1340
|
var _range = _slicedToArray(range, 2),
|
|
@@ -1346,8 +1345,7 @@ function getScale(_ref) {
|
|
|
1346
1345
|
throw new Error('invalid range');
|
|
1347
1346
|
}
|
|
1348
1347
|
|
|
1349
|
-
scale.range(inverted ? range.slice().reverse() : range);
|
|
1350
|
-
|
|
1348
|
+
scale.range(inverted ? range.slice().reverse() : range);
|
|
1351
1349
|
return scale;
|
|
1352
1350
|
}
|
|
1353
1351
|
/**
|
|
@@ -1423,7 +1421,7 @@ function getNiceDomain(_ref2) {
|
|
|
1423
1421
|
}
|
|
1424
1422
|
|
|
1425
1423
|
if (min === undefined || max === undefined) {
|
|
1426
|
-
throw new Error('invalid domain');
|
|
1424
|
+
throw new Error('invalid domain supplied to stats function');
|
|
1427
1425
|
}
|
|
1428
1426
|
|
|
1429
1427
|
if (minScore !== undefined && minScore !== Number.MIN_VALUE) {
|
|
@@ -1558,12 +1556,11 @@ var DensityRenderer = /*#__PURE__*/function (_WiggleBaseRenderer) {
|
|
|
1558
1556
|
var pivotValue = configuration.readConfObject(config, 'bicolorPivotValue');
|
|
1559
1557
|
var negColor = configuration.readConfObject(config, 'negColor');
|
|
1560
1558
|
var posColor = configuration.readConfObject(config, 'posColor');
|
|
1559
|
+
var color = configuration.readConfObject(config, 'color');
|
|
1561
1560
|
var colorCallback;
|
|
1562
|
-
var colorScale;
|
|
1563
1561
|
|
|
1564
|
-
if (
|
|
1565
|
-
|
|
1566
|
-
colorScale = pivot !== 'none' ? getScale(_objectSpread2(_objectSpread2({}, scaleOpts), {}, {
|
|
1562
|
+
if (color === '#f0f') {
|
|
1563
|
+
var colorScale = pivot !== 'none' ? getScale(_objectSpread2(_objectSpread2({}, scaleOpts), {}, {
|
|
1567
1564
|
pivotValue: pivotValue,
|
|
1568
1565
|
range: [negColor, 'white', posColor]
|
|
1569
1566
|
})) : getScale(_objectSpread2(_objectSpread2({}, scaleOpts), {}, {
|
|
@@ -1808,11 +1805,10 @@ var YScaleBar = /*#__PURE__*/mobxReact.observer(function (_ref) {
|
|
|
1808
1805
|
});
|
|
1809
1806
|
var LinearWiggleDisplay = /*#__PURE__*/mobxReact.observer(function (props) {
|
|
1810
1807
|
var model = props.model;
|
|
1811
|
-
var
|
|
1812
|
-
stats = model.stats,
|
|
1808
|
+
var stats = model.stats,
|
|
1813
1809
|
height = model.height,
|
|
1814
1810
|
needsScalebar = model.needsScalebar;
|
|
1815
|
-
return React__default.createElement("div", null, React__default.createElement(pluginLinearGenomeView.BaseLinearDisplayComponent, Object.assign({}, props)),
|
|
1811
|
+
return React__default.createElement("div", null, React__default.createElement(pluginLinearGenomeView.BaseLinearDisplayComponent, Object.assign({}, props)), stats && needsScalebar ? React__default.createElement("svg", {
|
|
1816
1812
|
style: {
|
|
1817
1813
|
position: 'absolute',
|
|
1818
1814
|
top: 0,
|
|
@@ -1854,6 +1850,8 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
1854
1850
|
resolution: mobxStateTree.types.optional(mobxStateTree.types.number, 1),
|
|
1855
1851
|
fill: mobxStateTree.types.maybe(mobxStateTree.types["boolean"]),
|
|
1856
1852
|
color: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
1853
|
+
posColor: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
1854
|
+
negColor: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
1857
1855
|
summaryScoreMode: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
1858
1856
|
rendererTypeNameState: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
1859
1857
|
scale: mobxStateTree.types.maybe(mobxStateTree.types.string),
|
|
@@ -1865,7 +1863,7 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
1865
1863
|
}), {})
|
|
1866
1864
|
}))["volatile"](function () {
|
|
1867
1865
|
return {
|
|
1868
|
-
|
|
1866
|
+
statsReady: false,
|
|
1869
1867
|
message: undefined,
|
|
1870
1868
|
stats: mobx.observable({
|
|
1871
1869
|
scoreMin: 0,
|
|
@@ -1878,11 +1876,17 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
1878
1876
|
updateStats: function updateStats(stats) {
|
|
1879
1877
|
self.stats.scoreMin = stats.scoreMin;
|
|
1880
1878
|
self.stats.scoreMax = stats.scoreMax;
|
|
1881
|
-
self.
|
|
1879
|
+
self.statsReady = true;
|
|
1882
1880
|
},
|
|
1883
1881
|
setColor: function setColor(color) {
|
|
1884
1882
|
self.color = color;
|
|
1885
1883
|
},
|
|
1884
|
+
setPosColor: function setPosColor(color) {
|
|
1885
|
+
self.posColor = color;
|
|
1886
|
+
},
|
|
1887
|
+
setNegColor: function setNegColor(color) {
|
|
1888
|
+
self.negColor = color;
|
|
1889
|
+
},
|
|
1886
1890
|
setLoading: function setLoading(aborter) {
|
|
1887
1891
|
var statsFetch = self.statsFetchInProgress;
|
|
1888
1892
|
|
|
@@ -1970,10 +1974,6 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
1970
1974
|
return self.scale || configuration.getConf(self, 'scaleType');
|
|
1971
1975
|
},
|
|
1972
1976
|
|
|
1973
|
-
get filled() {
|
|
1974
|
-
return typeof self.fill !== 'undefined' ? self.fill : configuration.readConfObject(this.rendererConfig, 'filled');
|
|
1975
|
-
},
|
|
1976
|
-
|
|
1977
1977
|
get maxScore() {
|
|
1978
1978
|
var max = self.constraints.max;
|
|
1979
1979
|
return max !== undefined ? max : configuration.getConf(self, 'maxScore');
|
|
@@ -1982,23 +1982,35 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
1982
1982
|
get minScore() {
|
|
1983
1983
|
var min = self.constraints.min;
|
|
1984
1984
|
return min !== undefined ? min : configuration.getConf(self, 'minScore');
|
|
1985
|
-
}
|
|
1985
|
+
}
|
|
1986
1986
|
|
|
1987
|
+
};
|
|
1988
|
+
}).views(function (self) {
|
|
1989
|
+
return {
|
|
1987
1990
|
get rendererConfig() {
|
|
1988
|
-
var configBlob = configuration.getConf(self, ['renderers',
|
|
1989
|
-
return self.rendererType.configSchema.create(_objectSpread2(_objectSpread2({}, configBlob), {}, {
|
|
1991
|
+
var configBlob = configuration.getConf(self, ['renderers', self.rendererTypeName]) || {};
|
|
1992
|
+
return self.rendererType.configSchema.create(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, configBlob), {}, {
|
|
1990
1993
|
filled: self.fill,
|
|
1991
|
-
scaleType:
|
|
1994
|
+
scaleType: self.scaleType,
|
|
1992
1995
|
displayCrossHatches: self.displayCrossHatches,
|
|
1993
|
-
summaryScoreMode: self.summaryScoreMode
|
|
1996
|
+
summaryScoreMode: self.summaryScoreMode
|
|
1997
|
+
}, self.color ? {
|
|
1994
1998
|
color: self.color
|
|
1995
|
-
}),
|
|
1999
|
+
} : {}), self.negColor ? {
|
|
2000
|
+
negColor: self.negColor
|
|
2001
|
+
} : {}), self.posColor ? {
|
|
2002
|
+
posColor: self.posColor
|
|
2003
|
+
} : {}), mobxStateTree.getEnv(self));
|
|
1996
2004
|
}
|
|
1997
2005
|
|
|
1998
2006
|
};
|
|
1999
2007
|
}).views(function (self) {
|
|
2000
2008
|
var oldDomain = [0, 0];
|
|
2001
2009
|
return {
|
|
2010
|
+
get filled() {
|
|
2011
|
+
return typeof self.fill !== 'undefined' ? self.fill : configuration.readConfObject(self.rendererConfig, 'filled');
|
|
2012
|
+
},
|
|
2013
|
+
|
|
2002
2014
|
get summaryScoreModeSetting() {
|
|
2003
2015
|
return self.summaryScoreMode || configuration.readConfObject(self.rendererConfig, 'summaryScoreMode');
|
|
2004
2016
|
},
|
|
@@ -2086,8 +2098,9 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2086
2098
|
var superRenderProps = self.renderProps;
|
|
2087
2099
|
return {
|
|
2088
2100
|
renderProps: function renderProps() {
|
|
2089
|
-
|
|
2090
|
-
|
|
2101
|
+
var superProps = superRenderProps();
|
|
2102
|
+
return _objectSpread2(_objectSpread2({}, superProps), {}, {
|
|
2103
|
+
notReady: superProps.notReady || !self.statsReady,
|
|
2091
2104
|
rpcDriverName: self.rpcDriverName,
|
|
2092
2105
|
displayModel: self,
|
|
2093
2106
|
config: self.rendererConfig,
|
|
@@ -2349,7 +2362,7 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2349
2362
|
},
|
|
2350
2363
|
afterAttach: function afterAttach() {
|
|
2351
2364
|
mobxStateTree.addDisposer(self, mobx.autorun( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
2352
|
-
var aborter, view,
|
|
2365
|
+
var aborter, view, wiggleStats;
|
|
2353
2366
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
2354
2367
|
while (1) {
|
|
2355
2368
|
switch (_context2.prev = _context2.next) {
|
|
@@ -2367,7 +2380,7 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2367
2380
|
return _context2.abrupt("return");
|
|
2368
2381
|
|
|
2369
2382
|
case 6:
|
|
2370
|
-
if (
|
|
2383
|
+
if (self.estimatedStatsReady) {
|
|
2371
2384
|
_context2.next = 8;
|
|
2372
2385
|
break;
|
|
2373
2386
|
}
|
|
@@ -2375,24 +2388,32 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2375
2388
|
return _context2.abrupt("return");
|
|
2376
2389
|
|
|
2377
2390
|
case 8:
|
|
2378
|
-
|
|
2391
|
+
if (!self.regionTooLarge) {
|
|
2392
|
+
_context2.next = 10;
|
|
2393
|
+
break;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
return _context2.abrupt("return");
|
|
2397
|
+
|
|
2398
|
+
case 10:
|
|
2399
|
+
_context2.next = 12;
|
|
2379
2400
|
return getStats({
|
|
2380
2401
|
signal: aborter.signal,
|
|
2381
2402
|
filters: self.filters
|
|
2382
2403
|
});
|
|
2383
2404
|
|
|
2384
|
-
case
|
|
2385
|
-
|
|
2405
|
+
case 12:
|
|
2406
|
+
wiggleStats = _context2.sent;
|
|
2386
2407
|
|
|
2387
2408
|
if (mobxStateTree.isAlive(self)) {
|
|
2388
|
-
self.updateStats(
|
|
2409
|
+
self.updateStats(wiggleStats);
|
|
2389
2410
|
}
|
|
2390
2411
|
|
|
2391
|
-
_context2.next =
|
|
2412
|
+
_context2.next = 19;
|
|
2392
2413
|
break;
|
|
2393
2414
|
|
|
2394
|
-
case
|
|
2395
|
-
_context2.prev =
|
|
2415
|
+
case 16:
|
|
2416
|
+
_context2.prev = 16;
|
|
2396
2417
|
_context2.t0 = _context2["catch"](0);
|
|
2397
2418
|
|
|
2398
2419
|
if (!util.isAbortException(_context2.t0) && mobxStateTree.isAlive(self)) {
|
|
@@ -2400,12 +2421,12 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2400
2421
|
self.setError(_context2.t0);
|
|
2401
2422
|
}
|
|
2402
2423
|
|
|
2403
|
-
case
|
|
2424
|
+
case 19:
|
|
2404
2425
|
case "end":
|
|
2405
2426
|
return _context2.stop();
|
|
2406
2427
|
}
|
|
2407
2428
|
}
|
|
2408
|
-
}, _callee2, null, [[0,
|
|
2429
|
+
}, _callee2, null, [[0, 16]]);
|
|
2409
2430
|
})), {
|
|
2410
2431
|
delay: 1000
|
|
2411
2432
|
}));
|
|
@@ -2420,7 +2441,7 @@ var stateModelFactory = function stateModelFactory(pluginManager, configSchema)
|
|
|
2420
2441
|
case 0:
|
|
2421
2442
|
_context3.next = 2;
|
|
2422
2443
|
return mobx.when(function () {
|
|
2423
|
-
return self.
|
|
2444
|
+
return self.statsReady && !!self.regionCannotBeRenderedText;
|
|
2424
2445
|
});
|
|
2425
2446
|
|
|
2426
2447
|
case 2:
|
|
@@ -3072,12 +3093,15 @@ var WigglePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
3072
3093
|
var regexGuess = /\.(bw|bigwig)$/i;
|
|
3073
3094
|
var adapterName = 'BigWigAdapter';
|
|
3074
3095
|
var fileName = tracks.getFileName(file);
|
|
3096
|
+
var obj = {
|
|
3097
|
+
type: adapterName,
|
|
3098
|
+
bigWigLocation: file
|
|
3099
|
+
};
|
|
3075
3100
|
|
|
3076
|
-
if (regexGuess.test(fileName)
|
|
3077
|
-
return
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
};
|
|
3101
|
+
if (regexGuess.test(fileName) && !adapterHint) {
|
|
3102
|
+
return obj;
|
|
3103
|
+
} else if (adapterHint === adapterName) {
|
|
3104
|
+
return obj;
|
|
3081
3105
|
}
|
|
3082
3106
|
|
|
3083
3107
|
return adapterGuesser(file, index, adapterHint);
|
|
@@ -3208,9 +3232,8 @@ var SetMinMaxDialog = {
|
|
|
3208
3232
|
'default': SetMinMaxDlg$1
|
|
3209
3233
|
};
|
|
3210
3234
|
|
|
3211
|
-
var useStyles$2 = /*#__PURE__*/
|
|
3235
|
+
var useStyles$2 = /*#__PURE__*/core.makeStyles(function (theme) {
|
|
3212
3236
|
return {
|
|
3213
|
-
root: {},
|
|
3214
3237
|
closeButton: {
|
|
3215
3238
|
position: 'absolute',
|
|
3216
3239
|
right: theme.spacing(1),
|
|
@@ -3221,61 +3244,78 @@ var useStyles$2 = /*#__PURE__*/styles.makeStyles(function (theme) {
|
|
|
3221
3244
|
}); // this is needed because passing a entire color object into the react-color
|
|
3222
3245
|
// for alpha, can't pass in an rgba string for example
|
|
3223
3246
|
|
|
3224
|
-
function
|
|
3247
|
+
function serialize(color) {
|
|
3225
3248
|
if (color instanceof Object) {
|
|
3226
3249
|
var r = color.r,
|
|
3227
3250
|
g = color.g,
|
|
3228
|
-
b = color.b
|
|
3229
|
-
|
|
3230
|
-
return "rgb(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
|
|
3251
|
+
b = color.b;
|
|
3252
|
+
return "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
|
|
3231
3253
|
}
|
|
3232
3254
|
|
|
3233
3255
|
return color;
|
|
3234
3256
|
}
|
|
3235
3257
|
|
|
3236
|
-
function SetColorDialog(
|
|
3258
|
+
function SetColorDialog(_ref) {
|
|
3259
|
+
var model = _ref.model,
|
|
3260
|
+
handleClose = _ref.handleClose;
|
|
3237
3261
|
var classes = useStyles$2();
|
|
3238
|
-
|
|
3239
|
-
|
|
3262
|
+
|
|
3263
|
+
var _useState = React.useState(false),
|
|
3264
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3265
|
+
posneg = _useState2[0],
|
|
3266
|
+
setPosNeg = _useState2[1];
|
|
3267
|
+
|
|
3240
3268
|
return React__default.createElement(core.Dialog, {
|
|
3241
3269
|
open: true,
|
|
3242
|
-
onClose: handleClose
|
|
3243
|
-
|
|
3244
|
-
"aria-describedby": "alert-dialog-description"
|
|
3245
|
-
}, React__default.createElement(core.DialogTitle, {
|
|
3246
|
-
id: "alert-dialog-title"
|
|
3247
|
-
}, "Select a color", React__default.createElement(core.IconButton, {
|
|
3270
|
+
onClose: handleClose
|
|
3271
|
+
}, React__default.createElement(core.DialogTitle, null, "Select either an overall color, or the positive/negative colors. Note that density renderers only work properly with positive/negative colors", React__default.createElement(core.IconButton, {
|
|
3248
3272
|
"aria-label": "close",
|
|
3249
3273
|
className: classes.closeButton,
|
|
3250
3274
|
onClick: handleClose
|
|
3251
|
-
}, React__default.createElement(CloseIcon, null))), React__default.createElement(core.DialogContent, {
|
|
3252
|
-
|
|
3253
|
-
|
|
3275
|
+
}, React__default.createElement(CloseIcon, null))), React__default.createElement(core.DialogContent, null, React__default.createElement(core.FormControlLabel, {
|
|
3276
|
+
checked: !posneg,
|
|
3277
|
+
onClick: function onClick() {
|
|
3278
|
+
return setPosNeg(false);
|
|
3279
|
+
},
|
|
3280
|
+
control: React__default.createElement(core.Radio, null),
|
|
3281
|
+
label: 'Overall color'
|
|
3282
|
+
}), React__default.createElement(core.FormControlLabel, {
|
|
3283
|
+
checked: posneg,
|
|
3284
|
+
onClick: function onClick() {
|
|
3285
|
+
return setPosNeg(true);
|
|
3286
|
+
},
|
|
3287
|
+
control: React__default.createElement(core.Radio, null),
|
|
3288
|
+
label: 'Positive/negative color'
|
|
3289
|
+
}), posneg ? React__default.createElement(React__default.Fragment, null, React__default.createElement(core.Typography, null, "Positive color"), React__default.createElement(reactColor.CompactPicker, {
|
|
3290
|
+
onChange: function onChange(event) {
|
|
3291
|
+
model.setPosColor(serialize(event.rgb));
|
|
3292
|
+
model.setColor(undefined);
|
|
3254
3293
|
}
|
|
3255
|
-
}, React__default.createElement("
|
|
3256
|
-
className: classes.root
|
|
3257
|
-
}, React__default.createElement(reactColor.CompactPicker, {
|
|
3294
|
+
}), React__default.createElement(core.Typography, null, "Negative color"), React__default.createElement(reactColor.CompactPicker, {
|
|
3258
3295
|
onChange: function onChange(event) {
|
|
3259
|
-
model.
|
|
3296
|
+
model.setNegColor(serialize(event.rgb));
|
|
3297
|
+
model.setColor(undefined);
|
|
3260
3298
|
}
|
|
3261
|
-
})
|
|
3262
|
-
|
|
3263
|
-
|
|
3299
|
+
})) : React__default.createElement(React__default.Fragment, null, React__default.createElement(core.Typography, null, "Overall color"), React__default.createElement(reactColor.CompactPicker, {
|
|
3300
|
+
onChange: function onChange(event) {
|
|
3301
|
+
model.setColor(serialize(event.rgb));
|
|
3264
3302
|
}
|
|
3265
|
-
}, React__default.createElement(core.Button, {
|
|
3303
|
+
}))), React__default.createElement(core.DialogActions, null, React__default.createElement(core.Button, {
|
|
3266
3304
|
onClick: function onClick() {
|
|
3305
|
+
model.setPosColor(undefined);
|
|
3306
|
+
model.setNegColor(undefined);
|
|
3267
3307
|
model.setColor(undefined);
|
|
3268
3308
|
},
|
|
3269
3309
|
color: "secondary",
|
|
3270
3310
|
variant: "contained"
|
|
3271
|
-
}, "Restore default
|
|
3311
|
+
}, "Restore default"), React__default.createElement(core.Button, {
|
|
3272
3312
|
variant: "contained",
|
|
3273
3313
|
color: "primary",
|
|
3274
3314
|
type: "submit",
|
|
3275
3315
|
onClick: function onClick() {
|
|
3276
3316
|
handleClose();
|
|
3277
3317
|
}
|
|
3278
|
-
}, "Submit")))
|
|
3318
|
+
}, "Submit")));
|
|
3279
3319
|
}
|
|
3280
3320
|
|
|
3281
3321
|
var SetColorDialog$1 = {
|
|
@@ -3304,28 +3344,25 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3304
3344
|
key: "setup",
|
|
3305
3345
|
value: function () {
|
|
3306
3346
|
var _setup = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(opts) {
|
|
3307
|
-
var
|
|
3347
|
+
var _this2 = this;
|
|
3348
|
+
|
|
3349
|
+
var _ref, _ref$statusCallback, statusCallback;
|
|
3308
3350
|
|
|
3309
3351
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3310
3352
|
while (1) {
|
|
3311
3353
|
switch (_context.prev = _context.next) {
|
|
3312
3354
|
case 0:
|
|
3313
3355
|
_ref = opts || {}, _ref$statusCallback = _ref.statusCallback, statusCallback = _ref$statusCallback === void 0 ? function () {} : _ref$statusCallback;
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
case 4:
|
|
3319
|
-
result = _context.sent;
|
|
3320
|
-
statusCallback('');
|
|
3321
|
-
return _context.abrupt("return", result);
|
|
3356
|
+
return _context.abrupt("return", util.updateStatus('Downloading bigwig header', statusCallback, function () {
|
|
3357
|
+
return _this2.bigwig.getHeader(opts);
|
|
3358
|
+
}));
|
|
3322
3359
|
|
|
3323
|
-
case
|
|
3360
|
+
case 2:
|
|
3324
3361
|
case "end":
|
|
3325
3362
|
return _context.stop();
|
|
3326
3363
|
}
|
|
3327
3364
|
}
|
|
3328
|
-
}, _callee
|
|
3365
|
+
}, _callee);
|
|
3329
3366
|
}));
|
|
3330
3367
|
|
|
3331
3368
|
function setup(_x) {
|
|
@@ -3338,7 +3375,8 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3338
3375
|
key: "getRefNames",
|
|
3339
3376
|
value: function () {
|
|
3340
3377
|
var _getRefNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(opts) {
|
|
3341
|
-
var
|
|
3378
|
+
var _yield$this$setup, refsByName;
|
|
3379
|
+
|
|
3342
3380
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
3343
3381
|
while (1) {
|
|
3344
3382
|
switch (_context2.prev = _context2.next) {
|
|
@@ -3347,10 +3385,11 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3347
3385
|
return this.setup(opts);
|
|
3348
3386
|
|
|
3349
3387
|
case 2:
|
|
3350
|
-
|
|
3351
|
-
|
|
3388
|
+
_yield$this$setup = _context2.sent;
|
|
3389
|
+
refsByName = _yield$this$setup.refsByName;
|
|
3390
|
+
return _context2.abrupt("return", Object.keys(refsByName));
|
|
3352
3391
|
|
|
3353
|
-
case
|
|
3392
|
+
case 5:
|
|
3354
3393
|
case "end":
|
|
3355
3394
|
return _context2.stop();
|
|
3356
3395
|
}
|
|
@@ -3368,7 +3407,10 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3368
3407
|
key: "refIdToName",
|
|
3369
3408
|
value: function () {
|
|
3370
3409
|
var _refIdToName = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(refId) {
|
|
3371
|
-
var
|
|
3410
|
+
var _refsByNumber$refId;
|
|
3411
|
+
|
|
3412
|
+
var _yield$this$setup2, refsByNumber;
|
|
3413
|
+
|
|
3372
3414
|
return runtime_1.wrap(function _callee3$(_context3) {
|
|
3373
3415
|
while (1) {
|
|
3374
3416
|
switch (_context3.prev = _context3.next) {
|
|
@@ -3377,12 +3419,11 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3377
3419
|
return this.setup();
|
|
3378
3420
|
|
|
3379
3421
|
case 2:
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
}).name);
|
|
3422
|
+
_yield$this$setup2 = _context3.sent;
|
|
3423
|
+
refsByNumber = _yield$this$setup2.refsByNumber;
|
|
3424
|
+
return _context3.abrupt("return", (_refsByNumber$refId = refsByNumber[refId]) === null || _refsByNumber$refId === void 0 ? void 0 : _refsByNumber$refId.name);
|
|
3384
3425
|
|
|
3385
|
-
case
|
|
3426
|
+
case 5:
|
|
3386
3427
|
case "end":
|
|
3387
3428
|
return _context3.stop();
|
|
3388
3429
|
}
|
|
@@ -3400,7 +3441,8 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3400
3441
|
key: "getGlobalStats",
|
|
3401
3442
|
value: function () {
|
|
3402
3443
|
var _getGlobalStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(opts) {
|
|
3403
|
-
var
|
|
3444
|
+
var _yield$this$setup3, totalSummary;
|
|
3445
|
+
|
|
3404
3446
|
return runtime_1.wrap(function _callee4$(_context4) {
|
|
3405
3447
|
while (1) {
|
|
3406
3448
|
switch (_context4.prev = _context4.next) {
|
|
@@ -3409,10 +3451,11 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3409
3451
|
return this.setup(opts);
|
|
3410
3452
|
|
|
3411
3453
|
case 2:
|
|
3412
|
-
|
|
3413
|
-
|
|
3454
|
+
_yield$this$setup3 = _context4.sent;
|
|
3455
|
+
totalSummary = _yield$this$setup3.totalSummary;
|
|
3456
|
+
return _context4.abrupt("return", stats.rectifyStats(totalSummary));
|
|
3414
3457
|
|
|
3415
|
-
case
|
|
3458
|
+
case 5:
|
|
3416
3459
|
case "end":
|
|
3417
3460
|
return _context4.stop();
|
|
3418
3461
|
}
|
|
@@ -3429,7 +3472,7 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3429
3472
|
}, {
|
|
3430
3473
|
key: "getFeatures",
|
|
3431
3474
|
value: function getFeatures(region) {
|
|
3432
|
-
var
|
|
3475
|
+
var _this3 = this;
|
|
3433
3476
|
|
|
3434
3477
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3435
3478
|
var refName = region.refName,
|
|
@@ -3451,7 +3494,7 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3451
3494
|
case 0:
|
|
3452
3495
|
statusCallback('Downloading bigwig data');
|
|
3453
3496
|
_context5.next = 3;
|
|
3454
|
-
return
|
|
3497
|
+
return _this3.bigwig.getFeatureStream(refName, start, end, _objectSpread2(_objectSpread2({}, opts), {}, {
|
|
3455
3498
|
basesPerSpan: bpPerPx / resolution
|
|
3456
3499
|
}));
|
|
3457
3500
|
|
|
@@ -3478,7 +3521,34 @@ var BigWigAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3478
3521
|
return _ref2.apply(this, arguments);
|
|
3479
3522
|
};
|
|
3480
3523
|
}(), signal);
|
|
3481
|
-
}
|
|
3524
|
+
} // always render bigwig instead of calculating a feature density for it
|
|
3525
|
+
|
|
3526
|
+
}, {
|
|
3527
|
+
key: "estimateRegionsStats",
|
|
3528
|
+
value: function () {
|
|
3529
|
+
var _estimateRegionsStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(_regions) {
|
|
3530
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
|
3531
|
+
while (1) {
|
|
3532
|
+
switch (_context6.prev = _context6.next) {
|
|
3533
|
+
case 0:
|
|
3534
|
+
return _context6.abrupt("return", {
|
|
3535
|
+
featureDensity: 0
|
|
3536
|
+
});
|
|
3537
|
+
|
|
3538
|
+
case 1:
|
|
3539
|
+
case "end":
|
|
3540
|
+
return _context6.stop();
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
}, _callee6);
|
|
3544
|
+
}));
|
|
3545
|
+
|
|
3546
|
+
function estimateRegionsStats(_x6) {
|
|
3547
|
+
return _estimateRegionsStats.apply(this, arguments);
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3550
|
+
return estimateRegionsStats;
|
|
3551
|
+
}()
|
|
3482
3552
|
}, {
|
|
3483
3553
|
key: "freeResources",
|
|
3484
3554
|
value: function freeResources() {}
|