@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { mergeConfigScopes } from "./mergeConfig.js";
|
|
2
|
+
import { normalizeStyle } from "./styleUtils.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} scopes
|
|
6
|
+
* @returns {import("../spec/config.js").TitleConfig}
|
|
7
|
+
*/
|
|
8
|
+
export function getConfiguredTitleConfig(scopes) {
|
|
9
|
+
return /** @type {import("../spec/config.js").TitleConfig} */ (
|
|
10
|
+
mergeConfigScopes(
|
|
11
|
+
scopes.map(
|
|
12
|
+
(scope) =>
|
|
13
|
+
/** @type {Record<string, any> | undefined} */ (scope.title)
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} scopes
|
|
21
|
+
* @param {string | string[]} [styleName]
|
|
22
|
+
* @returns {import("../spec/config.js").StyleConfig}
|
|
23
|
+
*/
|
|
24
|
+
export function getConfiguredStyleConfig(scopes, styleName) {
|
|
25
|
+
const styles = normalizeStyle(styleName);
|
|
26
|
+
if (styles.length == 0) {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return /** @type {import("../spec/config.js").StyleConfig} */ (
|
|
31
|
+
mergeConfigScopes(
|
|
32
|
+
scopes.flatMap((scope) =>
|
|
33
|
+
styles.map(
|
|
34
|
+
(name) =>
|
|
35
|
+
/** @type {Record<string, any> | undefined} */ (
|
|
36
|
+
scope.style?.[name]
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} scopes
|
|
3
|
+
* @param {import("../spec/view.js").ViewBackground} [explicitViewBackground]
|
|
4
|
+
* @returns {import("../spec/view.js").ViewBackground}
|
|
5
|
+
*/
|
|
6
|
+
export function getConfiguredViewBackground(scopes: import("../spec/config.js").GenomeSpyConfig[], explicitViewBackground?: import("../spec/view.js").ViewBackground): import("../spec/view.js").ViewBackground;
|
|
7
|
+
//# sourceMappingURL=viewConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewConfig.d.ts","sourceRoot":"","sources":["../../../src/config/viewConfig.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,oDAJW,OAAO,mBAAmB,EAAE,eAAe,EAAE,2BAC7C,OAAO,iBAAiB,EAAE,cAAc,GACtC,OAAO,iBAAiB,EAAE,cAAc,CAsBpD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { mergeConfigScopes } from "./mergeConfig.js";
|
|
2
|
+
import { normalizeStyle } from "./styleUtils.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} scopes
|
|
6
|
+
* @param {import("../spec/view.js").ViewBackground} [explicitViewBackground]
|
|
7
|
+
* @returns {import("../spec/view.js").ViewBackground}
|
|
8
|
+
*/
|
|
9
|
+
export function getConfiguredViewBackground(scopes, explicitViewBackground) {
|
|
10
|
+
// Mirrors Vega-Lite behavior: view backgrounds use the implicit "cell"
|
|
11
|
+
// style, and explicit view.style entries augment it.
|
|
12
|
+
const styles = ["cell", ...normalizeStyle(explicitViewBackground?.style)];
|
|
13
|
+
|
|
14
|
+
return /** @type {import("../spec/view.js").ViewBackground} */ (
|
|
15
|
+
mergeConfigScopes(
|
|
16
|
+
scopes
|
|
17
|
+
.flatMap((scope) => [
|
|
18
|
+
/** @type {Record<string, any> | undefined} */ (scope.view),
|
|
19
|
+
...styles.map(
|
|
20
|
+
(styleName) =>
|
|
21
|
+
/** @type {Record<string, any> | undefined} */ (
|
|
22
|
+
scope.style?.[styleName]
|
|
23
|
+
)
|
|
24
|
+
),
|
|
25
|
+
])
|
|
26
|
+
.concat([explicitViewBackground])
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walks upstream from a flow node and collects scale channels whose current
|
|
3
|
+
* domain affects the produced data. Downstream encodings on these channels
|
|
4
|
+
* must not re-register as domain contributors or they will invalidate the
|
|
5
|
+
* domain that they themselves depend on.
|
|
6
|
+
*
|
|
7
|
+
* @param {FlowNode | undefined} node
|
|
8
|
+
* @returns {Set<import("../spec/channel.js").ChannelWithScale>}
|
|
9
|
+
*/
|
|
10
|
+
export function collectDomainSensitiveScaleChannels(node: FlowNode | undefined): Set<import("../spec/channel.js").ChannelWithScale>;
|
|
1
11
|
/**
|
|
2
12
|
* @param {import("../types/flowBatch.js").FlowBatch} flowBatch
|
|
3
13
|
* @returns {flowBatch is import("../types/flowBatch.js").FileBatch}
|
|
@@ -24,7 +34,9 @@ export const BEHAVIOR_MODIFIES: number;
|
|
|
24
34
|
*/
|
|
25
35
|
export const BEHAVIOR_COLLECTS: number;
|
|
26
36
|
/**
|
|
27
|
-
* @typedef {
|
|
37
|
+
* @typedef {object} ParamRuntimeProvider
|
|
38
|
+
* @prop {import("../paramRuntime/viewParamRuntime.js").default} [paramRuntime]
|
|
39
|
+
* @prop {import("../types/viewContext.js").default} [context]
|
|
28
40
|
*/
|
|
29
41
|
/**
|
|
30
42
|
* This is heavily inspired by Vega's and Vega-Lite's data flow system.
|
|
@@ -49,6 +61,14 @@ export default class FlowNode {
|
|
|
49
61
|
*/
|
|
50
62
|
paramRuntimeProvider: ParamRuntimeProvider;
|
|
51
63
|
get behavior(): number;
|
|
64
|
+
/**
|
|
65
|
+
* Scale channels whose current domain affects this node's output.
|
|
66
|
+
* Downstream views must not feed these channels back into shared-domain
|
|
67
|
+
* resolution or domain-dependent flows can invalidate themselves.
|
|
68
|
+
*
|
|
69
|
+
* @returns {import("../spec/channel.js").ChannelWithScale[]}
|
|
70
|
+
*/
|
|
71
|
+
get domainSensitiveScaleChannels(): import("../spec/channel.js").ChannelWithScale[];
|
|
52
72
|
/**
|
|
53
73
|
* A human-readable label for the node. Used for debugging and logging.
|
|
54
74
|
*
|
|
@@ -173,6 +193,7 @@ export default class FlowNode {
|
|
|
173
193
|
}
|
|
174
194
|
export type ParamRuntimeProvider = {
|
|
175
195
|
paramRuntime?: import("../paramRuntime/viewParamRuntime.js").default;
|
|
196
|
+
context?: import("../types/viewContext.js").default;
|
|
176
197
|
};
|
|
177
198
|
/**
|
|
178
199
|
* This is heavily inspired by Vega's and Vega-Lite's data flow system.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowNode.d.ts","sourceRoot":"","sources":["../../../src/data/flowNode.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flowNode.d.ts","sourceRoot":"","sources":["../../../src/data/flowNode.js"],"names":[],"mappings":"AA2ZA;;;;;;;;GAQG;AACH,0DAHW,QAAQ,GAAG,SAAS,GAClB,GAAG,CAAC,OAAO,oBAAoB,EAAE,gBAAgB,CAAC,CAc9D;AAED;;;GAGG;AACH,uCAHW,OAAO,uBAAuB,EAAE,SAAS,GACvC,SAAS,IAAI,OAAO,uBAAuB,EAAE,SAAS,CAIlE;AAED;;;GAGG;AACH,wCAHW,OAAO,uBAAuB,EAAE,SAAS,GACvC,SAAS,IAAI,OAAO,uBAAuB,EAAE,UAAU,CAInE;AA9bD;;;GAGG;AACH,qCAAsC;AAEtC;;;GAGG;AACH,uCAAwC;AAExC;;;GAGG;AACH,uCAAwC;AAExC;;;;GAIG;AAEH;;;;;GAKG;AACH;IA+CI;;OAEG;IACH,mCAFW,oBAAoB,EAa9B;IA5DD;;QAEI,oBAAoB;eAAT,KAAK;MAElB;IAWF;;;;OAIG;IACH,sBAFU,oBAAoB,CAEF;IAE5B,uBAEC;IAED;;;;;;OAMG;IACH,oCAFa,OAAO,oBAAoB,EAAE,gBAAgB,EAAE,CAI3D;IAED;;;;OAIG;IACH,aAFa,MAAM,CAIlB;IAQG,yBAAyB;IACzB,UADW,QAAQ,EAAE,CACH;IAElB,uBAAuB;IACvB,QADW,QAAQ,CACI;IAEvB,2CAA2C;IAC3C,mBAAsB;IAG1B,wBAEC;IAED;;;OAGG;IACH,cASC;IAED;;;;;;OAMG;IACH,mBAEC;IAED;;;OAGG;IACH,uBAMC;IA2QD;;;OAGG;IACH,4BAHW,KAAK,QAKf;IAxPD;;;OAGG;IACH,kBAFW,QAAQ,QAIlB;IAED;;;OAGG;IACH,gBAFW,QAAQ,QAUlB;IAED;;OAEG;IACH,YAFW,QAAQ,QAQlB;IAED;;OAEG;IACH,6BAFW,QAAQ,QAMlB;IAED;;OAEG;IACH,0BAFW,QAAQ,QAalB;IAED;;;OAGG;IACH,mBAFW,QAAQ,QAWlB;IAED;;OAEG;IACH,eAiBC;IAED,kBAEC;IAED,uBAEC;IAED,sBAEC;IAED;;;;OAIG;IACH,eAFW,CAAC,CAAS,IAAQ,EAAR,QAAQ,KAAE,IAAI,CAAC,GAAG;QAAE,aAAa,CAAC,EAAE,CAAS,IAAQ,EAAR,QAAQ,KAAE,IAAI,CAAA;KAAC,QAchF;IAED;;;OAGG;IACH,wBAHW,MAAM,GACJ,MAAM,CAWlB;IAED;;;OAGG;IACH,cAFW,KAAK,QAKf;IAED,iBAMC;IAED;;;;OAIG;IACH,2BAFW,MAAM,IAAI,QAQpB;IAED;;OAEG;IACH,gBAWC;IAED;;OAEG;IACH,uBAOC;IAED;;;;OAIG;IACH,sBAFW,OAAO,uBAAuB,EAAE,SAAS,QAMnD;IAED;;;OAGG;IACH,8BAHa,OAAO,qCAAqC,EAAE,OAAO,CAcjE;IAED;;;;OAIG;IACH,8BAQC;;CASJ;;mBAnYS,OAAO,qCAAqC,EAAE,OAAO;cACrD,OAAO,yBAAyB,EAAE,OAAO;;;;;oBAMtC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;mBACnB,KAAK,EAAE"}
|
|
@@ -19,7 +19,9 @@ export const BEHAVIOR_MODIFIES = 1 << 1;
|
|
|
19
19
|
export const BEHAVIOR_COLLECTS = 1 << 2;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* @typedef {
|
|
22
|
+
* @typedef {object} ParamRuntimeProvider
|
|
23
|
+
* @prop {import("../paramRuntime/viewParamRuntime.js").default} [paramRuntime]
|
|
24
|
+
* @prop {import("../types/viewContext.js").default} [context]
|
|
23
25
|
*/
|
|
24
26
|
|
|
25
27
|
/**
|
|
@@ -55,6 +57,17 @@ export default class FlowNode {
|
|
|
55
57
|
return 0;
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Scale channels whose current domain affects this node's output.
|
|
62
|
+
* Downstream views must not feed these channels back into shared-domain
|
|
63
|
+
* resolution or domain-dependent flows can invalidate themselves.
|
|
64
|
+
*
|
|
65
|
+
* @returns {import("../spec/channel.js").ChannelWithScale[]}
|
|
66
|
+
*/
|
|
67
|
+
get domainSensitiveScaleChannels() {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
/**
|
|
59
72
|
* A human-readable label for the node. Used for debugging and logging.
|
|
60
73
|
*
|
|
@@ -396,6 +409,29 @@ export default class FlowNode {
|
|
|
396
409
|
}
|
|
397
410
|
}
|
|
398
411
|
|
|
412
|
+
/**
|
|
413
|
+
* Walks upstream from a flow node and collects scale channels whose current
|
|
414
|
+
* domain affects the produced data. Downstream encodings on these channels
|
|
415
|
+
* must not re-register as domain contributors or they will invalidate the
|
|
416
|
+
* domain that they themselves depend on.
|
|
417
|
+
*
|
|
418
|
+
* @param {FlowNode | undefined} node
|
|
419
|
+
* @returns {Set<import("../spec/channel.js").ChannelWithScale>}
|
|
420
|
+
*/
|
|
421
|
+
export function collectDomainSensitiveScaleChannels(node) {
|
|
422
|
+
/** @type {Set<import("../spec/channel.js").ChannelWithScale>} */
|
|
423
|
+
const channels = new Set();
|
|
424
|
+
|
|
425
|
+
while (node) {
|
|
426
|
+
for (const channel of node.domainSensitiveScaleChannels) {
|
|
427
|
+
channels.add(channel);
|
|
428
|
+
}
|
|
429
|
+
node = node.parent;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return channels;
|
|
433
|
+
}
|
|
434
|
+
|
|
399
435
|
/**
|
|
400
436
|
* @param {import("../types/flowBatch.js").FlowBatch} flowBatch
|
|
401
437
|
* @returns {flowBatch is import("../types/flowBatch.js").FileBatch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bed.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bed.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bed.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bed.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,kCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAsC1C"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { formats as vegaFormats } from "vega-loader";
|
|
2
|
+
|
|
1
3
|
const blankLinePattern = /^\s*$/;
|
|
2
4
|
const controlLinePattern = /^\s*(?:browser\b|track\b|#)/;
|
|
3
5
|
|
|
@@ -44,10 +46,13 @@ export default async function bed(data) {
|
|
|
44
46
|
throw new Error(
|
|
45
47
|
`Cannot parse BED line ${i + 1}: ${
|
|
46
48
|
/** @type {Error} */ (error).message
|
|
47
|
-
}
|
|
49
|
+
}`,
|
|
50
|
+
{ cause: error }
|
|
48
51
|
);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
return rows;
|
|
53
56
|
}
|
|
57
|
+
|
|
58
|
+
vegaFormats("bed", bed);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bedpe.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bedpe.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bedpe.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bedpe.js"],"names":[],"mappings":"AAiFA;;;GAGG;AACH,oCAHW,MAAM,WACN;IAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,yBA8EhC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { formats as vegaFormats } from "vega-loader";
|
|
2
|
+
|
|
1
3
|
const blankLinePattern = /^\s*$/;
|
|
2
4
|
const controlLinePattern = /^\s*(?:browser\b|track\b|#)/;
|
|
3
5
|
|
|
@@ -158,3 +160,5 @@ export default function bedpe(data, format = {}) {
|
|
|
158
160
|
|
|
159
161
|
return rows;
|
|
160
162
|
}
|
|
163
|
+
|
|
164
|
+
vegaFormats("bedpe", bedpe);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fasta.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/fasta.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fasta.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/fasta.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,oCAJW,MAAM,WACN,GAAG,GACD,aAAa,EAAE,CAsB3B;;;;;gBA3BS,MAAM;cACN,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parquet.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/parquet.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parquet.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/parquet.js"],"names":[],"mappings":"AAcA;;;;;GAKG;AACH,+BAJW,WAAW,GAAC,UAAU,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,EAAE,CAAC,CAWzC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { formats as vegaFormats } from "vega-loader";
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Adapted from: https://github.com/vega/vega-loader-parquet/blob/main/src/index.js
|
|
3
5
|
*/
|
|
@@ -27,3 +29,5 @@ export default async function parquet(data) {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
parquet.responseType = "arrayBuffer";
|
|
32
|
+
|
|
33
|
+
vegaFormats("parquet", parquet);
|
|
@@ -1,19 +1,8 @@
|
|
|
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
1
|
/**
|
|
11
2
|
* @param {Partial<import("../../spec/data.js").Data>} params
|
|
12
3
|
* @param {import("../../view/view.js").default} view
|
|
13
4
|
*/
|
|
14
5
|
export default function createDataSource(params: Partial<import("../../spec/data.js").Data>, view: import("../../view/view.js").default): import("./dataSource.js").default;
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
Source: new (params: P, view: import("../../view/view.js").default) => import("./dataSource.js").default;
|
|
18
|
-
};
|
|
6
|
+
export { registerLazyDataSource };
|
|
7
|
+
import { registerLazyDataSource } from "./lazy/lazyDataSourceRegistry.js";
|
|
19
8
|
//# sourceMappingURL=dataSourceFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSourceFactory.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataSourceFactory.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataSourceFactory.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/dataSourceFactory.js"],"names":[],"mappings":"AAQA;;;GAGG;AACH,iDAHW,OAAO,CAAC,OAAO,oBAAoB,EAAE,IAAI,CAAC,QAC1C,OAAO,oBAAoB,EAAE,OAAO,qCAgB9C;;uCApBM,kCAAkC"}
|
|
@@ -1,45 +1,10 @@
|
|
|
1
1
|
import InlineSource, { isInlineData } from "./inlineSource.js";
|
|
2
2
|
import UrlSource, { isUrlData } from "./urlSource.js";
|
|
3
3
|
import SequenceSource, { isSequenceGenerator } from "./sequenceSource.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import BigBedSource from "./lazy/bigBedSource.js";
|
|
9
|
-
import BamSource from "./lazy/bamSource.js";
|
|
10
|
-
import Gff3Source from "./lazy/gff3Source.js";
|
|
11
|
-
import VcfSource from "./lazy/vcfSource.js";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @template {import("../../spec/data.js").LazyDataParams} P
|
|
15
|
-
* @typedef {{
|
|
16
|
-
* guard: (params: import("../../spec/data.js").LazyDataParams) => params is P,
|
|
17
|
-
* Source: new (params: P, view: import("../../view/view.js").default) => import("./dataSource.js").default
|
|
18
|
-
* }} LazySourceEntry
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/** @type {LazySourceEntry<any>[]} */
|
|
22
|
-
const customLazySources = [];
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Registers a lazy data source for a custom type.
|
|
26
|
-
*
|
|
27
|
-
* @template {import("../../spec/data.js").LazyDataParams} P
|
|
28
|
-
* @param {LazySourceEntry<P>["guard"]} guard
|
|
29
|
-
* @param {LazySourceEntry<P>["Source"]} Source
|
|
30
|
-
* @returns {() => void}
|
|
31
|
-
*/
|
|
32
|
-
export function registerLazyDataSource(guard, Source) {
|
|
33
|
-
/** @type {LazySourceEntry<any>} */
|
|
34
|
-
const entry = { guard, Source };
|
|
35
|
-
customLazySources.push(entry);
|
|
36
|
-
return () => {
|
|
37
|
-
const index = customLazySources.indexOf(entry);
|
|
38
|
-
if (index >= 0) {
|
|
39
|
-
customLazySources.splice(index, 1);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
4
|
+
import {
|
|
5
|
+
createLazyDataSource,
|
|
6
|
+
registerLazyDataSource,
|
|
7
|
+
} from "./lazy/lazyDataSourceRegistry.js";
|
|
43
8
|
|
|
44
9
|
/**
|
|
45
10
|
* @param {Partial<import("../../spec/data.js").Data>} params
|
|
@@ -70,105 +35,4 @@ function isLazyData(params) {
|
|
|
70
35
|
return "lazy" in params;
|
|
71
36
|
}
|
|
72
37
|
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
76
|
-
* @returns {params is import("../../spec/data.js").AxisTicksData}
|
|
77
|
-
*/
|
|
78
|
-
function isAxisTickSource(params) {
|
|
79
|
-
return params?.type == "axisTicks";
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
85
|
-
* @returns {params is import("../../spec/data.js").AxisGenomeData}
|
|
86
|
-
*/
|
|
87
|
-
function isAxisGenomeSource(params) {
|
|
88
|
-
return params?.type == "axisGenome";
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
94
|
-
* @returns {params is import("../../spec/data.js").IndexedFastaData}
|
|
95
|
-
*/
|
|
96
|
-
function isIndexedFastaSource(params) {
|
|
97
|
-
return params?.type == "indexedFasta";
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
103
|
-
* @returns {params is import("../../spec/data.js").BigWigData}
|
|
104
|
-
*/
|
|
105
|
-
function isBigWigSource(params) {
|
|
106
|
-
return params?.type == "bigwig";
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
112
|
-
* @returns {params is import("../../spec/data.js").BigBedData}
|
|
113
|
-
*/
|
|
114
|
-
function isBigBedSource(params) {
|
|
115
|
-
return params?.type == "bigbed";
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
121
|
-
* @returns {params is import("../../spec/data.js").BamData}
|
|
122
|
-
*/
|
|
123
|
-
function isBamSource(params) {
|
|
124
|
-
return params?.type == "bam";
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
129
|
-
* @returns {params is import("../../spec/data.js").Gff3Data}
|
|
130
|
-
*/
|
|
131
|
-
function isGff3Source(params) {
|
|
132
|
-
return params?.type == "gff3";
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
137
|
-
* @returns {params is import("../../spec/data.js").VcfData}
|
|
138
|
-
*/
|
|
139
|
-
function isVcfSource(params) {
|
|
140
|
-
return params?.type == "vcf";
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** @type {LazySourceEntry<any>[]} */
|
|
144
|
-
const builtinLazySources = [
|
|
145
|
-
{ guard: isAxisTickSource, Source: AxisTickSource },
|
|
146
|
-
{ guard: isAxisGenomeSource, Source: AxisGenomeSource },
|
|
147
|
-
{ guard: isIndexedFastaSource, Source: IndexedFastaSource },
|
|
148
|
-
{ guard: isBigWigSource, Source: BigWigSource },
|
|
149
|
-
{ guard: isBigBedSource, Source: BigBedSource },
|
|
150
|
-
{ guard: isBamSource, Source: BamSource },
|
|
151
|
-
{ guard: isGff3Source, Source: Gff3Source },
|
|
152
|
-
{ guard: isVcfSource, Source: VcfSource },
|
|
153
|
-
];
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @param {import("../../spec/data.js").LazyDataParams} params
|
|
157
|
-
* @param {import("../../view/view.js").default} view
|
|
158
|
-
*/
|
|
159
|
-
function createLazyDataSource(params, view) {
|
|
160
|
-
for (const entry of customLazySources) {
|
|
161
|
-
if (entry.guard(params)) {
|
|
162
|
-
return new entry.Source(/** @type {any} */ (params), view);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
for (const entry of builtinLazySources) {
|
|
166
|
-
if (entry.guard(params)) {
|
|
167
|
-
return new entry.Source(/** @type {any} */ (params), view);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
throw new Error(
|
|
172
|
-
"Cannot figure out the data source type: " + JSON.stringify(params)
|
|
173
|
-
);
|
|
174
|
-
}
|
|
38
|
+
export { registerLazyDataSource };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisGenomeSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/axisGenomeSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axisGenomeSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/axisGenomeSource.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,cAAc,QAC9C,OAAO,uBAAuB,EAAE,OAAO,EAIjD;CASJ;iCAtBgC,2BAA2B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
1
2
|
import SingleAxisLazySource from "./singleAxisLazySource.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -21,3 +22,13 @@ export default class AxisGenomeSource extends SingleAxisLazySource {
|
|
|
21
22
|
this.publishData([this.genome.chromosomes]);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
28
|
+
* @returns {params is import("../../../spec/data.js").AxisGenomeData}
|
|
29
|
+
*/
|
|
30
|
+
function isAxisGenomeSource(params) {
|
|
31
|
+
return params?.type == "axisGenome";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
registerBuiltInLazyDataSource(isAxisGenomeSource, AxisGenomeSource);
|
|
@@ -12,7 +12,7 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
12
12
|
*/
|
|
13
13
|
ticks: import("../../../spec/channel.js").Scalar[];
|
|
14
14
|
params: import("../../../spec/data.js").AxisTicksData;
|
|
15
|
-
onDomainChanged(): void
|
|
15
|
+
onDomainChanged(): Promise<void>;
|
|
16
16
|
}
|
|
17
17
|
import SingleAxisLazySource from "./singleAxisLazySource.js";
|
|
18
18
|
//# sourceMappingURL=axisTickSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisTickSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/axisTickSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axisTickSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/axisTickSource.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IAMI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,aAAa,QAC7C,OAAO,uBAAuB,EAAE,OAAO,EAYjD;IAnBD;;OAEG;IACH,OAFU,OAAO,0BAA0B,EAAE,MAAM,EAAE,CAE1C;IAeP,sDAAoB;IAcxB,iCAkCC;CACJ;iCAzEgC,2BAA2B"}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
tickFormat,
|
|
9
9
|
tickCount,
|
|
10
10
|
} from "../../../scale/ticks.js";
|
|
11
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
11
12
|
import SingleAxisLazySource from "./singleAxisLazySource.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -43,24 +44,24 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
43
44
|
// Force the ticks to be recalculated. This is needed because the async
|
|
44
45
|
// initialization process and non-deterministic order of events.
|
|
45
46
|
this.ticks = null;
|
|
46
|
-
this.onDomainChanged();
|
|
47
|
+
await this.onDomainChanged();
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
onDomainChanged() {
|
|
50
|
-
// Note, although this function is async, it is not awaited. Data are updated
|
|
51
|
-
// synchronously to ensure that the new ticks are available before the next frame is drawn.
|
|
52
|
-
|
|
50
|
+
async onDomainChanged() {
|
|
53
51
|
const scale = this.scaleResolution.getScale();
|
|
54
52
|
const axisLength = this.scaleResolution.getAxisLength();
|
|
55
53
|
const axisParams = this.params.axis;
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
|
-
* Make ticks
|
|
56
|
+
* Make ticks denser in small plots.
|
|
59
57
|
* TODO: Make configurable
|
|
60
58
|
*
|
|
61
|
-
* @
|
|
59
|
+
* @type {(length: number) => number}
|
|
62
60
|
*/
|
|
63
|
-
const tickSpacing =
|
|
61
|
+
const tickSpacing =
|
|
62
|
+
scale.type != "locus"
|
|
63
|
+
? (length) => 30 + 55 * smoothstep(100, 700, length)
|
|
64
|
+
: () => 85;
|
|
64
65
|
|
|
65
66
|
const requestedCount = isNumber(axisParams.tickCount)
|
|
66
67
|
? axisParams.tickCount
|
|
@@ -82,3 +83,13 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
89
|
+
* @returns {params is import("../../../spec/data.js").AxisTicksData}
|
|
90
|
+
*/
|
|
91
|
+
function isAxisTickSource(params) {
|
|
92
|
+
return params?.type == "axisTicks";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
registerBuiltInLazyDataSource(isAxisTickSource, AxisTickSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"AAIA;IAeI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,OAAO,QACvC,OAAO,uBAAuB,EAAE,OAAO,EAmDjD;IAhED;;;;;;;;OAQG;IACH,gBAFU,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAEH;IAkB1B,gDAAgC;IAQhC,iCA4BE;;CAuCT;qCA5GoC,+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 BamSource extends SingleAxisWindowedSource {
|
|
@@ -108,3 +109,13 @@ export default class BamSource extends SingleAxisWindowedSource {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
115
|
+
* @returns {params is import("../../../spec/data.js").BamData}
|
|
116
|
+
*/
|
|
117
|
+
function isBamSource(params) {
|
|
118
|
+
return params?.type == "bam";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
registerBuiltInLazyDataSource(isBamSource, BamSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"AAQA;IAUI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAoCjD;IA/CD,0CAA0C;IAC1C,QADW,OAAO,WAAW,EAAE,OAAO,CAC/B;IAEP,yCAAyC;IACzC,KADW,OAAO,WAAW,EAAE,MAAM,CACjC;IAEJ,4GAA4G;IAC5G,WADW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC9F;IAmBN,mDAYC;;CAwFR;qCAjIoC,+BAA+B"}
|
|
@@ -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
|
export default class BigBedSource extends SingleAxisWindowedSource {
|
|
@@ -87,7 +88,7 @@ export default class BigBedSource extends SingleAxisWindowedSource {
|
|
|
87
88
|
const fastParser = makeFastParser(this.parser);
|
|
88
89
|
this.parseLine = (chrom, f) =>
|
|
89
90
|
fastParser(chrom, f.start, f.end, f.rest);
|
|
90
|
-
} catch
|
|
91
|
+
} catch {
|
|
91
92
|
this.parseLine = (chrom, f) =>
|
|
92
93
|
this.parser.parseLine(
|
|
93
94
|
`${chrom}\t${f.start}\t${f.end}\t${f.rest}`
|
|
@@ -299,6 +300,16 @@ function makeFastParser(bed) {
|
|
|
299
300
|
return parseLine;
|
|
300
301
|
}
|
|
301
302
|
|
|
303
|
+
/**
|
|
304
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
305
|
+
* @returns {params is import("../../../spec/data.js").BigBedData}
|
|
306
|
+
*/
|
|
307
|
+
function isBigBedSource(params) {
|
|
308
|
+
return params?.type == "bigbed";
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
registerBuiltInLazyDataSource(isBigBedSource, BigBedSource);
|
|
312
|
+
|
|
302
313
|
/**
|
|
303
314
|
* @param {T[]} arr
|
|
304
315
|
* @param {number} size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigWigSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigWigSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bigWigSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigWigSource.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IAOI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAoCjD;IArBG,mDAYC;IA+DL;;;;OAIG;IACH,wBAFW,MAAM,EAAE,iBAqBlB;IAED;;;OAGG;IAEH,uBAJW,MAAM,EAAE,kBACR,MAAM,iBA2BhB;;CACJ;qCAhKoC,+BAA+B"}
|