@jbrowse/core 5.0.0-beta.11 → 5.0.0-beta.14
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/README.md +450 -132
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +6 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +18 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
- package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +15 -24
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.d.ts +3 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.js +2 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +29 -20
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +3 -3
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +9 -0
- package/esm/BaseFeatureWidget/stateModelFactory.js +11 -0
- package/esm/BaseFeatureWidget/types.d.ts +2 -0
- package/esm/PluginManager.d.ts +7 -3
- package/esm/PluginManager.js +12 -3
- package/esm/ReExports/coreModules.generated.js +538 -518
- package/esm/ReExports/coreWorkerModules.generated.js +456 -438
- package/esm/ReExports/lazify.js +3 -2
- package/esm/ReExports/list.js +22 -6
- package/esm/ReExports/names.d.ts +1 -0
- package/esm/ReExports/names.generated.d.ts +2 -0
- package/esm/ReExports/names.generated.js +566 -0
- package/esm/ReExports/names.js +3 -0
- package/esm/TextSearch/TextSearchManager.d.ts +3 -3
- package/esm/TextSearch/TextSearchManager.js +6 -13
- package/esm/assemblyManager/assembly.d.ts +9 -0
- package/esm/assemblyManager/assembly.js +13 -0
- package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
- package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
- package/esm/assemblyManager/assemblyManager.d.ts +11 -0
- package/esm/assemblyManager/assemblyManager.js +2 -0
- package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
- package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
- package/esm/checkPlugins.js +10 -4
- package/esm/configuration/configurationSchema.d.ts +51 -100
- package/esm/configuration/configurationSchema.js +59 -225
- package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
- package/esm/configuration/configurationSchemaUnion.js +2 -1
- package/esm/configuration/configurationSlot.d.ts +18 -64
- package/esm/configuration/configurationSlot.js +32 -98
- package/esm/configuration/fillLocations.d.ts +4 -2
- package/esm/configuration/fillLocations.js +9 -3
- package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
- package/esm/configuration/formatAboutConfigSchema.js +2 -2
- package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
- package/esm/configuration/formatDetailsConfigSchema.js +7 -5
- package/esm/configuration/getConf.d.ts +7 -36
- package/esm/configuration/getConf.js +20 -41
- package/esm/configuration/index.d.ts +4 -3
- package/esm/configuration/index.js +3 -2
- package/esm/configuration/partitionAdvanced.d.ts +12 -0
- package/esm/configuration/partitionAdvanced.js +42 -0
- package/esm/configuration/plot.d.ts +6 -0
- package/esm/configuration/plot.js +56 -9
- package/esm/configuration/readConfObject.d.ts +15 -17
- package/esm/configuration/readConfObject.js +19 -50
- package/esm/configuration/schemaRegistry.d.ts +0 -2
- package/esm/configuration/schemaTypes.js +5 -1
- package/esm/configuration/slotFacade.js +2 -2
- package/esm/configuration/snapshotPreprocess.d.ts +42 -18
- package/esm/configuration/snapshotPreprocess.js +95 -37
- package/esm/configuration/tabixShorthand.js +1 -3
- package/esm/configuration/types.d.ts +60 -159
- package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
- package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
- package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
- package/esm/data_adapters/BaseAdapter/index.js +0 -1
- package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
- package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
- package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
- package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
- package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
- package/esm/data_adapters/dataAdapterCache.js +68 -24
- package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
- package/esm/data_adapters/getFeatureAdapter.js +17 -0
- package/esm/pluggableElementTypes/DisplayType.d.ts +7 -0
- package/esm/pluggableElementTypes/DisplayType.js +7 -0
- package/esm/pluggableElementTypes/RpcMethodType.d.ts +7 -0
- package/esm/pluggableElementTypes/RpcMethodType.js +9 -0
- package/esm/pluggableElementTypes/addMenuItems.d.ts +2 -1
- package/esm/pluggableElementTypes/addMenuItems.js +2 -1
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -5
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +57 -9
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -7
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +9 -10
- package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
- package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
- package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
- package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
- package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
- package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
- package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
- package/esm/pluggableElementTypes/models/baseTrackConfig.js +12 -1
- package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
- package/esm/pluginDefinitions.d.ts +7 -0
- package/esm/pluginDefinitions.js +20 -0
- package/esm/rpc/RpcRegistry.d.ts +2 -11
- package/esm/rpc/byteBudget.d.ts +15 -0
- package/esm/rpc/byteBudget.js +23 -0
- package/esm/rpc/configSchema.d.ts +2 -0
- package/esm/rpc/configSchema.js +3 -1
- package/esm/rpc/coreRpcMethods.d.ts +1 -2
- package/esm/rpc/coreRpcMethods.js +1 -2
- package/esm/rpc/explainTransferError.js +3 -3
- package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
- package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
- package/esm/rpc/methods/CoreLoadTrackCode.d.ts +17 -0
- package/esm/rpc/methods/CoreLoadTrackCode.js +24 -0
- package/esm/rpc/methods/layerFeatures.d.ts +9 -6
- package/esm/rpc/methods/layerFeatures.js +21 -5
- package/esm/ui/ActionLink.d.ts +3 -2
- package/esm/ui/ActionLink.js +4 -2
- package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
- package/esm/ui/AddCustomPluginDialog.js +6 -4
- package/esm/ui/AppLogo.js +43 -3
- package/esm/ui/BaseTooltip.d.ts +3 -2
- package/esm/ui/BaseTooltip.js +4 -2
- package/esm/ui/CascadingMenu.js +14 -12
- package/esm/ui/CascadingMenuButton.d.ts +2 -2
- package/esm/ui/CascadingMenuButton.js +5 -4
- package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
- package/esm/ui/CascadingMenuHelpDialog.js +4 -2
- package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
- package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
- package/esm/ui/ColorPicker.d.ts +5 -4
- package/esm/ui/ColorPicker.js +6 -4
- package/esm/ui/ContextMenu.d.ts +1 -1
- package/esm/ui/ContextMenu.js +1 -1
- package/esm/ui/CopyToClipboardButton.d.ts +3 -2
- package/esm/ui/CopyToClipboardButton.js +4 -2
- package/esm/ui/Crosshairs.js +13 -10
- package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
- package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
- package/esm/ui/DataGridFlexContainer.d.ts +3 -2
- package/esm/ui/DataGridFlexContainer.js +4 -2
- package/esm/ui/Dialog.d.ts +1 -1
- package/esm/ui/Dialog.js +5 -4
- package/esm/ui/DropDownMenu.js +2 -2
- package/esm/ui/EditableTypography.d.ts +1 -1
- package/esm/ui/EditableTypography.js +3 -2
- package/esm/ui/ErrorActions.d.ts +3 -2
- package/esm/ui/ErrorActions.js +4 -2
- package/esm/ui/ErrorBanner.d.ts +2 -2
- package/esm/ui/ErrorBanner.js +3 -2
- package/esm/ui/ErrorBar.d.ts +3 -2
- package/esm/ui/ErrorBar.js +4 -2
- package/esm/ui/ErrorMessage.d.ts +3 -2
- package/esm/ui/ErrorMessage.js +4 -2
- package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
- package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
- package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
- package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
- package/esm/ui/ErrorOverlay.d.ts +3 -2
- package/esm/ui/ErrorOverlay.js +4 -2
- package/esm/ui/ExportSvgDialog.d.ts +3 -2
- package/esm/ui/ExportSvgDialog.js +4 -2
- package/esm/ui/ExternalLink.d.ts +2 -1
- package/esm/ui/ExternalLink.js +4 -2
- package/esm/ui/FactoryResetDialog.d.ts +3 -2
- package/esm/ui/FactoryResetDialog.js +4 -2
- package/esm/ui/FatalErrorDialog.d.ts +3 -2
- package/esm/ui/FatalErrorDialog.js +6 -4
- package/esm/ui/FileDropZone.d.ts +3 -2
- package/esm/ui/FileDropZone.js +4 -2
- package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
- package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
- package/esm/ui/FileSelector/LocationInput.js +4 -2
- package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
- package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
- package/esm/ui/GpuFallbackButton.d.ts +3 -2
- package/esm/ui/GpuFallbackButton.js +4 -2
- package/esm/ui/HoverMenu.d.ts +2 -2
- package/esm/ui/HoverMenu.js +7 -3
- package/esm/ui/HoverTooltip.d.ts +3 -2
- package/esm/ui/HoverTooltip.js +4 -2
- package/esm/ui/Icons.d.ts +5 -5
- package/esm/ui/Icons.js +11 -10
- package/esm/ui/InlineMenuControls.d.ts +2 -2
- package/esm/ui/InlineMenuControls.js +4 -3
- package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
- package/esm/ui/JexlFilterRowEditors.js +9 -8
- package/esm/ui/LabeledCheckbox.d.ts +3 -2
- package/esm/ui/LabeledCheckbox.js +4 -2
- package/esm/ui/LazyBaseTooltip.d.ts +12 -3
- package/esm/ui/LazyBaseTooltip.js +4 -2
- package/esm/ui/LegendSwatchGlyph.js +1 -0
- package/esm/ui/LoadingDots.d.ts +2 -1
- package/esm/ui/LoadingDots.js +4 -2
- package/esm/ui/LoadingEllipses.d.ts +5 -2
- package/esm/ui/LoadingEllipses.js +5 -3
- package/esm/ui/LoadingOverlay.d.ts +3 -2
- package/esm/ui/LoadingOverlay.js +4 -2
- package/esm/ui/LoadingProgress.d.ts +3 -2
- package/esm/ui/LoadingProgress.js +4 -2
- package/esm/ui/Logo.d.ts +2 -2
- package/esm/ui/Logo.js +9 -8
- package/esm/ui/MenuItemChevron.d.ts +2 -2
- package/esm/ui/MenuItemChevron.js +3 -2
- package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
- package/esm/ui/MenuItemEndDecoration.js +3 -2
- package/esm/ui/MenuItemTrailing.d.ts +2 -2
- package/esm/ui/MenuItemTrailing.js +7 -6
- package/esm/ui/MenuTypes.d.ts +21 -1
- package/esm/ui/MenuTypes.js +20 -0
- package/esm/ui/MonospaceTextField.d.ts +3 -2
- package/esm/ui/MonospaceTextField.js +4 -2
- package/esm/ui/NumberTextField.d.ts +2 -2
- package/esm/ui/NumberTextField.js +4 -2
- package/esm/ui/PaletteContext.d.ts +11 -9
- package/esm/ui/PaletteContext.js +33 -18
- package/esm/ui/PluginStoreCard.d.ts +3 -2
- package/esm/ui/PluginStoreCard.js +4 -2
- package/esm/ui/PopoverPicker.d.ts +3 -2
- package/esm/ui/PopoverPicker.js +4 -2
- package/esm/ui/PrerenderedCanvas.d.ts +2 -2
- package/esm/ui/PrerenderedCanvas.js +3 -2
- package/esm/ui/RedErrorMessageBox.d.ts +3 -2
- package/esm/ui/RedErrorMessageBox.js +4 -2
- package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
- package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
- package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
- package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
- package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
- package/esm/ui/ReplaceCurrentViewButton.js +4 -2
- package/esm/ui/ResizeHandle.d.ts +2 -2
- package/esm/ui/ResizeHandle.js +3 -2
- package/esm/ui/SanitizedHTML.d.ts +3 -2
- package/esm/ui/SanitizedHTML.js +6 -4
- package/esm/ui/ScrollChrome.d.ts +3 -2
- package/esm/ui/ScrollChrome.js +4 -2
- package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
- package/esm/ui/ScrollEdgeShadow.js +2 -2
- package/esm/ui/SessionJsonPanel.d.ts +3 -2
- package/esm/ui/SessionJsonPanel.js +4 -2
- package/esm/ui/ShareLinkField.d.ts +3 -2
- package/esm/ui/ShareLinkField.js +4 -2
- package/esm/ui/SingleSlider.d.ts +2 -2
- package/esm/ui/SingleSlider.js +4 -2
- package/esm/ui/SliderTooltip.d.ts +2 -1
- package/esm/ui/SliderTooltip.js +4 -2
- package/esm/ui/SnackbarContents.d.ts +3 -2
- package/esm/ui/SnackbarContents.js +4 -2
- package/esm/ui/SnackbarModel.d.ts +2 -0
- package/esm/ui/SnackbarModel.js +2 -0
- package/esm/ui/StackTraceButton.d.ts +3 -2
- package/esm/ui/StackTraceButton.js +4 -2
- package/esm/ui/StatusProgressBar.d.ts +3 -2
- package/esm/ui/StatusProgressBar.js +4 -2
- package/esm/ui/SubmitForm.d.ts +2 -1
- package/esm/ui/SubmitForm.js +4 -2
- package/esm/ui/SvgColorLegend.d.ts +3 -4
- package/esm/ui/SvgColorLegend.js +27 -18
- package/esm/ui/TagTextField.d.ts +2 -2
- package/esm/ui/TagTextField.js +4 -2
- package/esm/ui/ViewLoadingScreen.d.ts +3 -2
- package/esm/ui/ViewLoadingScreen.js +4 -2
- package/esm/ui/buildExtraTrackMenuItems.d.ts +2 -2
- package/esm/ui/colorScale.d.ts +5 -1
- package/esm/ui/colorScale.js +12 -10
- package/esm/ui/colors.d.ts +42 -31
- package/esm/ui/colors.js +85 -48
- package/esm/ui/filterMenuItems.d.ts +10 -31
- package/esm/ui/filterMenuItems.js +13 -14
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/esm/ui/launchTargetsMenuItem.js +9 -13
- package/esm/ui/legendMenuItem.d.ts +4 -4
- package/esm/ui/legendMenuItem.js +4 -4
- package/esm/ui/menuItemAdornment.d.ts +1 -1
- package/esm/ui/menuItemAdornment.js +1 -1
- package/esm/ui/menuItems.d.ts +1 -1
- package/esm/ui/menuItems.js +1 -1
- package/esm/ui/menuLabels.d.ts +2 -2
- package/esm/ui/menuLabels.js +2 -2
- package/esm/ui/multiTrackMenuItems.d.ts +2 -2
- package/esm/ui/palette.d.ts +2 -2
- package/esm/ui/palette.js +10 -10
- package/esm/ui/radioSubMenu.d.ts +5 -3
- package/esm/ui/radioSubMenu.js +2 -2
- package/esm/ui/rampKey.d.ts +15 -0
- package/esm/ui/rampKey.js +17 -0
- package/esm/ui/showSubMenu.d.ts +0 -5
- package/esm/ui/showSubMenu.js +6 -15
- package/esm/ui/theme.d.ts +2 -2
- package/esm/ui/theme.js +1 -1
- package/esm/ui/useAssemblySelection.d.ts +2 -0
- package/esm/ui/useMouseTracking.d.ts +8 -20
- package/esm/ui/useMouseTracking.js +23 -62
- package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
- package/esm/ui/usePlacedMenuFocus.js +28 -0
- package/esm/util/Base1DViewModel.d.ts +5 -3
- package/esm/util/Base1DViewModel.js +5 -3
- package/esm/util/SvgCanvas.js +1 -1
- package/esm/util/aggregateFieldName.d.ts +1 -10
- package/esm/util/aggregateFieldName.js +1 -8
- package/esm/util/alignedBytes.d.ts +19 -0
- package/esm/util/alignedBytes.js +37 -0
- package/esm/util/analytics.d.ts +6 -9
- package/esm/util/analytics.js +148 -15
- package/esm/util/bezierConnector.d.ts +20 -0
- package/esm/util/bezierConnector.js +34 -96
- package/esm/util/cacheBudgets.d.ts +3 -0
- package/esm/util/cacheBudgets.js +3 -0
- package/esm/util/categoricalField.d.ts +24 -4
- package/esm/util/categoricalField.js +38 -5
- package/esm/util/cellMatches.js +14 -14
- package/esm/util/cellsStep.d.ts +3 -5
- package/esm/util/cellsStep.js +31 -29
- package/esm/util/color/index.d.ts +1 -1
- package/esm/util/color/index.js +2 -2
- package/esm/util/color-bits/bit.js +1 -1
- package/esm/util/color-bits/parse.js +28 -17
- package/esm/util/colorBits.d.ts +15 -4
- package/esm/util/colorBits.js +38 -15
- package/esm/util/colorRamp.d.ts +3 -3
- package/esm/util/colorRamp.js +20 -2
- package/esm/util/colorScale.d.ts +123 -22
- package/esm/util/colorScale.js +157 -28
- package/esm/util/colorSchemes.d.ts +7 -3
- package/esm/util/colorSchemes.js +8 -2
- package/esm/util/createSvgRasterCanvas.d.ts +14 -1
- package/esm/util/createSvgRasterCanvas.js +36 -12
- package/esm/util/diagonalizeRegions.js +18 -9
- package/esm/util/featureTransforms.d.ts +2 -2
- package/esm/util/featureTransforms.js +85 -135
- package/esm/util/fileHandleStore.js +5 -0
- package/esm/util/groupKeys.d.ts +5 -4
- package/esm/util/groupKeys.js +15 -9
- package/esm/util/index.js +1 -1
- package/esm/util/installFetch.d.ts +2 -2
- package/esm/util/installPrerequisiteFetch.d.ts +8 -3
- package/esm/util/installPrerequisiteFetch.js +9 -7
- package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
- package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
- package/esm/util/isoformRank.d.ts +39 -0
- package/esm/util/isoformRank.js +118 -0
- package/esm/util/jexl.js +1 -1
- package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
- package/esm/util/layouts/GranularRectLayout.js +57 -34
- package/esm/util/leadingEdgeAutorun.d.ts +9 -1
- package/esm/util/leadingEdgeAutorun.js +5 -2
- package/esm/util/markEncoding.d.ts +10 -8
- package/esm/util/markEncoding.js +50 -12
- package/esm/util/markEncodingTypes.d.ts +77 -21
- package/esm/util/originCut.d.ts +14 -0
- package/esm/util/originCut.js +19 -0
- package/esm/util/paintLayer.d.ts +1 -1
- package/esm/util/paintLayer.js +4 -3
- package/esm/util/pathSeries.d.ts +18 -0
- package/esm/util/pathSeries.js +143 -0
- package/esm/util/pressOwner.d.ts +20 -0
- package/esm/util/pressOwner.js +26 -0
- package/esm/util/quantileExtent.d.ts +23 -1
- package/esm/util/quantileExtent.js +25 -2
- package/esm/util/rowStackGeometry.d.ts +1 -1
- package/esm/util/rowStackGeometry.js +1 -1
- package/esm/util/sessionActivity.d.ts +36 -0
- package/esm/util/sessionActivity.js +88 -0
- package/esm/util/stepOutputs.d.ts +165 -0
- package/esm/util/stepOutputs.js +201 -0
- package/esm/util/stepTables.d.ts +7 -3
- package/esm/util/stepTables.js +86 -3
- package/esm/util/systemColorScheme.d.ts +4 -0
- package/esm/util/systemColorScheme.js +21 -0
- package/esm/util/tabix.d.ts +1 -1
- package/esm/util/tabix.js +1 -1
- package/esm/util/temporaryAssembly.d.ts +2 -2
- package/esm/util/temporaryAssembly.js +2 -3
- package/esm/util/thresholdScale.d.ts +1 -1
- package/esm/util/thresholdScale.js +1 -1
- package/esm/util/trackConfigDelta.d.ts +1 -1
- package/esm/util/tracks.d.ts +25 -15
- package/esm/util/tracks.js +68 -44
- package/esm/util/types/index.d.ts +15 -7
- package/esm/util/types/index.js +21 -2
- package/esm/util/usePanZoom.js +4 -10
- package/esm/util/useRowVirtualScroll.d.ts +1 -0
- package/esm/util/windowStep.d.ts +6 -0
- package/esm/util/windowStep.js +153 -0
- package/package.json +27 -16
- package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
- package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
- package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
- package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
- package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +0 -13
- package/esm/rpc/methods/CoreLoadAdapterCode.js +0 -16
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ActivitySession {
|
|
2
|
+
sessionTracks: {
|
|
3
|
+
type: string;
|
|
4
|
+
}[];
|
|
5
|
+
views: {
|
|
6
|
+
type: string;
|
|
7
|
+
tracks?: readonly object[];
|
|
8
|
+
}[];
|
|
9
|
+
widgets?: {
|
|
10
|
+
values(): Iterable<{
|
|
11
|
+
type: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface SessionShape {
|
|
16
|
+
viewTypes: string[];
|
|
17
|
+
trackTypes: string[];
|
|
18
|
+
widgetTypes: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function describeSession(session: ActivitySession | undefined): SessionShape;
|
|
21
|
+
export declare function tallyTypes(types: string[]): string;
|
|
22
|
+
export declare function createSessionActivity(): {
|
|
23
|
+
watch(getSession: () => ActivitySession | undefined): void;
|
|
24
|
+
stop(): void;
|
|
25
|
+
readonly watching: boolean;
|
|
26
|
+
stats(): {
|
|
27
|
+
'view-types': string;
|
|
28
|
+
'open-track-types': string;
|
|
29
|
+
'seen-view-types': string;
|
|
30
|
+
'seen-track-types': string;
|
|
31
|
+
'seen-widget-types': string;
|
|
32
|
+
'max-open-views': number;
|
|
33
|
+
'max-open-tracks': number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type SessionActivity = ReturnType<typeof createSessionActivity>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { autorun } from 'mobx';
|
|
2
|
+
export function describeSession(session) {
|
|
3
|
+
const shape = { viewTypes: [], trackTypes: [], widgetTypes: [] };
|
|
4
|
+
if (session) {
|
|
5
|
+
for (const view of session.views) {
|
|
6
|
+
shape.viewTypes.push(view.type);
|
|
7
|
+
for (const track of view.tracks ?? []) {
|
|
8
|
+
if ('type' in track && typeof track.type === 'string') {
|
|
9
|
+
shape.trackTypes.push(track.type);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
for (const widget of session.widgets?.values() ?? []) {
|
|
14
|
+
shape.widgetTypes.push(widget.type);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return shape;
|
|
18
|
+
}
|
|
19
|
+
// `LinearGenomeView:2,DotplotView:1`, sorted so equal sessions give equal text
|
|
20
|
+
export function tallyTypes(types) {
|
|
21
|
+
const counts = new Map();
|
|
22
|
+
for (const type of types) {
|
|
23
|
+
counts.set(type, (counts.get(type) ?? 0) + 1);
|
|
24
|
+
}
|
|
25
|
+
return [...counts]
|
|
26
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
27
|
+
.map(([type, count]) => `${type}:${count}`)
|
|
28
|
+
.join(',');
|
|
29
|
+
}
|
|
30
|
+
// Accumulates what a page load's sessions held at any point, so the end report
|
|
31
|
+
// can say what was opened during use and not only what is open at the end.
|
|
32
|
+
export function createSessionActivity() {
|
|
33
|
+
const seen = {
|
|
34
|
+
viewTypes: new Set(),
|
|
35
|
+
trackTypes: new Set(),
|
|
36
|
+
widgetTypes: new Set(),
|
|
37
|
+
};
|
|
38
|
+
let maxOpenViews = 0;
|
|
39
|
+
let maxOpenTracks = 0;
|
|
40
|
+
let current = describeSession(undefined);
|
|
41
|
+
let stopWatching;
|
|
42
|
+
function record(shape) {
|
|
43
|
+
current = shape;
|
|
44
|
+
maxOpenViews = Math.max(maxOpenViews, shape.viewTypes.length);
|
|
45
|
+
maxOpenTracks = Math.max(maxOpenTracks, shape.trackTypes.length);
|
|
46
|
+
for (const key of ['viewTypes', 'trackTypes', 'widgetTypes']) {
|
|
47
|
+
for (const type of shape[key]) {
|
|
48
|
+
seen[key].add(type);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
// jbrowse-web rebuilds the root model when plugins change and Desktop
|
|
54
|
+
// builds one per session opened, so each call replaces the previous watch.
|
|
55
|
+
// A root model that has left its state tree throws when read; the watch
|
|
56
|
+
// then keeps what it last saw.
|
|
57
|
+
watch(getSession) {
|
|
58
|
+
stopWatching?.();
|
|
59
|
+
stopWatching = autorun(() => {
|
|
60
|
+
try {
|
|
61
|
+
record(describeSession(getSession()));
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// dead state tree
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
stop() {
|
|
69
|
+
stopWatching?.();
|
|
70
|
+
stopWatching = undefined;
|
|
71
|
+
},
|
|
72
|
+
get watching() {
|
|
73
|
+
return stopWatching !== undefined;
|
|
74
|
+
},
|
|
75
|
+
stats() {
|
|
76
|
+
const list = (types) => [...types].sort().join(',');
|
|
77
|
+
return {
|
|
78
|
+
'view-types': tallyTypes(current.viewTypes),
|
|
79
|
+
'open-track-types': tallyTypes(current.trackTypes),
|
|
80
|
+
'seen-view-types': list(seen.viewTypes),
|
|
81
|
+
'seen-track-types': list(seen.trackTypes),
|
|
82
|
+
'seen-widget-types': list(seen.widgetTypes),
|
|
83
|
+
'max-open-views': maxOpenViews,
|
|
84
|
+
'max-open-tracks': maxOpenTracks,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each transform step does to the rows it reads, stated once for the
|
|
3
|
+
* runtime's facet split, the validator, the field pickers and the channels a
|
|
4
|
+
* mark adopts by default. Imports nothing, so the validator's copy of the mark
|
|
5
|
+
* rule list carries it unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Every step type answers three things:
|
|
8
|
+
* - `rowwise`: it answers each row from that row alone and in order, so a
|
|
9
|
+
* facet split may run ahead of it.
|
|
10
|
+
* - `replacesRows`: it makes its rows anew (an aggregate, a coverage), so a
|
|
11
|
+
* field survives it only where it writes that field or keeps it as a group.
|
|
12
|
+
* - `writes`: the fields it sets, each with the kind of value it holds and the
|
|
13
|
+
* channel a mark leaving that channel unwritten reads it through.
|
|
14
|
+
*/
|
|
15
|
+
/** The field an aggregate op writes: `as` where named, else `count` for a count, else `<op>_<field>`. */
|
|
16
|
+
export declare function aggregateFieldName({ op, field, as, }: {
|
|
17
|
+
op: string;
|
|
18
|
+
field?: string;
|
|
19
|
+
as?: string;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare const DEFAULT_FORMULA_AS = "value";
|
|
22
|
+
export declare const DEFAULT_COVERAGE_AS = "coverage";
|
|
23
|
+
export declare const DEFAULT_PILEUP_AS = "row";
|
|
24
|
+
export declare const DEFAULT_AGGREGATE_OP = "count";
|
|
25
|
+
export declare const DEFAULT_BIN_AS: readonly [string, string];
|
|
26
|
+
/** What a `bin` over `fields` writes on each piece: the bases of its interval inside its bin. */
|
|
27
|
+
export declare const BIN_OVERLAP_FIELD = "overlap";
|
|
28
|
+
/** What a `cells` step writes: `state` on every cell, `base` on a mismatch or an insertion, `match` off a gap or a reference `N`, `length` on an insertion. */
|
|
29
|
+
export declare const CELLS_FIELDS: readonly ['state', 'base', 'match', 'length'];
|
|
30
|
+
/** What a `mate` step writes on every feature it answers. */
|
|
31
|
+
export declare const MATE_FIELDS: readonly ['mate.refName', 'mate.start', 'mate.end', 'mate.mateDirection', 'mateDirection', 'alt', 'svType'];
|
|
32
|
+
/** Where a row stands, which every row keeps through every step. */
|
|
33
|
+
export declare const POSITION_FIELDS: readonly ['refName', 'start', 'end'];
|
|
34
|
+
/** The kind of value a step writes into a field; `unknown` keeps whatever the field held. */
|
|
35
|
+
export type FieldKind = 'numeric' | 'categorical' | 'unknown';
|
|
36
|
+
/** A channel a step's output fills where a mark leaves it unwritten. */
|
|
37
|
+
export type FilledChannel = 'y' | 'row' | 'x2';
|
|
38
|
+
export interface WrittenField {
|
|
39
|
+
field: string;
|
|
40
|
+
kind: FieldKind;
|
|
41
|
+
fills?: FilledChannel;
|
|
42
|
+
}
|
|
43
|
+
/** A step as a config node, a snapshot or a worker request holds it, any default unwritten. */
|
|
44
|
+
export interface StepOutline {
|
|
45
|
+
type: string;
|
|
46
|
+
as?: string | readonly string[];
|
|
47
|
+
ops?: readonly {
|
|
48
|
+
op?: string;
|
|
49
|
+
field?: string;
|
|
50
|
+
as?: string;
|
|
51
|
+
}[];
|
|
52
|
+
groupby?: readonly string[];
|
|
53
|
+
fields?: readonly string[];
|
|
54
|
+
index?: string;
|
|
55
|
+
key?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface StepOutput {
|
|
58
|
+
rowwise: boolean;
|
|
59
|
+
replacesRows: boolean;
|
|
60
|
+
/** `edges` are the fields the last `bin` before this step wrote its edges to. */
|
|
61
|
+
writes: (step: StepOutline, edges: readonly string[]) => WrittenField[];
|
|
62
|
+
}
|
|
63
|
+
declare function summaries(step: StepOutline): WrittenField[];
|
|
64
|
+
export declare const STEP_OUTPUTS: {
|
|
65
|
+
filter: {
|
|
66
|
+
rowwise: true;
|
|
67
|
+
replacesRows: false;
|
|
68
|
+
writes: () => never[];
|
|
69
|
+
};
|
|
70
|
+
formula: {
|
|
71
|
+
rowwise: true;
|
|
72
|
+
replacesRows: false;
|
|
73
|
+
writes: (step: StepOutline) => {
|
|
74
|
+
field: string;
|
|
75
|
+
kind: "numeric";
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
bin: {
|
|
79
|
+
rowwise: true;
|
|
80
|
+
replacesRows: false;
|
|
81
|
+
writes: (step: StepOutline) => {
|
|
82
|
+
field: string;
|
|
83
|
+
kind: 'numeric';
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
cells: {
|
|
87
|
+
rowwise: true;
|
|
88
|
+
replacesRows: false;
|
|
89
|
+
writes: () => ({
|
|
90
|
+
field: string;
|
|
91
|
+
kind: "numeric";
|
|
92
|
+
} | {
|
|
93
|
+
field: string;
|
|
94
|
+
kind: "categorical";
|
|
95
|
+
})[];
|
|
96
|
+
};
|
|
97
|
+
aggregate: {
|
|
98
|
+
rowwise: false;
|
|
99
|
+
replacesRows: true;
|
|
100
|
+
writes: (step: StepOutline, edges: readonly string[]) => WrittenField[];
|
|
101
|
+
};
|
|
102
|
+
window: {
|
|
103
|
+
rowwise: false;
|
|
104
|
+
replacesRows: false;
|
|
105
|
+
writes: typeof summaries;
|
|
106
|
+
};
|
|
107
|
+
coverage: {
|
|
108
|
+
rowwise: false;
|
|
109
|
+
replacesRows: true;
|
|
110
|
+
writes: (step: StepOutline) => {
|
|
111
|
+
field: string;
|
|
112
|
+
kind: "numeric";
|
|
113
|
+
fills: "y";
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
pileup: {
|
|
117
|
+
rowwise: false;
|
|
118
|
+
replacesRows: false;
|
|
119
|
+
writes: (step: StepOutline) => {
|
|
120
|
+
field: string;
|
|
121
|
+
kind: "numeric";
|
|
122
|
+
fills: "row";
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
flatten: {
|
|
126
|
+
rowwise: false;
|
|
127
|
+
replacesRows: false;
|
|
128
|
+
writes: (step: StepOutline) => ({
|
|
129
|
+
field: string;
|
|
130
|
+
kind: 'numeric';
|
|
131
|
+
} | {
|
|
132
|
+
field: string;
|
|
133
|
+
kind: 'categorical';
|
|
134
|
+
})[];
|
|
135
|
+
};
|
|
136
|
+
mate: {
|
|
137
|
+
rowwise: false;
|
|
138
|
+
replacesRows: false;
|
|
139
|
+
writes: () => {
|
|
140
|
+
field: "alt" | "mate.end" | "mate.mateDirection" | "mate.refName" | "mate.start" | "mateDirection" | "svType";
|
|
141
|
+
kind: "categorical" | "numeric";
|
|
142
|
+
fills?: "x2" | undefined;
|
|
143
|
+
}[];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type StepType = keyof typeof STEP_OUTPUTS;
|
|
147
|
+
/**
|
|
148
|
+
* The fields one step writes. A step this table does not know writes nothing
|
|
149
|
+
* it can name.
|
|
150
|
+
*/
|
|
151
|
+
export declare function stepWrites(step: StepOutline, edges?: readonly string[]): WrittenField[];
|
|
152
|
+
/** Whether a step answers each row from that row alone, in order. */
|
|
153
|
+
export declare function isRowwise(step: StepOutline): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* What a run of steps leaves: every field written, the last write of each
|
|
156
|
+
* winning, and, where a step made the rows anew, the only fields that survive
|
|
157
|
+
* it (`undefined` while the input's own fields all do). `channels` are what
|
|
158
|
+
* the output fills where a mark leaves them unwritten.
|
|
159
|
+
*/
|
|
160
|
+
export declare function stepsOutput(steps: readonly (StepOutline | undefined)[]): {
|
|
161
|
+
written: WrittenField[];
|
|
162
|
+
surviving: Set<string> | undefined;
|
|
163
|
+
channels: Map<FilledChannel, string>;
|
|
164
|
+
};
|
|
165
|
+
export {};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each transform step does to the rows it reads, stated once for the
|
|
3
|
+
* runtime's facet split, the validator, the field pickers and the channels a
|
|
4
|
+
* mark adopts by default. Imports nothing, so the validator's copy of the mark
|
|
5
|
+
* rule list carries it unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Every step type answers three things:
|
|
8
|
+
* - `rowwise`: it answers each row from that row alone and in order, so a
|
|
9
|
+
* facet split may run ahead of it.
|
|
10
|
+
* - `replacesRows`: it makes its rows anew (an aggregate, a coverage), so a
|
|
11
|
+
* field survives it only where it writes that field or keeps it as a group.
|
|
12
|
+
* - `writes`: the fields it sets, each with the kind of value it holds and the
|
|
13
|
+
* channel a mark leaving that channel unwritten reads it through.
|
|
14
|
+
*/
|
|
15
|
+
/** The field an aggregate op writes: `as` where named, else `count` for a count, else `<op>_<field>`. */
|
|
16
|
+
export function aggregateFieldName({ op, field, as, }) {
|
|
17
|
+
return as || (op === 'count' || !field ? op : `${op}_${field}`);
|
|
18
|
+
}
|
|
19
|
+
export const DEFAULT_FORMULA_AS = 'value';
|
|
20
|
+
export const DEFAULT_COVERAGE_AS = 'coverage';
|
|
21
|
+
export const DEFAULT_PILEUP_AS = 'row';
|
|
22
|
+
export const DEFAULT_AGGREGATE_OP = 'count';
|
|
23
|
+
export const DEFAULT_BIN_AS = ['start', 'end'];
|
|
24
|
+
/** What a `bin` over `fields` writes on each piece: the bases of its interval inside its bin. */
|
|
25
|
+
export const BIN_OVERLAP_FIELD = 'overlap';
|
|
26
|
+
/** What a `cells` step writes: `state` on every cell, `base` on a mismatch or an insertion, `match` off a gap or a reference `N`, `length` on an insertion. */
|
|
27
|
+
export const CELLS_FIELDS = ['state', 'base', 'match', 'length'];
|
|
28
|
+
/** What a `mate` step writes on every feature it answers. */
|
|
29
|
+
export const MATE_FIELDS = [
|
|
30
|
+
'mate.refName',
|
|
31
|
+
'mate.start',
|
|
32
|
+
'mate.end',
|
|
33
|
+
'mate.mateDirection',
|
|
34
|
+
'mateDirection',
|
|
35
|
+
'alt',
|
|
36
|
+
'svType',
|
|
37
|
+
];
|
|
38
|
+
/** Where a row stands, which every row keeps through every step. */
|
|
39
|
+
export const POSITION_FIELDS = ['refName', 'start', 'end'];
|
|
40
|
+
function named(as, fallback) {
|
|
41
|
+
return typeof as === 'string' && as !== '' ? as : fallback;
|
|
42
|
+
}
|
|
43
|
+
function binEdges(step) {
|
|
44
|
+
const { as } = step;
|
|
45
|
+
return Array.isArray(as) && as.length === 2 ? as : DEFAULT_BIN_AS;
|
|
46
|
+
}
|
|
47
|
+
// A single op names the `y` its mark reads; two leave the mark to choose.
|
|
48
|
+
function summaries(step) {
|
|
49
|
+
const ops = step.ops ?? [];
|
|
50
|
+
return ops.map(({ op = DEFAULT_AGGREGATE_OP, field, as }) => ({
|
|
51
|
+
field: aggregateFieldName({ op, field, as }),
|
|
52
|
+
kind: 'numeric',
|
|
53
|
+
...(ops.length === 1 ? { fills: 'y' } : {}),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
const kept = (field) => ({ field, kind: 'unknown' });
|
|
57
|
+
export const STEP_OUTPUTS = {
|
|
58
|
+
filter: { rowwise: true, replacesRows: false, writes: () => [] },
|
|
59
|
+
formula: {
|
|
60
|
+
rowwise: true,
|
|
61
|
+
replacesRows: false,
|
|
62
|
+
writes: step => [
|
|
63
|
+
{ field: named(step.as, DEFAULT_FORMULA_AS), kind: 'numeric' },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
bin: {
|
|
67
|
+
rowwise: true,
|
|
68
|
+
replacesRows: false,
|
|
69
|
+
writes: step => [
|
|
70
|
+
...binEdges(step).map(field => ({ field, kind: 'numeric' })),
|
|
71
|
+
...(step.fields?.length === 2
|
|
72
|
+
? [{ field: BIN_OVERLAP_FIELD, kind: 'numeric' }]
|
|
73
|
+
: []),
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
cells: {
|
|
77
|
+
rowwise: true,
|
|
78
|
+
replacesRows: false,
|
|
79
|
+
writes: () => [
|
|
80
|
+
{ field: 'start', kind: 'numeric' },
|
|
81
|
+
{ field: 'end', kind: 'numeric' },
|
|
82
|
+
{ field: 'state', kind: 'categorical' },
|
|
83
|
+
{ field: 'base', kind: 'categorical' },
|
|
84
|
+
{ field: 'match', kind: 'numeric' },
|
|
85
|
+
{ field: 'length', kind: 'numeric' },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
aggregate: {
|
|
89
|
+
rowwise: false,
|
|
90
|
+
replacesRows: true,
|
|
91
|
+
writes: (step, edges) => [
|
|
92
|
+
...(step.groupby?.length ? step.groupby : edges).map(kept),
|
|
93
|
+
...summaries(step),
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
window: { rowwise: false, replacesRows: false, writes: summaries },
|
|
97
|
+
coverage: {
|
|
98
|
+
rowwise: false,
|
|
99
|
+
replacesRows: true,
|
|
100
|
+
writes: step => [
|
|
101
|
+
{
|
|
102
|
+
field: named(step.as, DEFAULT_COVERAGE_AS),
|
|
103
|
+
kind: 'numeric',
|
|
104
|
+
fills: 'y',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
pileup: {
|
|
109
|
+
rowwise: false,
|
|
110
|
+
replacesRows: false,
|
|
111
|
+
writes: step => [
|
|
112
|
+
{
|
|
113
|
+
field: named(step.as, DEFAULT_PILEUP_AS),
|
|
114
|
+
kind: 'numeric',
|
|
115
|
+
fills: 'row',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
flatten: {
|
|
120
|
+
rowwise: false,
|
|
121
|
+
replacesRows: false,
|
|
122
|
+
writes: step => [
|
|
123
|
+
...(step.index ? [{ field: step.index, kind: 'numeric' }] : []),
|
|
124
|
+
...(step.key ? [{ field: step.key, kind: 'categorical' }] : []),
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
mate: {
|
|
128
|
+
rowwise: false,
|
|
129
|
+
replacesRows: false,
|
|
130
|
+
writes: () => MATE_FIELDS.map(field => ({
|
|
131
|
+
field,
|
|
132
|
+
kind: field === 'mate.start' || field === 'mate.end'
|
|
133
|
+
? 'numeric'
|
|
134
|
+
: 'categorical',
|
|
135
|
+
...(field === 'mate.refName' ? { fills: 'x2' } : {}),
|
|
136
|
+
})),
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
function outputOf(step) {
|
|
140
|
+
return Object.hasOwn(STEP_OUTPUTS, step.type)
|
|
141
|
+
? STEP_OUTPUTS[step.type]
|
|
142
|
+
: undefined;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The fields one step writes. A step this table does not know writes nothing
|
|
146
|
+
* it can name.
|
|
147
|
+
*/
|
|
148
|
+
export function stepWrites(step, edges = DEFAULT_BIN_AS) {
|
|
149
|
+
return outputOf(step)?.writes(step, edges) ?? [];
|
|
150
|
+
}
|
|
151
|
+
/** Whether a step answers each row from that row alone, in order. */
|
|
152
|
+
export function isRowwise(step) {
|
|
153
|
+
return outputOf(step)?.rowwise ?? false;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* What a run of steps leaves: every field written, the last write of each
|
|
157
|
+
* winning, and, where a step made the rows anew, the only fields that survive
|
|
158
|
+
* it (`undefined` while the input's own fields all do). `channels` are what
|
|
159
|
+
* the output fills where a mark leaves them unwritten.
|
|
160
|
+
*/
|
|
161
|
+
export function stepsOutput(steps) {
|
|
162
|
+
let edges = DEFAULT_BIN_AS;
|
|
163
|
+
let surviving;
|
|
164
|
+
const written = new Map();
|
|
165
|
+
let channels = new Map();
|
|
166
|
+
for (const step of steps) {
|
|
167
|
+
const output = step && outputOf(step);
|
|
168
|
+
if (!step || !output) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const writes = output.writes(step, edges);
|
|
172
|
+
if (output.replacesRows) {
|
|
173
|
+
surviving = new Set(POSITION_FIELDS);
|
|
174
|
+
for (const [field] of written) {
|
|
175
|
+
if (!writes.some(w => w.field === field)) {
|
|
176
|
+
written.delete(field);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
for (const w of writes) {
|
|
180
|
+
surviving.add(w.field);
|
|
181
|
+
}
|
|
182
|
+
channels = new Map([...channels].filter(([, f]) => surviving.has(f)));
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
for (const w of writes) {
|
|
186
|
+
surviving?.add(w.field);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
for (const w of writes) {
|
|
190
|
+
const held = written.get(w.field);
|
|
191
|
+
written.set(w.field, w.kind === 'unknown' && held ? { ...held, field: w.field } : w);
|
|
192
|
+
if (w.fills) {
|
|
193
|
+
channels.set(w.fills, w.field);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (step.type === 'bin') {
|
|
197
|
+
edges = binEdges(step);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return { written: [...written.values()], surviving, channels };
|
|
201
|
+
}
|
package/esm/util/stepTables.d.ts
CHANGED
|
@@ -2,9 +2,7 @@ import { DerivedTable } from './featureTable.ts';
|
|
|
2
2
|
import type { Column, FeatureTable, MadeRows } from './featureTable.ts';
|
|
3
3
|
import type { AggregateOp, AggregateStep, BinStep } from './markEncodingTypes.ts';
|
|
4
4
|
import type { Feature, SimpleFeatureSerialized } from './simpleFeature.ts';
|
|
5
|
-
export
|
|
6
|
-
/** What a `bin` over `fields` writes on each piece: the bases of its interval inside its bin. */
|
|
7
|
-
export declare const BIN_OVERLAP_FIELD = "overlap";
|
|
5
|
+
export { BIN_OVERLAP_FIELD, DEFAULT_BIN_AS } from './stepOutputs.ts';
|
|
8
6
|
/**
|
|
9
7
|
* A table's rows split into sections, each a contiguous range: `bounds[s]` is
|
|
10
8
|
* where section `s` starts and `bounds[s + 1]` where it ends. A step keeps
|
|
@@ -94,3 +92,9 @@ export declare class OpSums {
|
|
|
94
92
|
add(g: number, v: number, w: number): void;
|
|
95
93
|
column(groups: number): Column;
|
|
96
94
|
}
|
|
95
|
+
export declare function sortByStart(rows: Uint32Array, starts: Float64Array): void;
|
|
96
|
+
export declare function groupRows(n: number, bounds: Bounds, reads: readonly ((i: number) => unknown)[], normalize: boolean): {
|
|
97
|
+
groupOf: Uint32Array<ArrayBuffer>;
|
|
98
|
+
firstRow: number[];
|
|
99
|
+
sectionOf: number[];
|
|
100
|
+
};
|
package/esm/util/stepTables.js
CHANGED
|
@@ -6,9 +6,7 @@ import { DerivedTable, NO_COLUMN, TableRow, numberReaderOf, readerOf, valueAt, }
|
|
|
6
6
|
import { fieldReader, isPlainFieldRef } from './fieldReader.js';
|
|
7
7
|
import { isJexl } from './jexlStrings.js';
|
|
8
8
|
import { numericValue } from './numericValue.js';
|
|
9
|
-
export
|
|
10
|
-
/** What a `bin` over `fields` writes on each piece: the bases of its interval inside its bin. */
|
|
11
|
-
export const BIN_OVERLAP_FIELD = 'overlap';
|
|
9
|
+
export { BIN_OVERLAP_FIELD, DEFAULT_BIN_AS } from './stepOutputs.js';
|
|
12
10
|
// Section starts through a step whose rows came from its input's in order:
|
|
13
11
|
// each section starts at the first row whose parent row is in it.
|
|
14
12
|
export function boundsThrough(bounds, parentRow) {
|
|
@@ -275,3 +273,88 @@ export class OpSums {
|
|
|
275
273
|
return { kind: 'number', values, at: undefined, nanIsAbsent: true };
|
|
276
274
|
}
|
|
277
275
|
}
|
|
276
|
+
// Rows in start order, ties in the order they came: a start and a row packed
|
|
277
|
+
// into one double and sorted without a comparator, which leaves the typed
|
|
278
|
+
// sort's fast path only where the packing could not be exact.
|
|
279
|
+
export function sortByStart(rows, starts) {
|
|
280
|
+
const n = rows.length;
|
|
281
|
+
let lo = Infinity;
|
|
282
|
+
let hi = -Infinity;
|
|
283
|
+
let whole = true;
|
|
284
|
+
for (let k = 0; k < n; k++) {
|
|
285
|
+
const v = starts[rows[k]];
|
|
286
|
+
if (v < lo) {
|
|
287
|
+
lo = v;
|
|
288
|
+
}
|
|
289
|
+
if (v > hi) {
|
|
290
|
+
hi = v;
|
|
291
|
+
}
|
|
292
|
+
whole &&= Number.isInteger(v);
|
|
293
|
+
}
|
|
294
|
+
if (whole && (hi - lo + 1) * n < Number.MAX_SAFE_INTEGER) {
|
|
295
|
+
const keys = new Float64Array(n);
|
|
296
|
+
for (let k = 0; k < n; k++) {
|
|
297
|
+
keys[k] = (starts[rows[k]] - lo) * n + k;
|
|
298
|
+
}
|
|
299
|
+
keys.sort();
|
|
300
|
+
const placed = Uint32Array.from(rows);
|
|
301
|
+
for (let k = 0; k < n; k++) {
|
|
302
|
+
rows[k] = placed[keys[k] % n];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
rows.sort((a, b) => starts[a] - starts[b] || a - b);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Each row's group, numbered in the order groups are first met, a section
|
|
310
|
+
// being the outermost level: the groups keyed by their raw values, one Map
|
|
311
|
+
// level per groupby field, where a string key built per row was the
|
|
312
|
+
// aggregate's whole cost.
|
|
313
|
+
export function groupRows(n, bounds, reads, normalize) {
|
|
314
|
+
const groupOf = new Uint32Array(n);
|
|
315
|
+
const firstRow = [];
|
|
316
|
+
const sectionOf = [];
|
|
317
|
+
const last = reads.length - 1;
|
|
318
|
+
for (let s = 0; s + 1 < bounds.length; s++) {
|
|
319
|
+
const root = new Map();
|
|
320
|
+
for (let i = bounds[s]; i < bounds[s + 1]; i++) {
|
|
321
|
+
let g;
|
|
322
|
+
if (reads.length === 0) {
|
|
323
|
+
g =
|
|
324
|
+
firstRow.length > 0 && sectionOf.at(-1) === s
|
|
325
|
+
? firstRow.length - 1
|
|
326
|
+
: -1;
|
|
327
|
+
if (g < 0) {
|
|
328
|
+
g = firstRow.length;
|
|
329
|
+
firstRow.push(i);
|
|
330
|
+
sectionOf.push(s);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
let node = root;
|
|
335
|
+
for (let l = 0; l < last; l++) {
|
|
336
|
+
const raw = reads[l](i);
|
|
337
|
+
const v = normalize && typeof raw !== 'object' ? raw : groupKey(raw);
|
|
338
|
+
let next = node.get(v);
|
|
339
|
+
if (!next) {
|
|
340
|
+
next = new Map();
|
|
341
|
+
node.set(v, next);
|
|
342
|
+
}
|
|
343
|
+
node = next;
|
|
344
|
+
}
|
|
345
|
+
const raw = reads[last](i);
|
|
346
|
+
const v = normalize && typeof raw !== 'object' ? raw : groupKey(raw);
|
|
347
|
+
let at = node.get(v);
|
|
348
|
+
if (at === undefined) {
|
|
349
|
+
at = firstRow.length;
|
|
350
|
+
node.set(v, at);
|
|
351
|
+
firstRow.push(i);
|
|
352
|
+
sectionOf.push(s);
|
|
353
|
+
}
|
|
354
|
+
g = at;
|
|
355
|
+
}
|
|
356
|
+
groupOf[i] = g;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return { groupOf, firstRow, sectionOf };
|
|
360
|
+
}
|
|
@@ -10,3 +10,7 @@ export declare function prefersDarkColorScheme(): boolean;
|
|
|
10
10
|
* one preference, and a second spelling of the query is a second answer.
|
|
11
11
|
*/
|
|
12
12
|
export declare function onColorSchemeChange(listener: () => void): () => void;
|
|
13
|
+
/** Whether Dark Reader darkens the page around canvases it leaves light. */
|
|
14
|
+
export declare function darkReaderIsDark(): boolean;
|
|
15
|
+
/** Call `listener` whenever Dark Reader's scheme mark changes, and return the unsubscribe. */
|
|
16
|
+
export declare function onDarkReaderChange(listener: () => void): () => void;
|
|
@@ -25,3 +25,24 @@ export function onColorSchemeChange(listener) {
|
|
|
25
25
|
media?.removeEventListener('change', listener);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
const DARK_READER_ATTRIBUTE = 'data-darkreader-scheme';
|
|
29
|
+
/** Whether Dark Reader darkens the page around canvases it leaves light. */
|
|
30
|
+
export function darkReaderIsDark() {
|
|
31
|
+
return (typeof document !== 'undefined' &&
|
|
32
|
+
document.documentElement.getAttribute(DARK_READER_ATTRIBUTE) === 'dark');
|
|
33
|
+
}
|
|
34
|
+
/** Call `listener` whenever Dark Reader's scheme mark changes, and return the unsubscribe. */
|
|
35
|
+
export function onDarkReaderChange(listener) {
|
|
36
|
+
if (typeof MutationObserver !== 'function' ||
|
|
37
|
+
typeof document === 'undefined') {
|
|
38
|
+
return () => { };
|
|
39
|
+
}
|
|
40
|
+
const observer = new MutationObserver(listener);
|
|
41
|
+
observer.observe(document.documentElement, {
|
|
42
|
+
attributes: true,
|
|
43
|
+
attributeFilter: [DARK_READER_ATTRIBUTE],
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
observer.disconnect();
|
|
47
|
+
};
|
|
48
|
+
}
|
package/esm/util/tabix.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ interface TabixHeaderSource {
|
|
|
113
113
|
* An adapter that stops at `getHeader()` therefore cannot tell "this file has
|
|
114
114
|
* no header" from "this file's header is not commented", and quietly falls back
|
|
115
115
|
* to an assumed column layout. That has cost real information more than once: a
|
|
116
|
-
* PLINK LD file lost its D' column, so `
|
|
116
|
+
* PLINK LD file lost its D' column, so `color.field: 'dprime'` silently served r²,
|
|
117
117
|
* and a bedGraph loses the names of its value columns. Nothing errors, because
|
|
118
118
|
* the assumed layout parses.
|
|
119
119
|
*
|
package/esm/util/tabix.js
CHANGED
|
@@ -133,7 +133,7 @@ function mergeTabixLines(...groups) {
|
|
|
133
133
|
* An adapter that stops at `getHeader()` therefore cannot tell "this file has
|
|
134
134
|
* no header" from "this file's header is not commented", and quietly falls back
|
|
135
135
|
* to an assumed column layout. That has cost real information more than once: a
|
|
136
|
-
* PLINK LD file lost its D' column, so `
|
|
136
|
+
* PLINK LD file lost its D' column, so `color.field: 'dprime'` silently served r²,
|
|
137
137
|
* and a bedGraph loses the names of its value columns. Nothing errors, because
|
|
138
138
|
* the assumed layout parses.
|
|
139
139
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyConfiguration } from '../configuration/index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Whether a track config names an assembly the session holds as **temporary** —
|
|
4
4
|
* the read-vs-ref pair a comparative view synthesizes, which goes away when that
|
|
@@ -18,4 +18,4 @@ import type { AnyConfigurationModel } from '../configuration/index.ts';
|
|
|
18
18
|
* answer is yes. A second copy of the predicate is the thing to avoid — a copied
|
|
19
19
|
* guard is where the escape clause gets added to only one of them.
|
|
20
20
|
*/
|
|
21
|
-
export declare function namesTemporaryAssembly(session: unknown, trackConf:
|
|
21
|
+
export declare function namesTemporaryAssembly(session: unknown, trackConf: AnyConfiguration): boolean;
|