@jbrowse/plugin-sequence 1.7.11 → 2.0.0

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 (126) hide show
  1. package/dist/BgzipFastaAdapter/BgzipFastaAdapter.js +50 -68
  2. package/dist/BgzipFastaAdapter/BgzipFastaAdapter.js.map +1 -0
  3. package/dist/BgzipFastaAdapter/configSchema.js +31 -43
  4. package/dist/BgzipFastaAdapter/configSchema.js.map +1 -0
  5. package/dist/BgzipFastaAdapter/index.js +8 -14
  6. package/dist/BgzipFastaAdapter/index.js.map +1 -0
  7. package/dist/ChromSizesAdapter/ChromSizesAdapter.js +132 -166
  8. package/dist/ChromSizesAdapter/ChromSizesAdapter.js.map +1 -0
  9. package/dist/ChromSizesAdapter/configSchema.js +12 -21
  10. package/dist/ChromSizesAdapter/configSchema.js.map +1 -0
  11. package/dist/ChromSizesAdapter/index.js +8 -14
  12. package/dist/ChromSizesAdapter/index.js.map +1 -0
  13. package/dist/DivSequenceRenderer/components/DivSequenceRendering.js +130 -229
  14. package/dist/DivSequenceRenderer/components/DivSequenceRendering.js.map +1 -0
  15. package/dist/DivSequenceRenderer/configSchema.js +10 -19
  16. package/dist/DivSequenceRenderer/configSchema.js.map +1 -0
  17. package/dist/DivSequenceRenderer/index.js +10 -22
  18. package/dist/DivSequenceRenderer/index.js.map +1 -0
  19. package/dist/GCContentAdapter/GCContentAdapter.js +181 -248
  20. package/dist/GCContentAdapter/GCContentAdapter.js.map +1 -0
  21. package/dist/GCContentAdapter/configSchema.js +7 -16
  22. package/dist/GCContentAdapter/configSchema.js.map +1 -0
  23. package/dist/GCContentAdapter/index.js +33 -28
  24. package/dist/GCContentAdapter/index.js.map +1 -0
  25. package/dist/IndexedFastaAdapter/IndexedFastaAdapter.js +177 -266
  26. package/dist/IndexedFastaAdapter/IndexedFastaAdapter.js.map +1 -0
  27. package/dist/IndexedFastaAdapter/configSchema.js +21 -36
  28. package/dist/IndexedFastaAdapter/configSchema.js.map +1 -0
  29. package/dist/IndexedFastaAdapter/index.js +8 -14
  30. package/dist/IndexedFastaAdapter/index.js.map +1 -0
  31. package/dist/LinearReferenceSequenceDisplay/configSchema.js +5 -16
  32. package/dist/LinearReferenceSequenceDisplay/configSchema.js.map +1 -0
  33. package/dist/LinearReferenceSequenceDisplay/index.js +7 -20
  34. package/dist/LinearReferenceSequenceDisplay/index.js.map +1 -0
  35. package/dist/LinearReferenceSequenceDisplay/model.d.ts +17 -15
  36. package/dist/LinearReferenceSequenceDisplay/model.js +88 -99
  37. package/dist/LinearReferenceSequenceDisplay/model.js.map +1 -0
  38. package/dist/TwoBitAdapter/TwoBitAdapter.js +178 -274
  39. package/dist/TwoBitAdapter/TwoBitAdapter.js.map +1 -0
  40. package/dist/TwoBitAdapter/configSchema.js +16 -28
  41. package/dist/TwoBitAdapter/configSchema.js.map +1 -0
  42. package/dist/TwoBitAdapter/index.js +8 -14
  43. package/dist/TwoBitAdapter/index.js.map +1 -0
  44. package/dist/index.js +255 -312
  45. package/dist/index.js.map +1 -0
  46. package/dist/referenceSeqTrackConfig.js +71 -86
  47. package/dist/referenceSeqTrackConfig.js.map +1 -0
  48. package/esm/BgzipFastaAdapter/BgzipFastaAdapter.d.ts +7 -0
  49. package/esm/BgzipFastaAdapter/BgzipFastaAdapter.js +28 -0
  50. package/esm/BgzipFastaAdapter/BgzipFastaAdapter.js.map +1 -0
  51. package/esm/BgzipFastaAdapter/configSchema.d.ts +2 -0
  52. package/esm/BgzipFastaAdapter/configSchema.js +30 -0
  53. package/esm/BgzipFastaAdapter/configSchema.js.map +1 -0
  54. package/esm/BgzipFastaAdapter/index.d.ts +1 -0
  55. package/esm/BgzipFastaAdapter/index.js +2 -0
  56. package/esm/BgzipFastaAdapter/index.js.map +1 -0
  57. package/esm/ChromSizesAdapter/ChromSizesAdapter.d.ts +19 -0
  58. package/esm/ChromSizesAdapter/ChromSizesAdapter.js +45 -0
  59. package/esm/ChromSizesAdapter/ChromSizesAdapter.js.map +1 -0
  60. package/esm/ChromSizesAdapter/configSchema.d.ts +2 -0
  61. package/esm/ChromSizesAdapter/configSchema.js +11 -0
  62. package/esm/ChromSizesAdapter/configSchema.js.map +1 -0
  63. package/esm/ChromSizesAdapter/index.d.ts +1 -0
  64. package/esm/ChromSizesAdapter/index.js +2 -0
  65. package/esm/ChromSizesAdapter/index.js.map +1 -0
  66. package/esm/DivSequenceRenderer/components/DivSequenceRendering.d.ts +21 -0
  67. package/esm/DivSequenceRenderer/components/DivSequenceRendering.js +97 -0
  68. package/esm/DivSequenceRenderer/components/DivSequenceRendering.js.map +1 -0
  69. package/esm/DivSequenceRenderer/configSchema.d.ts +2 -0
  70. package/esm/DivSequenceRenderer/configSchema.js +9 -0
  71. package/esm/DivSequenceRenderer/configSchema.js.map +1 -0
  72. package/esm/DivSequenceRenderer/index.d.ts +2 -0
  73. package/esm/DivSequenceRenderer/index.js +3 -0
  74. package/esm/DivSequenceRenderer/index.js.map +1 -0
  75. package/esm/GCContentAdapter/GCContentAdapter.d.ts +23 -0
  76. package/esm/GCContentAdapter/GCContentAdapter.js +97 -0
  77. package/esm/GCContentAdapter/GCContentAdapter.js.map +1 -0
  78. package/esm/GCContentAdapter/configSchema.d.ts +3 -0
  79. package/esm/GCContentAdapter/configSchema.js +7 -0
  80. package/esm/GCContentAdapter/configSchema.js.map +1 -0
  81. package/esm/GCContentAdapter/index.d.ts +6 -0
  82. package/esm/GCContentAdapter/index.js +8 -0
  83. package/esm/GCContentAdapter/index.js.map +1 -0
  84. package/esm/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +27 -0
  85. package/esm/IndexedFastaAdapter/IndexedFastaAdapter.js +90 -0
  86. package/esm/IndexedFastaAdapter/IndexedFastaAdapter.js.map +1 -0
  87. package/esm/IndexedFastaAdapter/configSchema.d.ts +2 -0
  88. package/esm/IndexedFastaAdapter/configSchema.js +20 -0
  89. package/esm/IndexedFastaAdapter/configSchema.js.map +1 -0
  90. package/esm/IndexedFastaAdapter/index.d.ts +1 -0
  91. package/esm/IndexedFastaAdapter/index.js +2 -0
  92. package/esm/IndexedFastaAdapter/index.js.map +1 -0
  93. package/esm/LinearReferenceSequenceDisplay/configSchema.d.ts +1 -0
  94. package/esm/LinearReferenceSequenceDisplay/configSchema.js +4 -0
  95. package/esm/LinearReferenceSequenceDisplay/configSchema.js.map +1 -0
  96. package/esm/LinearReferenceSequenceDisplay/index.d.ts +2 -0
  97. package/esm/LinearReferenceSequenceDisplay/index.js +3 -0
  98. package/esm/LinearReferenceSequenceDisplay/index.js.map +1 -0
  99. package/esm/LinearReferenceSequenceDisplay/model.d.ts +210 -0
  100. package/esm/LinearReferenceSequenceDisplay/model.js +83 -0
  101. package/esm/LinearReferenceSequenceDisplay/model.js.map +1 -0
  102. package/esm/TwoBitAdapter/TwoBitAdapter.d.ts +26 -0
  103. package/esm/TwoBitAdapter/TwoBitAdapter.js +79 -0
  104. package/esm/TwoBitAdapter/TwoBitAdapter.js.map +1 -0
  105. package/esm/TwoBitAdapter/configSchema.d.ts +2 -0
  106. package/esm/TwoBitAdapter/configSchema.js +16 -0
  107. package/esm/TwoBitAdapter/configSchema.js.map +1 -0
  108. package/esm/TwoBitAdapter/index.d.ts +1 -0
  109. package/esm/TwoBitAdapter/index.js +2 -0
  110. package/esm/TwoBitAdapter/index.js.map +1 -0
  111. package/esm/index.d.ts +6 -0
  112. package/esm/index.js +197 -0
  113. package/esm/index.js.map +1 -0
  114. package/esm/referenceSeqTrackConfig.d.ts +2 -0
  115. package/esm/referenceSeqTrackConfig.js +63 -0
  116. package/esm/referenceSeqTrackConfig.js.map +1 -0
  117. package/package.json +16 -8
  118. package/src/DivSequenceRenderer/components/DivSequenceRendering.test.js +1 -1
  119. package/src/LinearReferenceSequenceDisplay/model.ts +4 -2
  120. package/dist/BgzipFastaAdapter/BgzipFastaAdapter.test.js +0 -64
  121. package/dist/ChromSizesAdapter/ChromSizesAdapter.test.js +0 -46
  122. package/dist/DivSequenceRenderer/components/DivSequenceRendering.test.js +0 -245
  123. package/dist/IndexedFastaAdapter/IndexedFastaAdapter.test.js +0 -81
  124. package/dist/TwoBitAdapter/TwoBitAdapter.test.js +0 -94
  125. package/dist/declare.d.js +0 -1
  126. package/dist/index.test.js +0 -29
@@ -1,93 +1,78 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.createReferenceSeqTrackConfig = createReferenceSeqTrackConfig;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- var _mobxStateTree = require("mobx-state-tree");
13
-
14
- var _configuration = require("@jbrowse/core/configuration");
15
-
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
-
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.createReferenceSeqTrackConfig = void 0;
15
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
+ var mobx_state_tree_1 = require("mobx-state-tree");
17
+ var configuration_1 = require("@jbrowse/core/configuration");
20
18
  /*
21
19
  Note: this is primarily a copy of createBaseTrackConfig, except with a subset
22
20
  of the config slots, to avoid including fields that don't make sense for the
23
21
  ReferenceSequenceTrack
24
22
  */
25
23
  function createReferenceSeqTrackConfig(pluginManager) {
26
- return (0, _configuration.ConfigurationSchema)('ReferenceSequenceTrack', {
27
- adapter: pluginManager.pluggableConfigSchemaType('adapter'),
28
- displays: _mobxStateTree.types.array(pluginManager.pluggableConfigSchemaType('display')),
29
- name: {
30
- type: 'string',
31
- description: 'optional track name',
32
- defaultValue: ''
33
- },
34
- metadata: {
35
- type: 'frozen',
36
- description: 'anything to add about this track',
37
- defaultValue: {}
38
- }
39
- }, {
40
- preProcessSnapshot: function preProcessSnapshot(s) {
41
- var snap = JSON.parse(JSON.stringify(s));
42
- var displayTypes = new Set();
43
- var _snap$displays = snap.displays,
44
- displays = _snap$displays === void 0 ? [] : _snap$displays;
45
-
46
- if (snap.trackId !== 'placeholderId') {
47
- // Gets the displays on the track snapshot and the possible displays
48
- // from the track type and adds any missing possible displays to the
49
- // snapshot
50
- displays.forEach(function (d) {
51
- return d && displayTypes.add(d.type);
52
- });
53
- var trackType = pluginManager.getTrackType(snap.type);
54
- trackType.displayTypes.forEach(function (displayType) {
55
- if (!displayTypes.has(displayType.name)) {
56
- displays.push({
57
- displayId: "".concat(snap.trackId, "-").concat(displayType.name),
58
- type: displayType.name
59
- });
60
- }
61
- });
62
- }
63
-
64
- return _objectSpread(_objectSpread({}, snap), {}, {
65
- displays: displays
66
- });
67
- },
68
- explicitIdentifier: 'trackId',
69
- explicitlyTyped: true,
70
- actions: function actions(self) {
71
- return {
72
- addDisplayConf: function addDisplayConf(displayConf) {
73
- var type = displayConf.type;
74
-
75
- if (!type) {
76
- throw new Error("unknown display type ".concat(type));
77
- }
78
-
79
- var display = self.displays.find(function (d) {
80
- return d && d.displayId === displayConf.displayId;
81
- });
82
-
83
- if (display) {
84
- return display;
85
- }
86
-
87
- var length = self.displays.push(displayConf);
88
- return self.displays[length - 1];
89
- }
90
- };
91
- }
92
- });
93
- }
24
+ return (0, configuration_1.ConfigurationSchema)('ReferenceSequenceTrack', {
25
+ adapter: pluginManager.pluggableConfigSchemaType('adapter'),
26
+ displays: mobx_state_tree_1.types.array(pluginManager.pluggableConfigSchemaType('display')),
27
+ name: {
28
+ type: 'string',
29
+ description: 'optional track name',
30
+ defaultValue: '',
31
+ },
32
+ metadata: {
33
+ type: 'frozen',
34
+ description: 'anything to add about this track',
35
+ defaultValue: {},
36
+ },
37
+ }, {
38
+ preProcessSnapshot: function (s) {
39
+ var snap = JSON.parse(JSON.stringify(s));
40
+ var displayTypes = new Set();
41
+ var _a = snap.displays, displays = _a === void 0 ? [] : _a;
42
+ if (snap.trackId !== 'placeholderId') {
43
+ // Gets the displays on the track snapshot and the possible displays
44
+ // from the track type and adds any missing possible displays to the
45
+ // snapshot
46
+ displays.forEach(function (d) { return d && displayTypes.add(d.type); });
47
+ var trackType = pluginManager.getTrackType(snap.type);
48
+ trackType.displayTypes.forEach(function (displayType) {
49
+ if (!displayTypes.has(displayType.name)) {
50
+ displays.push({
51
+ displayId: "".concat(snap.trackId, "-").concat(displayType.name),
52
+ type: displayType.name,
53
+ });
54
+ }
55
+ });
56
+ }
57
+ return __assign(__assign({}, snap), { displays: displays });
58
+ },
59
+ explicitIdentifier: 'trackId',
60
+ explicitlyTyped: true,
61
+ actions: function (self) { return ({
62
+ addDisplayConf: function (displayConf) {
63
+ var type = displayConf.type;
64
+ if (!type) {
65
+ throw new Error("unknown display type ".concat(type));
66
+ }
67
+ var display = self.displays.find(function (d) { return d && d.displayId === displayConf.displayId; });
68
+ if (display) {
69
+ return display;
70
+ }
71
+ var length = self.displays.push(displayConf);
72
+ return self.displays[length - 1];
73
+ },
74
+ }); },
75
+ });
76
+ }
77
+ exports.createReferenceSeqTrackConfig = createReferenceSeqTrackConfig;
78
+ //# sourceMappingURL=referenceSeqTrackConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"referenceSeqTrackConfig.js","sourceRoot":"","sources":["../src/referenceSeqTrackConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,mDAAuC;AACvC,6DAAiE;AAGjE;;;;EAIE;AACF,SAAgB,6BAA6B,CAAC,aAA4B;IACxE,OAAO,IAAA,mCAAmB,EACxB,wBAAwB,EACxB;QACE,OAAO,EAAE,aAAa,CAAC,yBAAyB,CAAC,SAAS,CAAC;QAC3D,QAAQ,EAAE,uBAAK,CAAC,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC;QACzE,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qBAAqB;YAClC,YAAY,EAAE,EAAE;SACjB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kCAAkC;YAC/C,YAAY,EAAE,EAAE;SACjB;KACF,EACD;QACE,kBAAkB,EAAE,UAAA,CAAC;YACnB,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;YAC1C,IAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAA;YACtB,IAAA,KAAkB,IAAI,SAAT,EAAb,QAAQ,mBAAG,EAAE,KAAA,CAAS;YAC9B,IAAI,IAAI,CAAC,OAAO,KAAK,eAAe,EAAE;gBACpC,oEAAoE;gBACpE,oEAAoE;gBACpE,WAAW;gBACX,QAAQ,CAAC,OAAO,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAA7B,CAA6B,CAAC,CAAA;gBAC3D,IAAM,SAAS,GAAG,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACvD,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,UAAA,WAAW;oBACxC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;wBACvC,QAAQ,CAAC,IAAI,CAAC;4BACZ,SAAS,EAAE,UAAG,IAAI,CAAC,OAAO,cAAI,WAAW,CAAC,IAAI,CAAE;4BAChD,IAAI,EAAE,WAAW,CAAC,IAAI;yBACvB,CAAC,CAAA;qBACH;gBACH,CAAC,CAAC,CAAA;aACH;YACD,6BAAY,IAAI,KAAE,QAAQ,UAAA,IAAE;QAC9B,CAAC;QACD,kBAAkB,EAAE,SAAS;QAC7B,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,UAAC,IAAS,IAAK,OAAA,CAAC;YACvB,cAAc,EAAd,UAAe,WAAgD;gBACrD,IAAA,IAAI,GAAK,WAAW,KAAhB,CAAgB;gBAC5B,IAAI,CAAC,IAAI,EAAE;oBACT,MAAM,IAAI,KAAK,CAAC,+BAAwB,IAAI,CAAE,CAAC,CAAA;iBAChD;gBACD,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAChC,UAAC,CAAM,IAAK,OAAA,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,WAAW,CAAC,SAAS,EAA1C,CAA0C,CACvD,CAAA;gBACD,IAAI,OAAO,EAAE;oBACX,OAAO,OAAO,CAAA;iBACf;gBACD,IAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YAClC,CAAC;SACF,CAAC,EAfsB,CAetB;KACH,CACF,CAAA;AACH,CAAC;AA3DD,sEA2DC"}
@@ -0,0 +1,7 @@
1
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
2
+ import IndexedFasta from '../IndexedFastaAdapter/IndexedFastaAdapter';
3
+ import PluginManager from '@jbrowse/core/PluginManager';
4
+ import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
5
+ export default class extends IndexedFasta {
6
+ constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
7
+ }
@@ -0,0 +1,28 @@
1
+ import { BgzipIndexedFasta } from '@gmod/indexedfasta';
2
+ import { openLocation } from '@jbrowse/core/util/io';
3
+ import { readConfObject } from '@jbrowse/core/configuration';
4
+ import IndexedFasta from '../IndexedFastaAdapter/IndexedFastaAdapter';
5
+ export default class extends IndexedFasta {
6
+ constructor(config, getSubAdapter, pluginManager) {
7
+ super(config, getSubAdapter, pluginManager);
8
+ const fastaLocation = readConfObject(config, 'fastaLocation');
9
+ const faiLocation = readConfObject(config, 'faiLocation');
10
+ const gziLocation = readConfObject(config, 'gziLocation');
11
+ if (!fastaLocation) {
12
+ throw new Error('must provide fastaLocation');
13
+ }
14
+ if (!faiLocation) {
15
+ throw new Error('must provide faiLocation');
16
+ }
17
+ if (!gziLocation) {
18
+ throw new Error('must provide gziLocation');
19
+ }
20
+ const fastaOpts = {
21
+ fasta: openLocation(fastaLocation, this.pluginManager),
22
+ fai: openLocation(faiLocation, this.pluginManager),
23
+ gzi: openLocation(gziLocation, this.pluginManager),
24
+ };
25
+ this.fasta = new BgzipIndexedFasta(fastaOpts);
26
+ }
27
+ }
28
+ //# sourceMappingURL=BgzipFastaAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BgzipFastaAdapter.js","sourceRoot":"","sources":["../../src/BgzipFastaAdapter/BgzipFastaAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,YAAY,MAAM,4CAA4C,CAAA;AAIrE,MAAM,CAAC,OAAO,MAAO,SAAQ,YAAY;IACvC,YACE,MAA6B,EAC7B,aAAiC,EACjC,aAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;QAC3C,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;QAC7D,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;QACzD,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;QACzD,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC9C;QACD,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;SAC5C;QACD,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;SAC5C;QACD,MAAM,SAAS,GAAG;YAChB,KAAK,EAAE,YAAY,CAAC,aAA6B,EAAE,IAAI,CAAC,aAAa,CAAC;YACtE,GAAG,EAAE,YAAY,CAAC,WAA2B,EAAE,IAAI,CAAC,aAAa,CAAC;YAClE,GAAG,EAAE,YAAY,CAAC,WAA2B,EAAE,IAAI,CAAC,aAAa,CAAC;SACnE,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAA;IAC/C,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ export default ConfigurationSchema('BgzipFastaAdapter', {
3
+ fastaLocation: {
4
+ type: 'fileLocation',
5
+ defaultValue: { uri: '/path/to/seq.fa.gz', locationType: 'UriLocation' },
6
+ },
7
+ faiLocation: {
8
+ type: 'fileLocation',
9
+ defaultValue: {
10
+ uri: '/path/to/seq.fa.gz.fai',
11
+ locationType: 'UriLocation',
12
+ },
13
+ },
14
+ metadataLocation: {
15
+ description: 'Optional metadata file',
16
+ type: 'fileLocation',
17
+ defaultValue: {
18
+ uri: '/path/to/fa.metadata.yaml',
19
+ locationType: 'UriLocation',
20
+ },
21
+ },
22
+ gziLocation: {
23
+ type: 'fileLocation',
24
+ defaultValue: {
25
+ uri: '/path/to/seq.fa.gz.gzi',
26
+ locationType: 'UriLocation',
27
+ },
28
+ },
29
+ }, { explicitlyTyped: true });
30
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/BgzipFastaAdapter/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,eAAe,mBAAmB,CAChC,mBAAmB,EACnB;IACE,aAAa,EAAE;QACb,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE;KACzE;IACD,WAAW,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE;YACZ,GAAG,EAAE,wBAAwB;YAC7B,YAAY,EAAE,aAAa;SAC5B;KACF;IACD,gBAAgB,EAAE;QAChB,WAAW,EAAE,wBAAwB;QACrC,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE;YACZ,GAAG,EAAE,2BAA2B;YAChC,YAAY,EAAE,aAAa;SAC5B;KACF;IACD,WAAW,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE;YACZ,GAAG,EAAE,wBAAwB;YAC7B,YAAY,EAAE,aAAa;SAC5B;KACF;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,CAAA"}
@@ -0,0 +1 @@
1
+ export { default as configSchema } from './configSchema';
@@ -0,0 +1,2 @@
1
+ export { default as configSchema } from './configSchema';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/BgzipFastaAdapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { RegionsAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { Instance } from 'mobx-state-tree';
3
+ import MyConfigSchema from './configSchema';
4
+ import PluginManager from '@jbrowse/core/PluginManager';
5
+ import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
6
+ export default class extends BaseAdapter implements RegionsAdapter {
7
+ protected refSeqs: Promise<Record<string, number>>;
8
+ protected source: string;
9
+ constructor(config: Instance<typeof MyConfigSchema>, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
10
+ private init;
11
+ getRegions(): Promise<{
12
+ refName: string;
13
+ start: number;
14
+ end: number;
15
+ }[]>;
16
+ getFeatures(): void;
17
+ getHeader(): {};
18
+ freeResources(): void;
19
+ }
@@ -0,0 +1,45 @@
1
+ import { BaseAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { openLocation } from '@jbrowse/core/util/io';
3
+ import { readConfObject } from '@jbrowse/core/configuration';
4
+ export default class extends BaseAdapter {
5
+ constructor(config, getSubAdapter, pluginManager) {
6
+ super(config, getSubAdapter, pluginManager);
7
+ const chromSizesLocation = readConfObject(config, 'chromSizesLocation');
8
+ if (!chromSizesLocation) {
9
+ throw new Error('must provide chromSizesLocation');
10
+ }
11
+ const file = openLocation(chromSizesLocation, this.pluginManager);
12
+ this.source = file.toString();
13
+ this.refSeqs = this.init(file);
14
+ }
15
+ async init(file) {
16
+ const data = await file.readFile('utf8');
17
+ const refSeqs = {};
18
+ if (!data.length) {
19
+ throw new Error(`Could not read file ${file.toString()}`);
20
+ }
21
+ data.split('\n').forEach((line) => {
22
+ if (line.length) {
23
+ const [name, length] = line.split('\t');
24
+ refSeqs[name] = +length;
25
+ }
26
+ });
27
+ return refSeqs;
28
+ }
29
+ async getRegions() {
30
+ const refSeqs = await this.refSeqs;
31
+ return Object.keys(refSeqs).map(refName => ({
32
+ refName,
33
+ start: 0,
34
+ end: refSeqs[refName],
35
+ }));
36
+ }
37
+ getFeatures() {
38
+ throw new Error('sequence not available');
39
+ }
40
+ getHeader() {
41
+ return {};
42
+ }
43
+ freeResources( /* { region } */) { }
44
+ }
45
+ //# sourceMappingURL=ChromSizesAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChromSizesAdapter.js","sourceRoot":"","sources":["../../src/ChromSizesAdapter/ChromSizesAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GACZ,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAM5D,MAAM,CAAC,OAAO,MAAO,SAAQ,WAAW;IAMtC,YACE,MAAuC,EACvC,aAAiC,EACjC,aAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;QAC3C,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;QACvE,IAAI,CAAC,kBAAkB,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;SACnD;QACD,MAAM,IAAI,GAAG,YAAY,CACvB,kBAAkC,EAClC,IAAI,CAAC,aAAa,CACnB,CAAA;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAEO,KAAK,CAAC,IAAI,CAAC,IAAuB;QACxC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACxC,MAAM,OAAO,GAA8B,EAAE,CAAA;QAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;SAC1D;QACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;YACxC,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBACvC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAA;aACxB;QACH,CAAC,CAAC,CAAA;QACF,OAAO,OAAO,CAAA;IAChB,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAA;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC1C,OAAO;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC;SACtB,CAAC,CAAC,CAAA;IACL,CAAC;IAEM,WAAW;QAChB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;IAC3C,CAAC;IAEM,SAAS;QACd,OAAO,EAAE,CAAA;IACX,CAAC;IAEM,aAAa,EAAC,gBAAgB,IAAS,CAAC;CAChD"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ export default ConfigurationSchema('ChromSizesAdapter', {
3
+ chromSizesLocation: {
4
+ type: 'fileLocation',
5
+ defaultValue: {
6
+ uri: '/path/to/species.chrom.sizes',
7
+ locationType: 'UriLocation',
8
+ },
9
+ },
10
+ }, { explicitlyTyped: true });
11
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/ChromSizesAdapter/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,eAAe,mBAAmB,CAChC,mBAAmB,EACnB;IACE,kBAAkB,EAAE;QAClB,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE;YACZ,GAAG,EAAE,8BAA8B;YACnC,YAAY,EAAE,aAAa;SAC5B;KACF;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,CAAA"}
@@ -0,0 +1 @@
1
+ export { default as configSchema } from './configSchema';
@@ -0,0 +1,2 @@
1
+ export { default as configSchema } from './configSchema';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ChromSizesAdapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
3
+ import { Feature } from '@jbrowse/core/util/simpleFeature';
4
+ import { Region } from '@jbrowse/core/util/types';
5
+ interface MyProps {
6
+ exportSVG?: {
7
+ rasterizeLayers: boolean;
8
+ };
9
+ features: Map<string, Feature>;
10
+ regions: Region[];
11
+ bpPerPx: number;
12
+ config: AnyConfigurationModel;
13
+ highResolutionScaling: number;
14
+ theme: any;
15
+ showForward: boolean;
16
+ showReverse: boolean;
17
+ showTranslation: boolean;
18
+ }
19
+ declare function Sequence(props: MyProps): JSX.Element;
20
+ declare const _default: typeof Sequence;
21
+ export default _default;
@@ -0,0 +1,97 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import React from 'react';
3
+ import { contrastingTextColor } from '@jbrowse/core/util/color';
4
+ import { createJBrowseTheme } from '@jbrowse/core/ui';
5
+ import { observer } from 'mobx-react';
6
+ import { bpSpanPx, revcom, complement, defaultStarts, defaultStops, defaultCodonTable, generateCodonTable, } from '@jbrowse/core/util';
7
+ function Translation(props) {
8
+ const { codonTable, seq, frame, bpPerPx, region, height, y, reverse = false, theme, } = props;
9
+ const scale = bpPerPx;
10
+ // the tilt variable normalizes the frame to where we are starting from,
11
+ // which increases consistency across blocks
12
+ const tilt = 3 - (region.start % 3);
13
+ // the effectiveFrame incorporates tilt and the frame to say what the
14
+ // effective frame that is plotted. The +3 is for when frame is -2 and this
15
+ // can otherwise result in effectiveFrame -1
16
+ const effectiveFrame = (frame + tilt + 3) % 3;
17
+ const seqSliced = seq.slice(effectiveFrame);
18
+ const translated = [];
19
+ for (let i = 0; i < seqSliced.length; i += 3) {
20
+ const codon = seqSliced.slice(i, i + 3);
21
+ const normalizedCodon = reverse ? revcom(codon) : codon;
22
+ const aminoAcid = codonTable[normalizedCodon] || '';
23
+ translated.push({ letter: aminoAcid, codon: normalizedCodon.toUpperCase() });
24
+ }
25
+ const w = (1 / scale) * 3;
26
+ const drop = region.start === 0 ? 0 : w;
27
+ const render = 1 / bpPerPx >= 12;
28
+ const width = (region.end - region.start) / bpPerPx;
29
+ const map = ['#d8d8d8', '#adadad', '#8f8f8f'].reverse();
30
+ return (React.createElement(React.Fragment, null, translated.map((element, index) => {
31
+ const x = region.reversed
32
+ ? width - (w * (index + 1) + effectiveFrame / scale - drop)
33
+ : w * index + effectiveFrame / scale - drop;
34
+ const { letter, codon } = element;
35
+ return (React.createElement(React.Fragment, { key: `${index}-${letter}` },
36
+ React.createElement("rect", { x: x, y: y, width: render ? w : w + 0.7 /* small fudge factor when zoomed out*/, height: height, stroke: render ? '#555' : 'none', fill: defaultStarts.includes(codon)
37
+ ? theme.palette.startCodon
38
+ : defaultStops.includes(codon)
39
+ ? theme.palette.stopCodon
40
+ : map[Math.abs(frame)] }),
41
+ render ? (React.createElement("text", { x: x + w / 2, y: y + height / 2, dominantBaseline: "middle", textAnchor: "middle" }, letter)) : null));
42
+ })));
43
+ }
44
+ function DNA(props) {
45
+ const { bpPerPx, region, feature, theme, height, seq, y } = props;
46
+ const render = 1 / bpPerPx >= 12;
47
+ const [leftPx, rightPx] = bpSpanPx(feature.get('start'), feature.get('end'), region, bpPerPx);
48
+ const reverse = region.reversed;
49
+ const len = feature.get('end') - feature.get('start');
50
+ const w = Math.max((rightPx - leftPx) / len, 0.8);
51
+ return (React.createElement(React.Fragment, null, seq.split('').map((letter, index) => {
52
+ const color = theme.palette.bases[letter.toUpperCase()];
53
+ const x = reverse ? rightPx - (index + 1) * w : leftPx + index * w;
54
+ return (React.createElement(React.Fragment, { key: index },
55
+ React.createElement("rect", { x: x, y: y, width: w, height: height, fill: color ? color.main : '#aaa', stroke: render ? '#555' : 'none' }),
56
+ render ? (React.createElement("text", { x: x + w / 2, y: y + height / 2, dominantBaseline: "middle", textAnchor: "middle", fill: color ? contrastingTextColor(color.main) : 'black' }, letter)) : null));
57
+ })));
58
+ }
59
+ const SequenceSVG = ({ regions, theme: configTheme, features = new Map(), showReverse, showForward, showTranslation, bpPerPx, }) => {
60
+ const [region] = regions;
61
+ const theme = createJBrowseTheme(configTheme);
62
+ const codonTable = generateCodonTable(defaultCodonTable);
63
+ const height = 20;
64
+ const [feature] = [...features.values()];
65
+ if (!feature) {
66
+ return null;
67
+ }
68
+ const seq = feature.get('seq');
69
+ if (!seq) {
70
+ return null;
71
+ }
72
+ // incrementer for the y-position of the current sequence being rendered
73
+ // (applies to both translation rows and dna rows)
74
+ let currY = -20;
75
+ return (React.createElement(React.Fragment, null,
76
+ showTranslation && (region.reversed ? showReverse : showForward)
77
+ ? [2, 1, 0].map(index => (React.createElement(Translation, { key: `translation-${index}`, seq: seq, y: (currY += 20), codonTable: codonTable, frame: index, bpPerPx: bpPerPx, region: region, theme: theme, height: height, reverse: region.reversed })))
78
+ : null,
79
+ showForward ? (React.createElement(DNA, { height: height, y: (currY += 20), feature: feature, region: region, seq: region.reversed ? complement(seq) : seq, bpPerPx: bpPerPx, theme: theme })) : null,
80
+ showReverse ? (React.createElement(DNA, { height: height, y: (currY += 20), feature: feature, region: region, seq: region.reversed ? seq : complement(seq), bpPerPx: bpPerPx, theme: theme })) : null,
81
+ showTranslation && (region.reversed ? showForward : showReverse)
82
+ ? [0, -1, -2].map(index => (React.createElement(Translation, { key: `rev-translation-${index}`, seq: seq, y: (currY += 20), codonTable: codonTable, frame: index, bpPerPx: bpPerPx, region: region, theme: theme, height: height, reverse: !region.reversed })))
83
+ : null));
84
+ };
85
+ const Wrapper = ({ exportSVG, width, totalHeight, children }) => {
86
+ return exportSVG ? (React.createElement(React.Fragment, null, children)) : (React.createElement("svg", { "data-testid": "sequence_track", width: width, height: totalHeight, style: { width, height: totalHeight } }, children));
87
+ };
88
+ function Sequence(props) {
89
+ const { regions, bpPerPx } = props;
90
+ const [region] = regions;
91
+ const width = (region.end - region.start) / bpPerPx;
92
+ const totalHeight = 200;
93
+ return (React.createElement(Wrapper, { ...props, totalHeight: totalHeight, width: width },
94
+ React.createElement(SequenceSVG, { ...props })));
95
+ }
96
+ export default observer(Sequence);
97
+ //# sourceMappingURL=DivSequenceRendering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DivSequenceRendering.js","sourceRoot":"","sources":["../../../src/DivSequenceRenderer/components/DivSequenceRendering.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAG/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAe3B,SAAS,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WAAW,EAAE,IAEpC,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IAClC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAA;IACxB,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAA;IACnD,MAAM,WAAW,GAAG,GAAG,CAAA;IAEvB,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;QACxD,oBAAC,WAAW,OAAK,KAAK,GAAI,CAClB,CACX,CAAA;AACH,CAAC;AAED,eAAe,QAAQ,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ export default ConfigurationSchema('DivSequenceRenderer', {
3
+ height: {
4
+ type: 'number',
5
+ description: 'height in pixels of each line of sequence',
6
+ defaultValue: 16,
7
+ },
8
+ }, { explicitlyTyped: true });
9
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/DivSequenceRenderer/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,eAAe,mBAAmB,CAChC,qBAAqB,EACrB;IACE,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,2CAA2C;QACxD,YAAY,EAAE,EAAE;KACjB;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as ReactComponent } from './components/DivSequenceRendering';
2
+ export { default as configSchema } from './configSchema';
@@ -0,0 +1,3 @@
1
+ export { default as ReactComponent } from './components/DivSequenceRendering';
2
+ export { default as configSchema } from './configSchema';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DivSequenceRenderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { Region } from '@jbrowse/core/util/types';
3
+ import { Feature } from '@jbrowse/core/util/simpleFeature';
4
+ export default class extends BaseFeatureDataAdapter {
5
+ private windowSize;
6
+ private windowDelta;
7
+ private gcMode;
8
+ static capabilities: string[];
9
+ configure(): Promise<BaseFeatureDataAdapter>;
10
+ getRefNames(): Promise<string[]>;
11
+ /**
12
+ * Fetch features for a certain region
13
+ * @param param -
14
+ * @returns Observable of Feature objects in the region
15
+ */
16
+ getFeatures(query: Region, opts: BaseOptions): import("rxjs").Observable<Feature>;
17
+ /**
18
+ * called to provide a hint that data tied to a certain region
19
+ * will not be needed for the forseeable future and can be purged
20
+ * from caches, etc
21
+ */
22
+ freeResources(): void;
23
+ }