@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.
Files changed (159) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail.d.ts +4 -4
  2. package/BaseFeatureWidget/BaseFeatureDetail.js +27 -8
  3. package/BaseFeatureWidget/SequenceFeatureDetails.js +10 -10
  4. package/BaseFeatureWidget/index.js +1 -1
  5. package/BaseFeatureWidget/types.d.ts +1 -1
  6. package/BaseFeatureWidget/util.js +3 -3
  7. package/CorePlugin.d.ts +0 -1
  8. package/CorePlugin.js +13 -1
  9. package/PluginLoader.d.ts +26 -4
  10. package/PluginLoader.js +337 -51
  11. package/PluginManager.d.ts +18 -11
  12. package/PluginManager.js +53 -31
  13. package/ReExports/list.js +1 -1
  14. package/ReExports/material-ui-colors.js +38 -38
  15. package/ReExports/modules.d.ts +19 -20
  16. package/ReExports/modules.js +10 -3
  17. package/TextSearch/BaseResults.d.ts +5 -14
  18. package/TextSearch/BaseResults.js +16 -58
  19. package/TextSearch/BaseResults.test.js +1 -11
  20. package/TextSearch/TextSearchManager.d.ts +3 -3
  21. package/TextSearch/TextSearchManager.js +1 -1
  22. package/assemblyManager/assembly.d.ts +21 -8
  23. package/assemblyManager/assembly.js +163 -120
  24. package/assemblyManager/assemblyConfigSchema.d.ts +3 -0
  25. package/assemblyManager/{assemblyConfigSchemas.js → assemblyConfigSchema.js} +35 -27
  26. package/assemblyManager/assemblyManager.d.ts +169 -60
  27. package/assemblyManager/index.d.ts +1 -1
  28. package/assemblyManager/index.js +5 -5
  29. package/configuration/configurationSchema.d.ts +3 -2
  30. package/configuration/configurationSchema.js +7 -10
  31. package/configuration/configurationSchema.test.js +4 -2
  32. package/configuration/configurationSlot.js +5 -4
  33. package/configuration/index.js +4 -4
  34. package/configuration/util.js +5 -5
  35. package/data_adapters/BaseAdapter.d.ts +5 -3
  36. package/data_adapters/BaseAdapter.js +7 -4
  37. package/data_adapters/BaseAdapter.test.js +4 -2
  38. package/data_adapters/CytobandAdapter.d.ts +8 -0
  39. package/data_adapters/CytobandAdapter.js +128 -0
  40. package/data_adapters/dataAdapterCache.js +3 -3
  41. package/package.json +7 -6
  42. package/pluggableElementTypes/AdapterType.d.ts +9 -1
  43. package/pluggableElementTypes/AdapterType.js +20 -0
  44. package/pluggableElementTypes/InternetAccountType.d.ts +12 -0
  45. package/pluggableElementTypes/InternetAccountType.js +64 -0
  46. package/pluggableElementTypes/PluggableElementBase.d.ts +1 -2
  47. package/pluggableElementTypes/PluggableElementBase.js +2 -3
  48. package/pluggableElementTypes/RpcMethodType.d.ts +3 -0
  49. package/pluggableElementTypes/RpcMethodType.js +269 -26
  50. package/pluggableElementTypes/RpcMethodType.test.d.ts +4 -0
  51. package/pluggableElementTypes/RpcMethodType.test.js +118 -0
  52. package/pluggableElementTypes/ViewType.d.ts +1 -1
  53. package/pluggableElementTypes/WidgetType.d.ts +1 -0
  54. package/pluggableElementTypes/index.d.ts +7 -3
  55. package/pluggableElementTypes/index.js +127 -1
  56. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +6 -6
  57. package/pluggableElementTypes/models/BaseDisplayModel.js +1 -3
  58. package/pluggableElementTypes/models/BaseViewModel.js +13 -15
  59. package/pluggableElementTypes/models/InternetAccountModel.d.ts +24 -0
  60. package/pluggableElementTypes/models/InternetAccountModel.js +85 -0
  61. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +4 -0
  62. package/pluggableElementTypes/models/baseInternetAccountConfig.js +25 -0
  63. package/pluggableElementTypes/models/index.d.ts +3 -0
  64. package/pluggableElementTypes/models/index.js +24 -8
  65. package/pluggableElementTypes/renderers/BoxRendererType.js +1 -1
  66. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +1 -1
  67. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +15 -6
  68. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +3 -3
  69. package/pluggableElementTypes/renderers/FeatureRendererType.js +17 -8
  70. package/pluggableElementTypes/renderers/RendererType.d.ts +1 -0
  71. package/pluggableElementTypes/renderers/RendererType.js +4 -1
  72. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +1 -1
  73. package/pluggableElementTypes/renderers/index.d.ts +9 -0
  74. package/pluggableElementTypes/renderers/index.js +63 -0
  75. package/rpc/BaseRpcDriver.js +5 -9
  76. package/rpc/BaseRpcDriver.test.js +6 -6
  77. package/rpc/RpcManager.d.ts +1 -1
  78. package/rpc/RpcManager.js +44 -16
  79. package/rpc/WebWorkerRpcDriver.js +3 -3
  80. package/rpc/coreRpcMethods.d.ts +2 -1
  81. package/rpc/coreRpcMethods.js +109 -75
  82. package/rpc/remoteAbortSignals.js +2 -2
  83. package/ui/App.d.ts +17 -4
  84. package/ui/App.js +55 -41
  85. package/ui/Drawer.d.ts +6 -14
  86. package/ui/Drawer.js +11 -12
  87. package/ui/DrawerWidget.d.ts +5 -3
  88. package/ui/DrawerWidget.js +100 -61
  89. package/ui/ErrorMessage.d.ts +5 -0
  90. package/ui/ErrorMessage.js +54 -0
  91. package/ui/FileSelector/FileSelector.d.ts +11 -0
  92. package/ui/FileSelector/FileSelector.js +198 -0
  93. package/ui/FileSelector/LocalFileChooser.d.ts +7 -0
  94. package/ui/FileSelector/LocalFileChooser.js +79 -0
  95. package/ui/FileSelector/UrlChooser.d.ts +9 -0
  96. package/ui/FileSelector/UrlChooser.js +41 -0
  97. package/ui/FileSelector/index.d.ts +2 -0
  98. package/ui/FileSelector/index.js +13 -0
  99. package/ui/Icons.d.ts +4 -0
  100. package/ui/Icons.js +34 -0
  101. package/ui/Logo.js +1 -1
  102. package/ui/PrerenderedCanvas.d.ts +1 -0
  103. package/ui/PrerenderedCanvas.js +4 -1
  104. package/ui/ResizeHandle.d.ts +2 -3
  105. package/ui/ResizeHandle.js +6 -7
  106. package/ui/SanitizedHTML.js +1 -1
  107. package/ui/Snackbar.js +4 -6
  108. package/ui/SnackbarModel.d.ts +16 -0
  109. package/ui/SnackbarModel.js +56 -0
  110. package/ui/Tooltip.d.ts +1 -1
  111. package/ui/index.js +24 -24
  112. package/ui/theme.js +5 -5
  113. package/util/QuickLRU.d.ts +1 -1
  114. package/util/QuickLRU.js +3 -3
  115. package/util/aborting.d.ts +1 -1
  116. package/util/aborting.js +10 -11
  117. package/util/analytics.d.ts +2 -2
  118. package/util/analytics.js +20 -7
  119. package/util/blockTypes.d.ts +11 -6
  120. package/util/blockTypes.js +7 -1
  121. package/util/color/cssColorsLevel4.js +1 -1
  122. package/util/color/index.js +5 -5
  123. package/util/compositeMap.js +3 -3
  124. package/util/index.d.ts +6 -16
  125. package/util/index.js +76 -100
  126. package/util/io/RemoteFileWithRangeCache.d.ts +17 -0
  127. package/util/io/RemoteFileWithRangeCache.js +266 -0
  128. package/util/io/index.d.ts +4 -2
  129. package/util/io/index.js +134 -25
  130. package/util/jexl.js +4 -1
  131. package/util/layouts/BaseLayout.d.ts +3 -0
  132. package/util/layouts/GranularRectLayout.d.ts +19 -10
  133. package/util/layouts/GranularRectLayout.js +459 -100
  134. package/util/layouts/GranularRectLayout.test.js +57 -10
  135. package/util/layouts/PrecomputedLayout.js +2 -1
  136. package/util/layouts/index.d.ts +7 -0
  137. package/util/layouts/index.js +68 -0
  138. package/util/mst-reflection.js +3 -3
  139. package/util/offscreenCanvasPonyfill.js +1 -1
  140. package/util/range.js +1 -1
  141. package/util/simpleFeature.js +1 -1
  142. package/util/stats.js +2 -2
  143. package/util/tracks.d.ts +31 -362
  144. package/util/tracks.js +74 -190
  145. package/util/types/index.d.ts +54 -10
  146. package/util/types/index.js +110 -8
  147. package/util/types/mst.d.ts +46 -2
  148. package/util/types/mst.js +56 -8
  149. package/util/types/util.d.ts +1 -1
  150. package/util/when.js +1 -1
  151. package/assemblyManager/assemblyConfigSchemas.d.ts +0 -7
  152. package/ui/FileSelector.d.ts +0 -9
  153. package/ui/FileSelector.js +0 -150
  154. package/util/io/LocalFile.d.ts +0 -18
  155. package/util/io/LocalFile.js +0 -220
  156. package/util/io/rangeFetcher.d.ts +0 -3
  157. package/util/io/rangeFetcher.js +0 -236
  158. package/value.d.ts +0 -1
  159. package/value.js +0 -10
@@ -8,7 +8,10 @@ var _GranularRectLayout = _interopRequireDefault(require("./GranularRectLayout")
8
8
 
9
9
  describe('GranularRectLayout', function () {
10
10
  it('lays out non-overlapping features end to end', function () {
11
- var l = new _GranularRectLayout.default();
11
+ var l = new _GranularRectLayout.default({
12
+ pitchX: 10,
13
+ pitchY: 4
14
+ });
12
15
  var testRects = [['1,0', 4133, 5923, 16], ['1,1', 11299, 12389, 16], ['1,2', 21050, 22778, 16], ['1,3', 41125, 47459, 16], ['1,4', 47926, 49272, 16], ['1,5', 50240, 52495, 16], ['1,6', 53329, 56283, 16], ['1,7', 59309, 79441, 16], ['1,8', 80359, 83196, 16], ['1,9', 92147, 94188, 16], ['1,10', 96241, 103626, 16], ['1,11', 104396, 108110, 16], ['1,12', 111878, 125251, 16], ['1,13', 125747, 128085, 16], ['1,14', 131492, 132641, 16], ['1,15', 133857, 134931, 16], ['1,16', 137023, 138220, 16], ['1,17', 140703, 145668, 16], ['1,18', 146045, 147059, 16], ['1,19', 162296, 165395, 16], ['1,20', 168531, 170795, 16], ['1,21', 174812, 180475, 16], ['1,22', 184302, 188826, 16], ['1,23', 189609, 191141, 16], ['1,24', 199799, 201389, 16], ['1,25', 203436, 211345, 16], ['1,26', 212100, 212379, 16], ['1,27', 213418, 214627, 16], ['1,28', 215115, 219344, 16], ['1,29', 220067, 222525, 16], ['1,30', 223308, 228141, 16], ['1,31', 234473, 236768, 16], ['1,32', 239691, 245015, 16]];
13
16
 
14
17
  for (var i = 0; i < testRects.length; i += 1) {
@@ -17,7 +20,10 @@ describe('GranularRectLayout', function () {
17
20
  }
18
21
  });
19
22
  it('stacks up overlapping features', function () {
20
- var l = new _GranularRectLayout.default();
23
+ var l = new _GranularRectLayout.default({
24
+ pitchX: 10,
25
+ pitchY: 4
26
+ });
21
27
  var testRects = [];
22
28
 
23
29
  for (var i = 1; i <= 20; i += 1) {
@@ -26,35 +32,76 @@ describe('GranularRectLayout', function () {
26
32
 
27
33
  for (var _i = 0; _i < testRects.length; _i += 1) {
28
34
  var top = l.addRect.apply(l, (0, _toConsumableArray2.default)(testRects[_i]));
29
- expect(top).toEqual(_i % 2 * 3);
35
+ expect(top).toEqual(_i % 2 * 4);
30
36
  }
31
37
  });
32
38
  it('discards regions', function () {
33
- var l = new _GranularRectLayout.default();
39
+ var l = new _GranularRectLayout.default({
40
+ pitchX: 10,
41
+ pitchY: 4
42
+ });
34
43
 
35
44
  for (var i = 0; i < 20; i += 1) {
36
45
  var top = l.addRect("feature-".concat(i), 10000 * i + 4000, 10000 * i + 16000, 1);
37
- expect(top).toEqual(i % 2 * 3);
46
+ expect(top).toEqual(i % 2 * 4);
38
47
  }
48
+
49
+ expect(l.bitmap[0].rowState.bits.length).toBe(34812);
50
+ expect(l.bitmap[1].rowState.bits.length).toBe(34812);
51
+ l.discardRange(190000, 220000);
52
+ expect(l.bitmap[0].rowState.bits.length).toBe(24802);
53
+ expect(l.bitmap[1].rowState.bits.length).toBe(23802);
54
+ l.discardRange(0, 100000);
55
+ expect(l.bitmap[0].rowState.bits.length).toBe(19001);
56
+ expect(l.bitmap[1].rowState.bits.length).toBe(23802);
57
+ l.discardRange(0, 220000);
58
+ expect(l.bitmap[0].rowState).toBeUndefined();
39
59
  }); // see issue #486
40
60
 
41
61
  it('tests that adding +/- pitchX fixes resolution causing errors', function () {
42
- var l = new _GranularRectLayout.default();
62
+ var l = new _GranularRectLayout.default({
63
+ pitchX: 91.21851599727707,
64
+ pitchY: 3
65
+ });
43
66
  l.addRect('test', 2581541, 2581542, 1);
44
67
  expect(l.serializeRegion({
45
68
  start: 2581491,
46
69
  end: 2818659
47
70
  }).rectangles.test).toBeTruthy();
48
71
  });
72
+ it('tests reinitializing layout due to throwing away old one', function () {
73
+ var spy = jest.spyOn(console, 'warn').mockImplementation(function () {});
74
+ var l = new _GranularRectLayout.default({
75
+ pitchX: 1,
76
+ pitchY: 1,
77
+ maxHeight: 600
78
+ });
79
+ l.addRect('test1', 0, 10000, 1);
80
+ l.addRect('test2', 1000000, 1000100, 1);
81
+ l.addRect('test3', 0, 10000, 1);
82
+ expect(l.rectangles.size).toBe(3);
83
+ expect(spy).toHaveBeenCalled();
84
+ spy.mockRestore();
85
+ });
49
86
  it('tests adding a gigantic feature that fills entire row with another smaller added on top', function () {
50
87
  var l = new _GranularRectLayout.default({
88
+ pitchX: 100,
89
+ pitchY: 1,
51
90
  maxHeight: 600
52
91
  });
53
92
  expect(l.getByCoord(50000, 0)).toEqual(undefined);
54
- l.addRect('test1', 0, 10000000, 1);
55
- expect(l.getByCoord(50000, 0)).toEqual('test1');
56
- l.addRect('test2', 0, 1000, 1);
57
- expect(l.getByCoord(500, 2)).toEqual('test2');
93
+ l.addRect('test1', 0, 100000000, 1, {
94
+ id: 'feat1'
95
+ });
96
+ expect(l.getByCoord(50000, 0)).toEqual({
97
+ id: 'feat1'
98
+ });
99
+ l.addRect('test2', 0, 1000, 1, {
100
+ id: 'feat2'
101
+ });
102
+ expect(l.getByCoord(500, 1)).toEqual({
103
+ id: 'feat2'
104
+ });
58
105
  expect(l.rectangles.size).toBe(2);
59
106
  });
60
107
  });
@@ -29,7 +29,8 @@ var PrecomputedLayout = /*#__PURE__*/function () {
29
29
  (0, _defineProperty2.default)(this, "totalHeight", void 0);
30
30
  (0, _defineProperty2.default)(this, "maxHeightReached", void 0);
31
31
  (0, _defineProperty2.default)(this, "rbush", void 0);
32
- this.rectangles = new Map(Object.entries(rectangles));
32
+ this.rectangles = new Map(Object.entries(rectangles)); // rectangles is of the form "featureId": [leftPx, topPx, rightPx, bottomPx]
33
+
33
34
  this.totalHeight = totalHeight;
34
35
  this.maxHeightReached = maxHeightReached;
35
36
  this.rbush = new _rbush.default();
@@ -0,0 +1,7 @@
1
+ export * from './BaseLayout';
2
+ export { default as GranularRectLayout } from './GranularRectLayout';
3
+ export { default as MultiLayout } from './MultiLayout';
4
+ export { default as PrecomputedLayout } from './PrecomputedLayout';
5
+ export type { Layout } from './PrecomputedLayout';
6
+ export { default as PrecomputedMultiLayout } from './PrecomputedMultiLayout';
7
+ export { default as SceneGraph } from './SceneGraph';
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ var _exportNames = {
9
+ GranularRectLayout: true,
10
+ MultiLayout: true,
11
+ PrecomputedLayout: true,
12
+ PrecomputedMultiLayout: true,
13
+ SceneGraph: true
14
+ };
15
+ Object.defineProperty(exports, "GranularRectLayout", {
16
+ enumerable: true,
17
+ get: function get() {
18
+ return _GranularRectLayout.default;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "MultiLayout", {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _MultiLayout.default;
25
+ }
26
+ });
27
+ Object.defineProperty(exports, "PrecomputedLayout", {
28
+ enumerable: true,
29
+ get: function get() {
30
+ return _PrecomputedLayout.default;
31
+ }
32
+ });
33
+ Object.defineProperty(exports, "PrecomputedMultiLayout", {
34
+ enumerable: true,
35
+ get: function get() {
36
+ return _PrecomputedMultiLayout.default;
37
+ }
38
+ });
39
+ Object.defineProperty(exports, "SceneGraph", {
40
+ enumerable: true,
41
+ get: function get() {
42
+ return _SceneGraph.default;
43
+ }
44
+ });
45
+
46
+ var _BaseLayout = require("./BaseLayout");
47
+
48
+ Object.keys(_BaseLayout).forEach(function (key) {
49
+ if (key === "default" || key === "__esModule") return;
50
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
51
+ if (key in exports && exports[key] === _BaseLayout[key]) return;
52
+ Object.defineProperty(exports, key, {
53
+ enumerable: true,
54
+ get: function get() {
55
+ return _BaseLayout[key];
56
+ }
57
+ });
58
+ });
59
+
60
+ var _GranularRectLayout = _interopRequireDefault(require("./GranularRectLayout"));
61
+
62
+ var _MultiLayout = _interopRequireDefault(require("./MultiLayout"));
63
+
64
+ var _PrecomputedLayout = _interopRequireDefault(require("./PrecomputedLayout"));
65
+
66
+ var _PrecomputedMultiLayout = _interopRequireDefault(require("./PrecomputedMultiLayout"));
67
+
68
+ var _SceneGraph = _interopRequireDefault(require("./SceneGraph"));
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getSubType = getSubType;
7
- exports.getUnionSubTypes = getUnionSubTypes;
8
- exports.getPropertyType = getPropertyType;
9
6
  exports.getDefaultValue = getDefaultValue;
10
7
  exports.getEnumerationValues = getEnumerationValues;
8
+ exports.getPropertyType = getPropertyType;
9
+ exports.getSubType = getSubType;
10
+ exports.getUnionSubTypes = getUnionSubTypes;
11
11
  exports.resolveLateType = resolveLateType;
12
12
 
13
13
  var _mobxStateTree = require("mobx-state-tree");
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.PonyfillOffscreenCanvas = exports.PonyfillOffscreenContext = exports.ImageBitmapType = exports.createImageBitmap = exports.createCanvas = void 0;
8
+ exports.createImageBitmap = exports.createCanvas = exports.PonyfillOffscreenContext = exports.PonyfillOffscreenCanvas = exports.ImageBitmapType = void 0;
9
9
 
10
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
11
11
 
package/util/range.js CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.intersection2 = intersection2;
7
6
  exports.doesIntersect2 = doesIntersect2;
7
+ exports.intersection2 = intersection2;
8
8
  exports.isContainedWithin = isContainedWithin;
9
9
 
10
10
  /**
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.isFeature = isFeature;
9
8
  exports.default = void 0;
9
+ exports.isFeature = isFeature;
10
10
 
11
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
12
 
package/util/stats.js CHANGED
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
+ exports.blankStats = blankStats;
9
+ exports.calcPerBaseStats = calcPerBaseStats;
8
10
  exports.calcStdFromSums = calcStdFromSums;
9
11
  exports.rectifyStats = rectifyStats;
10
- exports.calcPerBaseStats = calcPerBaseStats;
11
12
  exports.scoresToStats = scoresToStats;
12
- exports.blankStats = blankStats;
13
13
 
14
14
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
15
15
 
package/util/tracks.d.ts CHANGED
@@ -25,371 +25,40 @@ export declare function setBlobMap(map: {
25
25
  export declare function storeBlobLocation(location: PreFileLocation): import("./types").PreUriLocation | import("./types").PreLocalPathLocation | {
26
26
  name: string;
27
27
  blobId: string;
28
+ locationType: string;
28
29
  };
29
- export declare function guessAdapter(file: FileLocation, index: FileLocation | undefined, getFileName: (f: FileLocation) => string, adapterHint?: string): {
30
- type: string;
31
- bamLocation: FileLocation;
32
- index: {
33
- location: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
34
- uri: string;
35
- localPath?: undefined;
36
- };
37
- indexType: string;
38
- };
39
- cramLocation?: undefined;
40
- craiLocation?: undefined;
41
- gffGzLocation?: undefined;
42
- vcfLocation?: undefined;
43
- vcfGzLocation?: undefined;
44
- bedGzLocation?: undefined;
45
- bigBedLocation?: undefined;
46
- bigWigLocation?: undefined;
47
- fastaLocation?: undefined;
48
- faiLocation?: undefined;
49
- gziLocation?: undefined;
50
- twoBitLocation?: undefined;
51
- rootUrlTemplate?: undefined;
52
- endpoint?: undefined;
53
- hicLocation?: undefined;
54
- pafLocation?: undefined;
55
- } | {
56
- type: string;
57
- cramLocation: FileLocation;
58
- craiLocation: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
59
- uri: string;
60
- localPath?: undefined;
61
- };
62
- bamLocation?: undefined;
63
- index?: undefined;
64
- gffGzLocation?: undefined;
65
- vcfLocation?: undefined;
66
- vcfGzLocation?: undefined;
67
- bedGzLocation?: undefined;
68
- bigBedLocation?: undefined;
69
- bigWigLocation?: undefined;
70
- fastaLocation?: undefined;
71
- faiLocation?: undefined;
72
- gziLocation?: undefined;
73
- twoBitLocation?: undefined;
74
- rootUrlTemplate?: undefined;
75
- endpoint?: undefined;
76
- hicLocation?: undefined;
77
- pafLocation?: undefined;
78
- } | {
79
- type: string;
80
- bamLocation?: undefined;
81
- index?: undefined;
82
- cramLocation?: undefined;
83
- craiLocation?: undefined;
84
- gffGzLocation?: undefined;
85
- vcfLocation?: undefined;
86
- vcfGzLocation?: undefined;
87
- bedGzLocation?: undefined;
88
- bigBedLocation?: undefined;
89
- bigWigLocation?: undefined;
90
- fastaLocation?: undefined;
91
- faiLocation?: undefined;
92
- gziLocation?: undefined;
93
- twoBitLocation?: undefined;
94
- rootUrlTemplate?: undefined;
95
- endpoint?: undefined;
96
- hicLocation?: undefined;
97
- pafLocation?: undefined;
98
- } | {
99
- type: string;
100
- gffGzLocation: FileLocation;
101
- index: {
102
- location: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
103
- uri: string;
104
- localPath?: undefined;
105
- };
106
- indexType: string;
107
- };
108
- bamLocation?: undefined;
109
- cramLocation?: undefined;
110
- craiLocation?: undefined;
111
- vcfLocation?: undefined;
112
- vcfGzLocation?: undefined;
113
- bedGzLocation?: undefined;
114
- bigBedLocation?: undefined;
115
- bigWigLocation?: undefined;
116
- fastaLocation?: undefined;
117
- faiLocation?: undefined;
118
- gziLocation?: undefined;
119
- twoBitLocation?: undefined;
120
- rootUrlTemplate?: undefined;
121
- endpoint?: undefined;
122
- hicLocation?: undefined;
123
- pafLocation?: undefined;
124
- } | {
125
- type: string;
126
- vcfLocation: FileLocation;
127
- bamLocation?: undefined;
128
- index?: undefined;
129
- cramLocation?: undefined;
130
- craiLocation?: undefined;
131
- gffGzLocation?: undefined;
132
- vcfGzLocation?: undefined;
133
- bedGzLocation?: undefined;
134
- bigBedLocation?: undefined;
135
- bigWigLocation?: undefined;
136
- fastaLocation?: undefined;
137
- faiLocation?: undefined;
138
- gziLocation?: undefined;
139
- twoBitLocation?: undefined;
140
- rootUrlTemplate?: undefined;
141
- endpoint?: undefined;
142
- hicLocation?: undefined;
143
- pafLocation?: undefined;
144
- } | {
145
- type: string;
146
- vcfGzLocation: FileLocation;
147
- index: {
148
- location: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
149
- uri: string;
150
- localPath?: undefined;
151
- };
152
- indexType: string;
153
- };
154
- bamLocation?: undefined;
155
- cramLocation?: undefined;
156
- craiLocation?: undefined;
157
- gffGzLocation?: undefined;
158
- vcfLocation?: undefined;
159
- bedGzLocation?: undefined;
160
- bigBedLocation?: undefined;
161
- bigWigLocation?: undefined;
162
- fastaLocation?: undefined;
163
- faiLocation?: undefined;
164
- gziLocation?: undefined;
165
- twoBitLocation?: undefined;
166
- rootUrlTemplate?: undefined;
167
- endpoint?: undefined;
168
- hicLocation?: undefined;
169
- pafLocation?: undefined;
170
- } | {
171
- type: string;
172
- bedGzLocation: FileLocation;
173
- index: {
174
- location: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
175
- uri: string;
176
- localPath?: undefined;
177
- };
178
- indexType: string;
179
- };
180
- bamLocation?: undefined;
181
- cramLocation?: undefined;
182
- craiLocation?: undefined;
183
- gffGzLocation?: undefined;
184
- vcfLocation?: undefined;
185
- vcfGzLocation?: undefined;
186
- bigBedLocation?: undefined;
187
- bigWigLocation?: undefined;
188
- fastaLocation?: undefined;
189
- faiLocation?: undefined;
190
- gziLocation?: undefined;
191
- twoBitLocation?: undefined;
192
- rootUrlTemplate?: undefined;
193
- endpoint?: undefined;
194
- hicLocation?: undefined;
195
- pafLocation?: undefined;
196
- } | {
197
- type: string;
198
- bigBedLocation: FileLocation;
199
- bamLocation?: undefined;
200
- index?: undefined;
201
- cramLocation?: undefined;
202
- craiLocation?: undefined;
203
- gffGzLocation?: undefined;
204
- vcfLocation?: undefined;
205
- vcfGzLocation?: undefined;
206
- bedGzLocation?: undefined;
207
- bigWigLocation?: undefined;
208
- fastaLocation?: undefined;
209
- faiLocation?: undefined;
210
- gziLocation?: undefined;
211
- twoBitLocation?: undefined;
212
- rootUrlTemplate?: undefined;
213
- endpoint?: undefined;
214
- hicLocation?: undefined;
215
- pafLocation?: undefined;
216
- } | {
217
- type: string;
218
- bigWigLocation: FileLocation;
219
- bamLocation?: undefined;
220
- index?: undefined;
221
- cramLocation?: undefined;
222
- craiLocation?: undefined;
223
- gffGzLocation?: undefined;
224
- vcfLocation?: undefined;
225
- vcfGzLocation?: undefined;
226
- bedGzLocation?: undefined;
227
- bigBedLocation?: undefined;
228
- fastaLocation?: undefined;
229
- faiLocation?: undefined;
230
- gziLocation?: undefined;
231
- twoBitLocation?: undefined;
232
- rootUrlTemplate?: undefined;
233
- endpoint?: undefined;
234
- hicLocation?: undefined;
235
- pafLocation?: undefined;
236
- } | {
237
- type: string;
238
- fastaLocation: FileLocation;
239
- faiLocation: import("./types").LocalPathLocation | import("./types").UriLocation | import("./types").BlobLocation | {
240
- uri: string;
241
- localPath?: undefined;
242
- };
243
- bamLocation?: undefined;
244
- index?: undefined;
245
- cramLocation?: undefined;
246
- craiLocation?: undefined;
247
- gffGzLocation?: undefined;
248
- vcfLocation?: undefined;
249
- vcfGzLocation?: undefined;
250
- bedGzLocation?: undefined;
251
- bigBedLocation?: undefined;
252
- bigWigLocation?: undefined;
253
- gziLocation?: undefined;
254
- twoBitLocation?: undefined;
255
- rootUrlTemplate?: undefined;
256
- endpoint?: undefined;
257
- hicLocation?: undefined;
258
- pafLocation?: undefined;
259
- } | {
260
- type: string;
261
- fastaLocation: FileLocation;
262
- faiLocation: import("./types").BlobLocation | {
263
- uri: string;
264
- localPath?: undefined;
265
- } | {
266
- localPath: string;
267
- uri?: undefined;
268
- };
269
- gziLocation: import("./types").BlobLocation | {
270
- uri: string;
271
- localPath?: undefined;
272
- } | {
273
- localPath: string;
274
- uri?: undefined;
275
- };
276
- bamLocation?: undefined;
277
- index?: undefined;
278
- cramLocation?: undefined;
279
- craiLocation?: undefined;
280
- gffGzLocation?: undefined;
281
- vcfLocation?: undefined;
282
- vcfGzLocation?: undefined;
283
- bedGzLocation?: undefined;
284
- bigBedLocation?: undefined;
285
- bigWigLocation?: undefined;
286
- twoBitLocation?: undefined;
287
- rootUrlTemplate?: undefined;
288
- endpoint?: undefined;
289
- hicLocation?: undefined;
290
- pafLocation?: undefined;
291
- } | {
292
- type: string;
293
- twoBitLocation: FileLocation;
294
- bamLocation?: undefined;
295
- index?: undefined;
296
- cramLocation?: undefined;
297
- craiLocation?: undefined;
298
- gffGzLocation?: undefined;
299
- vcfLocation?: undefined;
300
- vcfGzLocation?: undefined;
301
- bedGzLocation?: undefined;
302
- bigBedLocation?: undefined;
303
- bigWigLocation?: undefined;
304
- fastaLocation?: undefined;
305
- faiLocation?: undefined;
306
- gziLocation?: undefined;
307
- rootUrlTemplate?: undefined;
308
- endpoint?: undefined;
309
- hicLocation?: undefined;
310
- pafLocation?: undefined;
311
- } | {
312
- type: string;
313
- rootUrlTemplate: FileLocation;
314
- bamLocation?: undefined;
315
- index?: undefined;
316
- cramLocation?: undefined;
317
- craiLocation?: undefined;
318
- gffGzLocation?: undefined;
319
- vcfLocation?: undefined;
320
- vcfGzLocation?: undefined;
321
- bedGzLocation?: undefined;
322
- bigBedLocation?: undefined;
323
- bigWigLocation?: undefined;
324
- fastaLocation?: undefined;
325
- faiLocation?: undefined;
326
- gziLocation?: undefined;
327
- twoBitLocation?: undefined;
328
- endpoint?: undefined;
329
- hicLocation?: undefined;
330
- pafLocation?: undefined;
331
- } | {
332
- type: string;
333
- endpoint: FileLocation;
334
- bamLocation?: undefined;
335
- index?: undefined;
336
- cramLocation?: undefined;
337
- craiLocation?: undefined;
338
- gffGzLocation?: undefined;
339
- vcfLocation?: undefined;
340
- vcfGzLocation?: undefined;
341
- bedGzLocation?: undefined;
342
- bigBedLocation?: undefined;
343
- bigWigLocation?: undefined;
344
- fastaLocation?: undefined;
345
- faiLocation?: undefined;
346
- gziLocation?: undefined;
347
- twoBitLocation?: undefined;
348
- rootUrlTemplate?: undefined;
349
- hicLocation?: undefined;
350
- pafLocation?: undefined;
351
- } | {
352
- type: string;
353
- hicLocation: FileLocation;
354
- bamLocation?: undefined;
355
- index?: undefined;
356
- cramLocation?: undefined;
357
- craiLocation?: undefined;
358
- gffGzLocation?: undefined;
359
- vcfLocation?: undefined;
360
- vcfGzLocation?: undefined;
361
- bedGzLocation?: undefined;
362
- bigBedLocation?: undefined;
363
- bigWigLocation?: undefined;
364
- fastaLocation?: undefined;
365
- faiLocation?: undefined;
366
- gziLocation?: undefined;
367
- twoBitLocation?: undefined;
368
- rootUrlTemplate?: undefined;
369
- endpoint?: undefined;
370
- pafLocation?: undefined;
30
+ /**
31
+ * creates a new location from the provided location including the appropriate suffix and location type
32
+ * @param location - the FileLocation
33
+ * @param suffix - the file suffix (e.g. .bam)
34
+ * @returns the constructed location object from the provided prameters
35
+ */
36
+ export declare function makeIndex(location: FileLocation, suffix: string): import("./types").BlobLocation | {
37
+ uri: string;
38
+ locationType: string;
39
+ localPath?: undefined;
371
40
  } | {
372
- type: string;
373
- pafLocation: FileLocation;
374
- bamLocation?: undefined;
375
- index?: undefined;
376
- cramLocation?: undefined;
377
- craiLocation?: undefined;
378
- gffGzLocation?: undefined;
379
- vcfLocation?: undefined;
380
- vcfGzLocation?: undefined;
381
- bedGzLocation?: undefined;
382
- bigBedLocation?: undefined;
383
- bigWigLocation?: undefined;
384
- fastaLocation?: undefined;
385
- faiLocation?: undefined;
386
- gziLocation?: undefined;
387
- twoBitLocation?: undefined;
388
- rootUrlTemplate?: undefined;
389
- endpoint?: undefined;
390
- hicLocation?: undefined;
41
+ localPath: string;
42
+ locationType: string;
43
+ uri?: undefined;
391
44
  };
392
- export declare function guessTrackType(adapterType: string): string;
45
+ /**
46
+ * constructs a potential index file (with suffix) from the provided file name
47
+ * @param name - the name of the index file
48
+ * @param typeA - one option of a potential two file suffix (e.g. CSI, BAI)
49
+ * @param typeB - the second option of a potential two file suffix (e.g. CSI, BAI)
50
+ * @returns a likely name of the index file for a given filename
51
+ */
52
+ export declare function makeIndexType(name: string | undefined, typeA: string, typeB: string): string;
53
+ export interface AdapterConfig {
54
+ type: string;
55
+ [key: string]: unknown;
56
+ }
57
+ export declare type AdapterGuesser = (file: FileLocation, index?: FileLocation, adapterHint?: string) => AdapterConfig | undefined;
58
+ export declare type TrackTypeGuesser = (adapterName: string) => string | undefined;
59
+ export declare function getFileName(track: FileLocation): string;
60
+ export declare function guessAdapter(file: FileLocation, index: FileLocation | undefined, adapterHint?: string, model?: IAnyStateTreeNode): AdapterConfig;
61
+ export declare function guessTrackType(adapterType: string, model?: IAnyStateTreeNode): string;
393
62
  export declare function generateUnsupportedTrackConf(trackName: string, trackUrl: string, categories: string[] | undefined): {
394
63
  type: string;
395
64
  name: string;