@genome-spy/core 0.73.0 → 0.74.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/AbortablePromiseCache-3gHJdF3E.js +96 -0
- package/dist/bundle/browser-BTgw5ieH.js +126 -0
- package/dist/bundle/chunk-DmhlhrBa.js +11 -0
- package/dist/bundle/esm-BDFRLEuD.js +1248 -0
- package/dist/bundle/esm-BygJiwh0.js +573 -0
- package/dist/bundle/esm-CGX-qz1d.js +155 -0
- package/dist/bundle/esm-CgfVIRJ-.js +121 -0
- package/dist/bundle/esm-CuMSzCHy.js +298 -0
- package/dist/bundle/esm-DMXpJXM4.js +369 -0
- package/dist/bundle/esm-DQiq2Zhd.js +1426 -0
- package/dist/bundle/esm-DtE8VqAv.js +1015 -0
- package/dist/bundle/esm-sIoQYZ21.js +461 -0
- package/dist/bundle/index.es.js +21071 -25935
- package/dist/bundle/index.js +363 -379
- package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
- package/dist/schema.json +13098 -7095
- package/dist/src/config/axisConfig.d.ts +16 -0
- package/dist/src/config/axisConfig.d.ts.map +1 -0
- package/dist/src/config/axisConfig.js +84 -0
- package/dist/src/config/defaultConfig.d.ts +3 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -0
- package/dist/src/config/defaultConfig.js +38 -0
- package/dist/src/config/defaults/axisDefaults.d.ts +5 -0
- package/dist/src/config/defaults/axisDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/axisDefaults.js +72 -0
- package/dist/src/config/defaults/markDefaults.d.ts +15 -0
- package/dist/src/config/defaults/markDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/markDefaults.js +121 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/scaleDefaults.js +18 -0
- package/dist/src/config/defaults/titleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/titleDefaults.js +47 -0
- package/dist/src/config/defaults/viewDefaults.d.ts +3 -0
- package/dist/src/config/defaults/viewDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/viewDefaults.js +2 -0
- package/dist/src/config/markConfig.d.ts +8 -0
- package/dist/src/config/markConfig.d.ts.map +1 -0
- package/dist/src/config/markConfig.js +27 -0
- package/dist/src/config/mergeConfig.d.ts +8 -0
- package/dist/src/config/mergeConfig.d.ts.map +1 -0
- package/dist/src/config/mergeConfig.js +81 -0
- package/dist/src/config/resolveConfig.d.ts +22 -0
- package/dist/src/config/resolveConfig.d.ts.map +1 -0
- package/dist/src/config/resolveConfig.js +32 -0
- package/dist/src/config/scaleConfig.d.ts +40 -0
- package/dist/src/config/scaleConfig.d.ts.map +1 -0
- package/dist/src/config/scaleConfig.js +220 -0
- package/dist/src/config/styleUtils.d.ts +6 -0
- package/dist/src/config/styleUtils.d.ts.map +1 -0
- package/dist/src/config/styleUtils.js +10 -0
- package/dist/src/config/themes.d.ts +15 -0
- package/dist/src/config/themes.d.ts.map +1 -0
- package/dist/src/config/themes.js +293 -0
- package/dist/src/config/titleConfig.d.ts +12 -0
- package/dist/src/config/titleConfig.d.ts.map +1 -0
- package/dist/src/config/titleConfig.js +42 -0
- package/dist/src/config/viewConfig.d.ts +7 -0
- package/dist/src/config/viewConfig.d.ts.map +1 -0
- package/dist/src/config/viewConfig.js +29 -0
- package/dist/src/data/flowNode.d.ts +22 -1
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +37 -1
- package/dist/src/data/formats/bed.d.ts.map +1 -1
- package/dist/src/data/formats/bed.js +6 -1
- package/dist/src/data/formats/bedpe.d.ts.map +1 -1
- package/dist/src/data/formats/bedpe.js +4 -0
- package/dist/src/data/formats/fasta.d.ts.map +1 -1
- package/dist/src/data/formats/fasta.js +4 -0
- package/dist/src/data/formats/parquet.d.ts.map +1 -1
- package/dist/src/data/formats/parquet.js +4 -0
- package/dist/src/data/sources/dataSourceFactory.d.ts +2 -13
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +5 -141
- package/dist/src/data/sources/lazy/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisGenomeSource.js +11 -0
- package/dist/src/data/sources/lazy/axisTickSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.js +19 -8
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +11 -0
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +12 -1
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +11 -0
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +12 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +11 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts +27 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.js +65 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts +2 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.js +8 -0
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.js +11 -2
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +11 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +5 -2
- package/dist/src/data/transforms/aggregate.d.ts +1 -0
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +30 -8
- package/dist/src/data/transforms/aggregateOps.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregateOps.js +12 -1
- package/dist/src/data/transforms/coverage.js +2 -2
- package/dist/src/data/transforms/filter.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +6 -0
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +9 -0
- package/dist/src/data/transforms/measureText.d.ts +1 -0
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +14 -5
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +0 -1
- package/dist/src/embedFactory.d.ts +13 -0
- package/dist/src/embedFactory.d.ts.map +1 -0
- package/dist/src/embedFactory.js +127 -0
- package/dist/src/encoder/accessor.d.ts +3 -12
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +10 -65
- package/dist/src/encoder/encoder.d.ts +51 -8
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +179 -55
- package/dist/src/fonts/bmFontManager.js +1 -1
- package/dist/src/full.d.ts +2 -0
- package/dist/src/full.d.ts.map +1 -0
- package/dist/src/full.js +2 -0
- package/dist/src/genome/genome.d.ts +8 -0
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +16 -2
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -1
- package/dist/src/genome/rootGenomeConfig.js +6 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +26 -7
- package/dist/src/genomeSpy/cursorManager.d.ts +69 -0
- package/dist/src/genomeSpy/cursorManager.d.ts.map +1 -0
- package/dist/src/genomeSpy/cursorManager.js +131 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts +113 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -0
- package/dist/src/genomeSpy/headlessBootstrap.js +246 -0
- package/dist/src/genomeSpy/interactionController.d.ts +5 -0
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +212 -19
- package/dist/src/genomeSpy/interactionDispatcher.d.ts +50 -0
- package/dist/src/genomeSpy/interactionDispatcher.d.ts.map +1 -0
- package/dist/src/genomeSpy/interactionDispatcher.js +203 -0
- package/dist/src/genomeSpy/viewContextFactory.d.ts +4 -2
- package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewContextFactory.js +12 -4
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +7 -3
- package/dist/src/genomeSpy.d.ts +1 -124
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +7 -688
- package/dist/src/genomeSpyBase.d.ts +133 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -0
- package/dist/src/genomeSpyBase.js +719 -0
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/arrayBuilder.js +0 -3
- package/dist/src/gl/colorUtils.d.ts.map +1 -1
- package/dist/src/gl/colorUtils.js +3 -0
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +13 -8
- package/dist/src/gl/glslScaleGenerator.d.ts +2 -2
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +5 -7
- package/dist/src/index.d.ts +3 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -114
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +4462 -0
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +0 -23
- package/dist/src/marks/mark.d.ts +8 -1
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +61 -20
- package/dist/src/marks/markUtils.d.ts +18 -1
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +52 -4
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +6 -26
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.js +13 -21
- package/dist/src/marks/rule.d.ts +7 -2
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +125 -16
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +5 -47
- package/dist/src/minimal.d.ts +8 -0
- package/dist/src/minimal.d.ts.map +1 -0
- package/dist/src/minimal.js +21 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +19 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +35 -0
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +13 -7
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +9 -5
- package/dist/src/scales/domainPlanner.d.ts +28 -8
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +207 -73
- package/dist/src/scales/indexLikeDomainUtils.d.ts +29 -0
- package/dist/src/scales/indexLikeDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/indexLikeDomainUtils.js +67 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts +15 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts.map +1 -0
- package/dist/src/scales/resolutionMemberOrder.js +22 -0
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +43 -4
- package/dist/src/scales/scalePropsResolver.d.ts +3 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +83 -6
- package/dist/src/scales/scaleResolution.d.ts +23 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +220 -58
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -1
- package/dist/src/scales/scaleResolutionTestUtils.js +6 -2
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +16 -2
- package/dist/src/scales/selectionDomainUtils.d.ts +30 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -1
- package/dist/src/scales/selectionDomainUtils.js +116 -1
- package/dist/src/screenshotHarness.js +3 -4
- package/dist/src/spec/axis.d.ts +41 -30
- package/dist/src/spec/channel.d.ts +15 -9
- package/dist/src/spec/config.d.ts +264 -0
- package/dist/src/spec/data.d.ts +7 -0
- package/dist/src/spec/decoration.d.ts +51 -0
- package/dist/src/spec/exampleFiles.d.ts +12 -0
- package/dist/src/spec/exampleFiles.d.ts.map +1 -0
- package/dist/src/spec/exampleFiles.js +52 -0
- package/dist/src/spec/font.d.ts +1 -1
- package/dist/src/spec/mark.d.ts +97 -13
- package/dist/src/spec/parameter.d.ts +30 -10
- package/dist/src/spec/root.d.ts +14 -0
- package/dist/src/spec/scale.d.ts +18 -13
- package/dist/src/spec/title.d.ts +13 -2
- package/dist/src/spec/tooltip.d.ts +1 -1
- package/dist/src/spec/transform.d.ts +39 -4
- package/dist/src/spec/view.d.ts +67 -19
- package/dist/src/styles/genome-spy.css +55 -55
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +23 -22
- package/dist/src/testSetup.d.ts +2 -0
- package/dist/src/testSetup.d.ts.map +1 -0
- package/dist/src/testSetup.js +5 -0
- package/dist/src/tooltip/dataTooltipHandler.js +8 -2
- package/dist/src/tooltip/tooltipContext.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipContext.js +3 -2
- package/dist/src/types/embedApi.d.ts +7 -0
- package/dist/src/types/encoder.d.ts +17 -15
- package/dist/src/types/scaleResolutionApi.d.ts +20 -0
- package/dist/src/types/viewContext.d.ts +23 -1
- package/dist/src/utils/expression.d.ts +2 -2
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +63 -8
- package/dist/src/utils/field.d.ts.map +1 -1
- package/dist/src/utils/field.js +0 -1
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +0 -1
- package/dist/src/utils/inputBinding.d.ts +1 -1
- package/dist/src/utils/interaction.d.ts +109 -0
- package/dist/src/utils/interaction.d.ts.map +1 -0
- package/dist/src/utils/interaction.js +200 -0
- package/dist/src/utils/interactionEvent.d.ts +21 -42
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +43 -66
- package/dist/src/utils/kWayMerge.js +1 -1
- package/dist/src/utils/mergeObjects.d.ts.map +1 -1
- package/dist/src/utils/mergeObjects.js +0 -2
- package/dist/src/utils/radixSort.d.ts.map +1 -1
- package/dist/src/utils/radixSort.js +0 -2
- package/dist/src/utils/throttle.d.ts.map +1 -1
- package/dist/src/utils/throttle.js +0 -2
- package/dist/src/utils/ui/tooltip.d.ts +1 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +1 -0
- package/dist/src/utils/url.js +1 -1
- package/dist/src/view/axisGridView.d.ts +1 -1
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +2 -47
- package/dist/src/view/axisView.d.ts +2 -3
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +251 -106
- package/dist/src/view/concatView.d.ts +2 -1
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +4 -2
- package/dist/src/view/containerMutationHelper.d.ts +3 -0
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +4 -1
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/facetView.js +3 -3
- package/dist/src/view/flowBuilder.js +2 -2
- package/dist/src/view/gridView/gridChild.d.ts +6 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +72 -43
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +255 -101
- package/dist/src/view/gridView/keyboardZoomController.d.ts +2 -2
- package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -1
- package/dist/src/view/gridView/keyboardZoomController.js +1 -1
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +4 -2
- package/dist/src/view/gridView/selectionRect.d.ts +4 -0
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +20 -1
- package/dist/src/view/gridView/separatorView.d.ts +1 -0
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +9 -0
- package/dist/src/view/interactionRouting.d.ts +20 -0
- package/dist/src/view/interactionRouting.d.ts.map +1 -0
- package/dist/src/view/interactionRouting.js +53 -0
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +12 -9
- package/dist/src/view/layout/grid.js +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +0 -2
- package/dist/src/view/testUtils.d.ts +17 -3
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +62 -69
- package/dist/src/view/title.d.ts +8 -1
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +66 -76
- package/dist/src/view/unitView.d.ts +1 -1
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +67 -17
- package/dist/src/view/view.d.ts +76 -30
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +136 -47
- package/dist/src/view/viewFactory.d.ts +11 -3
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +37 -11
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +41 -5
- package/dist/src/view/zoom.d.ts +2 -2
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +21 -23
- package/package.json +18 -10
- package/dist/bundle/AbortablePromiseCache-Dj0vzLnp.js +0 -149
- package/dist/bundle/browser-0iNU5Wit.js +0 -138
- package/dist/bundle/index-BYsZN7b0.js +0 -1597
- package/dist/bundle/index-C3kClAEN.js +0 -1771
- package/dist/bundle/index-C7wOh6y1.js +0 -657
- package/dist/bundle/index-CRaQAuki.js +0 -326
- package/dist/bundle/index-D9v1PCj9.js +0 -507
- package/dist/bundle/index-GDOuv_D5.js +0 -266
- package/dist/bundle/index-Gt44EOIH.js +0 -628
- package/dist/bundle/inflate-GtwLkvSP.js +0 -1048
- package/dist/bundle/parquetRead-BnAGCa4_.js +0 -1663
- package/dist/bundle/unzip-Bac01w6X.js +0 -1492
- package/dist/src/config/scaleDefaults.d.ts +0 -8
- package/dist/src/config/scaleDefaults.d.ts.map +0 -1
- package/dist/src/config/scaleDefaults.js +0 -45
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
withoutExprRef,
|
|
4
4
|
} from "../../../paramRuntime/paramUtils.js";
|
|
5
5
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
6
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
6
7
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -165,6 +166,16 @@ export default class BigWigSource extends SingleAxisWindowedSource {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
171
|
+
* @returns {params is import("../../../spec/data.js").BigWigData}
|
|
172
|
+
*/
|
|
173
|
+
function isBigWigSource(params) {
|
|
174
|
+
return params?.type == "bigwig";
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
registerBuiltInLazyDataSource(isBigWigSource, BigWigSource);
|
|
178
|
+
|
|
168
179
|
/**
|
|
169
180
|
* @param {number[]} domain
|
|
170
181
|
* @param {number} widthInPixels view width in pixels
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gff3Source.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/gff3Source.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gff3Source.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/gff3Source.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;;CAuBC;wBA5BuB,kBAAkB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
1
2
|
import TabixSource from "./tabixSource.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -22,8 +23,18 @@ export default class Gff3Source extends TabixSource {
|
|
|
22
23
|
* @param {string[]} lines
|
|
23
24
|
*/
|
|
24
25
|
_parseFeatures(lines) {
|
|
25
|
-
const features = this.#gff?.
|
|
26
|
+
const features = this.#gff?.parseStringSync(lines.join("\n"));
|
|
26
27
|
|
|
27
28
|
return features;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
34
|
+
* @returns {params is import("../../../spec/data.js").Gff3Data}
|
|
35
|
+
*/
|
|
36
|
+
function isGff3Source(params) {
|
|
37
|
+
return params?.type == "gff3";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
registerBuiltInLazyDataSource(isGff3Source, Gff3Source);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexedFastaSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/indexedFastaSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"indexedFastaSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/indexedFastaSource.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,gBAAgB,QAChD,OAAO,uBAAuB,EAAE,OAAO,EAwCjD;IA1BG,yDAAgC;IAQhC,iCAiBE;IATM,iDAKE;CAwCjB;qCAhFoC,+BAA+B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
2
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
2
3
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
3
4
|
|
|
4
5
|
export default class IndexedFastaSource extends SingleAxisWindowedSource {
|
|
@@ -80,3 +81,13 @@ export default class IndexedFastaSource extends SingleAxisWindowedSource {
|
|
|
80
81
|
this.publishData([features.filter((f) => f !== undefined)]);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
87
|
+
* @returns {params is import("../../../spec/data.js").IndexedFastaData}
|
|
88
|
+
*/
|
|
89
|
+
function isIndexedFastaSource(params) {
|
|
90
|
+
return params?.type == "indexedFasta";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
registerBuiltInLazyDataSource(isIndexedFastaSource, IndexedFastaSource);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a lazy data source for a custom type.
|
|
3
|
+
*
|
|
4
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
5
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
6
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
7
|
+
* @returns {() => void}
|
|
8
|
+
*/
|
|
9
|
+
export function registerLazyDataSource<P extends import("../../../spec/data.js").LazyDataParams>(guard: LazySourceEntry<P>["guard"], Source: LazySourceEntry<P>["Source"]): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Registers a built-in lazy data source.
|
|
12
|
+
*
|
|
13
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
14
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
15
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
16
|
+
*/
|
|
17
|
+
export function registerBuiltInLazyDataSource<P extends import("../../../spec/data.js").LazyDataParams>(guard: LazySourceEntry<P>["guard"], Source: LazySourceEntry<P>["Source"]): void;
|
|
18
|
+
/**
|
|
19
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
20
|
+
* @param {import("../../../view/view.js").default} view
|
|
21
|
+
*/
|
|
22
|
+
export function createLazyDataSource(params: import("../../../spec/data.js").LazyDataParams, view: import("../../../view/view.js").default): import("../dataSource.js").default;
|
|
23
|
+
export type LazySourceEntry<P extends import("../../../spec/data.js").LazyDataParams> = {
|
|
24
|
+
guard: (params: import("../../../spec/data.js").LazyDataParams) => params is P;
|
|
25
|
+
Source: new (params: any, view: import("../../../view/view.js").default) => import("../dataSource.js").default;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=lazyDataSourceRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyDataSourceRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/lazyDataSourceRegistry.js"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AACH,uCAL8D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,SAClD,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAC3B,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAC1B,MAAM,IAAI,CAYtB;AAED;;;;;;GAMG;AACH,8CAJ8D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,SAClD,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAC3B,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAItC;AAED;;;GAGG;AACH,6CAHW,OAAO,uBAAuB,EAAE,cAAc,QAC9C,OAAO,uBAAuB,EAAE,OAAO,sCAiBjD;4BA/D6D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,IAChD;IACR,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,uBAAuB,EAAE,cAAc,KAAK,MAAM,IAAI,CAAC,CAAC;IAC/E,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,uBAAuB,EAAE,OAAO,KAAK,OAAO,kBAAkB,EAAE,OAAO,CAAA;CAC/G"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
3
|
+
* @typedef {{
|
|
4
|
+
* guard: (params: import("../../../spec/data.js").LazyDataParams) => params is P,
|
|
5
|
+
* Source: new (params: any, view: import("../../../view/view.js").default) => import("../dataSource.js").default
|
|
6
|
+
* }} LazySourceEntry
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** @type {LazySourceEntry<any>[]} */
|
|
10
|
+
const customLazySources = [];
|
|
11
|
+
|
|
12
|
+
/** @type {LazySourceEntry<any>[]} */
|
|
13
|
+
const builtinLazySources = [];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Registers a lazy data source for a custom type.
|
|
17
|
+
*
|
|
18
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
19
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
20
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
21
|
+
* @returns {() => void}
|
|
22
|
+
*/
|
|
23
|
+
export function registerLazyDataSource(guard, Source) {
|
|
24
|
+
/** @type {LazySourceEntry<any>} */
|
|
25
|
+
const entry = { guard, Source };
|
|
26
|
+
customLazySources.push(entry);
|
|
27
|
+
return () => {
|
|
28
|
+
const index = customLazySources.indexOf(entry);
|
|
29
|
+
if (index >= 0) {
|
|
30
|
+
customLazySources.splice(index, 1);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Registers a built-in lazy data source.
|
|
37
|
+
*
|
|
38
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
39
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
40
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
41
|
+
*/
|
|
42
|
+
export function registerBuiltInLazyDataSource(guard, Source) {
|
|
43
|
+
builtinLazySources.push({ guard, Source });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
48
|
+
* @param {import("../../../view/view.js").default} view
|
|
49
|
+
*/
|
|
50
|
+
export function createLazyDataSource(params, view) {
|
|
51
|
+
for (const entry of customLazySources) {
|
|
52
|
+
if (entry.guard(params)) {
|
|
53
|
+
return new entry.Source(/** @type {any} */ (params), view);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const entry of builtinLazySources) {
|
|
57
|
+
if (entry.guard(params)) {
|
|
58
|
+
return new entry.Source(/** @type {any} */ (params), view);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
throw new Error(
|
|
63
|
+
"Cannot figure out the data source type: " + JSON.stringify(params)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerBuiltInLazySources.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/registerBuiltInLazySources.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;GAEG;AAEH;;;;;GAKG;AACH,wEAFgB,sBAAsB;IAelC;;;OAGG;IACH,kBAHW,OAAO,uBAAuB,EAAE,OAAO,WACvC,OAAO,0BAA0B,EAAE,wBAAwB,EA+CrE;IA7DD;;;OAGG;IACH,4CAAuC;IAEvC;;;OAGG;IACH,6BAHU,MAAM,EAAE,GAAG,SAAS,CAGZ;IAmBd,2EAA2E;IAC3E,SADW,OAAO,0BAA0B,EAAE,wBAAwB,CAChD;IAEtB,sEAA4D;IA+BhE;;;;OAIG;IACH,oEASC;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,QAe/C;IAED;;;OAGG;IACH,8BAHW,oBAAoB,GAClB,OAAO,CAenB;CACJ;mCAlKY,OAAO,CAAC,MAAM,CAAC,OAAO,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,EAAE,CAAC,CAAC;qCAItF;IAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAA;CAAC;uBAPxD,kBAAkB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import UnitView from "../../../view/unitView.js";
|
|
2
1
|
import DataSource from "../dataSource.js";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -53,7 +52,7 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
53
52
|
const sentences = [
|
|
54
53
|
`The lazy data source cannot find a resolved scale for channel "${channel}".`,
|
|
55
54
|
];
|
|
56
|
-
if (!(this.view
|
|
55
|
+
if (!isUnitViewLike(this.view)) {
|
|
57
56
|
sentences.push(
|
|
58
57
|
`Make sure the view has a "shared" scale resolution as it is not a unit view.`
|
|
59
58
|
);
|
|
@@ -165,3 +164,13 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
165
164
|
return min >= loadedMin && max <= loadedMax;
|
|
166
165
|
}
|
|
167
166
|
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Unit views expose `getMarkType()`, while container and helper views do not.
|
|
170
|
+
*
|
|
171
|
+
* @param {import("../../../view/view.js").default} view
|
|
172
|
+
* @returns {view is import("../../../view/unitView.js").default}
|
|
173
|
+
*/
|
|
174
|
+
function isUnitViewLike(view) {
|
|
175
|
+
return typeof (/** @type {any} */ (view).getMarkType) == "function";
|
|
176
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcfSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/vcfSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vcfSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/vcfSource.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;;CAgCC;wBAtCuB,kBAAkB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import TabixSource from "./tabixSource.js";
|
|
2
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @extends {TabixSource<import("./vcfTypes.js").ParsedVariant>}
|
|
@@ -36,3 +37,13 @@ export default class VcfSource extends TabixSource {
|
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
43
|
+
* @returns {params is import("../../../spec/data.js").VcfData}
|
|
44
|
+
*/
|
|
45
|
+
function isVcfSource(params) {
|
|
46
|
+
return params?.type == "vcf";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
registerBuiltInLazyDataSource(isVcfSource, VcfSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"AAkJA;;;GAGG;AACH,gCAHW,OAAO,CAAC,OAAO,oBAAoB,EAAE,IAAI,CAAC,GACxC,IAAI,IAAI,OAAO,oBAAoB,EAAE,OAAO,CAIxD;AA5ID;;;GAGG;AACH;IACI;;;OAGG;IACH,oBAHW,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,oBAAoB,EAAE,OAAO,EAc9C;IATG,6CAMC;IAED,gBAAiC;;CAgHxC;uBA9IsB,iBAAiB"}
|
|
@@ -101,7 +101,8 @@ export default class UrlSource extends DataSource {
|
|
|
101
101
|
return await readResponseBody(result, url, type);
|
|
102
102
|
} catch (e) {
|
|
103
103
|
throw new Error(
|
|
104
|
-
`Could not load data: ${url}. Reason: ${e.message}
|
|
104
|
+
`Could not load data: ${url}. Reason: ${e.message}`,
|
|
105
|
+
{ cause: e }
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
108
|
};
|
|
@@ -124,7 +125,9 @@ export default class UrlSource extends DataSource {
|
|
|
124
125
|
}
|
|
125
126
|
} catch (e) {
|
|
126
127
|
console.warn(e);
|
|
127
|
-
throw new Error(`Cannot parse: ${url}: ${e.message}
|
|
128
|
+
throw new Error(`Cannot parse: ${url}: ${e.message}`, {
|
|
129
|
+
cause: e,
|
|
130
|
+
});
|
|
128
131
|
}
|
|
129
132
|
};
|
|
130
133
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregate.js"],"names":[],"mappings":"AAOA;IAKI;;;;OAIG;IACH,oBAJW,OAAO,yBAAyB,EAAE,eAAe,EA6C3D;IAvCG,0DAAoB;IAEpB,oBAAoB;IACpB,QADW,GAAG,EAAE,CACA;IAEhB;;OAEG;IACH,KAFU,CAAC,CAAC,GAAG,EAAE,gCAAO,KAAK,MAAM,CAAC,EAAE,CAEzB;IACb;;OAEG;IACH,IAFU,MAAM,EAAE,CAEN;
|
|
1
|
+
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregate.js"],"names":[],"mappings":"AAOA;IAKI;;;;OAIG;IACH,oBAJW,OAAO,yBAAyB,EAAE,eAAe,EA6C3D;IAvCG,0DAAoB;IAEpB,oBAAoB;IACpB,QADW,GAAG,EAAE,CACA;IAEhB;;OAEG;IACH,KAFU,CAAC,CAAC,GAAG,EAAE,gCAAO,KAAK,MAAM,CAAC,EAAE,CAEzB;IACb;;OAEG;IACH,IAFU,MAAM,EAAE,CAEN;;CAuGnB;sBAlIqB,gBAAgB"}
|
|
@@ -64,16 +64,10 @@ export default class AggregateTransform extends Transform {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
* @param {import("../flowNode.js").Datum} datum
|
|
67
|
+
* Propagate the current buffer as one aggregated batch.
|
|
69
68
|
*/
|
|
70
|
-
|
|
71
|
-
this.buffer.push(datum);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
complete() {
|
|
69
|
+
#flushBuffer() {
|
|
75
70
|
const params = this.params;
|
|
76
|
-
|
|
77
71
|
const groupby = params?.groupby;
|
|
78
72
|
|
|
79
73
|
if (groupby?.length > 0) {
|
|
@@ -107,6 +101,34 @@ export default class AggregateTransform extends Transform {
|
|
|
107
101
|
|
|
108
102
|
this._propagate(datum);
|
|
109
103
|
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @param {import("../flowNode.js").Datum} datum
|
|
109
|
+
*/
|
|
110
|
+
handle(datum) {
|
|
111
|
+
this.buffer.push(datum);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Flush the current batch before downstream nodes switch to a new facet.
|
|
116
|
+
*
|
|
117
|
+
* @param {import("../../types/flowBatch.js").FlowBatch} flowBatch
|
|
118
|
+
*/
|
|
119
|
+
beginBatch(flowBatch) {
|
|
120
|
+
if (this.buffer.length > 0) {
|
|
121
|
+
this.#flushBuffer();
|
|
122
|
+
this.buffer = [];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
super.beginBatch(flowBatch);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
complete() {
|
|
129
|
+
if (this.buffer.length > 0) {
|
|
130
|
+
this.#flushBuffer();
|
|
131
|
+
}
|
|
110
132
|
|
|
111
133
|
super.complete();
|
|
112
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregateOps.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregateOps.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"aggregateOps.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregateOps.js"],"names":[],"mappings":";AAWA;;GAEG;AACH,6BAFU,MAAM,CAAC,OAAO,yBAAyB,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,KAAK,MAAM,CAAC,CAaxH"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
count,
|
|
3
|
+
max,
|
|
4
|
+
mean,
|
|
5
|
+
median,
|
|
6
|
+
min,
|
|
7
|
+
quantile,
|
|
8
|
+
sum,
|
|
9
|
+
variance,
|
|
10
|
+
} from "d3-array";
|
|
2
11
|
|
|
3
12
|
/**
|
|
4
13
|
* @type {Record<import("../../spec/transform.js").AggregateOp, (arr: any[], accessor?: (datum: any) => number) => number>}
|
|
@@ -10,7 +19,9 @@ const AGGREGATE_OPS = {
|
|
|
10
19
|
min,
|
|
11
20
|
max,
|
|
12
21
|
mean,
|
|
22
|
+
q1: (arr, accessor) => quantile(arr, 0.25, accessor),
|
|
13
23
|
median,
|
|
24
|
+
q3: (arr, accessor) => quantile(arr, 0.75, accessor),
|
|
14
25
|
variance,
|
|
15
26
|
};
|
|
16
27
|
|
|
@@ -147,7 +147,7 @@ export default class CoverageTransform extends Transform {
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
const flushQueue = () => {
|
|
150
|
-
let edge
|
|
150
|
+
let edge;
|
|
151
151
|
while ((edge = ends.peekValue()) !== undefined) {
|
|
152
152
|
pushSegment(prevEdge, edge, coverage);
|
|
153
153
|
prevEdge = edge;
|
|
@@ -166,7 +166,7 @@ export default class CoverageTransform extends Transform {
|
|
|
166
166
|
this.handle = (datum) => {
|
|
167
167
|
const start = startAccessor(datum);
|
|
168
168
|
|
|
169
|
-
let edge
|
|
169
|
+
let edge;
|
|
170
170
|
while ((edge = ends.peekValue()) !== undefined && edge < start) {
|
|
171
171
|
pushSegment(prevEdge, edge, coverage);
|
|
172
172
|
prevEdge = edge;
|
|
@@ -5,6 +5,12 @@ export default class FilterScoredLabelsTransform extends Transform {
|
|
|
5
5
|
* @param {import("../../view/view.js").default} view
|
|
6
6
|
*/
|
|
7
7
|
constructor(params: import("../../spec/transform.js").FilterScoredLabelsParams, view: import("../../view/view.js").default);
|
|
8
|
+
/**
|
|
9
|
+
* The transform emits only labels that fit in the current visible interval,
|
|
10
|
+
* so downstream x/y values derived from its output must not feed back into
|
|
11
|
+
* shared-domain resolution.
|
|
12
|
+
*/
|
|
13
|
+
get domainSensitiveScaleChannels(): ("x" | "y")[];
|
|
8
14
|
params: import("../../spec/transform.js").FilterScoredLabelsParams;
|
|
9
15
|
/** @type {any[]} */
|
|
10
16
|
_data: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAOA;
|
|
1
|
+
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAOA;IAcI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,wBAAwB,QAC1D,OAAO,oBAAoB,EAAE,OAAO,EAkD9C;IA9DD;;;;OAIG;IACH,kDAEC;IAUG,mEAAoB;IAEpB,oBAAoB;IACpB,OADW,GAAG,EAAE,CACD;IAEf,mBAAoC;IAMpC,sDAA8C;IAC9C,oDAAgE;IAChE,wDAAuD;IACvD,sDAAmD;IACnD,mDAA6C;IAC7C,mDAA6C;IAC7C,gCAAgC;IAChC,cADW,CAAS,IAAG,EAAH,GAAG,KAAE,GAAG,CAGd;IACd,gBAAuC;IAEvC,uCAAuC;IACvC,iBADW,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CACH;IAEhC,8DAAuD;IAIvD,qBAAuE;IA8B3E,4BAsEC;IAKG,sBAAuB;CAU9B;sBAzKqB,gBAAgB;2BAFX,+BAA+B"}
|
|
@@ -10,6 +10,15 @@ export default class FilterScoredLabelsTransform extends Transform {
|
|
|
10
10
|
return BEHAVIOR_COLLECTS;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* The transform emits only labels that fit in the current visible interval,
|
|
15
|
+
* so downstream x/y values derived from its output must not feed back into
|
|
16
|
+
* shared-domain resolution.
|
|
17
|
+
*/
|
|
18
|
+
get domainSensitiveScaleChannels() {
|
|
19
|
+
return [this.channel];
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
/**
|
|
14
23
|
*
|
|
15
24
|
* @param {import("../../spec/transform.js").FilterScoredLabelsParams} params
|
|
@@ -14,6 +14,7 @@ export default class MeasureTextTransform extends Transform {
|
|
|
14
14
|
* @param {any} datum
|
|
15
15
|
*/
|
|
16
16
|
handle: (datum: any) => void;
|
|
17
|
+
font: import("../../fonts/bmFontManager.js").FontEntry;
|
|
17
18
|
}
|
|
18
19
|
import Transform from "./transform.js";
|
|
19
20
|
//# sourceMappingURL=measureText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/measureText.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/measureText.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IAKI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,iBAAiB,wBACnD,OAAO,gBAAgB,EAAE,oBAAoB,EA4CvD;IAvCG,4DAAoB;IA0BpB;;;OAGG;IACH,gBAFW,GAAG,UAUb;IAOD,uDAMkC;CAEzC;sBAxEqB,gBAAgB"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { BEHAVIOR_MODIFIES } from "../flowNode.js";
|
|
2
|
-
import fontMetadata from "../../fonts/Lato-Regular.json" with { type: "json" };
|
|
3
|
-
import getMetrics from "../../fonts/bmFontMetrics.js";
|
|
4
2
|
import { field } from "../../utils/field.js";
|
|
5
3
|
import Transform from "./transform.js";
|
|
6
4
|
import { isExprRef } from "../../paramRuntime/paramUtils.js";
|
|
@@ -23,10 +21,8 @@ export default class MeasureTextTransform extends Transform {
|
|
|
23
21
|
|
|
24
22
|
this.params = params;
|
|
25
23
|
|
|
26
|
-
const metrics = getMetrics(fontMetadata);
|
|
27
24
|
const accessor = field(params.field);
|
|
28
25
|
const as = params.as;
|
|
29
|
-
// TODO: Support custom fonts.
|
|
30
26
|
|
|
31
27
|
let size = 0;
|
|
32
28
|
|
|
@@ -56,11 +52,24 @@ export default class MeasureTextTransform extends Transform {
|
|
|
56
52
|
this.handle = (datum) => {
|
|
57
53
|
const text = accessor(datum);
|
|
58
54
|
if (text !== undefined) {
|
|
59
|
-
datum[as] = metrics.measureWidth(text, size);
|
|
55
|
+
datum[as] = this.font.metrics.measureWidth(text, size);
|
|
60
56
|
} else {
|
|
61
57
|
datum[as] = 0;
|
|
62
58
|
}
|
|
63
59
|
this._propagate(datum);
|
|
64
60
|
};
|
|
65
61
|
}
|
|
62
|
+
|
|
63
|
+
initialize() {
|
|
64
|
+
const fontManager = this.paramRuntimeProvider.context.fontManager;
|
|
65
|
+
// Resolve the font during flow initialization so viewDataInit's global
|
|
66
|
+
// font wait also covers measureText before any rows are propagated.
|
|
67
|
+
this.font = this.params.font
|
|
68
|
+
? fontManager.getFont(
|
|
69
|
+
this.params.font,
|
|
70
|
+
this.params.fontStyle,
|
|
71
|
+
this.params.fontWeight
|
|
72
|
+
)
|
|
73
|
+
: fontManager.getDefaultFont();
|
|
74
|
+
}
|
|
66
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pileup.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/pileup.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pileup.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/pileup.js"],"names":[],"mappings":"AAQA;IAKI;;;OAGG;IACH,oBAFW,OAAO,yBAAyB,EAAE,YAAY,EAMxD;IADG,uDAAoB;CAyG3B;sBAzHqB,gBAAgB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-unmodified-loop-condition */
|
|
2
1
|
import FlatQueue from "flatqueue";
|
|
3
2
|
import { isNumber } from "vega-util";
|
|
4
3
|
import { field } from "../../utils/field.js";
|
|
@@ -68,7 +67,7 @@ export default class PileupTransform extends Transform {
|
|
|
68
67
|
const preferredLane = preferredOrder.indexOf(
|
|
69
68
|
preferenceAccessor(datum)
|
|
70
69
|
);
|
|
71
|
-
let lane
|
|
70
|
+
let lane;
|
|
72
71
|
if (preferredLane >= 0 && freeLaneMap[preferredLane] < start) {
|
|
73
72
|
lane = preferredLane;
|
|
74
73
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexFold.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/regexFold.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH;IAKI;;OAEG;IACH,oBAFW,OAAO,yBAAyB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"regexFold.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/regexFold.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH;IAKI;;OAEG;IACH,oBAFW,OAAO,yBAAyB,EAAE,eAAe,EA4I3D;IAvIG,0DAAoB;IAwHhB,gBALO,GAAG,UAKe;CAgBpC;sBA1JqB,gBAAgB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {new (container: HTMLElement, spec: import("./spec/root.js").RootSpec, options?: import("./types/embedApi.js").EmbedOptions) => import("./genomeSpy.js").default} GenomeSpy
|
|
3
|
+
* @returns {(el: HTMLElement | string, spec: import("./spec/root.js").RootSpec | string, options?: import("./types/embedApi.js").EmbedOptions) => Promise<import("./types/embedApi.js").EmbedResult>}
|
|
4
|
+
*/
|
|
5
|
+
export function createEmbed(GenomeSpy: new (container: HTMLElement, spec: import("./spec/root.js").RootSpec, options?: import("./types/embedApi.js").EmbedOptions) => import("./genomeSpy.js").default): (el: HTMLElement | string, spec: import("./spec/root.js").RootSpec | string, options?: import("./types/embedApi.js").EmbedOptions) => Promise<import("./types/embedApi.js").EmbedResult>;
|
|
6
|
+
/**
|
|
7
|
+
* Loads the spec from the given url and sets the baseUrl if it is not
|
|
8
|
+
* defined in the spec.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} url
|
|
11
|
+
*/
|
|
12
|
+
export function loadSpec(url: string): Promise<any>;
|
|
13
|
+
//# sourceMappingURL=embedFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedFactory.d.ts","sourceRoot":"","sources":["../../src/embedFactory.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,uCAHW,KAAK,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,OAAO,qBAAqB,EAAE,YAAY,KAAK,OAAO,gBAAgB,EAAE,OAAO,GAC7J,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,IAAI,EAAE,OAAO,gBAAgB,EAAE,QAAQ,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,qBAAqB,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,qBAAqB,EAAE,WAAW,CAAC,CAmFpM;AAaD;;;;;GAKG;AACH,8BAFW,MAAM,gBAmBhB"}
|