@genome-spy/app 1.2.0 → 1.3.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/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-8hMSlqAQ.js → agentApi-BclFF9zB.js} +7130 -7509
- package/dist/agentApi.es.js +4344 -4015
- package/dist/agentShared.es.js +431 -458
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-Bd8H8MMo.js → canvas2d-8MSf70d4.js} +78 -86
- package/dist/{canvas2d-D6VYooRf.js → canvas2d-BwGNI_Rx.js} +83 -91
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{containerView-aEVmYmkA.js → containerView-BItRtKqu.js} +5 -1
- package/dist/{containerView-CRJSc4bM.js → containerView-CWa6ZIJW.js} +5 -1
- package/dist/{debug-CQ0agCrd.js → debug-23s-jja_.js} +3 -2
- package/dist/{debug-DkIMiGdW.js → debug-CWRxvAss.js} +2 -3
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4756 -5528
- package/dist/index.js +707 -547
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/{markUtils-CvLDz744.js → markUtils-RaatLEa-.js} +9 -6
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/{order-BVvkjDRT.js → order-BnKzKjt4.js} +383 -347
- package/dist/{order-DmMoZsi1.js → order-BpJnq_nV.js} +375 -339
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-jeRVq6kY.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DxvowWjH.js → rasterExport-C_vx4Jwd.js} +3 -3
- package/dist/{rasterization-DFj3Cvx4.js → rasterization-QktH8Sn2.js} +1 -1
- package/dist/{rectangle-Dl4Dy0hS.js → rectangle-BAdoDPXu.js} +34 -31
- package/dist/{renderCanvas2D-Bfm1NHFu.js → renderCanvas2D-CsRO78Pq.js} +88 -87
- package/dist/{renderCanvas2D-DVjhp834.js → renderCanvas2D-Y7pkRzbC.js} +93 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DOYMJ-Md.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-DDC0YRGn.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-0aeqp_kz.js → scalePosition-CRXa0rCC.js} +1 -1
- package/dist/schema.json +3801 -816
- package/dist/{svg-Bm2zxBPu.js → svg-BBMtLgtM.js} +369 -285
- package/dist/{svg-CkfuhONt.js → svg-JjWL6U-T.js} +371 -287
- package/dist/{svgRasterizer-DoRQEqFA.js → svgRasterizer-6OcftuoI.js} +2 -2
- package/dist/{svgRasterizer-raDDhBF-.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/{viewError-BkJeVYXA.js → viewError-B0TMfOpB.js} +1 -1
- package/dist/{viewError-IYqyluc7.js → viewError-D9aO90cI.js} +1 -1
- package/dist/{viewSelectors-7LyasQN-.js → viewSelectors-DkFvo33d.js} +832 -734
- package/dist/{viewSelectors-CbmkSQRT.js → viewSelectors-lM93fHAq.js} +900 -802
- package/dist/{viewUtils-DuddMNNw.js → viewUtils-0SJOewM6.js} +1861 -2459
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-DElJ8dTZ.js +0 -3097
- package/dist/clipOptions-D_wBNhzs.js +0 -3087
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/vega-scale-BoGHANI7.js +0 -2446
- package/dist/vega-scale-o9TRyzYH.js +0 -2443
- package/dist/webgl-CQfvgnxo.js +0 -5633
- package/dist/webgl-DVYkXtiZ.js +0 -5632
|
@@ -18,17 +18,14 @@ function t(t, n, r, i, a = 0, o = n.length) {
|
|
|
18
18
|
}
|
|
19
19
|
let l = e(t);
|
|
20
20
|
if (l !== -1) {
|
|
21
|
-
if (l === 0) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
c = (r === -1 || r > s ? s : r) + 1;
|
|
28
|
-
}
|
|
29
|
-
return;
|
|
21
|
+
if (l === 0) for (let e = 0; e < r; e++) {
|
|
22
|
+
let t = c;
|
|
23
|
+
for (; c < s && n.charCodeAt(c) !== 58 && n.charCodeAt(c) !== 9;) c++;
|
|
24
|
+
i(n, t, c, e);
|
|
25
|
+
let r = n.indexOf(" ", c);
|
|
26
|
+
c = (r === -1 || r > s ? s : r) + 1;
|
|
30
27
|
}
|
|
31
|
-
for (let e = 0; e < r; e++) {
|
|
28
|
+
else for (let e = 0; e < r; e++) {
|
|
32
29
|
let t = 0, r = c, a = -1, o = -1;
|
|
33
30
|
for (; c < s;) {
|
|
34
31
|
let e = n.charCodeAt(c);
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { n as e } from "./esm-C6erfjPM.js";
|
|
2
|
+
import { t } from "./SharedReadCache-9sT2aIxW.js";
|
|
3
|
+
import { i as n, n as r } from "./esm-BUkWqSr2.js";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../../node_modules/@gmod/bgzf-filehandle/esm/long.js
|
|
6
|
+
function i(e, t = 0) {
|
|
7
|
+
let n = e.getUint32(t, !0);
|
|
8
|
+
return e.getUint32(t + 4, !0) * 4294967296 + n;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/@gmod/bgzf-filehandle/esm/gziIndex.js
|
|
12
|
+
var a = 16, o = {
|
|
13
|
+
compressed: /* @__PURE__ */ new Float64Array(),
|
|
14
|
+
uncompressed: /* @__PURE__ */ new Float64Array()
|
|
15
|
+
};
|
|
16
|
+
function s(e, t) {
|
|
17
|
+
let n = new Float64Array(t + 1), r = new Float64Array(t + 1), o = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
18
|
+
for (let e = 0; e < t; e += 1) {
|
|
19
|
+
let t = e * a;
|
|
20
|
+
n[e + 1] = i(o, t), r[e + 1] = i(o, t + 8);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
compressed: n,
|
|
24
|
+
uncompressed: r
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function c(e, t) {
|
|
28
|
+
let n = 0, r = e.length;
|
|
29
|
+
for (; n < r;) {
|
|
30
|
+
let i = n + r >>> 1;
|
|
31
|
+
e[i] <= t ? n = i + 1 : r = i;
|
|
32
|
+
}
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
var l = class {
|
|
36
|
+
filehandle;
|
|
37
|
+
index;
|
|
38
|
+
constructor({ filehandle: e }) {
|
|
39
|
+
this.filehandle = e;
|
|
40
|
+
}
|
|
41
|
+
_getIndex() {
|
|
42
|
+
return this.index ||= this._readIndex().catch((e) => {
|
|
43
|
+
throw this.index = void 0, e;
|
|
44
|
+
}), this.index;
|
|
45
|
+
}
|
|
46
|
+
async _readIndex() {
|
|
47
|
+
let e = await this.filehandle.read(8, 0), t = i(new DataView(e.buffer, e.byteOffset, e.byteLength));
|
|
48
|
+
if (t === 0) return s(/* @__PURE__ */ new Uint8Array(), 0);
|
|
49
|
+
if (t > (2 ** 53 - 1) / a) throw TypeError("integer overflow");
|
|
50
|
+
return s(await this.filehandle.read(a * t, 8), t);
|
|
51
|
+
}
|
|
52
|
+
async getRelevantBlocksForRead(e, t) {
|
|
53
|
+
if (e === 0) return {
|
|
54
|
+
...o,
|
|
55
|
+
nextCompressedPosition: void 0
|
|
56
|
+
};
|
|
57
|
+
let { compressed: n, uncompressed: r } = await this._getIndex(), i = c(r, t) - 1, a = c(r, t + e - 1);
|
|
58
|
+
return {
|
|
59
|
+
compressed: n.subarray(i, a),
|
|
60
|
+
uncompressed: r.subarray(i, a),
|
|
61
|
+
nextCompressedPosition: a < n.length ? n[a] : void 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}, u = 10, d = 33554432;
|
|
65
|
+
function f(e) {
|
|
66
|
+
let t = 0, n = [], r = () => {
|
|
67
|
+
t--, n.shift()?.();
|
|
68
|
+
};
|
|
69
|
+
return async (i) => {
|
|
70
|
+
t >= e && await new Promise((e) => {
|
|
71
|
+
n.push(e);
|
|
72
|
+
}), t++;
|
|
73
|
+
try {
|
|
74
|
+
return await i();
|
|
75
|
+
} finally {
|
|
76
|
+
r();
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function p(e, t, n) {
|
|
81
|
+
let r = [], i = e.length, a = 0;
|
|
82
|
+
for (; a < i;) {
|
|
83
|
+
let o = a + 1;
|
|
84
|
+
for (; o < i && t[o] - t[a] < d;) o += 1;
|
|
85
|
+
r.push({
|
|
86
|
+
compressedStart: e[a],
|
|
87
|
+
compressedEnd: o < i ? e[o] : n ?? e[i - 1] + 65536,
|
|
88
|
+
uncompressedStart: t[a]
|
|
89
|
+
}), a = o;
|
|
90
|
+
}
|
|
91
|
+
return r;
|
|
92
|
+
}
|
|
93
|
+
function m(e, t, n, r) {
|
|
94
|
+
let i = Math.max(0, n - t), a = Math.min(r, t + e.length) - t;
|
|
95
|
+
return i < e.length ? e.subarray(i, a) : /* @__PURE__ */ new Uint8Array();
|
|
96
|
+
}
|
|
97
|
+
var h = class {
|
|
98
|
+
filehandle;
|
|
99
|
+
gzi;
|
|
100
|
+
limit;
|
|
101
|
+
constructor({ filehandle: e, gziFilehandle: t, blockConcurrency: n = u }) {
|
|
102
|
+
this.filehandle = e, this.gzi = new l({ filehandle: t }), this.limit = f(n);
|
|
103
|
+
}
|
|
104
|
+
async read(e, t) {
|
|
105
|
+
let { compressed: i, uncompressed: a, nextCompressedPosition: o } = await this.gzi.getRelevantBlocksForRead(e, t);
|
|
106
|
+
if (i.length === 0) return /* @__PURE__ */ new Uint8Array();
|
|
107
|
+
let s = t + e, c = p(i, a, o), l = await Promise.all(c.map((e) => this.limit(async () => {
|
|
108
|
+
let n = await this.filehandle.read(e.compressedEnd - e.compressedStart, e.compressedStart);
|
|
109
|
+
return m(await r(n), e.uncompressedStart, t, s);
|
|
110
|
+
})));
|
|
111
|
+
return n(l);
|
|
112
|
+
}
|
|
113
|
+
}, g = new TextDecoder("utf8");
|
|
114
|
+
function _(e) {
|
|
115
|
+
return e.split(">").filter((e) => /\S/.test(e)).map((e) => {
|
|
116
|
+
let [t, ...n] = e.split("\n"), [r, ...i] = t.split(" "), a = n.join("").replace(/\s/g, "");
|
|
117
|
+
return {
|
|
118
|
+
id: r,
|
|
119
|
+
description: i.join(" "),
|
|
120
|
+
sequence: a
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
var v = class {
|
|
125
|
+
data;
|
|
126
|
+
indexed;
|
|
127
|
+
constructor({ fasta: t, path: n }) {
|
|
128
|
+
let r;
|
|
129
|
+
if (t) r = t;
|
|
130
|
+
else if (n) r = new e(n);
|
|
131
|
+
else throw Error("Need to pass fasta or path");
|
|
132
|
+
this.data = r.readFile().then((e) => _(g.decode(e)));
|
|
133
|
+
}
|
|
134
|
+
getIndexed() {
|
|
135
|
+
return this.indexed ??= this.data.then((e) => new Map(e.map((e) => [e.id, e]))), this.indexed;
|
|
136
|
+
}
|
|
137
|
+
async fetch(e, t, n) {
|
|
138
|
+
let r = (await this.getIndexed()).get(e);
|
|
139
|
+
if (!r) throw Error(`no sequence with id ${e} exists`);
|
|
140
|
+
return r.sequence.slice(t, n);
|
|
141
|
+
}
|
|
142
|
+
async getSequenceNames() {
|
|
143
|
+
return (await this.data).map((e) => e.id);
|
|
144
|
+
}
|
|
145
|
+
}, y = new TextDecoder("utf8");
|
|
146
|
+
function b(e, t, n, r) {
|
|
147
|
+
return e + t * Math.floor(r / n) + r % n;
|
|
148
|
+
}
|
|
149
|
+
async function x(e, t = {}) {
|
|
150
|
+
let n = y.decode(await e.readFile(t)), r = /* @__PURE__ */ new Map();
|
|
151
|
+
for (let e of n.split("\n")) {
|
|
152
|
+
let t = e.trim();
|
|
153
|
+
if (!t) continue;
|
|
154
|
+
let n = t.split(" ");
|
|
155
|
+
if (n.length < 5) throw Error(`Malformed FAI line (expected 5 tab-separated columns, got ${String(n.length)}): ${t}`);
|
|
156
|
+
let [i, a, o, s, c] = n;
|
|
157
|
+
if (i.startsWith(">")) throw Error("found > in sequence name, might have supplied FASTA file for the FASTA index");
|
|
158
|
+
let l = +a, u = +s;
|
|
159
|
+
if (l > 0 && u === 0) throw Error(`Invalid FAI index for "${i}": LINEBASES is 0, FASTA likely missing trailing newline; regenerate the .fai index`);
|
|
160
|
+
r.set(i, {
|
|
161
|
+
length: l,
|
|
162
|
+
offset: +o,
|
|
163
|
+
lineLength: u,
|
|
164
|
+
lineBytes: +c
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return r;
|
|
168
|
+
}
|
|
169
|
+
async function S(e, t, n = 0, r, i) {
|
|
170
|
+
if (n < 0) throw TypeError("regionStart cannot be less than 0");
|
|
171
|
+
let a = Math.min(r ?? t.length, t.length);
|
|
172
|
+
if (n >= a) return "";
|
|
173
|
+
let o = b(t.offset, t.lineBytes, t.lineLength, n), s = b(t.offset, t.lineBytes, t.lineLength, a) - o, c = y.decode(await e.read(s, o, i)).replace(/\s+/g, "");
|
|
174
|
+
if (/[^\x20-\x7e]/.test(c.slice(0, 1e3))) throw Error("Non-ASCII bytes in sequence; file may be gzip — use BgzipIndexedFasta or decompress");
|
|
175
|
+
return c;
|
|
176
|
+
}
|
|
177
|
+
var C = class {
|
|
178
|
+
fasta;
|
|
179
|
+
fai;
|
|
180
|
+
indexCache = new t({});
|
|
181
|
+
constructor({ fasta: t, fai: n, path: r, faiPath: i }) {
|
|
182
|
+
if (t) this.fasta = t;
|
|
183
|
+
else if (r) this.fasta = new e(r);
|
|
184
|
+
else throw Error("Need to pass filehandle for fasta or path to localfile");
|
|
185
|
+
if (n) this.fai = n;
|
|
186
|
+
else if (i) this.fai = new e(i);
|
|
187
|
+
else if (r) this.fai = new e(`${r}.fai`);
|
|
188
|
+
else throw Error("Need to pass filehandle for fai or path to localfile");
|
|
189
|
+
}
|
|
190
|
+
getIndexes(e) {
|
|
191
|
+
return this.indexCache.get("fai", e?.signal, (t) => x(this.fai, {
|
|
192
|
+
...e,
|
|
193
|
+
signal: t
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
async getSequenceNames(e) {
|
|
197
|
+
return [...(await this.getIndexes(e)).keys()];
|
|
198
|
+
}
|
|
199
|
+
async getSequenceSizes(e) {
|
|
200
|
+
let t = {};
|
|
201
|
+
for (let [n, r] of await this.getIndexes(e)) t[n] = r.length;
|
|
202
|
+
return t;
|
|
203
|
+
}
|
|
204
|
+
async getSequenceSize(e, t) {
|
|
205
|
+
return (await this.getIndexes(t)).get(e)?.length;
|
|
206
|
+
}
|
|
207
|
+
async hasReferenceSequence(e, t) {
|
|
208
|
+
return (await this.getIndexes(t)).has(e);
|
|
209
|
+
}
|
|
210
|
+
async getResiduesByName(e, t, n, r) {
|
|
211
|
+
let i = (await this.getIndexes(r)).get(e);
|
|
212
|
+
if (i !== void 0) return S(this.fasta, i, t, n, r);
|
|
213
|
+
}
|
|
214
|
+
async getSequence(e, t, n, r) {
|
|
215
|
+
return this.getResiduesByName(e, t, n, r);
|
|
216
|
+
}
|
|
217
|
+
}, w = class extends C {
|
|
218
|
+
constructor({ fasta: t, path: n, fai: r, faiPath: i, gzi: a, gziPath: o }) {
|
|
219
|
+
let s;
|
|
220
|
+
if (t && a) s = new h({
|
|
221
|
+
filehandle: t,
|
|
222
|
+
gziFilehandle: a
|
|
223
|
+
});
|
|
224
|
+
else if (n && o) s = new h({
|
|
225
|
+
filehandle: new e(n),
|
|
226
|
+
gziFilehandle: new e(o)
|
|
227
|
+
});
|
|
228
|
+
else throw Error("BgzipIndexedFasta requires either {fasta, gzi} or {path, gziPath}");
|
|
229
|
+
super({
|
|
230
|
+
fasta: s,
|
|
231
|
+
fai: r,
|
|
232
|
+
faiPath: i,
|
|
233
|
+
path: n
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
//#endregion
|
|
238
|
+
export { w as BgzipIndexedFasta, v as FetchableSmallFasta, C as IndexedFasta, _ as parseSmallFasta };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "./rolldown-runtime-
|
|
1
|
+
import { n as e, t } from "./rolldown-runtime-DeIk2rA4.js";
|
|
2
2
|
//#region ../../node_modules/generic-filehandle2/esm/util.js
|
|
3
3
|
async function n(e) {
|
|
4
4
|
return e.bytes ? e.bytes() : new Uint8Array(await e.arrayBuffer());
|
|
@@ -74,20 +74,25 @@ var l = class {
|
|
|
74
74
|
};
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
|
|
77
|
-
function u(e
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
...t
|
|
82
|
-
};
|
|
77
|
+
function u(...e) {
|
|
78
|
+
let t = /* @__PURE__ */ new Map();
|
|
79
|
+
for (let n of e) for (let [e, r] of Object.entries(n ?? {})) t.set(e.toLowerCase(), [e, r]);
|
|
80
|
+
return Object.fromEntries(t.values());
|
|
83
81
|
}
|
|
84
82
|
function d(e) {
|
|
85
|
-
|
|
83
|
+
let t = e.body;
|
|
84
|
+
typeof t?.cancel == "function" && t.cancel().catch(() => void 0);
|
|
86
85
|
}
|
|
87
86
|
function f(e) {
|
|
87
|
+
return Number.isSafeInteger(e) && e >= 0;
|
|
88
|
+
}
|
|
89
|
+
function p(e) {
|
|
90
|
+
return typeof e == "object" && !!e && "name" in e && e.name === "TypeError";
|
|
91
|
+
}
|
|
92
|
+
function m(e) {
|
|
88
93
|
return (typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : `${e}`).replace(/\.$/, "");
|
|
89
94
|
}
|
|
90
|
-
var
|
|
95
|
+
var h = class {
|
|
91
96
|
url;
|
|
92
97
|
get source() {
|
|
93
98
|
return this.url;
|
|
@@ -109,15 +114,12 @@ var p = class {
|
|
|
109
114
|
mode: "cors",
|
|
110
115
|
...this.baseOverrides,
|
|
111
116
|
...e.overrides,
|
|
112
|
-
headers: u(
|
|
113
|
-
...this.baseHeaders,
|
|
114
|
-
...e.headers
|
|
115
|
-
}, t),
|
|
117
|
+
headers: u(this.baseHeaders, e.headers, t),
|
|
116
118
|
...n ? { signal: n } : {}
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
121
|
async fetch(e, t) {
|
|
120
|
-
let n = (
|
|
122
|
+
let n = (n) => p(n) && !t?.signal?.aborted ? Error(`${m(n)} fetching ${e}`, { cause: n }) : n, r;
|
|
121
123
|
try {
|
|
122
124
|
r = await this.fetchImplementation(e, t);
|
|
123
125
|
} catch (i) {
|
|
@@ -136,29 +138,31 @@ var p = class {
|
|
|
136
138
|
return r;
|
|
137
139
|
}
|
|
138
140
|
async read(e, t, n = {}) {
|
|
139
|
-
if (e
|
|
140
|
-
|
|
141
|
-
return this.fetchBytes(e, t, n);
|
|
141
|
+
if (!f(e) || !f(t)) throw TypeError(`read() called with an invalid length or position (length=${e}, position=${t}). The index file may be corrupt.`);
|
|
142
|
+
return e === 0 ? /* @__PURE__ */ new Uint8Array() : this.fetchBytes(e, t, n);
|
|
142
143
|
}
|
|
143
144
|
async fetchBytes(e, t, r) {
|
|
144
145
|
let i = await this.fetch(this.url, this.buildRequest(r, { range: `bytes=${t}-${t + e - 1}` }));
|
|
145
|
-
if (i.status === 416) return /* @__PURE__ */ new Uint8Array();
|
|
146
|
+
if (i.status === 416) return d(i), /* @__PURE__ */ new Uint8Array();
|
|
146
147
|
if (this.checkOk(i), i.status === 200 && t === 0 || i.status === 206) {
|
|
147
148
|
let t = a(i.headers.get("content-range"));
|
|
148
149
|
t !== void 0 && (this._stat = { size: t });
|
|
149
150
|
let o = r.onProgress ? await c(i, r.onProgress) : await n(i);
|
|
150
151
|
return !this._stat && i.status === 200 && (this._stat = { size: o.byteLength }), o.byteLength <= e ? o : o.slice(0, e);
|
|
151
152
|
}
|
|
152
|
-
throw Error(i.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${i.status} fetching ${this.url}`);
|
|
153
|
+
throw d(i), Error(i.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${i.status} fetching ${this.url}`);
|
|
153
154
|
}
|
|
154
155
|
checkOk(e) {
|
|
155
|
-
if (!e.ok) throw Error(`HTTP ${e.status} fetching ${this.url}`);
|
|
156
|
+
if (!e.ok) throw d(e), Error(`HTTP ${e.status} fetching ${this.url}`);
|
|
156
157
|
}
|
|
157
158
|
async readFile(e) {
|
|
158
|
-
let { encoding: t, opts: n } = i(e),
|
|
159
|
-
this.checkOk(
|
|
160
|
-
let
|
|
161
|
-
return
|
|
159
|
+
let { encoding: t, opts: n } = i(e), r = await this.fetch(this.url, this.buildRequest(n));
|
|
160
|
+
this.checkOk(r);
|
|
161
|
+
let a = await this.readFileBody(r, t, n.onProgress);
|
|
162
|
+
return r.status === 200 && typeof a != "string" && (this._stat = { size: a.byteLength }), a;
|
|
163
|
+
}
|
|
164
|
+
readFileBody(e, t, n) {
|
|
165
|
+
return r(e, t, n);
|
|
162
166
|
}
|
|
163
167
|
async stat() {
|
|
164
168
|
return this._stat || (this.statProbe ??= this.read(10, 0).finally(() => {
|
|
@@ -168,13 +172,13 @@ var p = class {
|
|
|
168
172
|
close() {
|
|
169
173
|
return Promise.resolve();
|
|
170
174
|
}
|
|
171
|
-
},
|
|
175
|
+
}, g = (/* @__PURE__ */ t(((e, t) => {
|
|
172
176
|
t.exports = {};
|
|
173
177
|
})))();
|
|
174
|
-
function
|
|
178
|
+
function _(e) {
|
|
175
179
|
return typeof e == "object" && !!e && "unref" in e && typeof e.unref == "function";
|
|
176
180
|
}
|
|
177
|
-
var
|
|
181
|
+
var v = class {
|
|
178
182
|
filename;
|
|
179
183
|
get source() {
|
|
180
184
|
return this.filename;
|
|
@@ -190,10 +194,10 @@ var g = class {
|
|
|
190
194
|
touch() {
|
|
191
195
|
this.fdIdleTimeoutMs <= 0 || (this.idleTimer !== void 0 && clearTimeout(this.idleTimer), this.idleTimer = setTimeout(() => {
|
|
192
196
|
this.idleTimer = void 0, this.dropHandle();
|
|
193
|
-
}, this.fdIdleTimeoutMs),
|
|
197
|
+
}, this.fdIdleTimeoutMs), _(this.idleTimer) && this.idleTimer.unref());
|
|
194
198
|
}
|
|
195
199
|
async handle() {
|
|
196
|
-
return this.fh ? this.fh : (this.opening ??= (0,
|
|
200
|
+
return this.fh ? this.fh : (this.opening ??= (0, g.open)(this.filename, "r").then((e) => (this.fh = e, this.opening = void 0, e), (e) => {
|
|
197
201
|
throw this.opening = void 0, e;
|
|
198
202
|
}), this.opening);
|
|
199
203
|
}
|
|
@@ -224,7 +228,7 @@ var g = class {
|
|
|
224
228
|
async readWithOwnHandle(e, t, n) {
|
|
225
229
|
let r;
|
|
226
230
|
try {
|
|
227
|
-
return r = await (0,
|
|
231
|
+
return r = await (0, g.open)(this.filename, "r"), await this.readFrom(r, e, t, n);
|
|
228
232
|
} finally {
|
|
229
233
|
if (r) try {
|
|
230
234
|
await r.close();
|
|
@@ -232,18 +236,18 @@ var g = class {
|
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
async readFile(e) {
|
|
235
|
-
return (0,
|
|
239
|
+
return (0, g.readFile)(this.filename, e);
|
|
236
240
|
}
|
|
237
241
|
async stat() {
|
|
238
|
-
return (0,
|
|
242
|
+
return (0, g.stat)(this.filename);
|
|
239
243
|
}
|
|
240
244
|
async close() {
|
|
241
245
|
await this.dropHandle();
|
|
242
246
|
}
|
|
243
|
-
},
|
|
247
|
+
}, y = /* @__PURE__ */ e({
|
|
244
248
|
BlobFile: () => l,
|
|
245
|
-
LocalFile: () =>
|
|
246
|
-
RemoteFile: () =>
|
|
249
|
+
LocalFile: () => v,
|
|
250
|
+
RemoteFile: () => h
|
|
247
251
|
});
|
|
248
252
|
//#endregion
|
|
249
|
-
export {
|
|
253
|
+
export { v as n, h as r, y as t };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t as e } from "./tableMetadataSourceAdapter-DQrEXCo6.js";
|
|
2
|
+
import { r as t } from "./url-DeOdSRrv.js";
|
|
3
|
+
import { FigWig as n } from "./dist-D6xbz5Ks.js";
|
|
4
|
+
//#region src/sampleView/metadata/adapters/figWigMetadataSourceAdapter.js
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
#e;
|
|
7
|
+
constructor(e, n = {}) {
|
|
8
|
+
super(e, {
|
|
9
|
+
...n,
|
|
10
|
+
sampleIdField: "name",
|
|
11
|
+
excludedColumns: [
|
|
12
|
+
"dtype",
|
|
13
|
+
"group",
|
|
14
|
+
"sample"
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
let r = e.backend;
|
|
18
|
+
this.#e = t(n.baseUrl, r.url);
|
|
19
|
+
}
|
|
20
|
+
async loadRows(e) {
|
|
21
|
+
let t = new n({ url: this.#e });
|
|
22
|
+
try {
|
|
23
|
+
return (await t.getTracks({ signal: e })).map((e) => {
|
|
24
|
+
let t = {
|
|
25
|
+
...e.metadata,
|
|
26
|
+
name: e.name
|
|
27
|
+
};
|
|
28
|
+
return delete t.dtype, delete t.group, t;
|
|
29
|
+
});
|
|
30
|
+
} finally {
|
|
31
|
+
await t.close();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { u as e } from "./flowOutput-D5qpxWe0.js";
|
|
2
|
+
import { t } from "./tableMetadataSourceAdapter-CUNwLsdi.js";
|
|
3
|
+
import { FigWig as n } from "./dist-CmY6iewb.js";
|
|
4
|
+
//#region src/sampleView/metadata/adapters/figWigMetadataSourceAdapter.js
|
|
5
|
+
var r = class extends t {
|
|
6
|
+
#e;
|
|
7
|
+
constructor(t, n = {}) {
|
|
8
|
+
super(t, {
|
|
9
|
+
...n,
|
|
10
|
+
sampleIdField: "name",
|
|
11
|
+
excludedColumns: [
|
|
12
|
+
"dtype",
|
|
13
|
+
"group",
|
|
14
|
+
"sample"
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
let r = t.backend;
|
|
18
|
+
this.#e = e(n.baseUrl, r.url);
|
|
19
|
+
}
|
|
20
|
+
async loadRows(e) {
|
|
21
|
+
let t = new n({ url: this.#e });
|
|
22
|
+
try {
|
|
23
|
+
return (await t.getTracks({ signal: e })).map((e) => {
|
|
24
|
+
let t = {
|
|
25
|
+
...e.metadata,
|
|
26
|
+
name: e.name
|
|
27
|
+
};
|
|
28
|
+
return delete t.dtype, delete t.group, t;
|
|
29
|
+
});
|
|
30
|
+
} finally {
|
|
31
|
+
await t.close();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as default };
|