@genome-spy/core 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.
- package/dist/bundle/{browser-KWU9rWZT.js → browser-CETrb2cm.js} +53 -33
- package/dist/bundle/esm-BdLYkz-m.js +248 -0
- package/dist/bundle/esm-BwiDsqSb.js +1367 -0
- package/dist/bundle/esm-CDFd1cjk.js +441 -0
- package/dist/bundle/{esm-DVOHLB1e.js → esm-CTUHLDbv.js} +30 -30
- package/dist/bundle/{esm-NIYEaYkc.js → esm-Cx-EbkOj.js} +13 -13
- package/dist/bundle/esm-DlYGqi79.js +128 -0
- package/dist/bundle/{esm-BygJiwh0.js → esm-k9p3oHkt.js} +133 -158
- package/dist/bundle/{esm-CT3ygiMq.js → esm-zAZJQO6D.js} +226 -212
- package/dist/bundle/index.es.js +14879 -11656
- package/dist/bundle/index.js +119 -108
- package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
- package/dist/schema.json +18940 -6914
- package/dist/src/config/axisConfig.d.ts +2 -2
- package/dist/src/config/axisConfig.d.ts.map +1 -1
- package/dist/src/config/axisConfig.js +28 -44
- package/dist/src/config/configLayers.d.ts +45 -0
- package/dist/src/config/configLayers.d.ts.map +1 -0
- package/dist/src/config/configLayers.js +110 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -1
- package/dist/src/config/defaultConfig.js +8 -1
- package/dist/src/config/defaults/legendDefaults.d.ts +14 -0
- package/dist/src/config/defaults/legendDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/legendDefaults.js +46 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -1
- package/dist/src/config/defaults/titleDefaults.js +26 -18
- package/dist/src/config/legendConfig.d.ts +11 -0
- package/dist/src/config/legendConfig.d.ts.map +1 -0
- package/dist/src/config/legendConfig.js +63 -0
- package/dist/src/config/styleUtils.d.ts +8 -2
- package/dist/src/config/styleUtils.d.ts.map +1 -1
- package/dist/src/config/styleUtils.js +25 -1
- package/dist/src/config/themes.d.ts.map +1 -1
- package/dist/src/config/themes.js +21 -2
- package/dist/src/config/titleConfig.d.ts.map +1 -1
- package/dist/src/config/titleConfig.js +2 -18
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +40 -18
- package/dist/src/data/flowInit.d.ts +6 -0
- package/dist/src/data/flowInit.d.ts.map +1 -1
- package/dist/src/data/flowInit.js +1 -1
- package/dist/src/data/flowNode.d.ts +32 -0
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +59 -0
- package/dist/src/data/sources/lazy/bamSource.d.ts +0 -1
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +39 -30
- package/dist/src/data/sources/lazy/bigBedSource.d.ts +0 -10
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +127 -62
- package/dist/src/data/sources/lazy/bigWigSource.d.ts +2 -2
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +234 -81
- package/dist/src/data/sources/lazy/gff3Source.d.ts +7 -3
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +7 -8
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +28 -19
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts +24 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.js +218 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts +30 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendGradientSource.js +388 -0
- package/dist/src/data/sources/lazy/mockLazySource.d.ts +4 -1
- package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/mockLazySource.js +49 -4
- package/dist/src/data/sources/lazy/registerCoreLazySources.js +2 -0
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts +9 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixSource.js +201 -70
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts +2 -3
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixTsvSource.js +14 -12
- package/dist/src/data/sources/lazy/vcfSource.d.ts +7 -3
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +7 -8
- package/dist/src/data/sources/urlDescriptor.d.ts +165 -0
- package/dist/src/data/sources/urlDescriptor.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptor.js +473 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts +25 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorController.js +72 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts +47 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorState.js +129 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +101 -61
- package/dist/src/data/transforms/packLegendLabels.d.ts +21 -0
- package/dist/src/data/transforms/packLegendLabels.d.ts.map +1 -0
- package/dist/src/data/transforms/packLegendLabels.js +189 -0
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +4 -0
- package/dist/src/data/transforms/truncateText.d.ts +27 -0
- package/dist/src/data/transforms/truncateText.d.ts.map +1 -0
- package/dist/src/data/transforms/truncateText.js +94 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts +58 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/dataflowDebugSnapshot.js +159 -0
- package/dist/src/debug/markDebugSnapshot.d.ts +54 -0
- package/dist/src/debug/markDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/markDebugSnapshot.js +100 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts +53 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/paramDebugSnapshot.js +86 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts +155 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/resolutionDebugSnapshot.js +291 -0
- package/dist/src/debug/valuePreview.d.ts +9 -0
- package/dist/src/debug/valuePreview.d.ts.map +1 -0
- package/dist/src/debug/valuePreview.js +57 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts +131 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/viewDebugSnapshot.js +390 -0
- package/dist/src/embedFactory.d.ts.map +1 -1
- package/dist/src/embedFactory.js +6 -1
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +5 -4
- package/dist/src/fonts/bmFontManager.d.ts +1 -1
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +45 -10
- package/dist/src/fonts/textMetrics.d.ts +69 -0
- package/dist/src/fonts/textMetrics.d.ts.map +1 -0
- package/dist/src/fonts/textMetrics.js +73 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
- package/dist/src/genomeSpy/headlessBootstrap.js +6 -0
- package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
- package/dist/src/genomeSpy/renderCoordinator.js +25 -3
- package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +45 -8
- package/dist/src/genomeSpyBase.d.ts +6 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -1
- package/dist/src/genomeSpyBase.js +20 -3
- package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +39 -2
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
- package/dist/src/gl/vertexRangeIndex.js +4 -2
- package/dist/src/gl/webGLHelper.d.ts +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +13 -8
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
- package/dist/src/marks/mark.d.ts +47 -4
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +158 -54
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +4 -0
- package/dist/src/marks/point.vertex.glsl.js +1 -1
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +2 -7
- package/dist/src/marks/text.vertex.glsl.js +1 -1
- package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
- package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
- package/dist/src/paramRuntime/paramUtils.js +61 -1
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
- package/dist/src/scales/axisResolution.d.ts +35 -0
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +115 -7
- package/dist/src/scales/legendResolution.d.ts +83 -0
- package/dist/src/scales/legendResolution.d.ts.map +1 -0
- package/dist/src/scales/legendResolution.js +461 -0
- package/dist/src/scales/scaleResolution.d.ts +36 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +59 -0
- package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
- package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelGuideConfig.js +224 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -1
- package/dist/src/scales/viewLevelScaleConfig.js +13 -2
- package/dist/src/spec/axis.d.ts +109 -3
- package/dist/src/spec/channel.d.ts +23 -4
- package/dist/src/spec/config.d.ts +59 -4
- package/dist/src/spec/data.d.ts +177 -17
- package/dist/src/spec/legend.d.ts +246 -0
- package/dist/src/spec/mark.d.ts +16 -4
- package/dist/src/spec/title.d.ts +58 -1
- package/dist/src/spec/transform.d.ts +149 -0
- package/dist/src/spec/view.d.ts +39 -6
- package/dist/src/types/embedApi.d.ts +262 -6
- package/dist/src/types/rendering.d.ts +19 -3
- package/dist/src/types/viewContext.d.ts +18 -2
- package/dist/src/utils/arrayUtils.d.ts +11 -0
- package/dist/src/utils/arrayUtils.d.ts.map +1 -1
- package/dist/src/utils/arrayUtils.js +23 -0
- package/dist/src/utils/suspension.d.ts +17 -0
- package/dist/src/utils/suspension.d.ts.map +1 -0
- package/dist/src/utils/suspension.js +41 -0
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +1 -4
- package/dist/src/view/axisView.d.ts +18 -2
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +180 -75
- package/dist/src/view/concatView.d.ts +10 -2
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +46 -9
- package/dist/src/view/containerMutationHelper.d.ts +20 -1
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +196 -33
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +54 -4
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +301 -120
- package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
- package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
- package/dist/src/view/gridView/gridChildLegends.js +503 -0
- package/dist/src/view/gridView/gridView.d.ts +25 -0
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +490 -78
- package/dist/src/view/gridView/legendLayout.d.ts +30 -0
- package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
- package/dist/src/view/gridView/legendLayout.js +115 -0
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +1 -4
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +1 -4
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +1 -4
- package/dist/src/view/layerView.d.ts +9 -2
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +18 -1
- package/dist/src/view/layout/flexLayout.d.ts +20 -4
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +331 -31
- package/dist/src/view/layout/rectangle.d.ts +14 -0
- package/dist/src/view/layout/rectangle.d.ts.map +1 -1
- package/dist/src/view/layout/rectangle.js +40 -0
- package/dist/src/view/legend/legendEntries.d.ts +20 -0
- package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
- package/dist/src/view/legend/legendEntries.js +21 -0
- package/dist/src/view/legendView.d.ts +137 -0
- package/dist/src/view/legendView.d.ts.map +1 -0
- package/dist/src/view/legendView.js +1654 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
- package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
- package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
- package/dist/src/view/renderingContext/clipOptions.js +140 -0
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
- package/dist/src/view/resolutionPlanner.d.ts +2 -1
- package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
- package/dist/src/view/resolutionPlanner.js +89 -25
- package/dist/src/view/testUtils.d.ts +4 -2
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +60 -7
- package/dist/src/view/titleView.d.ts +37 -0
- package/dist/src/view/titleView.d.ts.map +1 -0
- package/dist/src/view/titleView.js +584 -0
- package/dist/src/view/unitView.d.ts +3 -3
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +3 -2
- package/dist/src/view/view.d.ts +25 -24
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +126 -16
- package/dist/src/view/viewChrome.d.ts +33 -0
- package/dist/src/view/viewChrome.d.ts.map +1 -0
- package/dist/src/view/viewChrome.js +64 -0
- package/dist/src/view/viewFactory.d.ts +2 -5
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +1 -2
- package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
- package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
- package/dist/src/view/viewIdentityRegistry.js +71 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
- package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
- package/dist/src/view/viewMutationApi.d.ts +42 -0
- package/dist/src/view/viewMutationApi.d.ts.map +1 -0
- package/dist/src/view/viewMutationApi.js +811 -0
- package/dist/src/view/viewSelectors.d.ts +11 -9
- package/dist/src/view/viewSelectors.d.ts.map +1 -1
- package/dist/src/view/viewSelectors.js +28 -17
- package/package.json +4 -4
- package/dist/bundle/esm-CuMSzCHy.js +0 -298
- package/dist/bundle/esm-DAnOffpD.js +0 -1426
- package/dist/bundle/esm-DMXpJXM4.js +0 -369
- package/dist/bundle/esm-DNtC3H80.js +0 -121
- package/dist/src/view/title.d.ts +0 -13
- package/dist/src/view/title.d.ts.map +0 -1
- package/dist/src/view/title.js +0 -154
- /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
- /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
- /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
|
@@ -55,7 +55,7 @@ var i = class {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region ../../node_modules
|
|
58
|
+
//#region ../../node_modules/pako-esm2/esm/utils/common.js
|
|
59
59
|
function a(e, t) {
|
|
60
60
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
61
61
|
}
|
|
@@ -125,7 +125,7 @@ var c = {
|
|
|
125
125
|
}, _ = function() {
|
|
126
126
|
let e = !0;
|
|
127
127
|
try {
|
|
128
|
-
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
128
|
+
String.fromCharCode.apply(null, /* @__PURE__ */ new Uint8Array(1));
|
|
129
129
|
} catch {
|
|
130
130
|
e = !1;
|
|
131
131
|
}
|
|
@@ -175,12 +175,12 @@ function C(e, t) {
|
|
|
175
175
|
return n < 0 || n === 0 ? t : n + v(e[n]) > t ? n : t;
|
|
176
176
|
}
|
|
177
177
|
//#endregion
|
|
178
|
-
//#region ../../node_modules
|
|
178
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/gzheader.js
|
|
179
179
|
function w() {
|
|
180
180
|
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
|
|
181
181
|
}
|
|
182
182
|
//#endregion
|
|
183
|
-
//#region ../../node_modules
|
|
183
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/adler32.js
|
|
184
184
|
function T(e, t, n, r) {
|
|
185
185
|
for (var i = e & 65535 | 0, a = e >>> 16 & 65535 | 0, o = 0; n !== 0;) {
|
|
186
186
|
o = n > 2e3 ? 2e3 : n, n -= o;
|
|
@@ -192,7 +192,7 @@ function T(e, t, n, r) {
|
|
|
192
192
|
return i | a << 16 | 0;
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
|
-
//#region ../../node_modules
|
|
195
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/crc32.js
|
|
196
196
|
function E() {
|
|
197
197
|
for (var e, t = [], n = 0; n < 256; n++) {
|
|
198
198
|
e = n;
|
|
@@ -212,7 +212,7 @@ function O(e, t, n, r) {
|
|
|
212
212
|
return e ^ -1;
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
|
-
//#region ../../node_modules
|
|
215
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/inffast.js
|
|
216
216
|
var k = 30, A = 12;
|
|
217
217
|
function ee(e, t) {
|
|
218
218
|
var n = e.state, r = e.next_in, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e.input, E;
|
|
@@ -297,7 +297,7 @@ function ee(e, t) {
|
|
|
297
297
|
x = m >> 3, r -= x, m -= x << 3, p &= (1 << m) - 1, e.next_in = r, e.next_out = a, e.avail_in = r < i ? 5 + (i - r) : 5 - (r - i), e.avail_out = a < s ? 257 + (s - a) : 257 - (a - s), n.hold = p, n.bits = m;
|
|
298
298
|
}
|
|
299
299
|
//#endregion
|
|
300
|
-
//#region ../../node_modules
|
|
300
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/inftrees.js
|
|
301
301
|
var j = 15, M = 852, te = 592, ne = 0, re = 1, ie = 2, ae = [
|
|
302
302
|
3,
|
|
303
303
|
4,
|
|
@@ -460,7 +460,7 @@ function N(e, t, n, r, i, a, o, s) {
|
|
|
460
460
|
return y !== 0 && (i[w + y] = l - g << 24 | 4194304), s.bits = p, 0;
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
|
-
//#region ../../node_modules
|
|
463
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/inflate.js
|
|
464
464
|
var P = 0, F = 1, le = 2, ue = 4, de = 5, fe = 6, I = 0, pe = 1, me = 2, L = -2, he = -3, ge = -4, _e = -5, ve = 8, ye = 1, be = 2, xe = 3, Se = 4, Ce = 5, we = 6, Te = 7, Ee = 8, De = 9, Oe = 10, R = 11, z = 12, ke = 13, Ae = 14, je = 15, Me = 16, Ne = 17, Pe = 18, Fe = 19, B = 20, V = 21, Ie = 22, Le = 23, Re = 24, ze = 25, Be = 26, Ve = 27, He = 28, Ue = 29, H = 30, We = 31, Ge = 32, Ke = 852, qe = 592;
|
|
465
465
|
function Je(e) {
|
|
466
466
|
return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24);
|
|
@@ -897,7 +897,7 @@ function ct(e, t) {
|
|
|
897
897
|
return !e || !e.state || (r = e.state, r.wrap !== 0 && r.mode !== R) ? L : r.mode === R && (i = 1, i = T(i, t, n, 0), i !== r.check) ? he : (a = it(e, t, n, n), a ? (r.mode = We, ge) : (r.havedict = 1, I));
|
|
898
898
|
}
|
|
899
899
|
//#endregion
|
|
900
|
-
//#region ../../node_modules
|
|
900
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/messages.js
|
|
901
901
|
var lt = {
|
|
902
902
|
2: "need dictionary",
|
|
903
903
|
1: "stream end",
|
|
@@ -910,12 +910,12 @@ var lt = {
|
|
|
910
910
|
"-6": "incompatible version"
|
|
911
911
|
};
|
|
912
912
|
//#endregion
|
|
913
|
-
//#region ../../node_modules
|
|
913
|
+
//#region ../../node_modules/pako-esm2/esm/zlib/zstream.js
|
|
914
914
|
function ut() {
|
|
915
915
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
916
916
|
}
|
|
917
917
|
//#endregion
|
|
918
|
-
//#region ../../node_modules
|
|
918
|
+
//#region ../../node_modules/pako-esm2/esm/inflate.js
|
|
919
919
|
var dt = Object.prototype.toString, ft = class e {
|
|
920
920
|
constructor(t) {
|
|
921
921
|
if (!(this instanceof e)) return new e(t);
|
|
@@ -1195,7 +1195,7 @@ function Xt(e) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
function Zt(e, t, n, r) {
|
|
1197
1197
|
let i = Math.max(0, n - t), a = Math.min(r, t + e.length) - t;
|
|
1198
|
-
return i < e.length ? e.subarray(i, a) : new Uint8Array();
|
|
1198
|
+
return i < e.length ? e.subarray(i, a) : /* @__PURE__ */ new Uint8Array();
|
|
1199
1199
|
}
|
|
1200
1200
|
var Qt = class {
|
|
1201
1201
|
filehandle;
|
|
@@ -1209,7 +1209,7 @@ var Qt = class {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
async read(e, t) {
|
|
1211
1211
|
let { blocks: n, nextCompressedPosition: r } = await this.gzi.getRelevantBlocksForRead(e, t);
|
|
1212
|
-
if (n.length === 0) return new Uint8Array();
|
|
1212
|
+
if (n.length === 0) return /* @__PURE__ */ new Uint8Array();
|
|
1213
1213
|
let i = t + e;
|
|
1214
1214
|
return qt(await Promise.all(n.map(([e, a], o) => this.limit(async () => {
|
|
1215
1215
|
let s = n[o + 1]?.[0] ?? r ?? e + Yt;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { t as e } from "./esm-Cx-EbkOj.js";
|
|
2
|
+
import { t } from "./browser-CETrb2cm.js";
|
|
3
|
+
//#region node_modules/@gmod/indexedfasta/esm/fetchableSmallFasta.js
|
|
4
|
+
var n = new TextDecoder("utf8");
|
|
5
|
+
function r(e) {
|
|
6
|
+
return e.split(">").filter((e) => /\S/.test(e)).map((e) => {
|
|
7
|
+
let [t, ...n] = e.split("\n"), [r, ...i] = t.split(" "), a = n.join("").replace(/\s/g, "");
|
|
8
|
+
return {
|
|
9
|
+
id: r,
|
|
10
|
+
description: i.join(" "),
|
|
11
|
+
sequence: a
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
var i = class {
|
|
16
|
+
data;
|
|
17
|
+
indexed;
|
|
18
|
+
constructor({ fasta: e, path: i }) {
|
|
19
|
+
let a;
|
|
20
|
+
if (e) a = e;
|
|
21
|
+
else if (i) a = new t(i);
|
|
22
|
+
else throw Error("Need to pass fasta or path");
|
|
23
|
+
this.data = a.readFile().then((e) => r(n.decode(e)));
|
|
24
|
+
}
|
|
25
|
+
getIndexed() {
|
|
26
|
+
return this.indexed ??= this.data.then((e) => new Map(e.map((e) => [e.id, e]))), this.indexed;
|
|
27
|
+
}
|
|
28
|
+
async fetch(e, t, n) {
|
|
29
|
+
let r = (await this.getIndexed()).get(e);
|
|
30
|
+
if (!r) throw Error(`no sequence with id ${e} exists`);
|
|
31
|
+
return r.sequence.slice(t, n);
|
|
32
|
+
}
|
|
33
|
+
async getSequenceNames() {
|
|
34
|
+
return (await this.data).map((e) => e.id);
|
|
35
|
+
}
|
|
36
|
+
}, a = new TextDecoder("utf8");
|
|
37
|
+
function o(e, t, n, r) {
|
|
38
|
+
return e + t * Math.floor(r / n) + r % n;
|
|
39
|
+
}
|
|
40
|
+
async function s(e, t = {}) {
|
|
41
|
+
let n = a.decode(await e.readFile(t)), r = /* @__PURE__ */ new Map();
|
|
42
|
+
for (let e of n.split("\n")) {
|
|
43
|
+
let t = e.trim();
|
|
44
|
+
if (!t) continue;
|
|
45
|
+
let n = t.split(" ");
|
|
46
|
+
if (n.length < 5) throw Error(`Malformed FAI line (expected 5 tab-separated columns, got ${String(n.length)}): ${t}`);
|
|
47
|
+
let [i, a, o, s, c] = n;
|
|
48
|
+
if (i.startsWith(">")) throw Error("found > in sequence name, might have supplied FASTA file for the FASTA index");
|
|
49
|
+
let l = +a, u = +s;
|
|
50
|
+
if (l > 0 && u === 0) throw Error(`Invalid FAI index for "${i}": LINEBASES is 0, FASTA likely missing trailing newline; regenerate the .fai index`);
|
|
51
|
+
r.set(i, {
|
|
52
|
+
length: l,
|
|
53
|
+
offset: +o,
|
|
54
|
+
lineLength: u,
|
|
55
|
+
lineBytes: +c
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return r;
|
|
59
|
+
}
|
|
60
|
+
async function c(e, t, n = 0, r, i) {
|
|
61
|
+
if (n < 0) throw TypeError("regionStart cannot be less than 0");
|
|
62
|
+
let s = Math.min(r ?? t.length, t.length);
|
|
63
|
+
if (n >= s) return "";
|
|
64
|
+
let c = o(t.offset, t.lineBytes, t.lineLength, n), l = o(t.offset, t.lineBytes, t.lineLength, s) - c, u = a.decode(await e.read(l, c, i)).replace(/\s+/g, "");
|
|
65
|
+
if (/[^\x20-\x7e]/.test(u.slice(0, 1e3))) throw Error("Non-ASCII bytes in sequence; file may be gzip — use BgzipIndexedFasta or decompress");
|
|
66
|
+
return u;
|
|
67
|
+
}
|
|
68
|
+
var l = class {
|
|
69
|
+
fasta;
|
|
70
|
+
fai;
|
|
71
|
+
indexes;
|
|
72
|
+
constructor({ fasta: e, fai: n, path: r, faiPath: i }) {
|
|
73
|
+
if (e) this.fasta = e;
|
|
74
|
+
else if (r) this.fasta = new t(r);
|
|
75
|
+
else throw Error("Need to pass filehandle for fasta or path to localfile");
|
|
76
|
+
if (n) this.fai = n;
|
|
77
|
+
else if (i) this.fai = new t(i);
|
|
78
|
+
else if (r) this.fai = new t(`${r}.fai`);
|
|
79
|
+
else throw Error("Need to pass filehandle for fai or path to localfile");
|
|
80
|
+
}
|
|
81
|
+
async getIndexes(e) {
|
|
82
|
+
return this.indexes ??= s(this.fai, e).catch((e) => {
|
|
83
|
+
throw this.indexes = void 0, e;
|
|
84
|
+
}), this.indexes;
|
|
85
|
+
}
|
|
86
|
+
async getSequenceNames(e) {
|
|
87
|
+
return [...(await this.getIndexes(e)).keys()];
|
|
88
|
+
}
|
|
89
|
+
async getSequenceSizes(e) {
|
|
90
|
+
let t = {};
|
|
91
|
+
for (let [n, r] of await this.getIndexes(e)) t[n] = r.length;
|
|
92
|
+
return t;
|
|
93
|
+
}
|
|
94
|
+
async getSequenceSize(e, t) {
|
|
95
|
+
return (await this.getIndexes(t)).get(e)?.length;
|
|
96
|
+
}
|
|
97
|
+
async hasReferenceSequence(e, t) {
|
|
98
|
+
return (await this.getIndexes(t)).has(e);
|
|
99
|
+
}
|
|
100
|
+
async getResiduesByName(e, t, n, r) {
|
|
101
|
+
let i = (await this.getIndexes(r)).get(e);
|
|
102
|
+
if (i !== void 0) return c(this.fasta, i, t, n, r);
|
|
103
|
+
}
|
|
104
|
+
async getSequence(e, t, n, r) {
|
|
105
|
+
return this.getResiduesByName(e, t, n, r);
|
|
106
|
+
}
|
|
107
|
+
}, u = class extends l {
|
|
108
|
+
constructor({ fasta: n, path: r, fai: i, faiPath: a, gzi: o, gziPath: s }) {
|
|
109
|
+
let c;
|
|
110
|
+
if (n && o) c = new e({
|
|
111
|
+
filehandle: n,
|
|
112
|
+
gziFilehandle: o
|
|
113
|
+
});
|
|
114
|
+
else if (r && s) c = new e({
|
|
115
|
+
filehandle: new t(r),
|
|
116
|
+
gziFilehandle: new t(s)
|
|
117
|
+
});
|
|
118
|
+
else throw Error("BgzipIndexedFasta requires either {fasta, gzi} or {path, gziPath}");
|
|
119
|
+
super({
|
|
120
|
+
fasta: c,
|
|
121
|
+
fai: i,
|
|
122
|
+
faiPath: a,
|
|
123
|
+
path: r
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { u as BgzipIndexedFasta, i as FetchableSmallFasta, l as IndexedFasta, r as parseSmallFasta };
|
|
@@ -1,154 +1,127 @@
|
|
|
1
|
-
//#region ../../node_modules/@gmod/vcf/esm/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
9
|
+
return -1;
|
|
39
10
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
43
|
+
c = a + 1;
|
|
75
44
|
}
|
|
76
|
-
a = n + 1;
|
|
77
45
|
}
|
|
78
46
|
}
|
|
79
47
|
//#endregion
|
|
80
|
-
//#region ../../node_modules/@gmod/vcf/esm/
|
|
81
|
-
function
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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 (
|
|
116
|
+
let t = r[d] ?? "", n = c.slice(u, e);
|
|
117
|
+
if (n === "" || n === ".") s[t] = void 0;
|
|
141
118
|
else {
|
|
142
|
-
let e =
|
|
143
|
-
|
|
144
|
-
let
|
|
145
|
-
|
|
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
|
-
|
|
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
|
|
134
|
+
return i(this.FORMAT ?? "", this.rest, this.sampleNames);
|
|
162
135
|
}
|
|
163
136
|
processGenotypes(e) {
|
|
164
|
-
|
|
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
|
|
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
|
|
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
|
|
195
|
-
let t =
|
|
196
|
-
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
|
181
|
+
return n;
|
|
205
182
|
}
|
|
206
183
|
//#endregion
|
|
207
184
|
//#region ../../node_modules/@gmod/vcf/esm/vcfReserved.js
|
|
208
|
-
var
|
|
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
|
-
},
|
|
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: { ...
|
|
524
|
-
FORMAT: { ...
|
|
525
|
-
ALT: { ...
|
|
526
|
-
FILTER: { ...
|
|
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
|
|
532
|
+
let n = t[1] ?? "", r = t[2];
|
|
553
533
|
if (r?.startsWith("<")) {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
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
|
|
565
|
-
for (let
|
|
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
|
|
544
|
+
return new s(e, this.metadata.INFO, this.metadata.FORMAT, this.samples, this.strict);
|
|
570
545
|
}
|
|
571
546
|
};
|
|
572
547
|
//#endregion
|
|
573
|
-
export {
|
|
548
|
+
export { p as default };
|