@jbrowse/plugin-legacy-jbrowse 1.7.0 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JBrowse1Connection/configSchema.d.ts +2 -2
- package/dist/JBrowse1Connection/configSchema.js +2 -2
- package/dist/JBrowse1Connection/index.d.ts +2 -2
- package/dist/JBrowse1Connection/index.js +2 -2
- package/dist/JBrowse1Connection/jb1ConfigLoad.d.ts +36 -36
- package/dist/JBrowse1Connection/jb1ConfigLoad.js +16 -16
- package/dist/JBrowse1Connection/jb1ConfigParse.d.ts +11 -11
- package/dist/JBrowse1Connection/jb1ConfigParse.js +6 -6
- package/dist/JBrowse1Connection/jb1ToJb2.d.ts +47 -47
- package/dist/JBrowse1Connection/jb1ToJb2.js +3 -3
- package/dist/JBrowse1Connection/model.d.ts +15 -4
- package/dist/JBrowse1Connection/model.js +3 -3
- package/dist/JBrowse1Connection/types.d.ts +91 -91
- package/dist/JBrowse1Connection/util.d.ts +26 -26
- package/dist/JBrowse1Connection/util.js +3 -3
- package/dist/JBrowse1TextSeachAdapter/HttpMap.d.ts +39 -39
- package/dist/JBrowse1TextSeachAdapter/HttpMap.js +22 -22
- package/dist/JBrowse1TextSeachAdapter/HttpMap.test.js +12 -12
- package/dist/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.d.ts +33 -33
- package/dist/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.js +18 -18
- package/dist/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.test.js +9 -9
- package/dist/JBrowse1TextSeachAdapter/configSchema.d.ts +2 -2
- package/dist/JBrowse1TextSeachAdapter/configSchema.js +2 -2
- package/dist/JBrowse1TextSeachAdapter/index.d.ts +2 -2
- package/dist/JBrowse1TextSeachAdapter/index.js +2 -2
- package/dist/NCListAdapter/NCListAdapter.d.ts +31 -31
- package/dist/NCListAdapter/NCListAdapter.js +17 -17
- package/dist/NCListAdapter/NCListAdapter.test.js +5 -5
- package/dist/NCListAdapter/NCListFeature.d.ts +31 -31
- package/dist/NCListAdapter/NCListFeature.js +6 -6
- package/dist/NCListAdapter/configSchema.d.ts +2 -2
- package/dist/NCListAdapter/configSchema.js +2 -2
- package/dist/NCListAdapter/index.d.ts +1 -1
- package/dist/NCListAdapter/index.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -13
- package/dist/index.test.js +3 -3
- package/package.json +5 -3
- package/dist/index.test.d.ts +0 -1
- package/dist/plugin-legacy-jbrowse.cjs.development.js +0 -3567
- package/dist/plugin-legacy-jbrowse.cjs.development.js.map +0 -1
- package/dist/plugin-legacy-jbrowse.cjs.production.min.js +0 -2
- package/dist/plugin-legacy-jbrowse.cjs.production.min.js.map +0 -1
- package/dist/plugin-legacy-jbrowse.esm.js +0 -3561
- package/dist/plugin-legacy-jbrowse.esm.js.map +0 -1
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
Object.defineProperty(exports, "AdapterClass", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return _JBrowse1TextSearchAdapter
|
|
11
|
+
return _JBrowse1TextSearchAdapter.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "configSchema", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return _configSchema
|
|
17
|
+
return _configSchema.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Region } from '@jbrowse/core/util/types';
|
|
2
|
-
import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
-
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
|
-
import { Instance } from 'mobx-state-tree';
|
|
5
|
-
import NCListFeature from './NCListFeature';
|
|
6
|
-
import MyConfigSchema from './configSchema';
|
|
7
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
8
|
-
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
9
|
-
export default class NCListAdapter extends BaseFeatureDataAdapter {
|
|
10
|
-
private nclist;
|
|
11
|
-
private configRefNames?;
|
|
12
|
-
constructor(config: Instance<typeof MyConfigSchema>, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
13
|
-
/**
|
|
14
|
-
* Fetch features for a certain region. Use getFeaturesInRegion() if you also
|
|
15
|
-
* want to verify that the store has features for the given reference sequence
|
|
16
|
-
* before fetching.
|
|
17
|
-
* @param region -
|
|
18
|
-
* @param opts - [signal] optional signalling object for aborting the fetch
|
|
19
|
-
* @returns Observable of Feature objects in the region
|
|
20
|
-
*/
|
|
21
|
-
getFeatures(region: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
22
|
-
wrapFeature(ncFeature: any): NCListFeature;
|
|
23
|
-
hasDataForRefName(refName: string): Promise<boolean>;
|
|
24
|
-
getRefNames(): Promise<string[]>;
|
|
25
|
-
/**
|
|
26
|
-
* called to provide a hint that data tied to a certain region
|
|
27
|
-
* will not be needed for the forseeable future and can be purged
|
|
28
|
-
* from caches, etc
|
|
29
|
-
*/
|
|
30
|
-
freeResources(): void;
|
|
31
|
-
}
|
|
1
|
+
import { Region } from '@jbrowse/core/util/types';
|
|
2
|
+
import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
|
+
import { Instance } from 'mobx-state-tree';
|
|
5
|
+
import NCListFeature from './NCListFeature';
|
|
6
|
+
import MyConfigSchema from './configSchema';
|
|
7
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
8
|
+
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
9
|
+
export default class NCListAdapter extends BaseFeatureDataAdapter {
|
|
10
|
+
private nclist;
|
|
11
|
+
private configRefNames?;
|
|
12
|
+
constructor(config: Instance<typeof MyConfigSchema>, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
13
|
+
/**
|
|
14
|
+
* Fetch features for a certain region. Use getFeaturesInRegion() if you also
|
|
15
|
+
* want to verify that the store has features for the given reference sequence
|
|
16
|
+
* before fetching.
|
|
17
|
+
* @param region -
|
|
18
|
+
* @param opts - [signal] optional signalling object for aborting the fetch
|
|
19
|
+
* @returns Observable of Feature objects in the region
|
|
20
|
+
*/
|
|
21
|
+
getFeatures(region: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
22
|
+
wrapFeature(ncFeature: any): NCListFeature;
|
|
23
|
+
hasDataForRefName(refName: string): Promise<boolean>;
|
|
24
|
+
getRefNames(): Promise<string[]>;
|
|
25
|
+
/**
|
|
26
|
+
* called to provide a hint that data tied to a certain region
|
|
27
|
+
* will not be needed for the forseeable future and can be purged
|
|
28
|
+
* from caches, etc
|
|
29
|
+
*/
|
|
30
|
+
freeResources(): void;
|
|
31
|
+
}
|
|
@@ -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
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
@@ -39,16 +39,16 @@ var _configuration = require("@jbrowse/core/configuration");
|
|
|
39
39
|
|
|
40
40
|
var _NCListFeature = _interopRequireDefault(require("./NCListFeature"));
|
|
41
41
|
|
|
42
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2
|
|
42
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
43
43
|
|
|
44
44
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
45
|
|
|
46
46
|
function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
47
47
|
|
|
48
|
-
function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); },
|
|
48
|
+
function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(value) { var ret = this.s.return; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, throw: function _throw(value) { var thr = this.s.return; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
|
|
49
49
|
|
|
50
50
|
var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
51
|
-
(0, _inherits2
|
|
51
|
+
(0, _inherits2.default)(NCListAdapter, _BaseFeatureDataAdapt);
|
|
52
52
|
|
|
53
53
|
var _super = _createSuper(NCListAdapter);
|
|
54
54
|
|
|
@@ -56,14 +56,14 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
56
56
|
function NCListAdapter(config, getSubAdapter, pluginManager) {
|
|
57
57
|
var _this;
|
|
58
58
|
|
|
59
|
-
(0, _classCallCheck2
|
|
59
|
+
(0, _classCallCheck2.default)(this, NCListAdapter);
|
|
60
60
|
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
61
|
-
(0, _defineProperty2
|
|
62
|
-
(0, _defineProperty2
|
|
61
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "nclist", void 0);
|
|
62
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "configRefNames", void 0);
|
|
63
63
|
var refNames = (0, _configuration.readConfObject)(config, 'refNames');
|
|
64
64
|
var rootUrlTemplate = (0, _configuration.readConfObject)(config, 'rootUrlTemplate');
|
|
65
65
|
_this.configRefNames = refNames;
|
|
66
|
-
_this.nclist = new _nclist
|
|
66
|
+
_this.nclist = new _nclist.default({
|
|
67
67
|
baseUrl: '',
|
|
68
68
|
urlTemplate: rootUrlTemplate.uri,
|
|
69
69
|
readFile: function readFile(url) {
|
|
@@ -82,17 +82,17 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
82
82
|
*/
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
(0, _createClass2
|
|
85
|
+
(0, _createClass2.default)(NCListAdapter, [{
|
|
86
86
|
key: "getFeatures",
|
|
87
87
|
value: function getFeatures(region) {
|
|
88
88
|
var _this2 = this;
|
|
89
89
|
|
|
90
90
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
91
91
|
return (0, _rxjs.ObservableCreate)( /*#__PURE__*/function () {
|
|
92
|
-
var _ref = (0, _asyncToGenerator2
|
|
92
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(observer) {
|
|
93
93
|
var signal, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, feature;
|
|
94
94
|
|
|
95
|
-
return _regenerator
|
|
95
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
96
96
|
while (1) {
|
|
97
97
|
switch (_context.prev = _context.next) {
|
|
98
98
|
case 0:
|
|
@@ -135,13 +135,13 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
135
135
|
_context.prev = 20;
|
|
136
136
|
_context.prev = 21;
|
|
137
137
|
|
|
138
|
-
if (!(_iteratorAbruptCompletion && _iterator
|
|
138
|
+
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
|
139
139
|
_context.next = 25;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
_context.next = 25;
|
|
144
|
-
return _iterator
|
|
144
|
+
return _iterator.return();
|
|
145
145
|
|
|
146
146
|
case 25:
|
|
147
147
|
_context.prev = 25;
|
|
@@ -179,14 +179,14 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
179
179
|
}, {
|
|
180
180
|
key: "wrapFeature",
|
|
181
181
|
value: function wrapFeature(ncFeature) {
|
|
182
|
-
return new _NCListFeature
|
|
182
|
+
return new _NCListFeature.default(ncFeature, undefined, "".concat(this.id, "-").concat(ncFeature.id()));
|
|
183
183
|
}
|
|
184
184
|
}, {
|
|
185
185
|
key: "hasDataForRefName",
|
|
186
186
|
value: function () {
|
|
187
|
-
var _hasDataForRefName = (0, _asyncToGenerator2
|
|
187
|
+
var _hasDataForRefName = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(refName) {
|
|
188
188
|
var root;
|
|
189
|
-
return _regenerator
|
|
189
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
190
190
|
while (1) {
|
|
191
191
|
switch (_context2.prev = _context2.next) {
|
|
192
192
|
case 0:
|
|
@@ -234,4 +234,4 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
234
234
|
return NCListAdapter;
|
|
235
235
|
}(_BaseAdapter.BaseFeatureDataAdapter);
|
|
236
236
|
|
|
237
|
-
exports
|
|
237
|
+
exports.default = NCListAdapter;
|
|
@@ -18,20 +18,20 @@ var _NCListAdapter = _interopRequireDefault(require("./NCListAdapter"));
|
|
|
18
18
|
|
|
19
19
|
var _configSchema = _interopRequireDefault(require("./configSchema"));
|
|
20
20
|
|
|
21
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it
|
|
21
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
22
22
|
|
|
23
23
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
24
|
|
|
25
25
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
26
26
|
|
|
27
|
-
test('adapter can fetch features from ensembl_genes test set', /*#__PURE__*/(0, _asyncToGenerator2
|
|
27
|
+
test('adapter can fetch features from ensembl_genes test set', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
28
28
|
var rootTemplate, args, adapter, features, featuresArray, featuresJsonArray, _iterator, _step, feature;
|
|
29
29
|
|
|
30
|
-
return _regenerator
|
|
30
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
31
31
|
while (1) {
|
|
32
32
|
switch (_context.prev = _context.next) {
|
|
33
33
|
case 0:
|
|
34
|
-
rootTemplate = _path
|
|
34
|
+
rootTemplate = _path.default.join(__dirname, '..', '..', 'test_data', 'ensembl_genes', '{refseq}', 'trackData.json').replace(/\\/g, '\\\\');
|
|
35
35
|
_context.next = 3;
|
|
36
36
|
return _fs.promises.stat(rootTemplate.replace('{refseq}', '21'));
|
|
37
37
|
|
|
@@ -44,7 +44,7 @@ test('adapter can fetch features from ensembl_genes test set', /*#__PURE__*/(0,
|
|
|
44
44
|
locationType: 'UriLocation'
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
adapter = new _NCListAdapter
|
|
47
|
+
adapter = new _NCListAdapter.default(_configSchema.default.create(args));
|
|
48
48
|
features = adapter.getFeatures({
|
|
49
49
|
assemblyName: 'volvox',
|
|
50
50
|
refName: '21',
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
|
|
2
|
-
/**
|
|
3
|
-
* wrapper to adapt nclist features to act like jbrowse 2 features
|
|
4
|
-
*/
|
|
5
|
-
export default class NCListFeature implements Feature {
|
|
6
|
-
private ncFeature;
|
|
7
|
-
private parentHandle?;
|
|
8
|
-
private uniqueId;
|
|
9
|
-
constructor(ncFeature: any, parent?: Feature, id?: string);
|
|
10
|
-
set(): void;
|
|
11
|
-
jb2TagToJb1Tag(tag: string): string;
|
|
12
|
-
jb1TagToJb2Tag(tag: string): string;
|
|
13
|
-
get(attrName: string): any;
|
|
14
|
-
/**
|
|
15
|
-
* Get an array listing which data keys are present in this feature.
|
|
16
|
-
*/
|
|
17
|
-
tags(): string[];
|
|
18
|
-
/**
|
|
19
|
-
* Get the unique ID of this feature.
|
|
20
|
-
*/
|
|
21
|
-
id(): string;
|
|
22
|
-
/**
|
|
23
|
-
* Get this feature's parent feature, or undefined if none.
|
|
24
|
-
*/
|
|
25
|
-
parent(): Feature | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Get an array of child features, or undefined if none.
|
|
28
|
-
*/
|
|
29
|
-
children(): Feature[] | undefined;
|
|
30
|
-
toJSON(): SimpleFeatureSerialized;
|
|
31
|
-
}
|
|
1
|
+
import { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
|
|
2
|
+
/**
|
|
3
|
+
* wrapper to adapt nclist features to act like jbrowse 2 features
|
|
4
|
+
*/
|
|
5
|
+
export default class NCListFeature implements Feature {
|
|
6
|
+
private ncFeature;
|
|
7
|
+
private parentHandle?;
|
|
8
|
+
private uniqueId;
|
|
9
|
+
constructor(ncFeature: any, parent?: Feature, id?: string);
|
|
10
|
+
set(): void;
|
|
11
|
+
jb2TagToJb1Tag(tag: string): string;
|
|
12
|
+
jb1TagToJb2Tag(tag: string): string;
|
|
13
|
+
get(attrName: string): any;
|
|
14
|
+
/**
|
|
15
|
+
* Get an array listing which data keys are present in this feature.
|
|
16
|
+
*/
|
|
17
|
+
tags(): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Get the unique ID of this feature.
|
|
20
|
+
*/
|
|
21
|
+
id(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get this feature's parent feature, or undefined if none.
|
|
24
|
+
*/
|
|
25
|
+
parent(): Feature | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Get an array of child features, or undefined if none.
|
|
28
|
+
*/
|
|
29
|
+
children(): Feature[] | undefined;
|
|
30
|
+
toJSON(): SimpleFeatureSerialized;
|
|
31
|
+
}
|
|
@@ -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
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
|
|
@@ -26,15 +26,15 @@ var jb1ToJb2 = {
|
|
|
26
26
|
var NCListFeature = /*#__PURE__*/function () {
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
28
|
function NCListFeature(ncFeature, parent, id) {
|
|
29
|
-
(0, _classCallCheck2
|
|
29
|
+
(0, _classCallCheck2.default)(this, NCListFeature);
|
|
30
30
|
this.ncFeature = ncFeature;
|
|
31
|
-
(0, _defineProperty2
|
|
32
|
-
(0, _defineProperty2
|
|
31
|
+
(0, _defineProperty2.default)(this, "parentHandle", void 0);
|
|
32
|
+
(0, _defineProperty2.default)(this, "uniqueId", void 0);
|
|
33
33
|
this.uniqueId = id || ncFeature.id();
|
|
34
34
|
this.parentHandle = parent;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
(0, _createClass2
|
|
37
|
+
(0, _createClass2.default)(NCListFeature, [{
|
|
38
38
|
key: "set",
|
|
39
39
|
value: function set() {
|
|
40
40
|
throw new Error('not implemented');
|
|
@@ -139,4 +139,4 @@ var NCListFeature = /*#__PURE__*/function () {
|
|
|
139
139
|
return NCListFeature;
|
|
140
140
|
}();
|
|
141
141
|
|
|
142
|
-
exports
|
|
142
|
+
exports.default = NCListFeature;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
2
|
+
export default _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _configuration = require("@jbrowse/core/configuration");
|
|
9
9
|
|
|
@@ -24,4 +24,4 @@ var _default = (0, _configuration.ConfigurationSchema)('NCListAdapter', {
|
|
|
24
24
|
explicitlyTyped: true
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
exports
|
|
27
|
+
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as configSchema } from './configSchema';
|
|
1
|
+
export { default as configSchema } from './configSchema';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
-
export default class LegacyJBrowsePlugin extends Plugin {
|
|
4
|
-
name: string;
|
|
5
|
-
install(pluginManager: PluginManager): void;
|
|
6
|
-
}
|
|
1
|
+
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
+
export default class LegacyJBrowsePlugin extends Plugin {
|
|
4
|
+
name: string;
|
|
5
|
+
install(pluginManager: PluginManager): void;
|
|
6
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports
|
|
10
|
+
exports.default = void 0;
|
|
11
11
|
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
|
@@ -41,43 +41,43 @@ var _JBrowse1Connection = require("./JBrowse1Connection");
|
|
|
41
41
|
|
|
42
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
43
|
|
|
44
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
44
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
45
|
|
|
46
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2
|
|
46
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
47
47
|
|
|
48
48
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
49
|
|
|
50
50
|
var LegacyJBrowsePlugin = /*#__PURE__*/function (_Plugin) {
|
|
51
|
-
(0, _inherits2
|
|
51
|
+
(0, _inherits2.default)(LegacyJBrowsePlugin, _Plugin);
|
|
52
52
|
|
|
53
53
|
var _super = _createSuper(LegacyJBrowsePlugin);
|
|
54
54
|
|
|
55
55
|
function LegacyJBrowsePlugin() {
|
|
56
56
|
var _this;
|
|
57
57
|
|
|
58
|
-
(0, _classCallCheck2
|
|
58
|
+
(0, _classCallCheck2.default)(this, LegacyJBrowsePlugin);
|
|
59
59
|
|
|
60
60
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
61
61
|
args[_key] = arguments[_key];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
65
|
-
(0, _defineProperty2
|
|
65
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", 'LegacyJBrowsePlugin');
|
|
66
66
|
return _this;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
(0, _createClass2
|
|
69
|
+
(0, _createClass2.default)(LegacyJBrowsePlugin, [{
|
|
70
70
|
key: "install",
|
|
71
71
|
value: function install(pluginManager) {
|
|
72
72
|
pluginManager.addAdapterType(function () {
|
|
73
|
-
return new _AdapterType
|
|
73
|
+
return new _AdapterType.default({
|
|
74
74
|
name: 'NCListAdapter',
|
|
75
75
|
configSchema: _NCListAdapter.configSchema,
|
|
76
76
|
getAdapterClass: function getAdapterClass() {
|
|
77
77
|
return Promise.resolve().then(function () {
|
|
78
78
|
return _interopRequireWildcard(require('./NCListAdapter/NCListAdapter'));
|
|
79
79
|
}).then(function (r) {
|
|
80
|
-
return r
|
|
80
|
+
return r.default;
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
});
|
|
@@ -99,7 +99,7 @@ var LegacyJBrowsePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
99
99
|
};
|
|
100
100
|
});
|
|
101
101
|
pluginManager.addTextSearchAdapterType(function () {
|
|
102
|
-
return new _TextSearchAdapterType
|
|
102
|
+
return new _TextSearchAdapterType.default({
|
|
103
103
|
name: 'JBrowse1TextSearchAdapter',
|
|
104
104
|
configSchema: _JBrowse1TextSeachAdapter.configSchema,
|
|
105
105
|
AdapterClass: _JBrowse1TextSeachAdapter.AdapterClass,
|
|
@@ -107,7 +107,7 @@ var LegacyJBrowsePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
pluginManager.addConnectionType(function () {
|
|
110
|
-
return new _ConnectionType
|
|
110
|
+
return new _ConnectionType.default({
|
|
111
111
|
name: 'JBrowse1Connection',
|
|
112
112
|
configSchema: _JBrowse1Connection.configSchema,
|
|
113
113
|
stateModel: (0, _JBrowse1Connection.modelFactory)(pluginManager),
|
|
@@ -119,6 +119,6 @@ var LegacyJBrowsePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
119
119
|
}
|
|
120
120
|
}]);
|
|
121
121
|
return LegacyJBrowsePlugin;
|
|
122
|
-
}(_Plugin2
|
|
122
|
+
}(_Plugin2.default);
|
|
123
123
|
|
|
124
|
-
exports
|
|
124
|
+
exports.default = LegacyJBrowsePlugin;
|
package/dist/index.test.js
CHANGED
|
@@ -11,12 +11,12 @@ var _ = _interopRequireDefault(require("."));
|
|
|
11
11
|
test('plugin in a stock JBrowse', function () {
|
|
12
12
|
var originalConsoleWarn = console.warn;
|
|
13
13
|
console.warn = jest.fn();
|
|
14
|
-
var pluginManager = new _PluginManager
|
|
14
|
+
var pluginManager = new _PluginManager.default([new _.default()]);
|
|
15
15
|
pluginManager.createPluggableElements();
|
|
16
16
|
pluginManager.configure();
|
|
17
17
|
console.warn = originalConsoleWarn;
|
|
18
18
|
expect(function () {
|
|
19
|
-
return pluginManager.addPlugin(new _
|
|
19
|
+
return pluginManager.addPlugin(new _.default());
|
|
20
20
|
}).toThrow(/JBrowse already configured, cannot add plugins/);
|
|
21
21
|
var NCListAdapter = pluginManager.getAdapterType('NCListAdapter');
|
|
22
22
|
var config = NCListAdapter.configSchema.create({
|
|
@@ -26,7 +26,7 @@ test('plugin in a stock JBrowse', function () {
|
|
|
26
26
|
});
|
|
27
27
|
test('test creating a text search adapter', function () {
|
|
28
28
|
console.warn = jest.fn();
|
|
29
|
-
var pluginManager = new _PluginManager
|
|
29
|
+
var pluginManager = new _PluginManager.default([new _.default()]);
|
|
30
30
|
pluginManager.createPluggableElements();
|
|
31
31
|
pluginManager.configure();
|
|
32
32
|
var JB1TextSearchAdapter = pluginManager.getTextSearchAdapterType('JBrowse1TextSearchAdapter');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-legacy-jbrowse",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "JBrowse 2 plugin for connecting to and reading JBrowse 1 data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -29,9 +29,11 @@
|
|
|
29
29
|
"prepack": "yarn build; yarn useDist",
|
|
30
30
|
"postpack": "yarn useSrc",
|
|
31
31
|
"useDist": "node ../../scripts/useDist.js",
|
|
32
|
-
"useSrc": "node ../../scripts/useSrc.js"
|
|
32
|
+
"useSrc": "node ../../scripts/useSrc.js",
|
|
33
|
+
"postbuild": "tsc --build tsconfig.build.json"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
36
|
+
"@babel/runtime": "^7.17.9",
|
|
35
37
|
"@gmod/nclist": "^0.2.1",
|
|
36
38
|
"buffer-crc32": "^0.2.13",
|
|
37
39
|
"generic-filehandle": "^2.2.2",
|
|
@@ -46,5 +48,5 @@
|
|
|
46
48
|
"publishConfig": {
|
|
47
49
|
"access": "public"
|
|
48
50
|
},
|
|
49
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "0a3e0c58055bbab8e3ab0270c139291b96eff403"
|
|
50
52
|
}
|
package/dist/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|