@jbrowse/core 5.0.0-beta.13 → 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 +365 -69
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -2
- 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 +1 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +10 -19
- 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/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 +2 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +22 -6
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +2 -0
- package/esm/PluginManager.d.ts +1 -0
- package/esm/PluginManager.js +6 -0
- package/esm/ReExports/coreModules.generated.js +538 -524
- package/esm/ReExports/coreWorkerModules.generated.js +454 -441
- package/esm/ReExports/lazify.js +3 -2
- package/esm/ReExports/list.js +15 -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/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 +18 -5
- package/esm/configuration/configurationSchema.js +9 -7
- package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
- package/esm/configuration/configurationSchemaUnion.js +2 -1
- package/esm/configuration/configurationSlot.js +4 -4
- 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 +5 -5
- package/esm/configuration/getConf.js +13 -4
- package/esm/configuration/index.d.ts +1 -1
- package/esm/configuration/index.js +1 -1
- package/esm/configuration/plot.d.ts +2 -2
- package/esm/configuration/plot.js +32 -18
- package/esm/configuration/schemaRegistry.d.ts +0 -2
- package/esm/configuration/slotFacade.js +2 -2
- package/esm/configuration/snapshotPreprocess.d.ts +42 -18
- package/esm/configuration/snapshotPreprocess.js +94 -34
- package/esm/configuration/tabixShorthand.js +1 -3
- 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/models/BaseConnectionModelFactory.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -6
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +56 -8
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +3 -3
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +7 -6
- 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 +9 -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 +0 -10
- package/esm/rpc/byteBudget.d.ts +8 -0
- package/esm/rpc/byteBudget.js +13 -0
- package/esm/rpc/configSchema.d.ts +2 -0
- package/esm/rpc/configSchema.js +3 -1
- package/esm/rpc/coreRpcMethods.d.ts +0 -1
- package/esm/rpc/coreRpcMethods.js +0 -1
- package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
- package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
- 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/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/colorScale.d.ts +5 -1
- package/esm/ui/colorScale.js +12 -10
- package/esm/ui/colors.d.ts +3 -3
- package/esm/ui/colors.js +7 -7
- 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/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/analytics.d.ts +4 -6
- package/esm/util/analytics.js +143 -12
- package/esm/util/bezierConnector.d.ts +20 -0
- package/esm/util/bezierConnector.js +34 -100
- package/esm/util/cacheBudgets.d.ts +3 -0
- package/esm/util/cacheBudgets.js +3 -0
- package/esm/util/categoricalField.d.ts +2 -2
- package/esm/util/categoricalField.js +3 -3
- 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 +6 -6
- 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 +14 -2
- package/esm/util/colorScale.d.ts +114 -20
- package/esm/util/colorScale.js +124 -26
- package/esm/util/colorSchemes.d.ts +6 -4
- package/esm/util/colorSchemes.js +6 -3
- 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/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 +74 -20
- 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 +3 -3
- package/esm/util/quantileExtent.js +3 -3
- 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/thresholdScale.d.ts +1 -1
- package/esm/util/thresholdScale.js +1 -1
- package/esm/util/tracks.js +1 -1
- package/esm/util/usePanZoom.js +4 -10
- package/esm/util/windowStep.d.ts +6 -0
- package/esm/util/windowStep.js +153 -0
- package/package.json +23 -15
- 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
|
@@ -18,7 +18,11 @@ const decisiveStrandFraction = 0.6;
|
|
|
18
18
|
// float addition is non-associative, so a varying order would perturb these sums
|
|
19
19
|
// in their low bits and could flip the query-chromosome ordering on a near-tie.
|
|
20
20
|
// Only intra-pair order matters, since every sum here is over one pair.
|
|
21
|
-
|
|
21
|
+
//
|
|
22
|
+
// A reversed reference chromosome is drawn right to left, so its positions,
|
|
23
|
+
// strand vote and covariance all change sign: the query is ordered and oriented
|
|
24
|
+
// against the reference as drawn.
|
|
25
|
+
function anchorStats({ alignments, bases, strandWeightedSum, refReversed, }) {
|
|
22
26
|
alignments.sort((a, b) => a.refStart - b.refStart ||
|
|
23
27
|
a.queryStart - b.queryStart ||
|
|
24
28
|
a.refEnd - b.refEnd ||
|
|
@@ -45,12 +49,13 @@ function anchorStats({ alignments, bases, strandWeightedSum }) {
|
|
|
45
49
|
((aln.refStart + aln.refEnd) / 2 - refMean) *
|
|
46
50
|
((aln.queryStart + aln.queryEnd) / 2 - queryMean);
|
|
47
51
|
}
|
|
48
|
-
const
|
|
52
|
+
const sign = refReversed ? -1 : 1;
|
|
53
|
+
const strandFraction = (sign * strandWeightedSum) / bases;
|
|
49
54
|
return {
|
|
50
|
-
bestRefPos: refMean,
|
|
55
|
+
bestRefPos: sign * refMean,
|
|
51
56
|
shouldReverse: Math.abs(strandFraction) > decisiveStrandFraction || covariance === 0
|
|
52
57
|
? strandFraction < 0
|
|
53
|
-
: covariance < 0,
|
|
58
|
+
: sign * covariance < 0,
|
|
54
59
|
};
|
|
55
60
|
}
|
|
56
61
|
// Groups alignments by vertical-axis (query) chromosome, accumulates total
|
|
@@ -73,9 +78,12 @@ export async function diagonalizeRegions(alignments, referenceRegions, currentRe
|
|
|
73
78
|
// first appearance wins: a refName can appear in more than one reference
|
|
74
79
|
// region, and the ordering key is where that chromosome starts on the axis
|
|
75
80
|
const refOrder = new Map();
|
|
76
|
-
for (const [
|
|
81
|
+
for (const [index, region] of referenceRegions.entries()) {
|
|
77
82
|
if (!refOrder.has(region.refName)) {
|
|
78
|
-
refOrder.set(region.refName,
|
|
83
|
+
refOrder.set(region.refName, {
|
|
84
|
+
index,
|
|
85
|
+
reversed: region.reversed ?? false,
|
|
86
|
+
});
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
// outer key: vertical chrom; inner key: horizontal chrom. Alignments to a
|
|
@@ -84,8 +92,8 @@ export async function diagonalizeRegions(alignments, referenceRegions, currentRe
|
|
|
84
92
|
const queryGroups = new Map();
|
|
85
93
|
for (const aln of alignments) {
|
|
86
94
|
reportGrouping();
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
95
|
+
const ref = refOrder.get(aln.refRefName);
|
|
96
|
+
if (ref !== undefined) {
|
|
89
97
|
let group = queryGroups.get(aln.queryRefName);
|
|
90
98
|
if (!group) {
|
|
91
99
|
group = new Map();
|
|
@@ -95,7 +103,8 @@ export async function diagonalizeRegions(alignments, referenceRegions, currentRe
|
|
|
95
103
|
if (!data) {
|
|
96
104
|
data = {
|
|
97
105
|
refName: aln.refRefName,
|
|
98
|
-
refIndex,
|
|
106
|
+
refIndex: ref.index,
|
|
107
|
+
refReversed: ref.reversed,
|
|
99
108
|
bases: 0,
|
|
100
109
|
strandWeightedSum: 0,
|
|
101
110
|
alignments: [],
|
|
@@ -6,8 +6,8 @@ export { BIN_OVERLAP_FIELD, DEFAULT_BIN_AS } from './stepTables.ts';
|
|
|
6
6
|
export declare const DEFAULT_BIN_FIELD = "start";
|
|
7
7
|
export declare const DEFAULT_FLATTEN_FIELD = "subfeatures";
|
|
8
8
|
export { DEFAULT_CELLS_FIELD } from './cellsStep.ts';
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export { DEFAULT_WINDOW_FRAME } from './windowStep.ts';
|
|
10
|
+
export { DEFAULT_COVERAGE_AS, DEFAULT_PILEUP_AS } from './stepOutputs.ts';
|
|
11
11
|
export declare const DEFAULT_PILEUP_FIELDS: [string, string];
|
|
12
12
|
/**
|
|
13
13
|
* #api
|
|
@@ -6,14 +6,16 @@ import { DerivedTable, NO_COLUMN, WithTable, asTable, numberReaderOf, readerOf,
|
|
|
6
6
|
import { fieldReader, isPlainFieldRef } from './fieldReader.js';
|
|
7
7
|
import { isJexl, stringToJexlExpression } from './jexlStrings.js';
|
|
8
8
|
import SimpleFeature, { buildJexlContext } from './simpleFeature.js';
|
|
9
|
-
import {
|
|
9
|
+
import { DEFAULT_COVERAGE_AS, DEFAULT_PILEUP_AS, isRowwise, stepWrites, } from './stepOutputs.js';
|
|
10
|
+
import { BIN_OVERLAP_FIELD, DEFAULT_BIN_AS, FannedTable, MadeTable, OpSums, binSize, boundsThrough, groupKey, groupRows, intervalsOf, isWeighted, madeGroups, sortByStart, stepNumberReader, stepReader, } from './stepTables.js';
|
|
10
11
|
import { junctionEnds, svClassOfAlt, svClassOfToken } from './svAlt.js';
|
|
12
|
+
import { windowStep } from './windowStep.js';
|
|
11
13
|
export { BIN_OVERLAP_FIELD, DEFAULT_BIN_AS } from './stepTables.js';
|
|
12
14
|
export const DEFAULT_BIN_FIELD = 'start';
|
|
13
15
|
export const DEFAULT_FLATTEN_FIELD = 'subfeatures';
|
|
14
16
|
export { DEFAULT_CELLS_FIELD } from './cellsStep.js';
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
+
export { DEFAULT_WINDOW_FRAME } from './windowStep.js';
|
|
18
|
+
export { DEFAULT_COVERAGE_AS, DEFAULT_PILEUP_AS } from './stepOutputs.js';
|
|
17
19
|
export const DEFAULT_PILEUP_FIELDS = ['start', 'end'];
|
|
18
20
|
function oneSection(n) {
|
|
19
21
|
return Uint32Array.of(0, n);
|
|
@@ -596,58 +598,6 @@ function binIntervals({ table, bounds }, step, fields) {
|
|
|
596
598
|
bounds: boundsThrough(bounds, parentRow),
|
|
597
599
|
};
|
|
598
600
|
}
|
|
599
|
-
// Each row's group, numbered in the order groups are first met, a section
|
|
600
|
-
// being the outermost level: the groups keyed by their raw values, one Map
|
|
601
|
-
// level per groupby field, where a string key built per row was the
|
|
602
|
-
// aggregate's whole cost.
|
|
603
|
-
function groupRows(n, bounds, reads, normalize) {
|
|
604
|
-
const groupOf = new Uint32Array(n);
|
|
605
|
-
const firstRow = [];
|
|
606
|
-
const sectionOf = [];
|
|
607
|
-
const last = reads.length - 1;
|
|
608
|
-
for (let s = 0; s + 1 < bounds.length; s++) {
|
|
609
|
-
const root = new Map();
|
|
610
|
-
for (let i = bounds[s]; i < bounds[s + 1]; i++) {
|
|
611
|
-
let g;
|
|
612
|
-
if (reads.length === 0) {
|
|
613
|
-
g =
|
|
614
|
-
firstRow.length > 0 && sectionOf.at(-1) === s
|
|
615
|
-
? firstRow.length - 1
|
|
616
|
-
: -1;
|
|
617
|
-
if (g < 0) {
|
|
618
|
-
g = firstRow.length;
|
|
619
|
-
firstRow.push(i);
|
|
620
|
-
sectionOf.push(s);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
else {
|
|
624
|
-
let node = root;
|
|
625
|
-
for (let l = 0; l < last; l++) {
|
|
626
|
-
const raw = reads[l](i);
|
|
627
|
-
const v = normalize && typeof raw !== 'object' ? raw : groupKey(raw);
|
|
628
|
-
let next = node.get(v);
|
|
629
|
-
if (!next) {
|
|
630
|
-
next = new Map();
|
|
631
|
-
node.set(v, next);
|
|
632
|
-
}
|
|
633
|
-
node = next;
|
|
634
|
-
}
|
|
635
|
-
const raw = reads[last](i);
|
|
636
|
-
const v = normalize && typeof raw !== 'object' ? raw : groupKey(raw);
|
|
637
|
-
let at = node.get(v);
|
|
638
|
-
if (at === undefined) {
|
|
639
|
-
at = firstRow.length;
|
|
640
|
-
node.set(v, at);
|
|
641
|
-
firstRow.push(i);
|
|
642
|
-
sectionOf.push(s);
|
|
643
|
-
}
|
|
644
|
-
g = at;
|
|
645
|
-
}
|
|
646
|
-
groupOf[i] = g;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
return { groupOf, firstRow, sectionOf };
|
|
650
|
-
}
|
|
651
601
|
function aggregate({ table, bounds }, step) {
|
|
652
602
|
const { groupby = [], ops } = step;
|
|
653
603
|
const n = table.length;
|
|
@@ -697,39 +647,6 @@ function aggregateColumn(table, agg, groupOf, groups) {
|
|
|
697
647
|
}
|
|
698
648
|
return sums.column(groups);
|
|
699
649
|
}
|
|
700
|
-
// Rows in start order, ties in the order they came: a start and a row packed
|
|
701
|
-
// into one double and sorted without a comparator, which leaves the typed
|
|
702
|
-
// sort's fast path only where the packing could not be exact.
|
|
703
|
-
function sortByStart(rows, starts) {
|
|
704
|
-
const n = rows.length;
|
|
705
|
-
let lo = Infinity;
|
|
706
|
-
let hi = -Infinity;
|
|
707
|
-
let whole = true;
|
|
708
|
-
for (let k = 0; k < n; k++) {
|
|
709
|
-
const v = starts[rows[k]];
|
|
710
|
-
if (v < lo) {
|
|
711
|
-
lo = v;
|
|
712
|
-
}
|
|
713
|
-
if (v > hi) {
|
|
714
|
-
hi = v;
|
|
715
|
-
}
|
|
716
|
-
whole &&= Number.isInteger(v);
|
|
717
|
-
}
|
|
718
|
-
if (whole && (hi - lo + 1) * n < Number.MAX_SAFE_INTEGER) {
|
|
719
|
-
const keys = new Float64Array(n);
|
|
720
|
-
for (let k = 0; k < n; k++) {
|
|
721
|
-
keys[k] = (starts[rows[k]] - lo) * n + k;
|
|
722
|
-
}
|
|
723
|
-
keys.sort();
|
|
724
|
-
const placed = Uint32Array.from(rows);
|
|
725
|
-
for (let k = 0; k < n; k++) {
|
|
726
|
-
rows[k] = placed[keys[k] % n];
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
else {
|
|
730
|
-
rows.sort((a, b) => starts[a] - starts[b] || a - b);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
650
|
/**
|
|
734
651
|
* The lowest row each row fits on, greedy first fit in start order within its
|
|
735
652
|
* section, as a step in front of the encoder rather than a packer behind it.
|
|
@@ -900,6 +817,9 @@ function runStep(staged, step, jexl) {
|
|
|
900
817
|
case 'aggregate': {
|
|
901
818
|
return aggregate(staged, step);
|
|
902
819
|
}
|
|
820
|
+
case 'window': {
|
|
821
|
+
return windowStep(staged, step);
|
|
822
|
+
}
|
|
903
823
|
case 'coverage': {
|
|
904
824
|
return coverage(staged, step);
|
|
905
825
|
}
|
|
@@ -1021,6 +941,15 @@ function keepingSection(staged, steps, field, labels) {
|
|
|
1021
941
|
}
|
|
1022
942
|
: staged;
|
|
1023
943
|
}
|
|
944
|
+
// The counting sort's row order: each section's rows in arrival order.
|
|
945
|
+
function sectionOrder(keyOfRow, sectionOf, bounds) {
|
|
946
|
+
const next = bounds.slice(0, sectionOf.length);
|
|
947
|
+
const order = new Uint32Array(keyOfRow.length);
|
|
948
|
+
for (let i = 0; i < keyOfRow.length; i++) {
|
|
949
|
+
order[next[sectionOf[keyOfRow[i]]]++] = i;
|
|
950
|
+
}
|
|
951
|
+
return order;
|
|
952
|
+
}
|
|
1024
953
|
/**
|
|
1025
954
|
* #api
|
|
1026
955
|
* A faceted request's layers: the rows split on the facet's field, the
|
|
@@ -1042,31 +971,54 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1042
971
|
const categories = categoricalField(field);
|
|
1043
972
|
const n = table.length;
|
|
1044
973
|
const sectionOfKey = new Map();
|
|
1045
|
-
const keyOfRow = new Uint32Array(n);
|
|
1046
974
|
const keys = [];
|
|
975
|
+
const countOfKey = [];
|
|
1047
976
|
const keyIndex = (key) => {
|
|
1048
977
|
let k = sectionOfKey.get(key);
|
|
1049
978
|
if (k === undefined) {
|
|
1050
979
|
k = keys.length;
|
|
1051
980
|
sectionOfKey.set(key, k);
|
|
1052
981
|
keys.push(key);
|
|
982
|
+
countOfKey.push(0);
|
|
1053
983
|
}
|
|
1054
984
|
return k;
|
|
1055
985
|
};
|
|
986
|
+
// Runs of one key down the rows: as many as the keys exactly when each
|
|
987
|
+
// key's rows arrive together, as a multi-source adapter's do.
|
|
988
|
+
let runs = 0;
|
|
989
|
+
let keyOfRow;
|
|
1056
990
|
const column = isPlainFieldRef(field) ? table.column(field) : undefined;
|
|
1057
991
|
if (column?.kind === 'category') {
|
|
1058
|
-
//
|
|
992
|
+
// Counted per code, and a label's key filed once, in arrival order; the
|
|
993
|
+
// row-by-row keys are read only for a table that needs reordering.
|
|
1059
994
|
const { codes, labels, at } = column;
|
|
1060
|
-
const
|
|
995
|
+
const countOfCode = new Uint32Array(labels.length);
|
|
996
|
+
const arrived = [];
|
|
997
|
+
let prev = -1;
|
|
1061
998
|
for (let i = 0; i < n; i++) {
|
|
1062
999
|
const code = codes[at ? at[i] : i];
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1000
|
+
if (code !== prev) {
|
|
1001
|
+
if (countOfCode[code] === 0) {
|
|
1002
|
+
arrived.push(code);
|
|
1003
|
+
}
|
|
1004
|
+
runs++;
|
|
1005
|
+
prev = code;
|
|
1067
1006
|
}
|
|
1068
|
-
|
|
1069
|
-
}
|
|
1007
|
+
countOfCode[code]++;
|
|
1008
|
+
}
|
|
1009
|
+
const keyOfCode = new Uint32Array(labels.length);
|
|
1010
|
+
for (const code of arrived) {
|
|
1011
|
+
const k = keyIndex(categories.key(labels[code]));
|
|
1012
|
+
keyOfCode[code] = k;
|
|
1013
|
+
countOfKey[k] += countOfCode[code];
|
|
1014
|
+
}
|
|
1015
|
+
keyOfRow = () => {
|
|
1016
|
+
const keyOf = new Uint32Array(n);
|
|
1017
|
+
for (let i = 0; i < n; i++) {
|
|
1018
|
+
keyOf[i] = keyOfCode[codes[at ? at[i] : i]];
|
|
1019
|
+
}
|
|
1020
|
+
return keyOf;
|
|
1021
|
+
};
|
|
1070
1022
|
}
|
|
1071
1023
|
else {
|
|
1072
1024
|
const read = column
|
|
@@ -1075,9 +1027,16 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1075
1027
|
const r = fieldReader(field, jexl);
|
|
1076
1028
|
return (i) => r(table.row(i));
|
|
1077
1029
|
})();
|
|
1030
|
+
const keyOf = new Uint32Array(n);
|
|
1078
1031
|
for (let i = 0; i < n; i++) {
|
|
1079
|
-
|
|
1032
|
+
const k = keyIndex(categories.key(read(i)));
|
|
1033
|
+
keyOf[i] = k;
|
|
1034
|
+
countOfKey[k]++;
|
|
1035
|
+
if (i === 0 || k !== keyOf[i - 1]) {
|
|
1036
|
+
runs++;
|
|
1037
|
+
}
|
|
1080
1038
|
}
|
|
1039
|
+
keyOfRow = () => keyOf;
|
|
1081
1040
|
}
|
|
1082
1041
|
const ordered = [...keys.keys()].sort((a, b) => categories.compare(keys[a], keys[b]));
|
|
1083
1042
|
const sectionOf = new Uint32Array(keys.length);
|
|
@@ -1085,19 +1044,19 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1085
1044
|
sectionOf[k] = s;
|
|
1086
1045
|
}
|
|
1087
1046
|
const bounds = new Uint32Array(keys.length + 1);
|
|
1088
|
-
for (
|
|
1089
|
-
bounds[
|
|
1090
|
-
}
|
|
1091
|
-
for (let s = 0; s < keys.length; s++) {
|
|
1092
|
-
bounds[s + 1] = bounds[s + 1] + bounds[s];
|
|
1093
|
-
}
|
|
1094
|
-
const next = bounds.slice(0, keys.length);
|
|
1095
|
-
const order = new Uint32Array(n);
|
|
1096
|
-
for (let i = 0; i < n; i++) {
|
|
1097
|
-
order[next[sectionOf[keyOfRow[i]]]++] = i;
|
|
1047
|
+
for (const [s, k] of ordered.entries()) {
|
|
1048
|
+
bounds[s + 1] = bounds[s] + countOfKey[k];
|
|
1098
1049
|
}
|
|
1050
|
+
// Rows arriving grouped, in section order, reach the steps as the table
|
|
1051
|
+
// they came in rather than through a row view.
|
|
1052
|
+
const inSectionOrder = runs === keys.length && ordered.every((k, s) => k === s);
|
|
1099
1053
|
const labels = ordered.map(k => keys[k]);
|
|
1100
|
-
const layered = runLayers({
|
|
1054
|
+
const layered = runLayers({
|
|
1055
|
+
table: inSectionOrder
|
|
1056
|
+
? table
|
|
1057
|
+
: selectRows(table, sectionOrder(keyOfRow(), sectionOf, bounds)),
|
|
1058
|
+
bounds,
|
|
1059
|
+
}, sectionSteps, layers.map(({ transform }) => transform), jexl, (staged, steps) => keepingSection(staged, steps, field, labels));
|
|
1101
1060
|
const placed = layers.map(({ row }, l) => {
|
|
1102
1061
|
const out = layered[l];
|
|
1103
1062
|
const readRow = row === undefined
|
|
@@ -1108,8 +1067,9 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1108
1067
|
const r = fieldReader(row, jexl);
|
|
1109
1068
|
return (i) => r(out.table.row(i));
|
|
1110
1069
|
})();
|
|
1111
|
-
|
|
1070
|
+
let local;
|
|
1112
1071
|
if (readRow) {
|
|
1072
|
+
local = new Uint32Array(out.table.length);
|
|
1113
1073
|
for (let i = 0; i < local.length; i++) {
|
|
1114
1074
|
local[i] = rowOf(readRow(i));
|
|
1115
1075
|
}
|
|
@@ -1118,6 +1078,9 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1118
1078
|
});
|
|
1119
1079
|
const rowCount = new Uint32Array(keys.length).fill(1);
|
|
1120
1080
|
for (const { bounds: b, local } of placed) {
|
|
1081
|
+
if (!local) {
|
|
1082
|
+
continue;
|
|
1083
|
+
}
|
|
1121
1084
|
for (let s = 0; s < keys.length; s++) {
|
|
1122
1085
|
for (let i = b[s]; i < b[s + 1]; i++) {
|
|
1123
1086
|
if (local[i] + 1 > rowCount[s]) {
|
|
@@ -1138,8 +1101,13 @@ export function facetLayers(input, facet, layers, jexl) {
|
|
|
1138
1101
|
layers: placed.map(({ table: t, bounds: b, local }) => {
|
|
1139
1102
|
const rows = new Uint32Array(t.length);
|
|
1140
1103
|
for (let s = 0; s < keys.length; s++) {
|
|
1141
|
-
|
|
1142
|
-
|
|
1104
|
+
if (local) {
|
|
1105
|
+
for (let i = b[s]; i < b[s + 1]; i++) {
|
|
1106
|
+
rows[i] = firstRow[s] + local[i];
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
rows.fill(firstRow[s], b[s], b[s + 1]);
|
|
1143
1111
|
}
|
|
1144
1112
|
}
|
|
1145
1113
|
return { table: t, rows };
|
|
@@ -1158,28 +1126,6 @@ export function runTransforms(input, steps, jexl) {
|
|
|
1158
1126
|
return runSteps({ table, bounds: oneSection(table.length) }, steps, jexl)
|
|
1159
1127
|
.table;
|
|
1160
1128
|
}
|
|
1161
|
-
// The fields a step writes onto its rows, which a partition on one of them
|
|
1162
|
-
// has to wait for; none for a step that must see every row at once.
|
|
1163
|
-
function writes(step) {
|
|
1164
|
-
switch (step.type) {
|
|
1165
|
-
case 'filter': {
|
|
1166
|
-
return [];
|
|
1167
|
-
}
|
|
1168
|
-
case 'formula': {
|
|
1169
|
-
return [step.as];
|
|
1170
|
-
}
|
|
1171
|
-
case 'bin': {
|
|
1172
|
-
const as = step.as ?? DEFAULT_BIN_AS;
|
|
1173
|
-
return step.fields ? [...as, BIN_OVERLAP_FIELD] : as;
|
|
1174
|
-
}
|
|
1175
|
-
case 'cells': {
|
|
1176
|
-
return ['start', 'end', 'state', 'base', 'match', 'length'];
|
|
1177
|
-
}
|
|
1178
|
-
default: {
|
|
1179
|
-
return undefined;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
1129
|
/**
|
|
1184
1130
|
* How many of `steps` must run before rows can be split on `field`: the rest
|
|
1185
1131
|
* each read a row and answer rows of it in order without writing `field`, so
|
|
@@ -1193,7 +1139,11 @@ function partitionPoint(steps, field) {
|
|
|
1193
1139
|
return steps.length;
|
|
1194
1140
|
}
|
|
1195
1141
|
let at = steps.length;
|
|
1196
|
-
while (at > 0
|
|
1142
|
+
while (at > 0) {
|
|
1143
|
+
const step = steps[at - 1];
|
|
1144
|
+
if (!isRowwise(step) || stepWrites(step).some(w => w.field === field)) {
|
|
1145
|
+
break;
|
|
1146
|
+
}
|
|
1197
1147
|
at--;
|
|
1198
1148
|
}
|
|
1199
1149
|
return at;
|
|
@@ -8,6 +8,11 @@ function getDB() {
|
|
|
8
8
|
upgrade(db) {
|
|
9
9
|
db.createObjectStore(STORE_NAME);
|
|
10
10
|
},
|
|
11
|
+
// the browser closed the connection (site data cleared while the page was
|
|
12
|
+
// open); without this every later pick reuses the dead handle and throws
|
|
13
|
+
terminated() {
|
|
14
|
+
dbPromise = undefined;
|
|
15
|
+
},
|
|
11
16
|
}).catch((error) => {
|
|
12
17
|
// drop the rejected promise, so a transient open failure (a blocked
|
|
13
18
|
// upgrade, a storage prompt the user has since answered) doesn't make every
|
package/esm/util/groupKeys.d.ts
CHANGED
|
@@ -29,14 +29,15 @@ export declare function compareGroupKeys(a: string, b: string): number;
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function groupKeyComparator(domain?: readonly string[]): typeof compareGroupKeys;
|
|
31
31
|
/**
|
|
32
|
-
* The
|
|
33
|
-
*
|
|
34
|
-
* the current
|
|
35
|
-
* through, an empty one included.
|
|
32
|
+
* The order and hidden sections a re-pick keeps: a facet set from a menu or
|
|
33
|
+
* dialog names neither, so one naming the field the current facet already
|
|
34
|
+
* reads carries the current `domain` and `hidden` along. A member the next
|
|
35
|
+
* facet names passes through, an empty one included.
|
|
36
36
|
*/
|
|
37
37
|
export declare function carryGroupDomain<T extends {
|
|
38
38
|
field: string;
|
|
39
39
|
domain?: readonly string[];
|
|
40
|
+
hidden?: readonly string[];
|
|
40
41
|
}>(next: T | undefined, current: T | undefined): T | undefined;
|
|
41
42
|
/**
|
|
42
43
|
* The overflow bucket's chip. Says MERGED because that lane is the one entry
|
package/esm/util/groupKeys.js
CHANGED
|
@@ -102,17 +102,23 @@ export function groupKeyComparator(domain) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* The
|
|
106
|
-
*
|
|
107
|
-
* the current
|
|
108
|
-
* through, an empty one included.
|
|
105
|
+
* The order and hidden sections a re-pick keeps: a facet set from a menu or
|
|
106
|
+
* dialog names neither, so one naming the field the current facet already
|
|
107
|
+
* reads carries the current `domain` and `hidden` along. A member the next
|
|
108
|
+
* facet names passes through, an empty one included.
|
|
109
109
|
*/
|
|
110
110
|
export function carryGroupDomain(next, current) {
|
|
111
|
-
|
|
112
|
-
next
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
? {
|
|
111
|
+
if (next === undefined || next.field !== current?.field) {
|
|
112
|
+
return next;
|
|
113
|
+
}
|
|
114
|
+
const domain = next.domain === undefined && current.domain !== undefined
|
|
115
|
+
? { domain: current.domain }
|
|
116
|
+
: {};
|
|
117
|
+
const hidden = next.hidden === undefined && current.hidden?.length
|
|
118
|
+
? { hidden: current.hidden }
|
|
119
|
+
: {};
|
|
120
|
+
return Object.keys(domain).length || Object.keys(hidden).length
|
|
121
|
+
? { ...next, ...domain, ...hidden }
|
|
116
122
|
: next;
|
|
117
123
|
}
|
|
118
124
|
/**
|
package/esm/util/index.js
CHANGED
|
@@ -116,7 +116,7 @@ export function isSupportedIndexingAdapter(type = '') {
|
|
|
116
116
|
// Still an object rather than a Map because this is on the plugin ABI — a Map
|
|
117
117
|
// would leave `Object.entries` on a published plugin returning [] and silently
|
|
118
118
|
// doing nothing. So integer-like keys still hoist ahead of the rest; anything
|
|
119
|
-
// needing insertion order builds its own Map (
|
|
119
|
+
// needing insertion order builds its own Map (reference/TREE_SIDEBAR.md).
|
|
120
120
|
export function groupBy(array, predicate) {
|
|
121
121
|
const result = Object.create(null);
|
|
122
122
|
// eslint-disable-next-line unicorn/prefer-group-by -- Object.groupBy types its result Partial, which would widen every caller's Object.values to `T[] | undefined`
|
|
@@ -163,8 +163,8 @@ interface InstallFetchOptionsBase<TArgs, TResult> extends FetchPhases<TArgs, TRe
|
|
|
163
163
|
loadedKey?: () => unknown;
|
|
164
164
|
/**
|
|
165
165
|
* The predicate form of the freshness gate, for a fetch whose "I have exactly
|
|
166
|
-
* this already" is not key equality:
|
|
167
|
-
* buffered read and answers a viewport
|
|
166
|
+
* this already" is not key equality: `CoarseTierMixin` holds payloads over a
|
|
167
|
+
* buffered read and answers a viewport that read *contains*, which no key can
|
|
168
168
|
* spell. Same rules as `fetchKey` — declined runs report `declined`, and a
|
|
169
169
|
* `reloadCounter` advanced since the last issued fetch overrides it — so the
|
|
170
170
|
* comparison lives here and not in `prepare`, where a reload could not reach
|
|
@@ -25,12 +25,17 @@ export interface AdapterRead<T> {
|
|
|
25
25
|
adapterConfig: Record<string, unknown>;
|
|
26
26
|
value: T;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether `read` answers the adapter config `host` holds. Equal by value, as
|
|
30
|
+
* the fetch key is: an undo rebuilds the track's config, handing back an equal
|
|
31
|
+
* adapter config the fetch declines to read again.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isCurrentRead<T>(host: {
|
|
34
|
+
adapterConfig: Record<string, unknown>;
|
|
35
|
+
}, read: AdapterRead<T> | undefined): read is AdapterRead<T>;
|
|
28
36
|
/**
|
|
29
37
|
* `read`'s value while it answers the adapter config `host` holds; undefined
|
|
30
38
|
* until a read of that config commits, which a failed read never does.
|
|
31
|
-
*
|
|
32
|
-
* Equal by value, as the fetch key is: an undo rebuilds the track's config,
|
|
33
|
-
* handing back an equal adapter config the fetch declines to read again.
|
|
34
39
|
*/
|
|
35
40
|
export declare function readFor<T>(host: {
|
|
36
41
|
adapterConfig: Record<string, unknown>;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
2
2
|
import { installFetch } from './installFetch.js';
|
|
3
3
|
import { isDataCurrent } from './isDataCurrent.js';
|
|
4
|
+
/**
|
|
5
|
+
* Whether `read` answers the adapter config `host` holds. Equal by value, as
|
|
6
|
+
* the fetch key is: an undo rebuilds the track's config, handing back an equal
|
|
7
|
+
* adapter config the fetch declines to read again.
|
|
8
|
+
*/
|
|
9
|
+
export function isCurrentRead(host, read) {
|
|
10
|
+
return (read !== undefined && isDataCurrent(read.adapterConfig, host.adapterConfig));
|
|
11
|
+
}
|
|
4
12
|
/**
|
|
5
13
|
* `read`'s value while it answers the adapter config `host` holds; undefined
|
|
6
14
|
* until a read of that config commits, which a failed read never does.
|
|
7
|
-
*
|
|
8
|
-
* Equal by value, as the fetch key is: an undo rebuilds the track's config,
|
|
9
|
-
* handing back an equal adapter config the fetch declines to read again.
|
|
10
15
|
*/
|
|
11
16
|
export function readFor(host, read) {
|
|
12
|
-
return read
|
|
13
|
-
isDataCurrent(read.adapterConfig, host.adapterConfig)
|
|
14
|
-
? read.value
|
|
15
|
-
: undefined;
|
|
17
|
+
return isCurrentRead(host, read) ? read.value : undefined;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* A **prerequisite read**: one RPC about the adapter itself, beside the
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* imports `clearCache` from this path directly, and `@jbrowse/core/util/io`
|
|
8
8
|
* re-exports the two classes from here.
|
|
9
9
|
*/
|
|
10
|
-
export { CachedFilehandle, RemoteFileWithRangeCache, clearCache, sweepIdleCache, } from '@gmod/range-cache-filehandle';
|
|
10
|
+
export { CachedFilehandle, RemoteFileWithRangeCache, clearCache, clearCacheFor, sweepIdleCache, } from '@gmod/range-cache-filehandle';
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* imports `clearCache` from this path directly, and `@jbrowse/core/util/io`
|
|
8
8
|
* re-exports the two classes from here.
|
|
9
9
|
*/
|
|
10
|
-
export { CachedFilehandle, RemoteFileWithRangeCache, clearCache, sweepIdleCache, } from '@gmod/range-cache-filehandle';
|
|
10
|
+
export { CachedFilehandle, RemoteFileWithRangeCache, clearCache, clearCacheFor, sweepIdleCache, } from '@gmod/range-cache-filehandle';
|
package/esm/util/jexl.js
CHANGED
|
@@ -131,7 +131,7 @@ export default function JexlF( /* config?: any*/) {
|
|
|
131
131
|
// BAM features expose a targeted `getTag` that walks the tag block and
|
|
132
132
|
// decodes only the requested tag; `get('tags')` decodes every tag on the
|
|
133
133
|
// read (a Record allocation plus NM/AS/ms/de/… — often ~10 per read) to
|
|
134
|
-
// answer one, and this runs per feature on
|
|
134
|
+
// answer one, and this runs per feature on color/label callbacks like
|
|
135
135
|
// `jexl:getTag(feature,'HP')`. Same duck-typing as
|
|
136
136
|
// `@jbrowse/modifications-utils`' getTag(), which core cannot import (that
|
|
137
137
|
// package depends on core). Unwrap first: on a jexlFeatureProxy every
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
interface LowerSpan {
|
|
2
|
+
top: number;
|
|
3
|
+
left: number;
|
|
4
|
+
right: number;
|
|
5
|
+
}
|
|
1
6
|
export default class GranularRectLayout {
|
|
2
7
|
private pitchX;
|
|
3
8
|
private pitchY;
|
|
@@ -23,10 +28,21 @@ export default class GranularRectLayout {
|
|
|
23
28
|
* @returns top position for the rect, or Null if laying
|
|
24
29
|
* out the rect would exceed maxHeight
|
|
25
30
|
*/
|
|
26
|
-
addRect(id: string, left: number, right: number, height: number, lower?:
|
|
27
|
-
|
|
31
|
+
addRect(id: string, left: number, right: number, height: number, lower?: LowerSpan): number | null;
|
|
32
|
+
/**
|
|
33
|
+
* Lays out rects, none of them placed yet, at one shared top: the lowest
|
|
34
|
+
* where every one fits. For the pieces of one feature drawn apart.
|
|
35
|
+
*/
|
|
36
|
+
addRectsAtOneTop(rects: readonly {
|
|
37
|
+
id: string;
|
|
28
38
|
left: number;
|
|
29
39
|
right: number;
|
|
30
|
-
|
|
40
|
+
height: number;
|
|
41
|
+
lower?: LowerSpan;
|
|
42
|
+
}[]): number | null;
|
|
43
|
+
private placement;
|
|
44
|
+
private firstFit;
|
|
45
|
+
private commit;
|
|
31
46
|
private getOrCreateRow;
|
|
32
47
|
}
|
|
48
|
+
export {};
|