@jbrowse/core 1.4.1 → 1.5.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/BaseFeatureWidget/BaseFeatureDetail.d.ts +4 -4
- package/BaseFeatureWidget/BaseFeatureDetail.js +27 -8
- package/BaseFeatureWidget/SequenceFeatureDetails.js +10 -10
- package/BaseFeatureWidget/index.js +1 -1
- package/BaseFeatureWidget/types.d.ts +1 -1
- package/BaseFeatureWidget/util.js +3 -3
- package/CorePlugin.d.ts +0 -1
- package/CorePlugin.js +13 -1
- package/PluginLoader.d.ts +26 -4
- package/PluginLoader.js +337 -51
- package/PluginManager.d.ts +18 -11
- package/PluginManager.js +53 -31
- package/ReExports/list.js +1 -1
- package/ReExports/material-ui-colors.js +38 -38
- package/ReExports/modules.d.ts +19 -20
- package/ReExports/modules.js +10 -3
- package/TextSearch/BaseResults.d.ts +5 -14
- package/TextSearch/BaseResults.js +16 -58
- package/TextSearch/BaseResults.test.js +1 -11
- package/TextSearch/TextSearchManager.d.ts +3 -3
- package/TextSearch/TextSearchManager.js +1 -1
- package/assemblyManager/assembly.d.ts +21 -8
- package/assemblyManager/assembly.js +163 -120
- package/assemblyManager/assemblyConfigSchema.d.ts +3 -0
- package/assemblyManager/{assemblyConfigSchemas.js → assemblyConfigSchema.js} +35 -27
- package/assemblyManager/assemblyManager.d.ts +169 -60
- package/assemblyManager/index.d.ts +1 -1
- package/assemblyManager/index.js +5 -5
- package/configuration/configurationSchema.d.ts +3 -2
- package/configuration/configurationSchema.js +7 -10
- package/configuration/configurationSchema.test.js +4 -2
- package/configuration/configurationSlot.js +5 -4
- package/configuration/index.js +4 -4
- package/configuration/util.js +5 -5
- package/data_adapters/BaseAdapter.d.ts +5 -3
- package/data_adapters/BaseAdapter.js +7 -4
- package/data_adapters/BaseAdapter.test.js +4 -2
- package/data_adapters/CytobandAdapter.d.ts +8 -0
- package/data_adapters/CytobandAdapter.js +128 -0
- package/data_adapters/dataAdapterCache.js +3 -3
- package/package.json +7 -6
- package/pluggableElementTypes/AdapterType.d.ts +9 -1
- package/pluggableElementTypes/AdapterType.js +20 -0
- package/pluggableElementTypes/InternetAccountType.d.ts +12 -0
- package/pluggableElementTypes/InternetAccountType.js +64 -0
- package/pluggableElementTypes/PluggableElementBase.d.ts +1 -2
- package/pluggableElementTypes/PluggableElementBase.js +2 -3
- package/pluggableElementTypes/RpcMethodType.d.ts +3 -0
- package/pluggableElementTypes/RpcMethodType.js +269 -26
- package/pluggableElementTypes/RpcMethodType.test.d.ts +4 -0
- package/pluggableElementTypes/RpcMethodType.test.js +118 -0
- package/pluggableElementTypes/ViewType.d.ts +1 -1
- package/pluggableElementTypes/WidgetType.d.ts +1 -0
- package/pluggableElementTypes/index.d.ts +7 -3
- package/pluggableElementTypes/index.js +127 -1
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +6 -6
- package/pluggableElementTypes/models/BaseDisplayModel.js +1 -3
- package/pluggableElementTypes/models/BaseViewModel.js +13 -15
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +24 -0
- package/pluggableElementTypes/models/InternetAccountModel.js +85 -0
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +4 -0
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +25 -0
- package/pluggableElementTypes/models/index.d.ts +3 -0
- package/pluggableElementTypes/models/index.js +24 -8
- package/pluggableElementTypes/renderers/BoxRendererType.js +1 -1
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +15 -6
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +3 -3
- package/pluggableElementTypes/renderers/FeatureRendererType.js +17 -8
- package/pluggableElementTypes/renderers/RendererType.d.ts +1 -0
- package/pluggableElementTypes/renderers/RendererType.js +4 -1
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +1 -1
- package/pluggableElementTypes/renderers/index.d.ts +9 -0
- package/pluggableElementTypes/renderers/index.js +63 -0
- package/rpc/BaseRpcDriver.js +5 -9
- package/rpc/BaseRpcDriver.test.js +6 -6
- package/rpc/RpcManager.d.ts +1 -1
- package/rpc/RpcManager.js +44 -16
- package/rpc/WebWorkerRpcDriver.js +3 -3
- package/rpc/coreRpcMethods.d.ts +2 -1
- package/rpc/coreRpcMethods.js +109 -75
- package/rpc/remoteAbortSignals.js +2 -2
- package/ui/App.d.ts +17 -4
- package/ui/App.js +55 -41
- package/ui/Drawer.d.ts +6 -14
- package/ui/Drawer.js +11 -12
- package/ui/DrawerWidget.d.ts +5 -3
- package/ui/DrawerWidget.js +100 -61
- package/ui/ErrorMessage.d.ts +5 -0
- package/ui/ErrorMessage.js +54 -0
- package/ui/FileSelector/FileSelector.d.ts +11 -0
- package/ui/FileSelector/FileSelector.js +198 -0
- package/ui/FileSelector/LocalFileChooser.d.ts +7 -0
- package/ui/FileSelector/LocalFileChooser.js +79 -0
- package/ui/FileSelector/UrlChooser.d.ts +9 -0
- package/ui/FileSelector/UrlChooser.js +41 -0
- package/ui/FileSelector/index.d.ts +2 -0
- package/ui/FileSelector/index.js +13 -0
- package/ui/Icons.d.ts +4 -0
- package/ui/Icons.js +34 -0
- package/ui/Logo.js +1 -1
- package/ui/PrerenderedCanvas.d.ts +1 -0
- package/ui/PrerenderedCanvas.js +4 -1
- package/ui/ResizeHandle.d.ts +2 -3
- package/ui/ResizeHandle.js +6 -7
- package/ui/SanitizedHTML.js +1 -1
- package/ui/Snackbar.js +4 -6
- package/ui/SnackbarModel.d.ts +16 -0
- package/ui/SnackbarModel.js +56 -0
- package/ui/Tooltip.d.ts +1 -1
- package/ui/index.js +24 -24
- package/ui/theme.js +5 -5
- package/util/QuickLRU.d.ts +1 -1
- package/util/QuickLRU.js +3 -3
- package/util/aborting.d.ts +1 -1
- package/util/aborting.js +10 -11
- package/util/analytics.d.ts +2 -2
- package/util/analytics.js +20 -7
- package/util/blockTypes.d.ts +11 -6
- package/util/blockTypes.js +7 -1
- package/util/color/cssColorsLevel4.js +1 -1
- package/util/color/index.js +5 -5
- package/util/compositeMap.js +3 -3
- package/util/index.d.ts +6 -16
- package/util/index.js +76 -100
- package/util/io/RemoteFileWithRangeCache.d.ts +17 -0
- package/util/io/RemoteFileWithRangeCache.js +266 -0
- package/util/io/index.d.ts +4 -2
- package/util/io/index.js +134 -25
- package/util/jexl.js +4 -1
- package/util/layouts/BaseLayout.d.ts +3 -0
- package/util/layouts/GranularRectLayout.d.ts +19 -10
- package/util/layouts/GranularRectLayout.js +459 -100
- package/util/layouts/GranularRectLayout.test.js +57 -10
- package/util/layouts/PrecomputedLayout.js +2 -1
- package/util/layouts/index.d.ts +7 -0
- package/util/layouts/index.js +68 -0
- package/util/mst-reflection.js +3 -3
- package/util/offscreenCanvasPonyfill.js +1 -1
- package/util/range.js +1 -1
- package/util/simpleFeature.js +1 -1
- package/util/stats.js +2 -2
- package/util/tracks.d.ts +31 -362
- package/util/tracks.js +74 -190
- package/util/types/index.d.ts +54 -10
- package/util/types/index.js +110 -8
- package/util/types/mst.d.ts +46 -2
- package/util/types/mst.js +56 -8
- package/util/types/util.d.ts +1 -1
- package/util/when.js +1 -1
- package/assemblyManager/assemblyConfigSchemas.d.ts +0 -7
- package/ui/FileSelector.d.ts +0 -9
- package/ui/FileSelector.js +0 -150
- package/util/io/LocalFile.d.ts +0 -18
- package/util/io/LocalFile.js +0 -220
- package/util/io/rangeFetcher.d.ts +0 -3
- package/util/io/rangeFetcher.js +0 -236
- package/value.d.ts +0 -1
- package/value.js +0 -10
|
@@ -60,12 +60,12 @@ var refNameColors = ['rgb(153, 102, 0)', 'rgb(102, 102, 0)', 'rgb(153, 153, 30)'
|
|
|
60
60
|
|
|
61
61
|
function loadRefNameMap(_x, _x2, _x3, _x4) {
|
|
62
62
|
return _loadRefNameMap.apply(this, arguments);
|
|
63
|
-
}
|
|
63
|
+
} // Valid refName pattern from https://samtools.github.io/hts-specs/SAMv1.pdf
|
|
64
|
+
|
|
64
65
|
|
|
65
66
|
function _loadRefNameMap() {
|
|
66
67
|
_loadRefNameMap = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(assembly, adapterConf, options, signal) {
|
|
67
|
-
var sessionId, refNames,
|
|
68
|
-
|
|
68
|
+
var sessionId, refNames, refNameAliases, refNameMap, reversed;
|
|
69
69
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
70
70
|
while (1) {
|
|
71
71
|
switch (_context4.prev = _context4.next) {
|
|
@@ -90,39 +90,34 @@ function _loadRefNameMap() {
|
|
|
90
90
|
|
|
91
91
|
case 5:
|
|
92
92
|
refNames = _context4.sent;
|
|
93
|
-
refNameMap = {};
|
|
94
93
|
refNameAliases = assembly.refNameAliases;
|
|
95
94
|
|
|
96
95
|
if (refNameAliases) {
|
|
97
|
-
_context4.next =
|
|
96
|
+
_context4.next = 9;
|
|
98
97
|
break;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
throw new Error("error loading assembly ".concat(assembly.name, "'s refNameAliases"));
|
|
102
101
|
|
|
103
|
-
case
|
|
104
|
-
refNames.
|
|
105
|
-
checkRefName(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), canonicalName = _Object$entries$_i[0], adapterName = _Object$entries$_i[1];
|
|
117
|
-
reversed[adapterName] = canonicalName;
|
|
118
|
-
}
|
|
119
|
-
|
|
102
|
+
case 9:
|
|
103
|
+
refNameMap = Object.fromEntries(refNames.map(function (name) {
|
|
104
|
+
checkRefName(name);
|
|
105
|
+
return [assembly.getCanonicalRefName(name), name];
|
|
106
|
+
})); // make the reversed map too
|
|
107
|
+
|
|
108
|
+
reversed = Object.fromEntries(Object.entries(refNameMap).map(function (_ref2) {
|
|
109
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
110
|
+
canonicalName = _ref3[0],
|
|
111
|
+
adapterName = _ref3[1];
|
|
112
|
+
|
|
113
|
+
return [adapterName, canonicalName];
|
|
114
|
+
}));
|
|
120
115
|
return _context4.abrupt("return", {
|
|
121
116
|
forwardMap: refNameMap,
|
|
122
117
|
reverseMap: reversed
|
|
123
118
|
});
|
|
124
119
|
|
|
125
|
-
case
|
|
120
|
+
case 12:
|
|
126
121
|
case "end":
|
|
127
122
|
return _context4.stop();
|
|
128
123
|
}
|
|
@@ -133,7 +128,6 @@ function _loadRefNameMap() {
|
|
|
133
128
|
}
|
|
134
129
|
|
|
135
130
|
function checkRefName(refName) {
|
|
136
|
-
// Valid refName pattern from https://samtools.github.io/hts-specs/SAMv1.pdf
|
|
137
131
|
if (!refName.match(/[0-9A-Za-z!#$%&+./:;?@^_|~-][0-9A-Za-z!#$%&*+./:;=?@^_|~-]*/)) {
|
|
138
132
|
throw new Error("Encountered invalid refName: \"".concat(refName, "\""));
|
|
139
133
|
}
|
|
@@ -175,12 +169,13 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
175
169
|
return {
|
|
176
170
|
error: undefined,
|
|
177
171
|
regions: undefined,
|
|
178
|
-
refNameAliases: undefined
|
|
172
|
+
refNameAliases: undefined,
|
|
173
|
+
cytobands: undefined
|
|
179
174
|
};
|
|
180
175
|
}).views(function (self) {
|
|
181
176
|
return {
|
|
182
177
|
get initialized() {
|
|
183
|
-
return
|
|
178
|
+
return !!self.refNameAliases;
|
|
184
179
|
},
|
|
185
180
|
|
|
186
181
|
get name() {
|
|
@@ -192,7 +187,7 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
192
187
|
},
|
|
193
188
|
|
|
194
189
|
hasName: function hasName(name) {
|
|
195
|
-
return this.
|
|
190
|
+
return this.allAliases.includes(name);
|
|
196
191
|
},
|
|
197
192
|
|
|
198
193
|
get allAliases() {
|
|
@@ -200,7 +195,9 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
200
195
|
},
|
|
201
196
|
|
|
202
197
|
get refNames() {
|
|
203
|
-
|
|
198
|
+
var _self$regions;
|
|
199
|
+
|
|
200
|
+
return (_self$regions = self.regions) === null || _self$regions === void 0 ? void 0 : _self$regions.map(function (region) {
|
|
204
201
|
return region.refName;
|
|
205
202
|
});
|
|
206
203
|
},
|
|
@@ -259,14 +256,15 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
259
256
|
setLoading: function setLoading() {},
|
|
260
257
|
setLoaded: function setLoaded(_ref) {
|
|
261
258
|
var adapterRegionsWithAssembly = _ref.adapterRegionsWithAssembly,
|
|
262
|
-
refNameAliases = _ref.refNameAliases
|
|
259
|
+
refNameAliases = _ref.refNameAliases,
|
|
260
|
+
cytobands = _ref.cytobands;
|
|
263
261
|
this.setRegions(adapterRegionsWithAssembly);
|
|
264
262
|
this.setRefNameAliases(refNameAliases);
|
|
263
|
+
this.setCytobands(cytobands);
|
|
265
264
|
},
|
|
266
|
-
setError: function setError(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
265
|
+
setError: function setError(e) {
|
|
266
|
+
console.error(e);
|
|
267
|
+
self.error = e;
|
|
270
268
|
},
|
|
271
269
|
setRegions: function setRegions(regions) {
|
|
272
270
|
self.regions = regions;
|
|
@@ -274,6 +272,9 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
274
272
|
setRefNameAliases: function setRefNameAliases(refNameAliases) {
|
|
275
273
|
self.refNameAliases = refNameAliases;
|
|
276
274
|
},
|
|
275
|
+
setCytobands: function setCytobands(cytobands) {
|
|
276
|
+
self.cytobands = cytobands;
|
|
277
|
+
},
|
|
277
278
|
afterAttach: function afterAttach() {
|
|
278
279
|
(0, _util.makeAbortableReaction)( // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
279
280
|
self, // @ts-ignore
|
|
@@ -299,7 +300,9 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
299
300
|
adapterConf: adapterConf,
|
|
300
301
|
self: self,
|
|
301
302
|
options: rest
|
|
302
|
-
}, signal,
|
|
303
|
+
}, // signal intentionally not passed here, fixes issues like #2221.
|
|
304
|
+
// alternative fix #2540 was proposed but non-working currently
|
|
305
|
+
undefined, statusCallback);
|
|
303
306
|
},
|
|
304
307
|
|
|
305
308
|
/**
|
|
@@ -372,17 +375,21 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
372
375
|
function makeLoadAssemblyData(pluginManager) {
|
|
373
376
|
return function (self) {
|
|
374
377
|
if (self.configuration) {
|
|
375
|
-
var _self$configuration$r;
|
|
376
|
-
|
|
377
378
|
// use full configuration instead of snapshot of the config, the
|
|
378
379
|
// rpcManager normally receives a snapshot but we bypass rpcManager here
|
|
379
380
|
// to avoid spinning up a webworker
|
|
380
|
-
var
|
|
381
|
-
|
|
381
|
+
var _self$configuration = self.configuration,
|
|
382
|
+
sequence = _self$configuration.sequence,
|
|
383
|
+
refNameAliases = _self$configuration.refNameAliases,
|
|
384
|
+
cytobands = _self$configuration.cytobands;
|
|
385
|
+
var sequenceAdapterConfig = sequence.adapter;
|
|
386
|
+
var refNameAliasesAdapterConfig = refNameAliases === null || refNameAliases === void 0 ? void 0 : refNameAliases.adapter;
|
|
387
|
+
var cytobandAdapterConfig = cytobands === null || cytobands === void 0 ? void 0 : cytobands.adapter;
|
|
382
388
|
return {
|
|
383
389
|
sequenceAdapterConfig: sequenceAdapterConfig,
|
|
384
390
|
assemblyName: self.name,
|
|
385
391
|
refNameAliasesAdapterConfig: refNameAliasesAdapterConfig,
|
|
392
|
+
cytobandAdapterConfig: cytobandAdapterConfig,
|
|
386
393
|
pluginManager: pluginManager
|
|
387
394
|
};
|
|
388
395
|
}
|
|
@@ -397,7 +404,7 @@ function loadAssemblyReaction(_x5, _x6) {
|
|
|
397
404
|
|
|
398
405
|
function _loadAssemblyReaction() {
|
|
399
406
|
_loadAssemblyReaction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(props, signal) {
|
|
400
|
-
var sequenceAdapterConfig, assemblyName, refNameAliasesAdapterConfig,
|
|
407
|
+
var sequenceAdapterConfig, assemblyName, refNameAliasesAdapterConfig, cytobandAdapterConfig, pluginManager, adapterRegions, adapterRegionsWithAssembly, refNameAliases, aliases, cytobands;
|
|
401
408
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
402
409
|
while (1) {
|
|
403
410
|
switch (_context5.prev = _context5.next) {
|
|
@@ -410,109 +417,48 @@ function _loadAssemblyReaction() {
|
|
|
410
417
|
return _context5.abrupt("return");
|
|
411
418
|
|
|
412
419
|
case 2:
|
|
413
|
-
sequenceAdapterConfig = props.sequenceAdapterConfig, assemblyName = props.assemblyName, refNameAliasesAdapterConfig = props.refNameAliasesAdapterConfig, pluginManager = props.pluginManager;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
_context5.t0 = AdapterClass;
|
|
417
|
-
|
|
418
|
-
if (_context5.t0) {
|
|
419
|
-
_context5.next = 10;
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
420
|
+
sequenceAdapterConfig = props.sequenceAdapterConfig, assemblyName = props.assemblyName, refNameAliasesAdapterConfig = props.refNameAliasesAdapterConfig, cytobandAdapterConfig = props.cytobandAdapterConfig, pluginManager = props.pluginManager;
|
|
421
|
+
_context5.next = 5;
|
|
422
|
+
return getAssemblyRegions(sequenceAdapterConfig, pluginManager, signal);
|
|
422
423
|
|
|
423
|
-
|
|
424
|
-
return getAdapterClass === null || getAdapterClass === void 0 ? void 0 : getAdapterClass();
|
|
425
|
-
|
|
426
|
-
case 9:
|
|
427
|
-
_context5.t0 = _context5.sent;
|
|
428
|
-
|
|
429
|
-
case 10:
|
|
430
|
-
CLASS = _context5.t0;
|
|
431
|
-
|
|
432
|
-
if (CLASS) {
|
|
433
|
-
_context5.next = 13;
|
|
434
|
-
break;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
throw new Error('Failed to get adapter class');
|
|
438
|
-
|
|
439
|
-
case 13:
|
|
440
|
-
adapter = new CLASS(sequenceAdapterConfig);
|
|
441
|
-
_context5.next = 16;
|
|
442
|
-
return adapter.getRegions({
|
|
443
|
-
signal: signal
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
case 16:
|
|
424
|
+
case 5:
|
|
447
425
|
adapterRegions = _context5.sent;
|
|
448
426
|
adapterRegionsWithAssembly = adapterRegions.map(function (adapterRegion) {
|
|
449
|
-
|
|
450
|
-
checkRefName(refName);
|
|
427
|
+
checkRefName(adapterRegion.refName);
|
|
451
428
|
return _objectSpread(_objectSpread({}, adapterRegion), {}, {
|
|
452
429
|
assemblyName: assemblyName
|
|
453
430
|
});
|
|
454
431
|
});
|
|
455
432
|
refNameAliases = {};
|
|
433
|
+
_context5.next = 10;
|
|
434
|
+
return getRefNameAliases(refNameAliasesAdapterConfig, pluginManager, signal);
|
|
456
435
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
refAliasAdapterType = pluginManager.getAdapterType(refNameAliasesAdapterConfig.type);
|
|
463
|
-
RefAdapterClass = refAliasAdapterType.AdapterClass, getRefAdapterClass = refAliasAdapterType.getAdapterClass;
|
|
464
|
-
_context5.t1 = RefAdapterClass;
|
|
465
|
-
|
|
466
|
-
if (_context5.t1) {
|
|
467
|
-
_context5.next = 27;
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
_context5.next = 26;
|
|
472
|
-
return getRefAdapterClass === null || getRefAdapterClass === void 0 ? void 0 : getRefAdapterClass();
|
|
473
|
-
|
|
474
|
-
case 26:
|
|
475
|
-
_context5.t1 = _context5.sent;
|
|
476
|
-
|
|
477
|
-
case 27:
|
|
478
|
-
REFCLASS = _context5.t1;
|
|
479
|
-
|
|
480
|
-
if (REFCLASS) {
|
|
481
|
-
_context5.next = 30;
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
throw new Error('Failed to get REFCLASS');
|
|
486
|
-
|
|
487
|
-
case 30:
|
|
488
|
-
refNameAliasAdapter = new REFCLASS(refNameAliasesAdapterConfig);
|
|
489
|
-
_context5.next = 33;
|
|
490
|
-
return refNameAliasAdapter.getRefNameAliases({
|
|
491
|
-
signal: signal
|
|
492
|
-
});
|
|
436
|
+
case 10:
|
|
437
|
+
aliases = _context5.sent;
|
|
438
|
+
_context5.next = 13;
|
|
439
|
+
return getCytobands(cytobandAdapterConfig, pluginManager);
|
|
493
440
|
|
|
494
|
-
case
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
var refName =
|
|
498
|
-
aliases =
|
|
441
|
+
case 13:
|
|
442
|
+
cytobands = _context5.sent;
|
|
443
|
+
aliases.forEach(function (_ref4) {
|
|
444
|
+
var refName = _ref4.refName,
|
|
445
|
+
aliases = _ref4.aliases;
|
|
499
446
|
aliases.forEach(function (alias) {
|
|
500
447
|
checkRefName(alias);
|
|
501
448
|
refNameAliases[alias] = refName;
|
|
502
449
|
});
|
|
503
|
-
});
|
|
450
|
+
}); // add identity to the refNameAliases list
|
|
504
451
|
|
|
505
|
-
case 35:
|
|
506
|
-
// add identity to the refNameAliases list
|
|
507
452
|
adapterRegionsWithAssembly.forEach(function (region) {
|
|
508
453
|
refNameAliases[region.refName] = region.refName;
|
|
509
454
|
});
|
|
510
455
|
return _context5.abrupt("return", {
|
|
511
456
|
adapterRegionsWithAssembly: adapterRegionsWithAssembly,
|
|
512
|
-
refNameAliases: refNameAliases
|
|
457
|
+
refNameAliases: refNameAliases,
|
|
458
|
+
cytobands: cytobands
|
|
513
459
|
});
|
|
514
460
|
|
|
515
|
-
case
|
|
461
|
+
case 17:
|
|
516
462
|
case "end":
|
|
517
463
|
return _context5.stop();
|
|
518
464
|
}
|
|
@@ -520,4 +466,101 @@ function _loadAssemblyReaction() {
|
|
|
520
466
|
}, _callee5);
|
|
521
467
|
}));
|
|
522
468
|
return _loadAssemblyReaction.apply(this, arguments);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function getRefNameAliases(_x7, _x8, _x9) {
|
|
472
|
+
return _getRefNameAliases.apply(this, arguments);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function _getRefNameAliases() {
|
|
476
|
+
_getRefNameAliases = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(config, pluginManager, signal) {
|
|
477
|
+
var _type$getAdapterClass;
|
|
478
|
+
|
|
479
|
+
var type, CLASS, adapter;
|
|
480
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
481
|
+
while (1) {
|
|
482
|
+
switch (_context6.prev = _context6.next) {
|
|
483
|
+
case 0:
|
|
484
|
+
type = pluginManager.getAdapterType(config.type);
|
|
485
|
+
_context6.next = 3;
|
|
486
|
+
return (_type$getAdapterClass = type.getAdapterClass) === null || _type$getAdapterClass === void 0 ? void 0 : _type$getAdapterClass.call(type);
|
|
487
|
+
|
|
488
|
+
case 3:
|
|
489
|
+
CLASS = _context6.sent;
|
|
490
|
+
adapter = new CLASS(config, undefined, pluginManager);
|
|
491
|
+
return _context6.abrupt("return", adapter.getRefNameAliases({
|
|
492
|
+
signal: signal
|
|
493
|
+
}));
|
|
494
|
+
|
|
495
|
+
case 6:
|
|
496
|
+
case "end":
|
|
497
|
+
return _context6.stop();
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}, _callee6);
|
|
501
|
+
}));
|
|
502
|
+
return _getRefNameAliases.apply(this, arguments);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
function getCytobands(_x10, _x11) {
|
|
506
|
+
return _getCytobands.apply(this, arguments);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function _getCytobands() {
|
|
510
|
+
_getCytobands = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(config, pluginManager) {
|
|
511
|
+
var type, CLASS, adapter;
|
|
512
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
513
|
+
while (1) {
|
|
514
|
+
switch (_context7.prev = _context7.next) {
|
|
515
|
+
case 0:
|
|
516
|
+
type = pluginManager.getAdapterType(config.type);
|
|
517
|
+
_context7.next = 3;
|
|
518
|
+
return type.getAdapterClass();
|
|
519
|
+
|
|
520
|
+
case 3:
|
|
521
|
+
CLASS = _context7.sent;
|
|
522
|
+
adapter = new CLASS(config, undefined, pluginManager); // @ts-ignore
|
|
523
|
+
|
|
524
|
+
return _context7.abrupt("return", adapter.getData());
|
|
525
|
+
|
|
526
|
+
case 6:
|
|
527
|
+
case "end":
|
|
528
|
+
return _context7.stop();
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}, _callee7);
|
|
532
|
+
}));
|
|
533
|
+
return _getCytobands.apply(this, arguments);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
function getAssemblyRegions(_x12, _x13, _x14) {
|
|
537
|
+
return _getAssemblyRegions.apply(this, arguments);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
function _getAssemblyRegions() {
|
|
541
|
+
_getAssemblyRegions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(config, pluginManager, signal) {
|
|
542
|
+
var type, CLASS, adapter;
|
|
543
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
544
|
+
while (1) {
|
|
545
|
+
switch (_context8.prev = _context8.next) {
|
|
546
|
+
case 0:
|
|
547
|
+
type = pluginManager.getAdapterType(config.type);
|
|
548
|
+
_context8.next = 3;
|
|
549
|
+
return type.getAdapterClass();
|
|
550
|
+
|
|
551
|
+
case 3:
|
|
552
|
+
CLASS = _context8.sent;
|
|
553
|
+
adapter = new CLASS(config, undefined, pluginManager);
|
|
554
|
+
return _context8.abrupt("return", adapter.getRegions({
|
|
555
|
+
signal: signal
|
|
556
|
+
}));
|
|
557
|
+
|
|
558
|
+
case 6:
|
|
559
|
+
case "end":
|
|
560
|
+
return _context8.stop();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}, _callee8);
|
|
564
|
+
}));
|
|
565
|
+
return _getAssemblyRegions.apply(this, arguments);
|
|
523
566
|
}
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _configuration = require("../configuration");
|
|
9
9
|
|
|
10
10
|
var _default = function _default(pluginManager) {
|
|
11
|
-
|
|
11
|
+
return (0, _configuration.ConfigurationSchema)('BaseAssembly', {
|
|
12
12
|
aliases: {
|
|
13
13
|
type: 'stringArray',
|
|
14
14
|
defaultValue: [],
|
|
@@ -20,6 +20,40 @@ var _default = function _default(pluginManager) {
|
|
|
20
20
|
defaultValue: [],
|
|
21
21
|
description: 'Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence.'
|
|
22
22
|
},
|
|
23
|
+
refNameAliases: (0, _configuration.ConfigurationSchema)('RefNameAliases', {
|
|
24
|
+
adapter: pluginManager.pluggableConfigSchemaType('adapter')
|
|
25
|
+
}, {
|
|
26
|
+
preProcessSnapshot: function preProcessSnapshot(snap) {
|
|
27
|
+
// allow refNameAliases to be unspecified
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
if (!snap.adapter) {
|
|
30
|
+
return {
|
|
31
|
+
adapter: {
|
|
32
|
+
type: 'RefNameAliasAdapter'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return snap;
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
cytobands: (0, _configuration.ConfigurationSchema)('Cytoband', {
|
|
41
|
+
adapter: pluginManager.pluggableConfigSchemaType('adapter')
|
|
42
|
+
}, {
|
|
43
|
+
preProcessSnapshot: function preProcessSnapshot(snap) {
|
|
44
|
+
// allow cytoBand to be unspecified
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
if (!snap.adapter) {
|
|
47
|
+
return {
|
|
48
|
+
adapter: {
|
|
49
|
+
type: 'CytobandAdapter'
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return snap;
|
|
55
|
+
}
|
|
56
|
+
}),
|
|
23
57
|
displayName: {
|
|
24
58
|
type: 'string',
|
|
25
59
|
defaultValue: '',
|
|
@@ -28,32 +62,6 @@ var _default = function _default(pluginManager) {
|
|
|
28
62
|
}, {
|
|
29
63
|
explicitIdentifier: 'name'
|
|
30
64
|
});
|
|
31
|
-
var AssemblyConfigSchema = (0, _configuration.ConfigurationSchema)('Assembly', {
|
|
32
|
-
refNameAliases: (0, _configuration.ConfigurationSchema)('RefNameAliases', {
|
|
33
|
-
adapter: pluginManager.pluggableConfigSchemaType('adapter')
|
|
34
|
-
})
|
|
35
|
-
}, {
|
|
36
|
-
baseConfiguration: BaseAssemblyConfigSchema
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
function dispatcher(snapshot) {
|
|
40
|
-
if (!snapshot) {
|
|
41
|
-
return BaseAssemblyConfigSchema;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var refNameAliases = snapshot.refNameAliases;
|
|
45
|
-
|
|
46
|
-
if (refNameAliases) {
|
|
47
|
-
return AssemblyConfigSchema;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return BaseAssemblyConfigSchema;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return {
|
|
54
|
-
assemblyConfigSchemas: [AssemblyConfigSchema, BaseAssemblyConfigSchema],
|
|
55
|
-
dispatcher: dispatcher
|
|
56
|
-
};
|
|
57
65
|
};
|
|
58
66
|
|
|
59
67
|
exports.default = _default;
|