@jbrowse/plugin-gff3 1.7.10 → 1.7.11
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.
|
@@ -29,8 +29,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
29
29
|
|
|
30
30
|
var _BaseAdapter = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
31
31
|
|
|
32
|
-
var _configuration = require("@jbrowse/core/configuration");
|
|
33
|
-
|
|
34
32
|
var _io = require("@jbrowse/core/util/io");
|
|
35
33
|
|
|
36
34
|
var _rxjs = require("@jbrowse/core/util/rxjs");
|
|
@@ -80,47 +78,48 @@ var _default = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
80
78
|
var _loadDataP = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
81
79
|
var _this2 = this;
|
|
82
80
|
|
|
83
|
-
var
|
|
81
|
+
var pm, buf, buffer, data, lines, headerLines, i, header, feats, intervalTree;
|
|
84
82
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
85
83
|
while (1) {
|
|
86
84
|
switch (_context.prev = _context.next) {
|
|
87
85
|
case 0:
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
pm = this.pluginManager;
|
|
87
|
+
_context.next = 3;
|
|
88
|
+
return (0, _io.openLocation)(this.getConf('gffLocation'), pm).readFile();
|
|
90
89
|
|
|
91
|
-
case
|
|
92
|
-
|
|
90
|
+
case 3:
|
|
91
|
+
buf = _context.sent;
|
|
93
92
|
|
|
94
|
-
if (!isGzip(
|
|
95
|
-
_context.next =
|
|
93
|
+
if (!isGzip(buf)) {
|
|
94
|
+
_context.next = 10;
|
|
96
95
|
break;
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
_context.next =
|
|
100
|
-
return (0, _bgzfFilehandle.unzip)(
|
|
98
|
+
_context.next = 7;
|
|
99
|
+
return (0, _bgzfFilehandle.unzip)(buf);
|
|
101
100
|
|
|
102
|
-
case
|
|
101
|
+
case 7:
|
|
103
102
|
_context.t0 = _context.sent;
|
|
104
|
-
_context.next =
|
|
103
|
+
_context.next = 11;
|
|
105
104
|
break;
|
|
106
105
|
|
|
107
|
-
case 9:
|
|
108
|
-
_context.t0 = buffer;
|
|
109
|
-
|
|
110
106
|
case 10:
|
|
111
|
-
|
|
107
|
+
_context.t0 = buf;
|
|
108
|
+
|
|
109
|
+
case 11:
|
|
110
|
+
buffer = _context.t0;
|
|
112
111
|
|
|
113
|
-
if (!(
|
|
114
|
-
_context.next =
|
|
112
|
+
if (!(buffer.length > 536870888)) {
|
|
113
|
+
_context.next = 14;
|
|
115
114
|
break;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
throw new Error('Data exceeds maximum string length (512MB)');
|
|
119
118
|
|
|
120
|
-
case
|
|
119
|
+
case 14:
|
|
121
120
|
data = new TextDecoder('utf8', {
|
|
122
121
|
fatal: true
|
|
123
|
-
}).decode(
|
|
122
|
+
}).decode(buffer);
|
|
124
123
|
lines = data.split('\n');
|
|
125
124
|
headerLines = [];
|
|
126
125
|
|
|
@@ -155,7 +154,7 @@ var _default = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
155
154
|
intervalTree: intervalTree
|
|
156
155
|
});
|
|
157
156
|
|
|
158
|
-
case
|
|
157
|
+
case 22:
|
|
159
158
|
case "end":
|
|
160
159
|
return _context.stop();
|
|
161
160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-gff3",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.11",
|
|
4
4
|
"description": "JBrowse 2 gff3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "5c21beb48a21f08b0091d293f09ac99174c48f77"
|
|
56
56
|
}
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
BaseOptions,
|
|
4
4
|
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
5
5
|
import { NoAssemblyRegion } from '@jbrowse/core/util/types'
|
|
6
|
-
import { readConfObject } from '@jbrowse/core/configuration'
|
|
7
6
|
import { openLocation } from '@jbrowse/core/util/io'
|
|
8
7
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
9
8
|
import IntervalTree from '@flatten-js/interval-tree'
|
|
@@ -23,16 +22,14 @@ export default class extends BaseFeatureDataAdapter {
|
|
|
23
22
|
}>
|
|
24
23
|
|
|
25
24
|
private async loadDataP() {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
).readFile()
|
|
30
|
-
const buf = isGzip(buffer) ? await unzip(buffer) : buffer
|
|
25
|
+
const pm = this.pluginManager
|
|
26
|
+
const buf = await openLocation(this.getConf('gffLocation'), pm).readFile()
|
|
27
|
+
const buffer = isGzip(buf) ? await unzip(buf) : buf
|
|
31
28
|
// 512MB max chrome string length is 512MB
|
|
32
|
-
if (
|
|
29
|
+
if (buffer.length > 536_870_888) {
|
|
33
30
|
throw new Error('Data exceeds maximum string length (512MB)')
|
|
34
31
|
}
|
|
35
|
-
const data = new TextDecoder('utf8', { fatal: true }).decode(
|
|
32
|
+
const data = new TextDecoder('utf8', { fatal: true }).decode(buffer)
|
|
36
33
|
const lines = data.split('\n')
|
|
37
34
|
const headerLines = []
|
|
38
35
|
for (let i = 0; i < lines.length && lines[i].startsWith('#'); i++) {
|