@jbrowse/plugin-bed 5.0.0-beta.10 → 5.0.0-beta.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.
|
@@ -14,9 +14,9 @@ export default class BedGraphTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
14
14
|
// getFeatures/byte-estimate awaits it) doesn't re-flash "Downloading index"
|
|
15
15
|
configure = cachedSetup({
|
|
16
16
|
label: 'Downloading index',
|
|
17
|
-
setup:
|
|
17
|
+
setup: opts => this.configurePre(opts),
|
|
18
18
|
});
|
|
19
|
-
async configurePre() {
|
|
19
|
+
async configurePre(opts) {
|
|
20
20
|
const pm = this.pluginManager;
|
|
21
21
|
const bedGraphGzLocation = this.getConf('bedGraphGzLocation');
|
|
22
22
|
const location = this.getConf(['index', 'location']);
|
|
@@ -31,7 +31,7 @@ export default class BedGraphTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
31
31
|
// Not bedGraph.getHeader(): that returns only a `#`-commented header, so a
|
|
32
32
|
// file whose header is a plain row skipped via `tabix -S 1` reported none
|
|
33
33
|
// and quietly lost the names of its value columns.
|
|
34
|
-
const header = (await readTabixHeaderLines(bedGraph)).join('\n');
|
|
34
|
+
const header = (await readTabixHeaderLines(bedGraph, { signal: opts.signal })).join('\n');
|
|
35
35
|
return {
|
|
36
36
|
columnNames,
|
|
37
37
|
bedGraph,
|
|
@@ -26,14 +26,14 @@ export default class BedTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
26
26
|
// re-entry (every getFeatures awaits it) doesn't re-flash "Downloading index"
|
|
27
27
|
getMetadata = cachedSetup({
|
|
28
28
|
label: 'Downloading index',
|
|
29
|
-
setup:
|
|
29
|
+
setup: opts => this.bed.getMetadata({ signal: opts.signal }),
|
|
30
30
|
});
|
|
31
31
|
// Memoized: getFeatures needs the names on every query, and reading them goes
|
|
32
32
|
// to the file's leading blocks — a fetch and a decompress that was being
|
|
33
33
|
// repeated on every pan and zoom. Resolves undefined when the file declares
|
|
34
34
|
// no column names — parseNamesFromHeader's answer for a header it can't read
|
|
35
35
|
// names out of.
|
|
36
|
-
getNames = cachedSetup({ setup:
|
|
36
|
+
getNames = cachedSetup({ setup: opts => this.readNames(opts.signal) });
|
|
37
37
|
constructor(config, getSubAdapter, pluginManager) {
|
|
38
38
|
super(config, getSubAdapter, pluginManager);
|
|
39
39
|
this.bedGzLoc = readConfObject(this.config, 'bedGzLocation');
|
|
@@ -61,7 +61,7 @@ export default class BedTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
61
61
|
async getRegionByteSize(regions, opts) {
|
|
62
62
|
return this.bed.bytesForRegions(regions, opts);
|
|
63
63
|
}
|
|
64
|
-
async readNames() {
|
|
64
|
+
async readNames(signal) {
|
|
65
65
|
const columnNames = readConfObject(this.config, 'columnNames');
|
|
66
66
|
if (columnNames.length) {
|
|
67
67
|
return columnNames;
|
|
@@ -69,7 +69,7 @@ export default class BedTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
69
69
|
// readTabixHeaderLines covers both ways a tabix file keeps a header: a
|
|
70
70
|
// `#`-commented block, which getHeader() returns, and a plain row skipped
|
|
71
71
|
// via `tabix -S N`, which it does not.
|
|
72
|
-
return parseNamesFromHeader((await readTabixHeaderLines(this.bed)).join('\n'));
|
|
72
|
+
return parseNamesFromHeader((await readTabixHeaderLines(this.bed, { signal })).join('\n'));
|
|
73
73
|
}
|
|
74
74
|
getFeatures(query, opts) {
|
|
75
75
|
const { signal, statusCallback } = opts ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-bed",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JBrowse 2 bed adapters, tracks, etc.",
|
|
6
6
|
"keywords": [
|
|
@@ -23,12 +23,16 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@gmod/bbi": "^11.3.0",
|
|
25
25
|
"@gmod/bed": "^2.3.1",
|
|
26
|
-
"@gmod/tabix": "^3.
|
|
26
|
+
"@gmod/tabix": "^3.9.1",
|
|
27
27
|
"@gmod/trix": "^3.0.22",
|
|
28
|
-
"@jbrowse/mobx-state-tree": "^6.
|
|
28
|
+
"@jbrowse/mobx-state-tree": "^6.7.0",
|
|
29
29
|
"mobx": "^7.0.5",
|
|
30
30
|
"rxjs": "^7.8.2",
|
|
31
|
-
"@jbrowse/core": "^5.0.0-beta.
|
|
31
|
+
"@jbrowse/core": "^5.0.0-beta.11"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": ">=19.0.0",
|
|
35
|
+
"react-dom": ">=19.0.0"
|
|
32
36
|
},
|
|
33
37
|
"publishConfig": {
|
|
34
38
|
"access": "public"
|