@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
package/esm/util/colorScale.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The scales a
|
|
2
|
+
* The scales a color object paints through, in a module that imports
|
|
3
3
|
* nothing: `jbrowse validate` carries a copy of it, so the validator and the
|
|
4
4
|
* displays read one statement.
|
|
5
5
|
*/
|
|
6
|
-
/** How a
|
|
6
|
+
/** How a color object maps its `field`; `none` paints `value`. */
|
|
7
7
|
export declare const COLOR_SCALES: readonly ['none', 'categorical', 'linear', 'log', 'threshold'];
|
|
8
8
|
/**
|
|
9
|
-
* The scale that maps no field: each feature paints the
|
|
10
|
-
* the key names the
|
|
11
|
-
* carry
|
|
9
|
+
* The scale that maps no field: each feature paints the color it carries, and
|
|
10
|
+
* the key names the colors `domain` lists. Only a display whose features
|
|
11
|
+
* carry colors of their own declares it.
|
|
12
12
|
*/
|
|
13
13
|
export declare const IDENTITY_SCALE = "identity";
|
|
14
14
|
export type ColorScaleName = (typeof COLOR_SCALES)[number] | typeof IDENTITY_SCALE;
|
|
15
15
|
/**
|
|
16
16
|
* A field's defaults on a display: the scale it paints through while `scale`
|
|
17
17
|
* is unset, and the members that scale reads while the config leaves them
|
|
18
|
-
* unwritten, so a field with a vocabulary or ramp of its own is the
|
|
18
|
+
* unwritten, so a field with a vocabulary or ramp of its own is the color
|
|
19
19
|
* object's defaults rather than a painter beside it.
|
|
20
20
|
*/
|
|
21
21
|
export interface FieldPreset<S extends string = ColorScaleName> {
|
|
@@ -31,17 +31,22 @@ export interface FieldPreset<S extends string = ColorScaleName> {
|
|
|
31
31
|
domainMid?: number;
|
|
32
32
|
scheme?: string;
|
|
33
33
|
reverse?: boolean;
|
|
34
|
+
/** A threshold key's direction: its highest interval first. */
|
|
35
|
+
descending?: boolean;
|
|
34
36
|
}
|
|
35
37
|
/** Each field's preset, `*` for any other field. */
|
|
36
38
|
export type FieldPresets<S extends string = ColorScaleName> = Readonly<Record<string, FieldPreset<S>>>;
|
|
37
39
|
/**
|
|
38
|
-
* The fields whose values have names, an order and
|
|
39
|
-
* every display, beneath each display's own presets.
|
|
40
|
-
*
|
|
40
|
+
* The fields whose values have names, an order and colors of their own on
|
|
41
|
+
* every display, beneath each display's own presets. The synteny ribbons
|
|
42
|
+
* paint strand from this range too. The SV classes are
|
|
41
43
|
* `svClassOf`'s, deletion red and duplication blue as dbVar and gnomAD-SV
|
|
42
44
|
* paint them, insertion the pileup's purple, and the rest kept apart under
|
|
43
45
|
* deuteranopia and protanopia. A record with no class files under `''`, so
|
|
44
|
-
* each display keeps its own no-value
|
|
46
|
+
* each display keeps its own no-value color for it. The impact tiers are a
|
|
47
|
+
* variant's most severe SnpEff (ANN) or VEP (CSQ) consequence, and a record
|
|
48
|
+
* with neither files under Unannotated, its own color: "nobody looked" is
|
|
49
|
+
* not MODIFIER's "we looked and it is harmless".
|
|
45
50
|
*/
|
|
46
51
|
export declare const UNIVERSAL_FIELD_PRESETS: {
|
|
47
52
|
readonly strand: {
|
|
@@ -58,6 +63,13 @@ export declare const UNIVERSAL_FIELD_PRESETS: {
|
|
|
58
63
|
readonly labels: readonly ["Deletion", "Duplication", "Insertion", "Inversion", "Copy-number variable", "Tandem repeat", "Breakend / translocation", "Complex", "Other / mixed"];
|
|
59
64
|
readonly title: 'SV type';
|
|
60
65
|
};
|
|
66
|
+
readonly impact: {
|
|
67
|
+
readonly scale: 'categorical';
|
|
68
|
+
readonly missing: 'Unannotated';
|
|
69
|
+
readonly domain: readonly ["HIGH", "MODERATE", "LOW", "MODIFIER", "Unannotated"];
|
|
70
|
+
readonly range: readonly ["#d32f2f", "#f57c00", "#fbc02d", "#9e9e9e", "#607d8b"];
|
|
71
|
+
readonly title: 'Consequence impact';
|
|
72
|
+
};
|
|
61
73
|
};
|
|
62
74
|
/** The universal preset of `field`, if it has one. */
|
|
63
75
|
export declare function universalPresetOf(field: string): FieldPreset<'categorical'> | undefined;
|
|
@@ -75,6 +87,73 @@ export declare const FEATURE_FIELD_PRESETS: {
|
|
|
75
87
|
};
|
|
76
88
|
readonly '*': FieldPreset<"categorical">;
|
|
77
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Mapping quality's bins, each keyed by its lowest score and confident reads
|
|
92
|
+
* first: real MAPQ is bimodal at the aligner's ceiling and at 0, and these
|
|
93
|
+
* are the cuts people filter on (`samtools view -q 10` / `-q 30`).
|
|
94
|
+
*/
|
|
95
|
+
export declare const MAPQ_BINS: readonly [{
|
|
96
|
+
readonly key: '30';
|
|
97
|
+
readonly min: 30;
|
|
98
|
+
readonly label: 'MAPQ 30+ (high confidence)';
|
|
99
|
+
}, {
|
|
100
|
+
readonly key: '10';
|
|
101
|
+
readonly min: 10;
|
|
102
|
+
readonly label: 'MAPQ 10-29';
|
|
103
|
+
}, {
|
|
104
|
+
readonly key: '1';
|
|
105
|
+
readonly min: 1;
|
|
106
|
+
readonly label: 'MAPQ 1-9 (low)';
|
|
107
|
+
}, {
|
|
108
|
+
readonly key: '0';
|
|
109
|
+
readonly min: 0;
|
|
110
|
+
readonly label: 'MAPQ 0 (multi-mapping)';
|
|
111
|
+
}];
|
|
112
|
+
/**
|
|
113
|
+
* The measurements whose scale is part of what they mean, for a display
|
|
114
|
+
* whose features carry them to spread into its own presets: `mapq` in the
|
|
115
|
+
* bins above; `identity` a fraction from 0 to 1, red where it diverges and
|
|
116
|
+
* blue where it is conserved, as conservation tracks paint it, through a grey
|
|
117
|
+
* middle that stays visible on a white page and under a faint ribbon, where
|
|
118
|
+
* viridis's bright top washed out; and `dnds` read against 1, its ramp's pale
|
|
119
|
+
* middle, up to 2, past which a few fast-evolving genes would flatten the
|
|
120
|
+
* rest into one blue; and `syntenicDepth` grey where a gene pair is
|
|
121
|
+
* one-to-one, so genes sharing one ortholog are what takes color. Opt-in rather
|
|
122
|
+
* than universal, since a column another file names `identity` need not be a
|
|
123
|
+
* fraction.
|
|
124
|
+
*/
|
|
125
|
+
export declare const MEASURE_FIELD_PRESETS: {
|
|
126
|
+
readonly mapq: {
|
|
127
|
+
readonly scale: 'threshold';
|
|
128
|
+
readonly domain: ("0" | "1" | "10" | "30")[];
|
|
129
|
+
readonly scheme: 'cividis';
|
|
130
|
+
readonly labels: ("MAPQ 0 (multi-mapping)" | "MAPQ 1-9 (low)" | "MAPQ 10-29" | "MAPQ 30+ (high confidence)")[];
|
|
131
|
+
readonly title: 'Mapping quality';
|
|
132
|
+
readonly descending: true;
|
|
133
|
+
};
|
|
134
|
+
readonly identity: {
|
|
135
|
+
readonly scale: 'linear';
|
|
136
|
+
readonly domainMin: 0;
|
|
137
|
+
readonly domainMax: 1;
|
|
138
|
+
readonly scheme: 'redgreyblue';
|
|
139
|
+
readonly title: 'Identity';
|
|
140
|
+
};
|
|
141
|
+
readonly dnds: {
|
|
142
|
+
readonly scale: 'linear';
|
|
143
|
+
readonly domainMin: 0;
|
|
144
|
+
readonly domainMax: 2;
|
|
145
|
+
readonly domainMid: 1;
|
|
146
|
+
readonly scheme: 'blueyellowred';
|
|
147
|
+
readonly title: 'dN/dS';
|
|
148
|
+
};
|
|
149
|
+
readonly syntenicDepth: {
|
|
150
|
+
readonly scale: 'threshold';
|
|
151
|
+
readonly domain: readonly ["2", "3"];
|
|
152
|
+
readonly range: readonly ["#bdbdbd", "#fdae6b", "#e6550d"];
|
|
153
|
+
readonly labels: readonly ["One-to-one", "Shared by 2 genes", "Shared by 3 or more"];
|
|
154
|
+
readonly title: 'Syntenic depth';
|
|
155
|
+
};
|
|
156
|
+
};
|
|
78
157
|
/**
|
|
79
158
|
* A field's preset under `presets`: its own, else a universal one, else
|
|
80
159
|
* `*`'s, else categorical.
|
|
@@ -83,20 +162,31 @@ export declare function presetOf<S extends string>(presets: FieldPresets<S>, fie
|
|
|
83
162
|
/** What a field paints through under `presets` while `scale` is unset. */
|
|
84
163
|
export declare function fieldScaleOf<S extends string>(presets: FieldPresets<S>, field: string): S | 'categorical';
|
|
85
164
|
/**
|
|
86
|
-
* A
|
|
165
|
+
* A color object with its field's preset under it: each member the preset
|
|
87
166
|
* names and the config leaves unwritten, an empty list counting as unwritten.
|
|
88
|
-
* Only while the
|
|
167
|
+
* Only while the color paints through the preset's own scale, so the cuts of
|
|
89
168
|
* a threshold preset never reach a field read through a ramp. A categorical
|
|
90
|
-
* preset's `range` and `labels` name its `domain`'s values in order,
|
|
91
|
-
*
|
|
92
|
-
*
|
|
169
|
+
* preset's `range` and `labels` name its `domain`'s values in order, and a
|
|
170
|
+
* threshold preset's `labels` its intervals, so they fill only while `domain`
|
|
171
|
+
* does too: a written order keeps each value's own color and name, and written
|
|
172
|
+
* cuts keep the preset's palette and lose its interval names.
|
|
93
173
|
*/
|
|
94
174
|
export declare function withPreset<C extends {
|
|
95
175
|
field?: string;
|
|
96
176
|
scale?: string;
|
|
97
177
|
}>(color: C, presets: FieldPresets<string>): C;
|
|
98
178
|
/**
|
|
99
|
-
*
|
|
179
|
+
* A color object with `implied` as its field while it names neither a field
|
|
180
|
+
* nor a constant, for a display whose bare color object still maps one (a
|
|
181
|
+
* quantitative display's `score`), so the display and `jbrowse validate`
|
|
182
|
+
* read it alike. A written `value` keeps the object a constant.
|
|
183
|
+
*/
|
|
184
|
+
export declare function withImpliedField<C extends {
|
|
185
|
+
value?: unknown;
|
|
186
|
+
field?: string;
|
|
187
|
+
}>(color: C, implied: string | undefined): C;
|
|
188
|
+
/**
|
|
189
|
+
* The scale a color object paints through: `none` while no `field` is
|
|
100
190
|
* named, else its own `scale`, or `fieldScale` where that is unset.
|
|
101
191
|
*/
|
|
102
192
|
export declare function paintedScale<S extends string, F extends string>({ scale, field }: {
|
|
@@ -105,28 +195,32 @@ export declare function paintedScale<S extends string, F extends string>({ scale
|
|
|
105
195
|
}, fieldScale: F): S | F | 'none';
|
|
106
196
|
/** A combination of a scale's slots the display cannot draw as written. */
|
|
107
197
|
export interface ScaleProblem {
|
|
108
|
-
rule: 'threshold-cuts' | 'threshold-range' | 'ramp-domain' | 'domain-ends' | 'domain-quantile' | 'labels-domain';
|
|
198
|
+
rule: 'threshold-cuts' | 'threshold-range' | 'ramp-domain' | 'ramp-range' | 'domain-ends' | 'domain-quantile' | 'log-floor' | 'labels-domain';
|
|
109
199
|
/** the slot to look at, relative to the scale's own object */
|
|
110
200
|
slot: string;
|
|
111
201
|
message: string;
|
|
112
202
|
}
|
|
113
203
|
/**
|
|
114
|
-
* The members a quantitative scale's ends are read by, as a
|
|
204
|
+
* The members a quantitative scale's ends are read by, as a color ramp,
|
|
115
205
|
* `scales.y` and a mark's width spell them alike.
|
|
116
206
|
*/
|
|
117
207
|
export interface ScaleEnds {
|
|
118
208
|
domainMin?: number;
|
|
119
209
|
domainMax?: number;
|
|
120
210
|
domainQuantile?: number;
|
|
211
|
+
/** the scale's kind, `scales.y.type` or a color's `scale`, where it bears on the ends */
|
|
212
|
+
type?: string;
|
|
121
213
|
}
|
|
122
214
|
/**
|
|
123
215
|
* What a quantitative scale's ends say together that neither can refuse
|
|
124
216
|
* alone: a `domainMax` below its `domainMin`, which every such scale draws in
|
|
125
217
|
* order either way, and a `domainQuantile` outside 0.5 to 1, where the quantile
|
|
126
|
-
* an open end follows is clamped
|
|
127
|
-
*
|
|
218
|
+
* an open end follows is clamped; and a log scale's `domainMin` at or below 0,
|
|
219
|
+
* which no log scale can hold, so the end floors above it. `reverse` is whether
|
|
220
|
+
* the scale turns round by a member of its own, which is then the spelling to
|
|
221
|
+
* point at.
|
|
128
222
|
*/
|
|
129
|
-
export declare function scaleEndProblems({ domainMin, domainMax, domainQuantile }: ScaleEnds, { reverse }?: {
|
|
223
|
+
export declare function scaleEndProblems({ domainMin, domainMax, domainQuantile, type }: ScaleEnds, { reverse }?: {
|
|
130
224
|
reverse?: boolean;
|
|
131
225
|
}): ScaleProblem[];
|
|
132
226
|
/** Problems as the lines a display's corner notice lists, under the setting that holds the scale. */
|
|
@@ -143,8 +237,15 @@ export interface ColorSlots {
|
|
|
143
237
|
domainQuantile?: number;
|
|
144
238
|
labels?: readonly unknown[];
|
|
145
239
|
}
|
|
240
|
+
/** A quantitative scale's ends among the members `member` reads, each a number or unset. */
|
|
241
|
+
export declare function scaleEndsOf(member: (name: string) => unknown): ScaleEnds;
|
|
242
|
+
/**
|
|
243
|
+
* The members `colorProblems` reads among the ones `member` reads, each of the
|
|
244
|
+
* type it reads or unset, so a config snapshot and a config node answer alike.
|
|
245
|
+
*/
|
|
246
|
+
export declare function colorSlotsOf(member: (name: string) => unknown): ColorSlots;
|
|
146
247
|
/**
|
|
147
|
-
* What a
|
|
248
|
+
* What a color object's slots say together that no single slot can refuse,
|
|
148
249
|
* since the config editor writes one slot at a time (ADR-133), read with its
|
|
149
250
|
* field's preset under it. A display shows these as a notice and draws what
|
|
150
251
|
* it can. A threshold naming no cuts leaves its intervals to the display —
|
package/esm/util/colorScale.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The scales a
|
|
2
|
+
* The scales a color object paints through, in a module that imports
|
|
3
3
|
* nothing: `jbrowse validate` carries a copy of it, so the validator and the
|
|
4
4
|
* displays read one statement.
|
|
5
5
|
*/
|
|
6
|
-
/** How a
|
|
6
|
+
/** How a color object maps its `field`; `none` paints `value`. */
|
|
7
7
|
export const COLOR_SCALES = [
|
|
8
8
|
'none',
|
|
9
9
|
'categorical',
|
|
@@ -12,20 +12,23 @@ export const COLOR_SCALES = [
|
|
|
12
12
|
'threshold',
|
|
13
13
|
];
|
|
14
14
|
/**
|
|
15
|
-
* The scale that maps no field: each feature paints the
|
|
16
|
-
* the key names the
|
|
17
|
-
* carry
|
|
15
|
+
* The scale that maps no field: each feature paints the color it carries, and
|
|
16
|
+
* the key names the colors `domain` lists. Only a display whose features
|
|
17
|
+
* carry colors of their own declares it.
|
|
18
18
|
*/
|
|
19
19
|
export const IDENTITY_SCALE = 'identity';
|
|
20
20
|
const CATEGORICAL_PRESET = { scale: 'categorical' };
|
|
21
21
|
/**
|
|
22
|
-
* The fields whose values have names, an order and
|
|
23
|
-
* every display, beneath each display's own presets.
|
|
24
|
-
*
|
|
22
|
+
* The fields whose values have names, an order and colors of their own on
|
|
23
|
+
* every display, beneath each display's own presets. The synteny ribbons
|
|
24
|
+
* paint strand from this range too. The SV classes are
|
|
25
25
|
* `svClassOf`'s, deletion red and duplication blue as dbVar and gnomAD-SV
|
|
26
26
|
* paint them, insertion the pileup's purple, and the rest kept apart under
|
|
27
27
|
* deuteranopia and protanopia. A record with no class files under `''`, so
|
|
28
|
-
* each display keeps its own no-value
|
|
28
|
+
* each display keeps its own no-value color for it. The impact tiers are a
|
|
29
|
+
* variant's most severe SnpEff (ANN) or VEP (CSQ) consequence, and a record
|
|
30
|
+
* with neither files under Unannotated, its own color: "nobody looked" is
|
|
31
|
+
* not MODIFIER's "we looked and it is harmless".
|
|
29
32
|
*/
|
|
30
33
|
export const UNIVERSAL_FIELD_PRESETS = {
|
|
31
34
|
strand: {
|
|
@@ -62,6 +65,13 @@ export const UNIVERSAL_FIELD_PRESETS = {
|
|
|
62
65
|
],
|
|
63
66
|
title: 'SV type',
|
|
64
67
|
},
|
|
68
|
+
impact: {
|
|
69
|
+
scale: 'categorical',
|
|
70
|
+
missing: 'Unannotated',
|
|
71
|
+
domain: ['HIGH', 'MODERATE', 'LOW', 'MODIFIER', 'Unannotated'],
|
|
72
|
+
range: ['#d32f2f', '#f57c00', '#fbc02d', '#9e9e9e', '#607d8b'],
|
|
73
|
+
title: 'Consequence impact',
|
|
74
|
+
},
|
|
65
75
|
};
|
|
66
76
|
/** The universal preset of `field`, if it has one. */
|
|
67
77
|
export function universalPresetOf(field) {
|
|
@@ -81,6 +91,63 @@ export const FEATURE_FIELD_PRESETS = {
|
|
|
81
91
|
score: { scale: 'linear' },
|
|
82
92
|
'*': CATEGORICAL_PRESET,
|
|
83
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Mapping quality's bins, each keyed by its lowest score and confident reads
|
|
96
|
+
* first: real MAPQ is bimodal at the aligner's ceiling and at 0, and these
|
|
97
|
+
* are the cuts people filter on (`samtools view -q 10` / `-q 30`).
|
|
98
|
+
*/
|
|
99
|
+
export const MAPQ_BINS = [
|
|
100
|
+
{ key: '30', min: 30, label: 'MAPQ 30+ (high confidence)' },
|
|
101
|
+
{ key: '10', min: 10, label: 'MAPQ 10-29' },
|
|
102
|
+
{ key: '1', min: 1, label: 'MAPQ 1-9 (low)' },
|
|
103
|
+
{ key: '0', min: 0, label: 'MAPQ 0 (multi-mapping)' },
|
|
104
|
+
];
|
|
105
|
+
const MAPQ_BINS_ASCENDING = [...MAPQ_BINS].reverse();
|
|
106
|
+
/**
|
|
107
|
+
* The measurements whose scale is part of what they mean, for a display
|
|
108
|
+
* whose features carry them to spread into its own presets: `mapq` in the
|
|
109
|
+
* bins above; `identity` a fraction from 0 to 1, red where it diverges and
|
|
110
|
+
* blue where it is conserved, as conservation tracks paint it, through a grey
|
|
111
|
+
* middle that stays visible on a white page and under a faint ribbon, where
|
|
112
|
+
* viridis's bright top washed out; and `dnds` read against 1, its ramp's pale
|
|
113
|
+
* middle, up to 2, past which a few fast-evolving genes would flatten the
|
|
114
|
+
* rest into one blue; and `syntenicDepth` grey where a gene pair is
|
|
115
|
+
* one-to-one, so genes sharing one ortholog are what takes color. Opt-in rather
|
|
116
|
+
* than universal, since a column another file names `identity` need not be a
|
|
117
|
+
* fraction.
|
|
118
|
+
*/
|
|
119
|
+
export const MEASURE_FIELD_PRESETS = {
|
|
120
|
+
mapq: {
|
|
121
|
+
scale: 'threshold',
|
|
122
|
+
domain: MAPQ_BINS_ASCENDING.slice(1).map(bin => bin.key),
|
|
123
|
+
scheme: 'cividis',
|
|
124
|
+
labels: MAPQ_BINS_ASCENDING.map(bin => bin.label),
|
|
125
|
+
title: 'Mapping quality',
|
|
126
|
+
descending: true,
|
|
127
|
+
},
|
|
128
|
+
identity: {
|
|
129
|
+
scale: 'linear',
|
|
130
|
+
domainMin: 0,
|
|
131
|
+
domainMax: 1,
|
|
132
|
+
scheme: 'redgreyblue',
|
|
133
|
+
title: 'Identity',
|
|
134
|
+
},
|
|
135
|
+
dnds: {
|
|
136
|
+
scale: 'linear',
|
|
137
|
+
domainMin: 0,
|
|
138
|
+
domainMax: 2,
|
|
139
|
+
domainMid: 1,
|
|
140
|
+
scheme: 'blueyellowred',
|
|
141
|
+
title: 'dN/dS',
|
|
142
|
+
},
|
|
143
|
+
syntenicDepth: {
|
|
144
|
+
scale: 'threshold',
|
|
145
|
+
domain: ['2', '3'],
|
|
146
|
+
range: ['#bdbdbd', '#fdae6b', '#e6550d'],
|
|
147
|
+
labels: ['One-to-one', 'Shared by 2 genes', 'Shared by 3 or more'],
|
|
148
|
+
title: 'Syntenic depth',
|
|
149
|
+
},
|
|
150
|
+
};
|
|
84
151
|
/**
|
|
85
152
|
* A field's preset under `presets`: its own, else a universal one, else
|
|
86
153
|
* `*`'s, else categorical.
|
|
@@ -98,13 +165,14 @@ function unwritten(value) {
|
|
|
98
165
|
return value === undefined || (Array.isArray(value) && value.length === 0);
|
|
99
166
|
}
|
|
100
167
|
/**
|
|
101
|
-
* A
|
|
168
|
+
* A color object with its field's preset under it: each member the preset
|
|
102
169
|
* names and the config leaves unwritten, an empty list counting as unwritten.
|
|
103
|
-
* Only while the
|
|
170
|
+
* Only while the color paints through the preset's own scale, so the cuts of
|
|
104
171
|
* a threshold preset never reach a field read through a ramp. A categorical
|
|
105
|
-
* preset's `range` and `labels` name its `domain`'s values in order,
|
|
106
|
-
*
|
|
107
|
-
*
|
|
172
|
+
* preset's `range` and `labels` name its `domain`'s values in order, and a
|
|
173
|
+
* threshold preset's `labels` its intervals, so they fill only while `domain`
|
|
174
|
+
* does too: a written order keeps each value's own color and name, and written
|
|
175
|
+
* cuts keep the preset's palette and lose its interval names.
|
|
108
176
|
*/
|
|
109
177
|
export function withPreset(color, presets) {
|
|
110
178
|
const field = color.field ?? '';
|
|
@@ -113,17 +181,27 @@ export function withPreset(color, presets) {
|
|
|
113
181
|
return color;
|
|
114
182
|
}
|
|
115
183
|
const written = new Map(Object.entries(color));
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
unwritten(written.get('domain'));
|
|
184
|
+
const ownDomain = !preset.domain || unwritten(written.get('domain'));
|
|
185
|
+
const named = preset.scale === 'categorical' ? ['range', 'labels'] : ['labels'];
|
|
119
186
|
const filled = Object.entries(preset).filter(([key]) => key !== 'scale' &&
|
|
120
187
|
key !== 'missing' &&
|
|
121
|
-
(
|
|
188
|
+
(ownDomain || !named.includes(key)) &&
|
|
122
189
|
unwritten(written.get(key)));
|
|
123
190
|
return filled.length > 0 ? { ...color, ...Object.fromEntries(filled) } : color;
|
|
124
191
|
}
|
|
125
192
|
/**
|
|
126
|
-
*
|
|
193
|
+
* A color object with `implied` as its field while it names neither a field
|
|
194
|
+
* nor a constant, for a display whose bare color object still maps one (a
|
|
195
|
+
* quantitative display's `score`), so the display and `jbrowse validate`
|
|
196
|
+
* read it alike. A written `value` keeps the object a constant.
|
|
197
|
+
*/
|
|
198
|
+
export function withImpliedField(color, implied) {
|
|
199
|
+
return implied && !color.field && color.value === undefined
|
|
200
|
+
? { ...color, field: implied }
|
|
201
|
+
: color;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The scale a color object paints through: `none` while no `field` is
|
|
127
205
|
* named, else its own `scale`, or `fieldScale` where that is unset.
|
|
128
206
|
*/
|
|
129
207
|
export function paintedScale({ scale, field }, fieldScale) {
|
|
@@ -133,11 +211,22 @@ export function paintedScale({ scale, field }, fieldScale) {
|
|
|
133
211
|
* What a quantitative scale's ends say together that neither can refuse
|
|
134
212
|
* alone: a `domainMax` below its `domainMin`, which every such scale draws in
|
|
135
213
|
* order either way, and a `domainQuantile` outside 0.5 to 1, where the quantile
|
|
136
|
-
* an open end follows is clamped
|
|
137
|
-
*
|
|
214
|
+
* an open end follows is clamped; and a log scale's `domainMin` at or below 0,
|
|
215
|
+
* which no log scale can hold, so the end floors above it. `reverse` is whether
|
|
216
|
+
* the scale turns round by a member of its own, which is then the spelling to
|
|
217
|
+
* point at.
|
|
138
218
|
*/
|
|
139
|
-
export function scaleEndProblems({ domainMin, domainMax, domainQuantile }, { reverse = false } = {}) {
|
|
219
|
+
export function scaleEndProblems({ domainMin, domainMax, domainQuantile, type }, { reverse = false } = {}) {
|
|
140
220
|
return [
|
|
221
|
+
...(type === 'log' && domainMin !== undefined && domainMin <= 0
|
|
222
|
+
? [
|
|
223
|
+
{
|
|
224
|
+
rule: 'log-floor',
|
|
225
|
+
slot: 'domainMin',
|
|
226
|
+
message: `a log scale has no ${domainMin}: the end floors to a positive value, so leave domainMin unset to follow the data or pin it above 0`,
|
|
227
|
+
},
|
|
228
|
+
]
|
|
229
|
+
: []),
|
|
141
230
|
...(domainMin !== undefined &&
|
|
142
231
|
domainMax !== undefined &&
|
|
143
232
|
domainMin > domainMax
|
|
@@ -165,11 +254,44 @@ export function scaleEndProblems({ domainMin, domainMax, domainQuantile }, { rev
|
|
|
165
254
|
export function noticeLines(setting, problems) {
|
|
166
255
|
return problems.map(({ slot, message }) => `${setting}.${slot}: ${message}`);
|
|
167
256
|
}
|
|
257
|
+
function numberOf(value) {
|
|
258
|
+
return typeof value === 'number' ? value : undefined;
|
|
259
|
+
}
|
|
260
|
+
function stringOf(value) {
|
|
261
|
+
return typeof value === 'string' ? value : undefined;
|
|
262
|
+
}
|
|
263
|
+
function listOf(value) {
|
|
264
|
+
return Array.isArray(value) ? value : undefined;
|
|
265
|
+
}
|
|
266
|
+
/** A quantitative scale's ends among the members `member` reads, each a number or unset. */
|
|
267
|
+
export function scaleEndsOf(member) {
|
|
268
|
+
return {
|
|
269
|
+
domainMin: numberOf(member('domainMin')),
|
|
270
|
+
domainMax: numberOf(member('domainMax')),
|
|
271
|
+
domainQuantile: numberOf(member('domainQuantile')),
|
|
272
|
+
type: stringOf(member('type')),
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* The members `colorProblems` reads among the ones `member` reads, each of the
|
|
277
|
+
* type it reads or unset, so a config snapshot and a config node answer alike.
|
|
278
|
+
*/
|
|
279
|
+
export function colorSlotsOf(member) {
|
|
280
|
+
return {
|
|
281
|
+
...scaleEndsOf(member),
|
|
282
|
+
value: stringOf(member('value')),
|
|
283
|
+
field: stringOf(member('field')) ?? '',
|
|
284
|
+
scale: stringOf(member('scale')),
|
|
285
|
+
domain: listOf(member('domain')),
|
|
286
|
+
range: listOf(member('range')),
|
|
287
|
+
labels: listOf(member('labels')),
|
|
288
|
+
};
|
|
289
|
+
}
|
|
168
290
|
function pinned(entry) {
|
|
169
291
|
return entry !== '' && Number.isFinite(Number(entry));
|
|
170
292
|
}
|
|
171
293
|
/**
|
|
172
|
-
* What a
|
|
294
|
+
* What a color object's slots say together that no single slot can refuse,
|
|
173
295
|
* since the config editor writes one slot at a time (ADR-133), read with its
|
|
174
296
|
* field's preset under it. A display shows these as a notice and draws what
|
|
175
297
|
* it can. A threshold naming no cuts leaves its intervals to the display —
|
|
@@ -198,7 +320,7 @@ export function colorProblems(written, presets) {
|
|
|
198
320
|
problems.push({
|
|
199
321
|
rule: 'threshold-range',
|
|
200
322
|
slot: 'range',
|
|
201
|
-
message: `${domain.length} threshold ${domain.length === 1 ? 'cut makes' : 'cuts make'} ${domain.length + 1} intervals, one
|
|
323
|
+
message: `${domain.length} threshold ${domain.length === 1 ? 'cut makes' : 'cuts make'} ${domain.length + 1} intervals, one color each, and range lists ${range.length}: a missing color comes from the default palette and an extra one is never read`,
|
|
202
324
|
});
|
|
203
325
|
}
|
|
204
326
|
}
|
|
@@ -207,10 +329,17 @@ export function colorProblems(written, presets) {
|
|
|
207
329
|
problems.push({
|
|
208
330
|
rule: 'ramp-domain',
|
|
209
331
|
slot: 'domain',
|
|
210
|
-
message: "a linear or log scale reads no domain, which is a categorical scale's order and a threshold scale's cuts; a ramp's ends are domainMin and domainMax where the
|
|
332
|
+
message: "a linear or log scale reads no domain, which is a categorical scale's order and a threshold scale's cuts; a ramp's ends are domainMin and domainMax where the color has them",
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (range.length === 1) {
|
|
336
|
+
problems.push({
|
|
337
|
+
rule: 'ramp-range',
|
|
338
|
+
slot: 'range',
|
|
339
|
+
message: 'a linear or log ramp runs between at least two colors, and one paints every value alike; a single color is value',
|
|
211
340
|
});
|
|
212
341
|
}
|
|
213
|
-
problems.push(...scaleEndProblems(color, { reverse: true }));
|
|
342
|
+
problems.push(...scaleEndProblems({ ...color, type: scale }, { reverse: true }));
|
|
214
343
|
}
|
|
215
344
|
const { labels = [] } = color;
|
|
216
345
|
const named = scale === 'categorical' || scale === IDENTITY_SCALE
|
|
@@ -225,13 +354,13 @@ export function colorProblems(written, presets) {
|
|
|
225
354
|
const what = scale === 'categorical'
|
|
226
355
|
? 'value'
|
|
227
356
|
: scale === IDENTITY_SCALE
|
|
228
|
-
? '
|
|
357
|
+
? 'color'
|
|
229
358
|
: 'interval';
|
|
230
359
|
problems.push({
|
|
231
360
|
rule: 'labels-domain',
|
|
232
361
|
slot: 'labels',
|
|
233
362
|
message: named === undefined
|
|
234
|
-
? "labels names a categorical scale's values, a threshold scale's intervals or an identity scale's
|
|
363
|
+
? "labels names a categorical scale's values, a threshold scale's intervals or an identity scale's colors, and this color paints none of them"
|
|
235
364
|
: `labels names one ${what} each, and ${labels.length} ${labels.length === 1 ? 'label names' : 'labels name'} ${named} ${named === 1 ? what : `${what}s`}: a label past them names nothing`,
|
|
236
365
|
});
|
|
237
366
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #api
|
|
3
|
-
* The named ramps a continuous
|
|
3
|
+
* The named ramps a continuous color scale's `scheme` takes, each one a stop
|
|
4
4
|
* table in `colorRamp.ts` that every ramp baker reads, so no display can name
|
|
5
5
|
* a scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
|
|
6
6
|
* matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
|
|
7
7
|
* transparent to red, as Juicebox paints contacts; `fall` runs white through
|
|
8
8
|
* yellow and red to black, as HiGlass does; `reds` and `blues` are
|
|
9
9
|
* ColorBrewer's, from white; `redblue` and `purpleorange` diverge through
|
|
10
|
-
* white, ColorBrewer's RdBu and PuOr
|
|
10
|
+
* white, ColorBrewer's RdBu and PuOr; `redgreyblue` diverges through a grey
|
|
11
|
+
* middle, which stays visible on a white page where a white middle would
|
|
12
|
+
* not, as `identity` paints;
|
|
13
|
+
* `blueyellowred` is ColorBrewer's RdYlBu turned round, so low reads cool and
|
|
14
|
+
* high hot through a pale yellow middle, as `dnds` paints.
|
|
11
15
|
*/
|
|
12
|
-
export declare const COLOR_SCHEMES: readonly ['viridis', 'magma', 'inferno', 'cividis', 'juicebox', 'fall', 'reds', 'blues', 'redblue', 'purpleorange'];
|
|
16
|
+
export declare const COLOR_SCHEMES: readonly ['viridis', 'magma', 'inferno', 'cividis', 'juicebox', 'fall', 'reds', 'blues', 'redblue', 'purpleorange', 'redgreyblue', 'blueyellowred'];
|
|
13
17
|
/** #api */
|
|
14
18
|
export type ColorSchemeName = (typeof COLOR_SCHEMES)[number];
|
|
15
19
|
/**
|
package/esm/util/colorSchemes.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #api
|
|
3
|
-
* The named ramps a continuous
|
|
3
|
+
* The named ramps a continuous color scale's `scheme` takes, each one a stop
|
|
4
4
|
* table in `colorRamp.ts` that every ramp baker reads, so no display can name
|
|
5
5
|
* a scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
|
|
6
6
|
* matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
|
|
7
7
|
* transparent to red, as Juicebox paints contacts; `fall` runs white through
|
|
8
8
|
* yellow and red to black, as HiGlass does; `reds` and `blues` are
|
|
9
9
|
* ColorBrewer's, from white; `redblue` and `purpleorange` diverge through
|
|
10
|
-
* white, ColorBrewer's RdBu and PuOr
|
|
10
|
+
* white, ColorBrewer's RdBu and PuOr; `redgreyblue` diverges through a grey
|
|
11
|
+
* middle, which stays visible on a white page where a white middle would
|
|
12
|
+
* not, as `identity` paints;
|
|
13
|
+
* `blueyellowred` is ColorBrewer's RdYlBu turned round, so low reads cool and
|
|
14
|
+
* high hot through a pale yellow middle, as `dnds` paints.
|
|
11
15
|
*/
|
|
12
16
|
export const COLOR_SCHEMES = [
|
|
13
17
|
'viridis',
|
|
@@ -20,6 +24,8 @@ export const COLOR_SCHEMES = [
|
|
|
20
24
|
'blues',
|
|
21
25
|
'redblue',
|
|
22
26
|
'purpleorange',
|
|
27
|
+
'redgreyblue',
|
|
28
|
+
'blueyellowred',
|
|
23
29
|
];
|
|
24
30
|
/**
|
|
25
31
|
* #api
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const MAX_SVG_RASTER_AREA_PX: number;
|
|
1
2
|
export interface SvgRasterCanvasOpts {
|
|
2
3
|
/**
|
|
3
4
|
* headless canvas factory for `rasterizeLayers` (jbrowse-img passes one);
|
|
@@ -11,7 +12,19 @@ export interface SvgRasterCanvasOpts {
|
|
|
11
12
|
*/
|
|
12
13
|
decodeSvg?: (markup: string) => Promise<CanvasImageSource>;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A canvas for one rasterized export layer of `width`x`height` CSS px, drawn in
|
|
17
|
+
* CSS px. Its backing store is 2× where that fits under `maxAreaPx` and the
|
|
18
|
+
* per-axis limit, and smaller where it does not, so read `canvas.width` for the
|
|
19
|
+
* scale it got.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createSvgRasterCanvas(width: number, height: number, opts: SvgRasterCanvasOpts | undefined, maxAreaPx?: number): {
|
|
15
22
|
canvas: HTMLCanvasElement;
|
|
16
23
|
ctx: CanvasRenderingContext2D;
|
|
17
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* The PNG data URL of an export raster. A canvas the browser could not
|
|
27
|
+
* allocate encodes to `data:,`, an image of nothing, so this throws and the
|
|
28
|
+
* export dialog shows the error.
|
|
29
|
+
*/
|
|
30
|
+
export declare function svgRasterDataUrl(canvas: HTMLCanvasElement): string;
|