@jbrowse/plugin-comparative-adapters 2.16.1 → 2.17.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.
- package/dist/BlastTabularAdapter/BlastTabularAdapter.d.ts +120 -0
- package/dist/BlastTabularAdapter/BlastTabularAdapter.js +207 -0
- package/dist/BlastTabularAdapter/configSchema.d.ts +45 -0
- package/dist/BlastTabularAdapter/configSchema.js +52 -0
- package/dist/BlastTabularAdapter/index.d.ts +2 -0
- package/dist/BlastTabularAdapter/index.js +42 -0
- package/dist/ChainAdapter/ChainAdapter.js +1 -3
- package/dist/ChainAdapter/util.js +2 -2
- package/dist/DeltaAdapter/DeltaAdapter.js +1 -3
- package/dist/DeltaAdapter/util.js +2 -2
- package/dist/MashMapAdapter/MashMapAdapter.d.ts +12 -1
- package/dist/MashMapAdapter/MashMapAdapter.js +1 -3
- package/dist/PAFAdapter/PAFAdapter.js +4 -6
- package/dist/PAFAdapter/util.d.ts +1 -1
- package/dist/PAFAdapter/util.js +1 -1
- package/dist/index.js +2 -0
- package/dist/util.d.ts +1 -1
- package/dist/util.js +9 -6
- package/esm/BlastTabularAdapter/BlastTabularAdapter.d.ts +120 -0
- package/esm/BlastTabularAdapter/BlastTabularAdapter.js +202 -0
- package/esm/BlastTabularAdapter/configSchema.d.ts +45 -0
- package/esm/BlastTabularAdapter/configSchema.js +50 -0
- package/esm/BlastTabularAdapter/index.d.ts +2 -0
- package/esm/BlastTabularAdapter/index.js +13 -0
- package/esm/ChainAdapter/ChainAdapter.js +2 -4
- package/esm/ChainAdapter/util.js +2 -2
- package/esm/DeltaAdapter/DeltaAdapter.js +2 -4
- package/esm/DeltaAdapter/util.js +2 -2
- package/esm/MashMapAdapter/MashMapAdapter.d.ts +12 -1
- package/esm/MashMapAdapter/MashMapAdapter.js +2 -4
- package/esm/PAFAdapter/PAFAdapter.js +5 -7
- package/esm/PAFAdapter/util.d.ts +1 -1
- package/esm/PAFAdapter/util.js +1 -1
- package/esm/index.js +2 -0
- package/esm/util.d.ts +1 -1
- package/esm/util.js +10 -7
- package/package.json +2 -2
package/esm/util.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isGzip } from '@jbrowse/core/util';
|
|
1
|
+
import { fetchAndMaybeUnzip } from '@jbrowse/core/util';
|
|
3
2
|
export function parseBed(text) {
|
|
4
3
|
return new Map(text
|
|
5
4
|
.split(/\n|\r\n|\r/)
|
|
@@ -20,25 +19,29 @@ export function parseBed(text) {
|
|
|
20
19
|
}));
|
|
21
20
|
}
|
|
22
21
|
export async function readFile(file, opts) {
|
|
23
|
-
const
|
|
24
|
-
|
|
22
|
+
const buf = await fetchAndMaybeUnzip(file, opts);
|
|
23
|
+
const decoder = new TextDecoder('utf8');
|
|
24
|
+
return decoder.decode(buf);
|
|
25
25
|
}
|
|
26
26
|
export function zip(a, b) {
|
|
27
27
|
return a.map((e, i) => [e, b[i]]);
|
|
28
28
|
}
|
|
29
|
-
const decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined;
|
|
30
29
|
export function parseLineByLine(buffer, cb) {
|
|
31
30
|
let blockStart = 0;
|
|
32
31
|
const entries = [];
|
|
32
|
+
const decoder = new TextDecoder('utf8');
|
|
33
33
|
while (blockStart < buffer.length) {
|
|
34
34
|
const n = buffer.indexOf('\n', blockStart);
|
|
35
35
|
if (n === -1) {
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
const b = buffer.subarray(blockStart, n);
|
|
39
|
-
const line =
|
|
39
|
+
const line = decoder.decode(b).trim();
|
|
40
40
|
if (line) {
|
|
41
|
-
|
|
41
|
+
const entry = cb(line);
|
|
42
|
+
if (entry) {
|
|
43
|
+
entries.push(entry);
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
blockStart = n + 1;
|
|
44
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-comparative-adapters",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "JBrowse 2 comparative adapters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
|
|
62
62
|
}
|