@genome-spy/core 0.51.0 → 0.53.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/bundle/{index-C8lYPtq_.js → index-B5cesONJ.js} +21 -21
- package/dist/bundle/index-BJLu48Hz.js +274 -0
- package/dist/bundle/{index-Sk-Wtwdn.js → index-BywMLhhd.js} +963 -989
- package/dist/bundle/{index-BwFvhduA.js → index-CSayoXbw.js} +7 -9
- package/dist/bundle/{index-CkI3Kd2P.js → index-DAJ8JQLE.js} +6 -5
- package/dist/bundle/{index-BtRKzKhM.js → index-_tI-fMQF.js} +414 -415
- package/dist/bundle/{index-CmBp-spD.js → index-e0oKgZbZ.js} +36 -36
- package/dist/bundle/{index-Z7JiNsFI.js → index-oqw_s02W.js} +10 -11
- package/dist/bundle/{index-mihmTLo-.js → index-uO0O4Uv-.js} +22 -22
- package/dist/bundle/index.es.js +4088 -4006
- package/dist/bundle/index.js +233 -112
- package/dist/bundle/{long-CYrAUkxh.js → long-D4tVjLLz.js} +5 -5
- package/dist/bundle/remoteFile-BkTxwFub.js +90 -0
- package/dist/schema.json +53 -12
- package/dist/src/data/sources/dataUtils.d.ts +5 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +9 -0
- package/dist/src/data/sources/lazy/axisTickSource.js +1 -1
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts +4 -6
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.js +4 -18
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +12 -7
- package/dist/src/data/transforms/clone.d.ts +1 -2
- package/dist/src/data/transforms/clone.d.ts.map +1 -1
- package/dist/src/data/transforms/clone.js +19 -4
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +1 -4
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/encoder/encoder.d.ts +1 -1
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
- package/dist/src/genome/genome.d.ts +24 -2
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +66 -28
- package/dist/src/genome/genome.test.js +43 -1
- package/dist/src/genome/genomes.d.ts +8 -0
- package/dist/src/genome/genomes.d.ts.map +1 -0
- package/dist/src/genome/genomes.js +164 -0
- package/dist/src/genome/genomes.test.d.ts +2 -0
- package/dist/src/genome/genomes.test.d.ts.map +1 -0
- package/dist/src/genome/genomes.test.js +8 -0
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/spec/axis.d.ts +0 -2
- package/dist/src/spec/genome.d.ts +19 -6
- package/dist/src/spec/scale.d.ts +1 -1
- package/dist/src/utils/addBaseUrl.d.ts +6 -0
- package/dist/src/utils/addBaseUrl.d.ts.map +1 -1
- package/dist/src/utils/addBaseUrl.js +18 -0
- package/dist/src/utils/addBaseUrl.test.js +9 -1
- package/dist/src/utils/cloner.d.ts +8 -2
- package/dist/src/utils/cloner.d.ts.map +1 -1
- package/dist/src/utils/cloner.js +19 -2
- package/dist/src/utils/cloner.test.js +16 -5
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.d.ts +1 -1
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +4 -1
- package/dist/src/view/paramMediator.d.ts +8 -3
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +3 -1
- package/dist/src/view/scaleResolution.d.ts +9 -0
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +30 -0
- package/dist/src/view/view.d.ts +20 -3
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +30 -2
- package/dist/src/view/view.test.js +15 -5
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/bundle/index-Dixm7K89.js +0 -279
- package/dist/bundle/remoteFile-1_eCK3VV.js +0 -96
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as Pi } from "./index-
|
|
1
|
+
import { b as Pi } from "./index-B5cesONJ.js";
|
|
2
2
|
import { g as Da } from "./_commonjsHelpers-BIiJCwQW.js";
|
|
3
3
|
var re = {};
|
|
4
4
|
(function(e) {
|
|
@@ -177,7 +177,7 @@ function aa(e) {
|
|
|
177
177
|
e.bi_valid > 8 ? Ye(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
178
178
|
}
|
|
179
179
|
function Wa(e, i, t, a) {
|
|
180
|
-
aa(e),
|
|
180
|
+
aa(e), Ye(e, t), Ye(e, ~t), Ra.arraySet(e.pending_buf, e.window, i, t, e.pending), e.pending += t;
|
|
181
181
|
}
|
|
182
182
|
function Jt(e, i, t, a) {
|
|
183
183
|
var r = i * 2, n = t * 2;
|
|
@@ -282,7 +282,7 @@ function Qa(e) {
|
|
|
282
282
|
ii || (Ga(), ii = !0), e.l_desc = new xt(e.dyn_ltree, ji), e.d_desc = new xt(e.dyn_dtree, Vi), e.bl_desc = new xt(e.bl_tree, Ji), e.bi_buf = 0, e.bi_valid = 0, ia(e);
|
|
283
283
|
}
|
|
284
284
|
function na(e, i, t, a) {
|
|
285
|
-
C(e, (Ua << 1) + (a ? 1 : 0), 3), Wa(e, i, t
|
|
285
|
+
C(e, (Ua << 1) + (a ? 1 : 0), 3), Wa(e, i, t);
|
|
286
286
|
}
|
|
287
287
|
function en(e) {
|
|
288
288
|
C(e, Ki << 1, 3), ee(e, Ht, ne), Xa(e);
|
|
@@ -560,7 +560,7 @@ function ua(e, i, t, a, r, n) {
|
|
|
560
560
|
return ue(e, X);
|
|
561
561
|
a === 8 && (a = 9);
|
|
562
562
|
var f = new Ln();
|
|
563
|
-
return e.state = f, f.strm = e, f.wrap = h, f.gzhead = null, f.w_bits = a, f.w_size = 1 << f.w_bits, f.w_mask = f.w_size - 1, f.hash_bits = r + 7, f.hash_size = 1 << f.hash_bits, f.hash_mask = f.hash_size - 1, f.hash_shift = ~~((f.hash_bits + S - 1) / S), f.window = new B.Buf8(f.w_size * 2), f.head = new B.Buf16(f.hash_size), f.prev = new B.Buf16(f.w_size), f.lit_bufsize = 1 << r + 6, f.pending_buf_size = f.lit_bufsize * 4, f.pending_buf = new B.Buf8(f.pending_buf_size), f.d_buf = 1 * f.lit_bufsize, f.l_buf =
|
|
563
|
+
return e.state = f, f.strm = e, f.wrap = h, f.gzhead = null, f.w_bits = a, f.w_size = 1 << f.w_bits, f.w_mask = f.w_size - 1, f.hash_bits = r + 7, f.hash_size = 1 << f.hash_bits, f.hash_mask = f.hash_size - 1, f.hash_shift = ~~((f.hash_bits + S - 1) / S), f.window = new B.Buf8(f.w_size * 2), f.head = new B.Buf16(f.hash_size), f.prev = new B.Buf16(f.w_size), f.lit_bufsize = 1 << r + 6, f.pending_buf_size = f.lit_bufsize * 4, f.pending_buf = new B.Buf8(f.pending_buf_size), f.d_buf = 1 * f.lit_bufsize, f.l_buf = 3 * f.lit_bufsize, f.level = i, f.strategy = n, f.method = t, _a(e);
|
|
564
564
|
}
|
|
565
565
|
function Rn(e, i) {
|
|
566
566
|
return ua(e, i, vt, pn, xn, gn);
|
|
@@ -1036,7 +1036,7 @@ var je = {}, j = {}, it = 30, Gn = 12, Wn = function(i, t) {
|
|
|
1036
1036
|
if (i === ui ? (m = Je = f, x = 19) : i === mt ? (m = jn, I -= 257, Je = Vn, Gt -= 257, x = 256) : (m = Jn, Je = Qn, x = -1), z = 0, v = 0, o = d, p = h, w = g, k = 0, T = -1, N = 1 << g, y = N - 1, i === mt && N > oi || i === di && N > _i)
|
|
1037
1037
|
return 1;
|
|
1038
1038
|
for (; ; ) {
|
|
1039
|
-
Wt = o - k, f[v] < x ? (Qe = 0, et = f[v]) : f[v] > x ? (Qe = Je[Gt + f[v]], et = m[I + f[v]]) : (Qe =
|
|
1039
|
+
Wt = o - k, f[v] < x ? (Qe = 0, et = f[v]) : f[v] > x ? (Qe = Je[Gt + f[v]], et = m[I + f[v]]) : (Qe = 96, et = 0), E = 1 << o - k, c = 1 << w, d = c;
|
|
1040
1040
|
do
|
|
1041
1041
|
c -= E, n[p + (z >> k) + c] = Wt << 24 | Qe << 16 | et | 0;
|
|
1042
1042
|
while (c !== 0);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { b as d } from "./index-B5cesONJ.js";
|
|
2
|
+
class b {
|
|
3
|
+
async getBufferFromResponse(e) {
|
|
4
|
+
const t = await e.arrayBuffer();
|
|
5
|
+
return d.Buffer.from(t);
|
|
6
|
+
}
|
|
7
|
+
constructor(e, t = {}) {
|
|
8
|
+
this.baseOverrides = {}, this.url = e;
|
|
9
|
+
const r = t.fetch || globalThis.fetch.bind(globalThis);
|
|
10
|
+
if (!r)
|
|
11
|
+
throw new TypeError("no fetch function supplied, and none found in global environment");
|
|
12
|
+
t.overrides && (this.baseOverrides = t.overrides), this.fetchImplementation = r;
|
|
13
|
+
}
|
|
14
|
+
async fetch(e, t) {
|
|
15
|
+
let r;
|
|
16
|
+
try {
|
|
17
|
+
r = await this.fetchImplementation(e, t);
|
|
18
|
+
} catch (s) {
|
|
19
|
+
if (`${s}`.includes("Failed to fetch"))
|
|
20
|
+
console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`), r = await this.fetchImplementation(e, {
|
|
21
|
+
...t,
|
|
22
|
+
cache: "reload"
|
|
23
|
+
});
|
|
24
|
+
else
|
|
25
|
+
throw s;
|
|
26
|
+
}
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
async read(e, t = 0, r, s = 0, h = {}) {
|
|
30
|
+
const { headers: n = {}, signal: c, overrides: a = {} } = h;
|
|
31
|
+
r < 1 / 0 ? n.range = `bytes=${s}-${s + r}` : r === 1 / 0 && s !== 0 && (n.range = `bytes=${s}-`);
|
|
32
|
+
const l = {
|
|
33
|
+
...this.baseOverrides,
|
|
34
|
+
...a,
|
|
35
|
+
headers: {
|
|
36
|
+
...n,
|
|
37
|
+
...a.headers,
|
|
38
|
+
...this.baseOverrides.headers
|
|
39
|
+
},
|
|
40
|
+
method: "GET",
|
|
41
|
+
redirect: "follow",
|
|
42
|
+
mode: "cors",
|
|
43
|
+
signal: c
|
|
44
|
+
}, i = await this.fetch(this.url, l);
|
|
45
|
+
if (!i.ok)
|
|
46
|
+
throw new Error(`HTTP ${i.status} ${i.statusText} ${this.url}`);
|
|
47
|
+
if (i.status === 200 && s === 0 || i.status === 206) {
|
|
48
|
+
const f = await this.getBufferFromResponse(i), u = f.copy(e, t, 0, Math.min(r, f.length)), w = i.headers.get("content-range"), o = /\/(\d+)$/.exec(w || "");
|
|
49
|
+
return o != null && o[1] && (this._stat = { size: parseInt(o[1], 10) }), { bytesRead: u, buffer: e };
|
|
50
|
+
}
|
|
51
|
+
throw i.status === 200 ? new Error("${this.url} fetch returned status 200, expected 206") : new Error(`HTTP ${i.status} fetching ${this.url}`);
|
|
52
|
+
}
|
|
53
|
+
async readFile(e = {}) {
|
|
54
|
+
let t, r;
|
|
55
|
+
typeof e == "string" ? (t = e, r = {}) : (t = e.encoding, r = e, delete r.encoding);
|
|
56
|
+
const { headers: s = {}, signal: h, overrides: n = {} } = r, c = {
|
|
57
|
+
headers: s,
|
|
58
|
+
method: "GET",
|
|
59
|
+
redirect: "follow",
|
|
60
|
+
mode: "cors",
|
|
61
|
+
signal: h,
|
|
62
|
+
...this.baseOverrides,
|
|
63
|
+
...n
|
|
64
|
+
}, a = await this.fetch(this.url, c);
|
|
65
|
+
if (!a)
|
|
66
|
+
throw new Error("generic-filehandle failed to fetch");
|
|
67
|
+
if (a.status !== 200)
|
|
68
|
+
throw Object.assign(new Error(`HTTP ${a.status} fetching ${this.url}`), {
|
|
69
|
+
status: a.status
|
|
70
|
+
});
|
|
71
|
+
if (t === "utf8")
|
|
72
|
+
return a.text();
|
|
73
|
+
if (t)
|
|
74
|
+
throw new Error(`unsupported encoding: ${t}`);
|
|
75
|
+
return this.getBufferFromResponse(a);
|
|
76
|
+
}
|
|
77
|
+
async stat() {
|
|
78
|
+
if (!this._stat) {
|
|
79
|
+
const e = d.Buffer.allocUnsafe(10);
|
|
80
|
+
if (await this.read(e, 0, 10, 0), !this._stat)
|
|
81
|
+
throw new Error(`unable to determine size of file at ${this.url}`);
|
|
82
|
+
}
|
|
83
|
+
return this._stat;
|
|
84
|
+
}
|
|
85
|
+
async close() {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
b as R
|
|
90
|
+
};
|
package/dist/schema.json
CHANGED
|
@@ -2843,19 +2843,21 @@
|
|
|
2843
2843
|
"type": "object"
|
|
2844
2844
|
},
|
|
2845
2845
|
"GenomeConfig": {
|
|
2846
|
-
"
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
"description": "Base url of data files: chromsizes, cytobands, and gene annotations.\n\n**Default:** `\"https://genomespy.app/data/genomes/\"`",
|
|
2850
|
-
"type": "string"
|
|
2846
|
+
"anyOf": [
|
|
2847
|
+
{
|
|
2848
|
+
"$ref": "#/definitions/UrlGenomeConfig"
|
|
2851
2849
|
},
|
|
2852
|
-
|
|
2853
|
-
"
|
|
2854
|
-
"items": {
|
|
2855
|
-
"$ref": "#/definitions/Contig"
|
|
2856
|
-
},
|
|
2857
|
-
"type": "array"
|
|
2850
|
+
{
|
|
2851
|
+
"$ref": "#/definitions/InlineGenomeConfig"
|
|
2858
2852
|
},
|
|
2853
|
+
{
|
|
2854
|
+
"$ref": "#/definitions/GenomeConfigBase"
|
|
2855
|
+
}
|
|
2856
|
+
]
|
|
2857
|
+
},
|
|
2858
|
+
"GenomeConfigBase": {
|
|
2859
|
+
"additionalProperties": false,
|
|
2860
|
+
"properties": {
|
|
2859
2861
|
"name": {
|
|
2860
2862
|
"description": "Name of the genome assembly, e.g., `hg19` or `hg38`.",
|
|
2861
2863
|
"type": "string"
|
|
@@ -3286,6 +3288,27 @@
|
|
|
3286
3288
|
}
|
|
3287
3289
|
]
|
|
3288
3290
|
},
|
|
3291
|
+
"InlineGenomeConfig": {
|
|
3292
|
+
"additionalProperties": false,
|
|
3293
|
+
"properties": {
|
|
3294
|
+
"contigs": {
|
|
3295
|
+
"description": "An array of contigs/sequences in the genome assembly.",
|
|
3296
|
+
"items": {
|
|
3297
|
+
"$ref": "#/definitions/Contig"
|
|
3298
|
+
},
|
|
3299
|
+
"type": "array"
|
|
3300
|
+
},
|
|
3301
|
+
"name": {
|
|
3302
|
+
"description": "Name of the genome assembly, e.g., `hg19` or `hg38`.",
|
|
3303
|
+
"type": "string"
|
|
3304
|
+
}
|
|
3305
|
+
},
|
|
3306
|
+
"required": [
|
|
3307
|
+
"contigs",
|
|
3308
|
+
"name"
|
|
3309
|
+
],
|
|
3310
|
+
"type": "object"
|
|
3311
|
+
},
|
|
3289
3312
|
"IntervalSelectionConfig": {
|
|
3290
3313
|
"additionalProperties": false,
|
|
3291
3314
|
"properties": {
|
|
@@ -7109,7 +7132,7 @@
|
|
|
7109
7132
|
"description": "Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\n\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\n\n__Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise."
|
|
7110
7133
|
},
|
|
7111
7134
|
"padding": {
|
|
7112
|
-
"description": "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed
|
|
7135
|
+
"description": "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.\n\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`. For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.",
|
|
7113
7136
|
"minimum": 0,
|
|
7114
7137
|
"type": "number"
|
|
7115
7138
|
},
|
|
@@ -8385,6 +8408,24 @@
|
|
|
8385
8408
|
],
|
|
8386
8409
|
"type": "object"
|
|
8387
8410
|
},
|
|
8411
|
+
"UrlGenomeConfig": {
|
|
8412
|
+
"additionalProperties": false,
|
|
8413
|
+
"properties": {
|
|
8414
|
+
"name": {
|
|
8415
|
+
"description": "Name of the genome assembly, e.g., `hg19` or `hg38`.",
|
|
8416
|
+
"type": "string"
|
|
8417
|
+
},
|
|
8418
|
+
"url": {
|
|
8419
|
+
"description": "A URL to a `chrom.sizes` file, which is a tab-separated file with two columns: the sequence name and its size.\n\nYou may want to strip alternative loci, haplotypes, and other non-canonical contigs from the file.\n\nExample: `\"https://genomespy.app/data/genomes/hg19/chrom.sizes\"`",
|
|
8420
|
+
"type": "string"
|
|
8421
|
+
}
|
|
8422
|
+
},
|
|
8423
|
+
"required": [
|
|
8424
|
+
"name",
|
|
8425
|
+
"url"
|
|
8426
|
+
],
|
|
8427
|
+
"type": "object"
|
|
8428
|
+
},
|
|
8388
8429
|
"UrlImport": {
|
|
8389
8430
|
"additionalProperties": false,
|
|
8390
8431
|
"properties": {
|
|
@@ -19,6 +19,11 @@ export function getFormat(params: import("../../spec/data.js").DataSource): {
|
|
|
19
19
|
} | {
|
|
20
20
|
type: string;
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} type
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
export function responseType(type: string): string;
|
|
22
27
|
/**
|
|
23
28
|
* @param {string | string[]} url
|
|
24
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataUtils.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataUtils.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataUtils.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,kCAHW,OAAO,oBAAoB,EAAE,UAAU;;;;;;;;;;;;;EAsBjD;AAED;;;GAGG;AACH,mCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;GAEG;AACH,wCAFW,MAAM,GAAG,MAAM,EAAE,UAU3B;AAWD;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,UAAU,4DAKjD;AAED;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,UAAU,4DAKjD;AAED;;;GAGG;AACH,6CAHW,OAAO,oBAAoB,EAAE,UAAU,6DAKjD;AAED;;;;GAIG;AACH,sCAHW,OAAO,oBAAoB,EAAE,UAAU,sDAKjD;AAxCM,+BAAgC,GAAG,QAI3B,OAAO,uBAAuB,EAAE,MAAM;;UAGtB,OAAO,gBAAgB,EAAE,KAAK,qCANR"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formats } from "vega-loader";
|
|
1
2
|
import { withoutExprRef } from "../../view/paramMediator.js";
|
|
2
3
|
import { isInlineData } from "./inlineSource.js";
|
|
3
4
|
|
|
@@ -29,6 +30,14 @@ export function getFormat(params) {
|
|
|
29
30
|
return format;
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @param {string} type
|
|
35
|
+
* @returns {string}
|
|
36
|
+
*/
|
|
37
|
+
export function responseType(type) {
|
|
38
|
+
return formats(type)?.responseType ?? "text";
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
/**
|
|
33
42
|
* @param {string | string[]} url
|
|
34
43
|
*/
|
|
@@ -47,8 +47,8 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
47
47
|
// synchronously to ensure that the new ticks are available before the next frame is drawn.
|
|
48
48
|
|
|
49
49
|
const scale = this.scaleResolution.scale;
|
|
50
|
+
const axisLength = this.scaleResolution.getAxisLength();
|
|
50
51
|
const axisParams = this.params.axis;
|
|
51
|
-
const axisLength = this.getAxisLength();
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Make ticks more dense in small plots.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"AAGA;IAeI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,OAAO,QACvC,OAAO,uBAAuB,EAAE,OAAO,EAmDjD;IAhED;;;;;;;;OAQG;IACH,
|
|
1
|
+
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"AAGA;IAeI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,OAAO,QACvC,OAAO,uBAAuB,EAAE,OAAO,EAmDjD;IAhED;;;;;;;;OAQG;IACH,gBAFU,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAEH;IAkB1B,gDAAgC;IAQhC,iCA4BE;;CAmCT;qCAxGoC,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"AAOA;IAUI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAmCjD;IA9CD,0CAA0C;IAC1C,QADW,OAAO,WAAW,EAAE,OAAO,CAC/B;IAEP,yCAAyC;IACzC,KADW,OAAO,WAAW,EAAE,MAAM,CACjC;IAEJ,4GAA4G;IAC5G,
|
|
1
|
+
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"AAOA;IAUI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAmCjD;IA9CD,0CAA0C;IAC1C,QADW,OAAO,WAAW,EAAE,OAAO,CAC/B;IAEP,yCAAyC;IACzC,KADW,OAAO,WAAW,EAAE,MAAM,CACjC;IAEJ,4GAA4G;IAC5G,WADW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,MAAM,EAAE,GAAG,CAAC,CAC9F;IA8BN,mDAA6B;;CAoFpC;qCA5HoC,+BAA+B"}
|
|
@@ -111,7 +111,7 @@ export default class BigWigSource extends SingleAxisWindowedSource {
|
|
|
111
111
|
await this.initializedPromise;
|
|
112
112
|
|
|
113
113
|
// TODO: Postpone the initial load until layout is computed and remove 700.
|
|
114
|
-
const length = this.getAxisLength() || 700;
|
|
114
|
+
const length = this.scaleResolution.getAxisLength() || 700;
|
|
115
115
|
|
|
116
116
|
const reductionLevel = findReductionLevel(
|
|
117
117
|
domain,
|
|
@@ -15,11 +15,6 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
15
15
|
/** @type {import("../../../spec/channel.js").PrimaryPositionalChannel} */
|
|
16
16
|
channel: import("../../../spec/channel.js").PrimaryPositionalChannel;
|
|
17
17
|
scaleResolution: import("../../../view/scaleResolution.js").default;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the length of the axis in pixels. Chooses the smallest of the views.
|
|
20
|
-
* They should all be the same, but some exotic configuration might break that assumption.
|
|
21
|
-
*/
|
|
22
|
-
getAxisLength(): number;
|
|
23
18
|
/**
|
|
24
19
|
* Convenience getter for genome.
|
|
25
20
|
*
|
|
@@ -42,7 +37,10 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
42
37
|
*/
|
|
43
38
|
protected requestRender(): void;
|
|
44
39
|
/**
|
|
45
|
-
* Resets the data flow and propagates the data.
|
|
40
|
+
* Resets the data flow and propagates the data, which should be an array of data chunks.
|
|
41
|
+
* A chunk is an ordinary array of data objects. Typically all data objects are stored
|
|
42
|
+
* in a single chunk, but sometimes they may be split into multiple chunks, e.g., one per
|
|
43
|
+
* chromosome.
|
|
46
44
|
*
|
|
47
45
|
* @param {import("../../flowNode.js").Datum[][]} chunks An array of data chunks.
|
|
48
46
|
* @protected
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAOI;;;OAGG;IACH,kBAHW,OAAO,uBAAuB,EAAE,OAAO,WACvC,OAAO,0BAA0B,EAAE,wBAAwB,EA+CrE;IAvDD;;;OAGG;IACH,4CAAuC;IAmBnC,2EAA2E;IAC3E,SADW,OAAO,0BAA0B,EAAE,wBAAwB,CAChD;IAEtB,oEAA4D;IA+BhE
|
|
1
|
+
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAOI;;;OAGG;IACH,kBAHW,OAAO,uBAAuB,EAAE,OAAO,WACvC,OAAO,0BAA0B,EAAE,wBAAwB,EA+CrE;IAvDD;;;OAGG;IACH,4CAAuC;IAmBnC,2EAA2E;IAC3E,SADW,OAAO,0BAA0B,EAAE,wBAAwB,CAChD;IAEtB,oEAA4D;IA+BhE;;;;OAIG;IACH,oEAEC;IAED;;;;;;OAMG;IACH,wBAJW,MAAM,EAAE,iBACR,OAAO,yBAAyB,EAAE,gBAAgB,EAAE,QAK9D;IAED;;;;;OAKG;IACH,gCAGC;IAQD;;;;;;;;OAQG;IACH,8BAHW,OAAO,mBAAmB,EAAE,KAAK,EAAE,EAAE,QAgB/C;CACJ;uBA5HsB,kBAAkB"}
|
|
@@ -63,23 +63,6 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* Returns the length of the axis in pixels. Chooses the smallest of the views.
|
|
68
|
-
* They should all be the same, but some exotic configuration might break that assumption.
|
|
69
|
-
*/
|
|
70
|
-
getAxisLength() {
|
|
71
|
-
const lengths = this.scaleResolution.members
|
|
72
|
-
.map(
|
|
73
|
-
(m) =>
|
|
74
|
-
m.view.coords?.[this.channel === "x" ? "width" : "height"]
|
|
75
|
-
)
|
|
76
|
-
.filter((len) => len > 0);
|
|
77
|
-
|
|
78
|
-
return lengths.length
|
|
79
|
-
? lengths.reduce((a, b) => Math.min(a, b), 10000)
|
|
80
|
-
: 0;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
66
|
/**
|
|
84
67
|
* Convenience getter for genome.
|
|
85
68
|
*
|
|
@@ -118,7 +101,10 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
118
101
|
}
|
|
119
102
|
|
|
120
103
|
/**
|
|
121
|
-
* Resets the data flow and propagates the data.
|
|
104
|
+
* Resets the data flow and propagates the data, which should be an array of data chunks.
|
|
105
|
+
* A chunk is an ordinary array of data objects. Typically all data objects are stored
|
|
106
|
+
* in a single chunk, but sometimes they may be split into multiple chunks, e.g., one per
|
|
107
|
+
* chromosome.
|
|
122
108
|
*
|
|
123
109
|
* @param {import("../../flowNode.js").Datum[][]} chunks An array of data chunks.
|
|
124
110
|
* @protected
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"AASA;;;GAGG;AACH,gCAHW,QAAQ,OAAO,oBAAoB,EAAE,IAAI,CAAC,gDAKpD;AAED;IACI;;;OAGG;IACH,oBAHW,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,oBAAoB,EAAE,OAAO,EAU9C;IALG,6CAEC;IAED,gBAAiC;
|
|
1
|
+
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"AASA;;;GAGG;AACH,gCAHW,QAAQ,OAAO,oBAAoB,EAAE,IAAI,CAAC,gDAKpD;AAED;IACI;;;OAGG;IACH,oBAHW,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,oBAAoB,EAAE,OAAO,EAU9C;IALG,6CAEC;IAED,gBAAiC;CAsExC;uBAjGsB,iBAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { read } from "vega-loader";
|
|
2
|
-
import { getFormat } from "./dataUtils.js";
|
|
2
|
+
import { getFormat, responseType } from "./dataUtils.js";
|
|
3
3
|
import DataSource from "./dataSource.js";
|
|
4
4
|
import {
|
|
5
5
|
activateExprRefProps,
|
|
@@ -40,6 +40,9 @@ export default class UrlSource extends DataSource {
|
|
|
40
40
|
/** @type {string[]} */
|
|
41
41
|
const urls = Array.isArray(url) ? url : [url];
|
|
42
42
|
|
|
43
|
+
const format = getFormat(this.params);
|
|
44
|
+
const type = responseType(format.type);
|
|
45
|
+
|
|
43
46
|
if (urls.length === 0 || !urls[0]) {
|
|
44
47
|
this.reset();
|
|
45
48
|
this.complete();
|
|
@@ -54,8 +57,11 @@ export default class UrlSource extends DataSource {
|
|
|
54
57
|
if (!result.ok) {
|
|
55
58
|
throw new Error(`${result.status} ${result.statusText}`);
|
|
56
59
|
}
|
|
57
|
-
//
|
|
58
|
-
return result
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
return typeof result[type] == "function"
|
|
62
|
+
? // @ts-ignore
|
|
63
|
+
result[type]()
|
|
64
|
+
: result.text();
|
|
59
65
|
} catch (e) {
|
|
60
66
|
throw new Error(
|
|
61
67
|
`Could not load data: ${url}. Reason: ${e.message}`
|
|
@@ -64,13 +70,13 @@ export default class UrlSource extends DataSource {
|
|
|
64
70
|
};
|
|
65
71
|
|
|
66
72
|
/**
|
|
67
|
-
* @param {
|
|
73
|
+
* @param {any} content
|
|
68
74
|
* @param {string} [url]
|
|
69
75
|
*/
|
|
70
|
-
const readAndParse = (
|
|
76
|
+
const readAndParse = (content, url) => {
|
|
71
77
|
try {
|
|
72
78
|
/** @type {any[]} */
|
|
73
|
-
const data = read(
|
|
79
|
+
const data = read(content, format);
|
|
74
80
|
this.beginBatch({ type: "file", url: url });
|
|
75
81
|
for (const d of data) {
|
|
76
82
|
this._propagate(d);
|
|
@@ -89,7 +95,6 @@ export default class UrlSource extends DataSource {
|
|
|
89
95
|
} catch (e) {
|
|
90
96
|
this.setLoadingStatus("error", e.message);
|
|
91
97
|
}
|
|
92
|
-
|
|
93
98
|
this.complete();
|
|
94
99
|
}
|
|
95
100
|
}
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export default class CloneTransform extends FlowNode {
|
|
5
5
|
constructor();
|
|
6
|
-
/** @param {any} datum */
|
|
7
|
-
handle: (datum: any) => void;
|
|
8
6
|
/**
|
|
9
7
|
* Signals that a new batch of data will be propagated.
|
|
10
8
|
*
|
|
11
9
|
* @param {import("../../types/flowBatch.js").FlowBatch} [flowBatch]
|
|
12
10
|
*/
|
|
13
11
|
beginBatch: (flowBatch?: import("../../types/flowBatch.js").FlowBatch) => void;
|
|
12
|
+
#private;
|
|
14
13
|
}
|
|
15
14
|
import FlowNode from "../flowNode.js";
|
|
16
15
|
//# sourceMappingURL=clone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/clone.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/clone.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAWI,cAmCC;IAXG;;;;OAIG;IACH,yBAFW,OAAO,0BAA0B,EAAE,SAAS,UAOtD;;CAER;qBApDsD,gBAAgB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { shallowArrayEquals } from "../../utils/arrayUtils.js";
|
|
2
|
+
import createCloner, { getAllProperties } from "../../utils/cloner.js";
|
|
2
3
|
import FlowNode, { BEHAVIOR_CLONES, isFileBatch } from "../flowNode.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -9,13 +10,28 @@ export default class CloneTransform extends FlowNode {
|
|
|
9
10
|
return BEHAVIOR_CLONES;
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
/** @type {string[]} */
|
|
14
|
+
#lastBatchFields;
|
|
15
|
+
|
|
16
|
+
/** @type {(datum: import("../flowNode.js").Datum) => import("../flowNode.js").Datum} */
|
|
17
|
+
#clone = (datum) => datum;
|
|
18
|
+
|
|
12
19
|
constructor() {
|
|
13
20
|
super();
|
|
14
21
|
|
|
15
|
-
/** @param {
|
|
22
|
+
/** @param {import("../flowNode.js").Datum} datum */
|
|
16
23
|
const setupCloner = (datum) => {
|
|
17
|
-
|
|
24
|
+
// Create a new cloner if the fields have changed
|
|
25
|
+
const fields = getAllProperties(datum);
|
|
26
|
+
if (
|
|
27
|
+
!this.#lastBatchFields ||
|
|
28
|
+
!shallowArrayEquals(fields, this.#lastBatchFields)
|
|
29
|
+
) {
|
|
30
|
+
this.#lastBatchFields = fields;
|
|
31
|
+
this.#clone = createCloner(datum);
|
|
32
|
+
}
|
|
18
33
|
|
|
34
|
+
const clone = this.#clone;
|
|
19
35
|
/** @param {any} datum */
|
|
20
36
|
this.handle = (datum) => this._propagate(clone(datum));
|
|
21
37
|
|
|
@@ -31,7 +47,6 @@ export default class CloneTransform extends FlowNode {
|
|
|
31
47
|
*/
|
|
32
48
|
this.beginBatch = (flowBatch) => {
|
|
33
49
|
if (isFileBatch(flowBatch)) {
|
|
34
|
-
// TODO: Only create new cloner if the props change
|
|
35
50
|
this.handle = setupCloner;
|
|
36
51
|
}
|
|
37
52
|
super.beginBatch(flowBatch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAMA;IAKI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,wBAAwB,QAC1D,OAAO,oBAAoB,EAAE,OAAO,EA2C9C;IAtCG,mEAAoB;IAEpB,oBAAoB;IACpB,OADW,GAAG,EAAE,CACD;IAEf,mBAAoC;IAMpC,iDAAyC;IACzC,mDAA6C;IAC7C,mDAA6C;IAC7C,mDAA6C;IAC7C,gCAAgC;IAChC,qBADoB,GAAG,KAAE,GAAG,CAGd;IACd,gBAAuC;IAEvC,uCAAuC;IACvC,iBADW,IAAI,GAAG,EAAE,cAAc,CAAC,CACH;IAEhC,4DAAuD;IAIvD,qBAAuE;IAgBvE,eAAiD;IAWrD,
|
|
1
|
+
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAMA;IAKI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,wBAAwB,QAC1D,OAAO,oBAAoB,EAAE,OAAO,EA2C9C;IAtCG,mEAAoB;IAEpB,oBAAoB;IACpB,OADW,GAAG,EAAE,CACD;IAEf,mBAAoC;IAMpC,iDAAyC;IACzC,mDAA6C;IAC7C,mDAA6C;IAC7C,mDAA6C;IAC7C,gCAAgC;IAChC,qBADoB,GAAG,KAAE,GAAG,CAGd;IACd,gBAAuC;IAEvC,uCAAuC;IACvC,iBADW,IAAI,GAAG,EAAE,cAAc,CAAC,CACH;IAEhC,4DAAuD;IAIvD,qBAAuE;IAgBvE,eAAiD;IAWrD,4BAyCC;IAKG,sBAAuB;CAU9B;qBAjI2C,gBAAgB;2BAEjC,+BAA+B"}
|
|
@@ -76,10 +76,7 @@ export default class FilterScoredLabelsTransform extends FlowNode {
|
|
|
76
76
|
super.reset();
|
|
77
77
|
|
|
78
78
|
const scale = this.resolution.scale;
|
|
79
|
-
const rangeSpan =
|
|
80
|
-
this.resolution.members[0].view.coords?.[
|
|
81
|
-
this.channel == "x" ? "width" : "height"
|
|
82
|
-
];
|
|
79
|
+
const rangeSpan = this.resolution.getAxisLength();
|
|
83
80
|
if (!rangeSpan) {
|
|
84
81
|
// The view size is not (yet) available
|
|
85
82
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformFactory.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/transformFactory.js"],"names":[],"mappings":"AA+CA;;;GAGG;AACH,gDAHW,OAAO,yBAAyB,EAAE,mBAAmB,SACrD,OAAO,oBAAoB,EAAE,OAAO,oCAS9C;AAtCD;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"transformFactory.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/transformFactory.js"],"names":[],"mappings":"AA+CA;;;GAGG;AACH,gDAHW,OAAO,yBAAyB,EAAE,mBAAmB,SACrD,OAAO,oBAAoB,EAAE,OAAO,oCAS9C;AAtCD;;;;GAIG;AACH,yBAFU,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,oBAAoB,EAAE,OAAO,KAAK,OAAO,gBAAgB,EAAE,OAAO,CAAC,CAsB1H"}
|
|
@@ -105,7 +105,7 @@ export function getPrimaryChannel(channel: import("../spec/channel.js").Channel)
|
|
|
105
105
|
*
|
|
106
106
|
* @param {import("../spec/channel.js").Channel} channel
|
|
107
107
|
*/
|
|
108
|
-
export function getChannelWithSecondarys(channel: import("../spec/channel.js").Channel): ("search" | "fill" | "stroke" | "angle" | "sample" | "color" | "fillOpacity" | "opacity" | "strokeOpacity" | "strokeWidth" | "
|
|
108
|
+
export function getChannelWithSecondarys(channel: import("../spec/channel.js").Channel): ("search" | "fill" | "stroke" | "angle" | "sample" | "color" | "fillOpacity" | "opacity" | "strokeOpacity" | "strokeWidth" | "x" | "y" | "text" | "size" | "x2" | "y2" | "shape" | "dx" | "dy" | "uniqueId" | "facetIndex" | "semanticScore")[];
|
|
109
109
|
/**
|
|
110
110
|
* @param {import("../spec/channel.js").Channel} channel
|
|
111
111
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/encoder/encoder.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,iDAJW,OAAO,qBAAqB,EAAE,OAAO,YACrC,OAAO,oBAAoB,EAAE,QAAQ,gGAgC/C;AAED;;;;GAIG;AACH,4DAJW,OAAO,qBAAqB,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/encoder/encoder.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,iDAJW,OAAO,qBAAqB,EAAE,OAAO,YACrC,OAAO,oBAAoB,EAAE,QAAQ,gGAgC/C;AAED;;;;GAIG;AACH,4DAJW,OAAO,qBAAqB,EAAE,QAAQ,EAAE,eACxC,CAAC,OAAO,EAAE,OAAO,oBAAoB,EAAE,gBAAgB,KAAK,OAAO,qBAAqB,EAAE,SAAS,yCAqC7G;AAED;;;;GAIG;AACH,kIAHW,CAAC,OAAO,EAAE,OAAO,oBAAoB,EAAE,gBAAgB,KAAK,OAAO,qBAAqB,EAAE,SAAS,yCAqC7G;AAED;;;;;GAKG;AACH,uCAHW,OAAO,oBAAoB,EAAE,UAAU,4FAKjD;AAED;;;GAGG;AACH,uCAHW,OAAO,oBAAoB,EAAE,UAAU,2DAKjD;AAED;;;GAGG;AACH,uCAHW,OAAO,oBAAoB,EAAE,UAAU,qIAKjD;AAED;;;GAGG;AACH,kDAHW,OAAO,oBAAoB,EAAE,UAAU,kEAWjD;AAED;;;GAGG;AACH,6CAHW,OAAO,qBAAqB,EAAE,OAAO,WACrC,OAAO,oBAAoB,EAAE,OAAO,s9CAS9C;AAED;;;GAGG;AACH,iDAHW,OAAO,oBAAoB,EAAE,UAAU,4FAKjD;AAED;;;GAGG;AACH,0CAHW,OAAO,oBAAoB,EAAE,UAAU,0DAKjD;AAED;;;GAGG;AACH,sCAHW,OAAO,oBAAoB,EAAE,UAAU,sDAKjD;AAED;;;GAGG;AACH,2DAHW,OAAO,oBAAoB,EAAE,UAAU,wMAQjD;AAED;;;GAGG;AACH,oDAHW,OAAO,oBAAoB,EAAE,UAAU,wGAKjD;AAoBD;;;GAGG;AACH,oDAHW,OAAO,oBAAoB,EAAE,OAAO,oEAM9C;AAED;;;GAGG;AACH,6CAHW,OAAO,oBAAoB,EAAE,OAAO,6DAM9C;AAqBD;;;GAGG;AACH,4CAFW,MAAM,WAIhB;AAED;;;;GAIG;AACH,oDAFW,OAAO,oBAAoB,EAAE,OAAO,2DAS9C;AAED;;;;;GAKG;AACH,2CAFW,OAAO,oBAAoB,EAAE,OAAO,wCAI9C;AAED;;;;GAIG;AACH,kDAFW,OAAO,oBAAoB,EAAE,OAAO,mPAM9C;AAED;;GAEG;AACH,wCAFW,OAAO,oBAAoB,EAAE,OAAO,WAI9C;AAED;;;;GAIG;AACH,2CAFW,OAAO,oBAAoB,EAAE,OAAO,WAI9C;AAED;;;GAGG;AACH,4CAHW,OAAO,oBAAoB,EAAE,OAAO,4DAsB9C;AAED;;;;;GAKG;AACH,0CAHW,OAAO,oBAAoB,EAAE,OAAO,GAClC,GAAG,EAAE,CAsBjB;AAED;;;GAGG;AACH,gDAHW,OAAO,oBAAoB,EAAE,OAAO,UACzB,GAAG,KAAE,MAAM,CAmBhC;AA5LD;;GAEG;AACH,wCAFU,OAAO,oBAAoB,EAAE,wBAAwB,EAAE,CAEb;AAEpD;;GAEG;AACH,0CAFU,OAAO,oBAAoB,EAAE,0BAA0B,EAAE,CAEX;AAExD;;GAEG;AACH,iCAFU,OAAO,oBAAoB,EAAE,iBAAiB,EAAE,CAKxD;AAoBF;;;;GAIG;AACH,gCAFU,QAAQ,OAAO,OAAO,oBAAoB,EAAE,OAAO,EAAE,OAAO,oBAAoB,EAAE,0BAA0B,CAAC,CAAC,CAKtH;AAEF;;;;GAIG;AACH,8BAFU,QAAQ,OAAO,OAAO,oBAAoB,EAAE,OAAO,EAAE,OAAO,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAInG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bmFontMetrics.d.ts","sourceRoot":"","sources":["../../../src/fonts/bmFontMetrics.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAHW,OAAO,oBAAoB,EAAE,MAAM,GACjC,aAAa,CAqFzB;AA3GD,4BAA6B;;;;;;;mBAUhB,OAAO,oBAAoB,EAAE,IAAI;;;;;;;;
|
|
1
|
+
{"version":3,"file":"bmFontMetrics.d.ts","sourceRoot":"","sources":["../../../src/fonts/bmFontMetrics.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAHW,OAAO,oBAAoB,EAAE,MAAM,GACjC,aAAa,CAqFzB;AA3GD,4BAA6B;;;;;;;mBAUhB,OAAO,oBAAoB,EAAE,IAAI;;;;;;;;kBAGpC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM;mBAC3C,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;aAC1B,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;aACtB,MAAM;eACN,MAAM;aACN,MAAM;YACN,OAAO,oBAAoB,EAAE,MAAM"}
|
|
@@ -18,6 +18,21 @@ export function isChromosomalLocus(value: any): value is import("../spec/genome.
|
|
|
18
18
|
* @return {value is ChromosomalLocus[]}
|
|
19
19
|
*/
|
|
20
20
|
export function isChromosomalLocusInterval(value: any[]): value is import("../spec/genome.js").ChromosomalLocus[];
|
|
21
|
+
/**
|
|
22
|
+
* @param {any} value
|
|
23
|
+
* @returns {value is GenomeConfig}
|
|
24
|
+
*/
|
|
25
|
+
export function isGenomeConfig(value: any): value is import("../spec/genome.js").GenomeConfig;
|
|
26
|
+
/**
|
|
27
|
+
* @param {any} value
|
|
28
|
+
* @returns {value is import("../spec/genome.js").UrlGenomeConfig }
|
|
29
|
+
*/
|
|
30
|
+
export function isUrlGenomeConfig(value: any): value is import("../spec/genome.js").UrlGenomeConfig;
|
|
31
|
+
/**
|
|
32
|
+
* @param {any} value
|
|
33
|
+
* @returns {value is import("../spec/genome.js").InlineGenomeConfig}
|
|
34
|
+
*/
|
|
35
|
+
export function isInlineGenomeConfig(value: any): value is import("../spec/genome.js").InlineGenomeConfig;
|
|
21
36
|
/**
|
|
22
37
|
* @typedef {import("../spec/genome.js").GenomeConfig} GenomeConfig
|
|
23
38
|
* @typedef {import("../spec/genome.js").ChromosomalLocus} ChromosomalLocus
|
|
@@ -44,7 +59,15 @@ export default class Genome {
|
|
|
44
59
|
* @param {GenomeConfig} config
|
|
45
60
|
*/
|
|
46
61
|
constructor(config: GenomeConfig);
|
|
47
|
-
config:
|
|
62
|
+
config: {
|
|
63
|
+
name: string;
|
|
64
|
+
} | {
|
|
65
|
+
url: string;
|
|
66
|
+
name: string;
|
|
67
|
+
} | {
|
|
68
|
+
contigs: import("../spec/genome.js").Contig[];
|
|
69
|
+
name: string;
|
|
70
|
+
};
|
|
48
71
|
/** @type {(Chromosome & ChromosomeAnnotation)[]} */
|
|
49
72
|
chromosomes: (Chromosome & ChromosomeAnnotation)[];
|
|
50
73
|
/** @type {Map<string | number, number>} */
|
|
@@ -59,7 +82,6 @@ export default class Genome {
|
|
|
59
82
|
* @param {string} baseUrl
|
|
60
83
|
*/
|
|
61
84
|
load(baseUrl: string): Promise<void>;
|
|
62
|
-
baseUrl: string;
|
|
63
85
|
hasChrPrefix(): boolean;
|
|
64
86
|
/**
|
|
65
87
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genome.d.ts","sourceRoot":"","sources":["../../../src/genome/genome.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"genome.d.ts","sourceRoot":"","sources":["../../../src/genome/genome.js"],"names":[],"mappings":"AAwWA;;;GAGG;AACH,gDAFW,MAAM;;;IAOhB;AAED;;;;GAIG;AACH,0CAHW,GAAG,yDAKb;AAED;;;;GAIG;AACH,kDAHW,GAAG,EAAE,2DAKf;AAED;;;GAGG;AACH,sCAHW,GAAG,qDAUb;AAED;;;GAGG;AACH,yCAHW,GAAG,wDAKb;AAED;;;GAGG;AACH,4CAHW,GAAG,2DAKb;AAzZD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;IACI;;OAEG;IACH,oBAFW,YAAY,EA6CtB;IA1CG;;;;;;;;MAA2C;IAc3C,oDAAoD;IACpD,aADW,CAAC,UAAU,GAAG,oBAAoB,CAAC,EAAE,CAC3B;IAErB,2CAA2C;IAC3C,0BADW,IAAI,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CACE;IAEzC,sEAAsE;IACtE,mBADW,IAAI,MAAM,GAAG,MAAM,EAAE,UAAU,GAAG,oBAAoB,CAAC,CAChC;IAElC,uBAAuB;IACvB,cADW,MAAM,EAAE,CACG;IAEtB,kBAAkB;IAkBtB,mBAEC;IAED;;OAEG;IACH,cAFW,MAAM,iBAmBhB;IAED,wBAEC;IAED;;;OAGG;IACH,0BAFW,UAAU,EAAE,QA2CtB;IAED,sBAEC;IAED;;;;;OAKG;IACH,oBAHW,MAAM,GAAG,MAAM,OACf,MAAM,UAShB;IAED;;;OAGG;IACH,4BAFW,MAAM,qCAgBhB;IAED;;;;OAIG;IACH,6BAHW,MAAM,GACJ,gBAAgB,CAY5B;IAED;;;OAGG;IACH,oBAFW,MAAM,qCAIhB;IAED;;;;;;;;;;OAUG;IACH,yBAHW,MAAM,EAAE,GACN,MAAM,CAIlB;IAED;;;OAGG;IACH,gCAHW,MAAM,EAAE,GACN,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAUhD;IAED;;;;;;OAMG;IACH,kCAFW,gBAAgB,EAAE,YAgB5B;IAED;;;;;OAKG;IACH,wCAHW,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAClC,0BAA0B,EAAE,CAiCxC;IAED;;;;OAIG;IACH,4DAFW,MAAM,EAAE,gCAOlB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAgC5B;CACJ;2BA9VY,OAAO,mBAAmB,EAAE,YAAY;+BACxC,OAAO,mBAAmB,EAAE,gBAAgB;;UAG/C,MAAM;UACN,MAAM;;;;;;WAGN,MAAM;;;;YACN,MAAM;;;;qBACN,MAAM;;;;mBACN,MAAM;wBACN,MAAM,EAAE;;;;SACR,OAAO;;;WAGP,MAAM;cACN,MAAM;YACN,MAAM"}
|