@genome-spy/app 0.78.0 → 0.79.1

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.
Files changed (54) hide show
  1. package/dist/agentApi.es.js +4918 -2499
  2. package/dist/agentShared.es.js +20 -22
  3. package/dist/{blosc-DL1kZHdE.js → blosc-JROzDOnd.js} +1 -1
  4. package/dist/{chunk-INHXZS53-DwEV9sMh.js → chunk-INHXZS53-CsrPGdTf.js} +1 -1
  5. package/dist/{componentStyles-CIXoKEp0.js → componentStyles-BGy033io.js} +2 -2
  6. package/dist/dialog.es.js +3 -3
  7. package/dist/{esm-D2-C5ZzN.js → esm-80V4xF_D.js} +226 -212
  8. package/dist/esm-B8j57WO7.js +441 -0
  9. package/dist/{esm-BkagIzhP.js → esm-BEHZgiVL.js} +30 -30
  10. package/dist/esm-BNd2PfFt.js +1367 -0
  11. package/dist/esm-BdLYkz-m.js +248 -0
  12. package/dist/{esm-id9DWBZW.js → esm-BdT7qUL-.js} +51 -31
  13. package/dist/esm-Bn4VTHqw.js +128 -0
  14. package/dist/{esm-C_XrKaCY.js → esm-C3k-CPce.js} +51 -31
  15. package/dist/{esm-CHVYSGF2.js → esm-CPzTvCZH.js} +226 -212
  16. package/dist/{esm-CPufCnsG.js → esm-CWd6i_cL.js} +30 -30
  17. package/dist/{esm-BgpwI2cq.js → esm-Cx-EbkOj.js} +13 -13
  18. package/dist/esm-D-iG_TIX.js +441 -0
  19. package/dist/esm-WxH0jQt4.js +128 -0
  20. package/dist/esm-cvhwoclu.js +1367 -0
  21. package/dist/{esm-BL9SNSnj.js → esm-k9p3oHkt.js} +133 -158
  22. package/dist/index.es.js +41477 -11008
  23. package/dist/index.js +579 -662
  24. package/dist/{lit-ymUSmGBw.js → lit-ByuJ0FJ4.js} +1 -1
  25. package/dist/{lz4-Csz5aoFA.js → lz4-CUYSbVey.js} +1 -1
  26. package/dist/{parquetRead-C33mgLEo.js → parquetRead-CBUyqZwZ.js} +473 -399
  27. package/dist/{chunk-CPXzm0be.js → rolldown-runtime-DF993M8W.js} +1 -1
  28. package/dist/schema.json +20018 -6213
  29. package/dist/{viewUtils-B7-F_Ae-.js → viewUtils-BBRWguwj.js} +4947 -4127
  30. package/dist/{zstd-dJuUp1fl.js → zstd-YMzMcush.js} +1 -1
  31. package/package.json +6 -4
  32. package/src/appTypes.d.ts +0 -1
  33. package/src/sampleView/state/payloadTypes.d.ts +9 -2
  34. package/src/spec/sampleView.d.ts +53 -0
  35. package/dist/AbortablePromiseCache-beUIcZcW.js +0 -96
  36. package/dist/agentApi-BwbEWjvl.js +0 -27118
  37. package/dist/blosc-BX4BJ8sR.js +0 -692
  38. package/dist/chunk-INHXZS53-Dx2aFznx.js +0 -13
  39. package/dist/esm-BHjeb8gt.js +0 -1426
  40. package/dist/esm-BI-plmf6.js +0 -121
  41. package/dist/esm-BwW--bVV.js +0 -369
  42. package/dist/esm-COzpU5N8.js +0 -1221
  43. package/dist/esm-CZvS2Ldm.js +0 -155
  44. package/dist/esm-D-y0Ce1M.js +0 -573
  45. package/dist/esm-D2_c7lXY.js +0 -298
  46. package/dist/esm-Daho46bY.js +0 -121
  47. package/dist/esm-DjF6pKy5.js +0 -369
  48. package/dist/esm-sPWfZg9X.js +0 -1426
  49. package/dist/esm-s_SlArJ8.js +0 -298
  50. package/dist/lz4-BSYl80V8.js +0 -626
  51. package/dist/parquetRead-m8-8_SpH.js +0 -1609
  52. package/dist/zstd-BAfRM3IH.js +0 -583
  53. /package/dist/{AbortablePromiseCache-BDH1cqFl.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
  54. /package/dist/{esm-Bz_92nH0.js → esm-VvpZ9hsq.js} +0 -0
@@ -1,154 +1,127 @@
1
- //#region ../../node_modules/@gmod/vcf/esm/parseGenotypesOnly.js
2
- function e(e, t, n) {
3
- let r = Object.create(null), i = n.length, a = t.length, o = 0;
4
- if (e === "GT") {
5
- for (let e = 0; e < i; e++) {
6
- let i = o;
7
- for (; o < a && t.charCodeAt(o) !== 9;) o++;
8
- r[n[e]] = t.slice(i, o), o++;
9
- }
10
- return r;
11
- }
12
- let s = e.indexOf("GT");
13
- if (s === -1) return r;
14
- if (s === 0) {
15
- for (let e = 0; e < i; e++) {
16
- let i = o;
17
- for (; o < a && t.charCodeAt(o) !== 58 && t.charCodeAt(o) !== 9;) o++;
18
- for (r[n[e]] = t.slice(i, o); o < a && t.charCodeAt(o) !== 9;) o++;
19
- o++;
20
- }
21
- return r;
22
- }
23
- let c = 0;
24
- for (let t = 0; t < s; t++) e.charCodeAt(t) === 58 && c++;
25
- for (let e = 0; e < i; e++) {
26
- let i = o, s = o;
27
- for (; s < a && t.charCodeAt(s) !== 9;) s++;
28
- let l = 0, u = i;
29
- for (let a = i; a <= s; a++) if (a === s || t.charCodeAt(a) === 58) {
30
- if (l === c) {
31
- r[n[e]] = t.slice(u, a);
32
- break;
33
- }
34
- l++, u = a + 1;
35
- }
36
- o = s + 1;
1
+ //#region ../../node_modules/@gmod/vcf/esm/processGenotypes.js
2
+ var e = 9, t = 58;
3
+ function n(e) {
4
+ let n = 0, r = 0, i = e.length;
5
+ for (let a = 0; a <= i; a++) if (a === i || e.charCodeAt(a) === t) {
6
+ if (a - r === 2 && e.charCodeAt(r) === 71 && e.charCodeAt(r + 1) === 84) return n;
7
+ n++, r = a + 1;
37
8
  }
38
- return r;
9
+ return -1;
39
10
  }
40
- //#endregion
41
- //#region ../../node_modules/@gmod/vcf/esm/processGenotypes.js
42
- function t(e, t, n, r) {
43
- let i = t.length, a = 0;
44
- if (e === "GT") {
45
- for (let e = 0; e < n; e++) {
46
- let e = a;
47
- for (; a < i && t.charCodeAt(a) !== 9;) a++;
48
- r(t, e, a), a++;
11
+ function r(r, i, a, o) {
12
+ let s = i.length, c = 0;
13
+ if (r === "GT") {
14
+ for (let t = 0; t < a; t++) {
15
+ let n = c;
16
+ for (; c < s && i.charCodeAt(c) !== e;) c++;
17
+ o(i, n, c, t), c++;
49
18
  }
50
19
  return;
51
20
  }
52
- let o = e.indexOf("GT");
53
- if (o === -1) return;
54
- if (o === 0) {
55
- for (let e = 0; e < n; e++) {
56
- let e = a;
57
- for (; a < i && t.charCodeAt(a) !== 58 && t.charCodeAt(a) !== 9;) a++;
58
- for (r(t, e, a); a < i && t.charCodeAt(a) !== 9;) a++;
59
- a++;
21
+ let l = n(r);
22
+ if (l !== -1) {
23
+ if (l === 0) {
24
+ for (let n = 0; n < a; n++) {
25
+ let r = c;
26
+ for (; c < s && i.charCodeAt(c) !== t && i.charCodeAt(c) !== e;) c++;
27
+ for (o(i, r, c, n); c < s && i.charCodeAt(c) !== e;) c++;
28
+ c++;
29
+ }
30
+ return;
60
31
  }
61
- return;
62
- }
63
- let s = 0;
64
- for (let t = 0; t < o; t++) e.charCodeAt(t) === 58 && s++;
65
- for (let e = 0; e < n; e++) {
66
- let e = a, n = a;
67
- for (; n < i && t.charCodeAt(n) !== 9;) n++;
68
- let o = 0, c = e;
69
- for (let i = e; i <= n; i++) if (i === n || t.charCodeAt(i) === 58) {
70
- if (o === s) {
71
- r(t, c, i);
72
- break;
32
+ for (let n = 0; n < a; n++) {
33
+ let r = c, a = c;
34
+ for (; a < s && i.charCodeAt(a) !== e;) a++;
35
+ let u = 0, d = r;
36
+ for (let e = r; e <= a; e++) if (e === a || i.charCodeAt(e) === t) {
37
+ if (u === l) {
38
+ o(i, d, e, n);
39
+ break;
40
+ }
41
+ u++, d = e + 1;
73
42
  }
74
- o++, c = i + 1;
43
+ c = a + 1;
75
44
  }
76
- a = n + 1;
77
45
  }
78
46
  }
79
47
  //#endregion
80
- //#region ../../node_modules/@gmod/vcf/esm/Variant.js
81
- function n(e) {
48
+ //#region ../../node_modules/@gmod/vcf/esm/parseGenotypesOnly.js
49
+ function i(e, t, n) {
50
+ let i = Object.create(null);
51
+ return r(e, t, n.length, (e, t, r, a) => {
52
+ i[n[a] ?? ""] = e.slice(t, r);
53
+ }), i;
54
+ }
55
+ //#endregion
56
+ //#region ../../node_modules/@gmod/vcf/esm/parseInfo.js
57
+ function a(e) {
82
58
  try {
83
59
  return decodeURIComponent(e);
84
60
  } catch {
85
61
  return e;
86
62
  }
87
63
  }
88
- var r = class {
89
- constructor(e, t, n, r, i) {
90
- let a = 0, o = 0;
91
- for (; a < e.length && o < 9;) e[a] === " " && (o += 1), a += 1;
92
- let s = o === 9 ? a - 1 : a, c = e.slice(0, s).split(" "), l = e.slice(s + 1), [u, d, f, p, m, h, g] = c, _ = g === "." ? void 0 : g.split(";");
93
- if (i && !c[7]) throw Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");
94
- this.CHROM = u, this.POS = +d, this.ID = f === "." ? void 0 : f.split(";"), this.REF = p, this.ALT = m === "." ? void 0 : m.split(","), this.QUAL = h === "." ? void 0 : +h, this.FILTER = _?.length === 1 && _[0] === "PASS" ? "PASS" : _, this.INFO = c[7] === void 0 || c[7] === "." ? {} : this.parseInfo(c[7], t), this.FORMAT = c[8], this.formatMeta = n, this.rest = l, this.sampleNames = r;
95
- }
96
- parseInfo(e, t) {
97
- let r = {}, i = e.includes("%"), a = e.split(";"), o = a.length;
98
- for (let e = 0; e < o; e++) {
99
- let o = a[e], s = o.indexOf("="), c = s === -1 ? o : o.slice(0, s), l = s === -1 ? void 0 : o.slice(s + 1), u = t[c]?.Type;
100
- if (u === "Flag") r[c] = !0;
101
- else if (!l) r[c] = !0;
102
- else {
103
- let e = u === "Integer" || u === "Float", t = l.split(","), a = t.length;
104
- if (i) {
105
- let i = [];
106
- for (let r = 0; r < a; r++) {
107
- let a = t[r];
108
- if (a === ".") i.push(void 0);
109
- else {
110
- let t = n(a);
111
- i.push(e ? Number(t) : t);
112
- }
113
- }
114
- r[c] = i;
115
- } else {
116
- let n = [];
117
- for (let r = 0; r < a; r++) {
118
- let i = t[r];
119
- i === "." ? n.push(void 0) : n.push(e ? Number(i) : i);
120
- }
121
- r[c] = n;
64
+ function o(e, t) {
65
+ let n = {}, r = e.includes("%"), i = e.split(";"), o = i.length;
66
+ for (let e = 0; e < o; e++) {
67
+ let o = i[e] ?? "", s = o.indexOf("="), c = s === -1 ? o : o.slice(0, s), l = s === -1 ? void 0 : o.slice(s + 1), u = t[c]?.Type;
68
+ if (u === "Flag" || !l) n[c] = !0;
69
+ else {
70
+ let e = u === "Integer" || u === "Float", t = l.split(","), i = t.length, o = [];
71
+ for (let n = 0; n < i; n++) {
72
+ let i = t[n] ?? "";
73
+ if (i === ".") o.push(void 0);
74
+ else {
75
+ let t = r ? a(i) : i;
76
+ o.push(e ? Number(t) : t);
122
77
  }
123
78
  }
79
+ n[c] = o;
124
80
  }
125
- return r;
81
+ }
82
+ return n;
83
+ }
84
+ //#endregion
85
+ //#region ../../node_modules/@gmod/vcf/esm/Variant.js
86
+ var s = class {
87
+ CHROM;
88
+ POS;
89
+ ID;
90
+ REF;
91
+ ALT;
92
+ QUAL;
93
+ FILTER;
94
+ INFO;
95
+ FORMAT;
96
+ formatMeta;
97
+ rest;
98
+ sampleNames;
99
+ constructor(e, t, n, r, i) {
100
+ let a = e.length, s = 0, c = 0;
101
+ for (; s < a && c < 9;) e.charCodeAt(s) === 9 && (c += 1), s += 1;
102
+ let l = c === 9 ? s - 1 : s, u = e.slice(0, l).split(" "), d = e.slice(l + 1), [f, p, m, h, g, _, v] = u, y = v === "." ? void 0 : v?.split(";");
103
+ if (i && !u[7]) throw Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");
104
+ this.CHROM = f, this.POS = p === void 0 ? 0 : +p, this.ID = m === "." ? void 0 : m?.split(";"), this.REF = h, this.ALT = g === "." ? void 0 : g?.split(","), this.QUAL = _ === void 0 || _ === "." ? void 0 : +_, this.FILTER = y?.length === 1 && y[0] === "PASS" ? "PASS" : y, this.INFO = u[7] === void 0 || u[7] === "." ? {} : o(u[7], t), this.FORMAT = u[8], this.formatMeta = n, this.rest = d, this.sampleNames = r;
126
105
  }
127
106
  SAMPLES() {
128
107
  let e = {}, t = this.FORMAT;
129
108
  if (t) {
130
- let n = this.rest.split(" "), r = t.split(":"), i = [];
131
- for (let e = 0; e < r.length; e++) {
132
- let t = this.formatMeta[r[e]]?.Type;
133
- i.push(t === "Integer" || t === "Float");
134
- }
135
- let a = r.length, o = this.sampleNames.length;
109
+ let n = this.rest.split(" "), r = t.split(":"), i = r.map((e) => {
110
+ let t = this.formatMeta[e]?.Type;
111
+ return t === "Integer" || t === "Float";
112
+ }), a = r.length, o = this.sampleNames.length;
136
113
  for (let t = 0; t < o; t++) {
137
- let o = this.sampleNames[t], s = {}, c = n[t], l = c.length, u = 0, d = 0;
114
+ let o = this.sampleNames[t] ?? "", s = {}, c = n[t] ?? "", l = c.length, u = 0, d = 0;
138
115
  for (let e = 0; e <= l; e++) if (e === l || c[e] === ":") {
139
- let t = c.slice(u, e);
140
- if (t === "" || t === ".") s[r[d]] = void 0;
116
+ let t = r[d] ?? "", n = c.slice(u, e);
117
+ if (n === "" || n === ".") s[t] = void 0;
141
118
  else {
142
- let e = t.split(","), n = [];
143
- if (i[d]) for (let t = 0; t < e.length; t++) {
144
- let r = e[t];
145
- n.push(r === "." ? void 0 : +r);
119
+ let e = n.split(","), r = e.length, a = i[d], o = [];
120
+ for (let t = 0; t < r; t++) {
121
+ let n = e[t] ?? "";
122
+ o.push(n === "." ? void 0 : a ? +n : n);
146
123
  }
147
- else for (let t = 0; t < e.length; t++) {
148
- let r = e[t];
149
- n.push(r === "." ? void 0 : r);
150
- }
151
- s[r[d]] = n;
124
+ s[t] = o;
152
125
  }
153
126
  if (u = e + 1, d += 1, d >= a) break;
154
127
  }
@@ -158,10 +131,10 @@ var r = class {
158
131
  return e;
159
132
  }
160
133
  GENOTYPES() {
161
- return e(this.FORMAT ?? "", this.rest, this.sampleNames);
134
+ return i(this.FORMAT ?? "", this.rest, this.sampleNames);
162
135
  }
163
136
  processGenotypes(e) {
164
- t(this.FORMAT ?? "", this.rest, this.sampleNames.length, e);
137
+ r(this.FORMAT ?? "", this.rest, this.sampleNames.length, e);
165
138
  }
166
139
  toJSON() {
167
140
  return {
@@ -179,33 +152,37 @@ var r = class {
179
152
  };
180
153
  //#endregion
181
154
  //#region ../../node_modules/@gmod/vcf/esm/parseMetaString.js
182
- function i(e) {
155
+ function c(e) {
183
156
  let t = [], n = [], r = !1, i = !1, a = e.length;
184
157
  for (let o = 0; o < a; o++) {
185
- let a = e[o];
158
+ let a = e[o] ?? "";
186
159
  a === "\"" ? (r = !r, n.push(a)) : a === "[" ? (i = !0, n.push(a)) : a === "]" ? (i = !1, n.push(a)) : a === "," && !r && !i ? (t.push(n.join("").trim()), n.length = 0) : n.push(a);
187
160
  }
188
161
  return n.length > 0 && t.push(n.join("").trim()), t;
189
162
  }
190
- function a(e, t) {
163
+ function l(e, t) {
191
164
  let n = e.indexOf(t);
192
165
  return [e.slice(0, n), e.slice(n + 1)];
193
166
  }
194
- function o(e) {
195
- let t = i(e.slice(1, -1)), n = [];
196
- for (let e = 0; e < t.length; e++) {
197
- let r = t[e], [i, o] = a(r, "=");
198
- if (o && o.startsWith("[") && o.endsWith("]")) {
199
- let e = o.slice(1, -1).split(",");
200
- for (let t = 0; t < e.length; t++) e[t] = e[t].trim();
201
- n.push([i, e]);
202
- } else o && o.startsWith("\"") && o.endsWith("\"") ? n.push([i, o.slice(1, -1)]) : n.push([i, o]);
167
+ function u(e) {
168
+ let t = d(e), n = t.ID;
169
+ if (delete t.ID, "Number" in t) {
170
+ let e = Number(t.Number);
171
+ Number.isNaN(e) || (t.Number = e);
172
+ }
173
+ return [n, t];
174
+ }
175
+ function d(e) {
176
+ let t = c(e.slice(1, -1)), n = {};
177
+ for (let e of t) {
178
+ let [t, r] = l(e, "=");
179
+ r && r.startsWith("[") && r.endsWith("]") ? n[t] = r.slice(1, -1).split(",").map((e) => e.trim()) : r && r.startsWith("\"") && r.endsWith("\"") ? n[t] = r.slice(1, -1) : n[t] = r;
203
180
  }
204
- return Object.fromEntries(n);
181
+ return n;
205
182
  }
206
183
  //#endregion
207
184
  //#region ../../node_modules/@gmod/vcf/esm/vcfReserved.js
208
- var s = {
185
+ var f = {
209
186
  InfoFields: {
210
187
  AA: {
211
188
  Number: 1,
@@ -514,20 +491,23 @@ var s = {
514
491
  "*": { Description: "Represents any possible alternative allele at this location" }
515
492
  },
516
493
  FilterTypes: { PASS: { Description: "Passed all filters" } }
517
- }, c = class {
494
+ }, p = class {
495
+ metadata;
496
+ strict;
497
+ samples;
518
498
  constructor({ header: e, strict: t = !0 }) {
519
499
  if (!e.length) throw Error("empty header received");
520
500
  let n = e.split(/[\r\n]+/).filter(Boolean);
521
501
  if (!n.length) throw Error("no non-empty header lines specified");
522
502
  this.strict = t, this.metadata = {
523
- INFO: { ...s.InfoFields },
524
- FORMAT: { ...s.GenotypeFields },
525
- ALT: { ...s.AltTypes },
526
- FILTER: { ...s.FilterTypes }
503
+ INFO: { ...f.InfoFields },
504
+ FORMAT: { ...f.GenotypeFields },
505
+ ALT: { ...f.AltTypes },
506
+ FILTER: { ...f.FilterTypes }
527
507
  };
528
508
  let r;
529
509
  for (let e = 0; e < n.length; e++) {
530
- let t = n[e];
510
+ let t = n[e] ?? "";
531
511
  if (t.startsWith("#")) t.startsWith("##") ? this.parseMetadata(t) : r = t;
532
512
  else throw Error(`Bad line in header:\n${t}`);
533
513
  }
@@ -549,25 +529,20 @@ var s = {
549
529
  parseMetadata(e) {
550
530
  let t = /^##(.+?)=(.*)/.exec(e.trim());
551
531
  if (!t) throw Error(`Line is not a valid metadata line: ${e}`);
552
- let [n, r] = t.slice(1, 3), i = n;
532
+ let n = t[1] ?? "", r = t[2];
553
533
  if (r?.startsWith("<")) {
554
- i in this.metadata || (this.metadata[i] = {});
555
- let [e, t] = this.parseStructuredMetaVal(r);
556
- e ? this.metadata[i][e] = t : this.metadata[i] = t;
557
- } else this.metadata[i] = r;
558
- }
559
- parseStructuredMetaVal(e) {
560
- let t = o(e), n = t.ID;
561
- return delete t.ID, "Number" in t && (Number.isNaN(Number(t.Number)) || (t.Number = Number(t.Number))), [n, t];
534
+ let e = this.metadata[n], t = e && typeof e == "object" ? e : {}, [i, a] = u(r);
535
+ typeof i == "string" ? (t[i] = a, this.metadata[n] = t) : this.metadata[n] = a;
536
+ } else this.metadata[n] = r;
562
537
  }
563
538
  getMetadata(...e) {
564
- let t = this.metadata, n = e.length;
565
- for (let r = 0; r < n; r++) if (t = t[e[r]], !t) return t;
539
+ let t = this.metadata;
540
+ for (let n of e) if (typeof t != "object" || !t || (t = t[n], t === void 0)) return;
566
541
  return t;
567
542
  }
568
543
  parseLine(e) {
569
- return new r(e, this.metadata.INFO, this.metadata.FORMAT, this.samples, this.strict);
544
+ return new s(e, this.metadata.INFO, this.metadata.FORMAT, this.samples, this.strict);
570
545
  }
571
546
  };
572
547
  //#endregion
573
- export { c as default };
548
+ export { p as default };