@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
|
@@ -5,25 +5,22 @@ import { LoadingEllipses } from '../../ui/index.js';
|
|
|
5
5
|
import SequenceFeatureMenu from './dialogs/SequenceFeatureMenu.js';
|
|
6
6
|
import SequenceTypeSelector from './dialogs/SequenceTypeSelector.js';
|
|
7
7
|
import TranscriptSelector from './dialogs/TranscriptSelector.js';
|
|
8
|
-
import {
|
|
8
|
+
import { getTranscripts, pickDefaultTranscriptIndex, resolveMode, } from './featureTypeUtil.js';
|
|
9
9
|
import { useSequenceFetch } from './useSequenceFetch.js';
|
|
10
10
|
// lazies
|
|
11
11
|
const SequenceBody = lazy(() => import('./SequenceBody.js'));
|
|
12
12
|
const SequenceDialog = lazy(() => import('./dialogs/SequenceDialog.js'));
|
|
13
|
-
const SequenceFeatureDetailsPanel = observer(function SequenceFeatureDetailsPanel({ model, session, assemblyName, feature, hoverTarget, showOpenInDialog = true, }) {
|
|
13
|
+
const SequenceFeatureDetailsPanel = observer(function SequenceFeatureDetailsPanel({ model, session, assemblyName, feature, hoverTarget, showOpenInDialog = true, canonicalTranscripts, }) {
|
|
14
14
|
const { upDownBp } = model;
|
|
15
15
|
const seqPanelRef = useRef(null);
|
|
16
16
|
// A container feature (e.g. a gene) has no CDS/exon of its own — one of its
|
|
17
|
-
// transcript children does. Default to the
|
|
18
|
-
// and Protein sequence types work without an extra click into
|
|
19
|
-
// with a selector to switch
|
|
17
|
+
// transcript children does. Default to the transcript the track draws first
|
|
18
|
+
// so CDS and Protein sequence types work without an extra click into
|
|
19
|
+
// Subfeatures, with a selector to switch when the gene has more than one.
|
|
20
20
|
const transcripts = getTranscripts(feature);
|
|
21
|
-
const [transcriptIndex, setTranscriptIndex] = useState(() => pickDefaultTranscriptIndex(transcripts));
|
|
21
|
+
const [transcriptIndex, setTranscriptIndex] = useState(() => pickDefaultTranscriptIndex(transcripts, canonicalTranscripts));
|
|
22
22
|
const effectiveFeature = transcripts[transcriptIndex] ?? feature;
|
|
23
|
-
|
|
24
|
-
// subfeature panel (e.g. coding vs noncoding transcripts of one gene) picks
|
|
25
|
-
// its own sequence type and strand
|
|
26
|
-
const [mode, setMode] = useState(() => getDefaultMode(effectiveFeature));
|
|
23
|
+
const mode = resolveMode(model.recentModes, effectiveFeature);
|
|
27
24
|
const [revcomp, setRevcomp] = useState(false);
|
|
28
25
|
const [openInDialog, setOpenInDialog] = useState(false);
|
|
29
26
|
// spread into whichever readout is mounted, rather than forwarded field by
|
|
@@ -40,11 +37,8 @@ const SequenceFeatureDetailsPanel = observer(function SequenceFeatureDetailsPane
|
|
|
40
37
|
// transcript lives in this component's state, so a dialog without the
|
|
41
38
|
// selector strands a multi-transcript gene on whichever one was picked
|
|
42
39
|
// before it opened (the inline copy is behind the modal and unclickable)
|
|
43
|
-
const transcriptSelector = transcripts.length > 1 ? (_jsx(TranscriptSelector, { transcripts: transcripts, transcriptIndex: transcriptIndex, setTranscriptIndex:
|
|
44
|
-
|
|
45
|
-
setMode(getDefaultMode(transcripts[index]));
|
|
46
|
-
} })) : null;
|
|
47
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { children: [transcriptSelector, _jsx(SequenceTypeSelector, { model: model, feature: effectiveFeature, mode: mode, setMode: setMode }), _jsx(SequenceFeatureMenu, { ref: seqPanelRef, model: model, session: session, mode: mode, revcomp: revcomp, setRevcomp: setRevcomp, extraItems: showOpenInDialog
|
|
40
|
+
const transcriptSelector = transcripts.length > 1 ? (_jsx(TranscriptSelector, { transcripts: transcripts, transcriptIndex: transcriptIndex, setTranscriptIndex: setTranscriptIndex })) : null;
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { children: [transcriptSelector, _jsx(SequenceTypeSelector, { model: model, feature: effectiveFeature, mode: mode }), _jsx(SequenceFeatureMenu, { ref: seqPanelRef, model: model, session: session, mode: mode, revcomp: revcomp, setRevcomp: setRevcomp, extraItems: showOpenInDialog
|
|
48
42
|
? [
|
|
49
43
|
{
|
|
50
44
|
label: 'Open in dialog',
|
|
@@ -53,7 +47,7 @@ const SequenceFeatureDetailsPanel = observer(function SequenceFeatureDetailsPane
|
|
|
53
47
|
},
|
|
54
48
|
},
|
|
55
49
|
]
|
|
56
|
-
: [] })] }), openInDialog ? (_jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(SequenceDialog, { ...fetched, sequenceFeatureDetails: model, session: session, transcriptSelector: transcriptSelector, feature: effectiveFeature, mode: mode,
|
|
50
|
+
: [] })] }), openInDialog ? (_jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(SequenceDialog, { ...fetched, sequenceFeatureDetails: model, session: session, transcriptSelector: transcriptSelector, feature: effectiveFeature, mode: mode, revcomp: revcomp, setRevcomp: setRevcomp, assemblyName: assemblyName, hoverTarget: hoverTarget, handleClose: () => {
|
|
57
51
|
setOpenInDialog(false);
|
|
58
52
|
} }) })) : (_jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(SequenceBody, { ...fetched, feature: effectiveFeature, seqPanelRef: seqPanelRef, model: model, mode: mode, revcomp: revcomp, assemblyName: assemblyName, hoverTarget: hoverTarget }) }))] }));
|
|
59
53
|
});
|
|
@@ -61,13 +55,10 @@ const SequenceFeatureDetailsPanel = observer(function SequenceFeatureDetailsPane
|
|
|
61
55
|
// a feature-detail widget, so anything holding a SequenceFeatureDetails model
|
|
62
56
|
// (the widget, a track's right-click dialog) renders the same readout.
|
|
63
57
|
//
|
|
64
|
-
// The panel's
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
// feature that doesn't offer it, which renders the wrong sequence and puts an
|
|
69
|
-
// out-of-range value in the sequence type selector.
|
|
70
|
-
function SequenceFeatureDetails(props) {
|
|
58
|
+
// The panel's transcript and revcomp are initialized from the feature, and the
|
|
59
|
+
// widget is reused (not remounted) when the user clicks a different feature —
|
|
60
|
+
// so key the panel on the feature to reinitialize them.
|
|
61
|
+
const SequenceFeatureDetails = observer(function SequenceFeatureDetails(props) {
|
|
71
62
|
return _jsx(SequenceFeatureDetailsPanel, { ...props }, props.feature.uniqueId);
|
|
72
|
-
}
|
|
63
|
+
});
|
|
73
64
|
export default SequenceFeatureDetails;
|
|
@@ -38,6 +38,6 @@ const SequenceFeaturePanel = observer(function SequenceFeaturePanel({ model, fea
|
|
|
38
38
|
feature,
|
|
39
39
|
viewAssemblyNames: model.view?.assemblyNames,
|
|
40
40
|
assemblyManager: getSession(model).assemblyManager,
|
|
41
|
-
}), feature: feature, hoverTarget: model }) })) : null] }));
|
|
41
|
+
}), feature: feature, hoverTarget: model, canonicalTranscripts: model.canonicalTranscripts }) })) : null] }));
|
|
42
42
|
});
|
|
43
43
|
export default SequenceFeaturePanel;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
2
3
|
// A small inline legend tying a swatch color to its meaning. Rendered alongside
|
|
3
4
|
// the sequence so e.g. transl_except highlights are self-explanatory. Styles are
|
|
4
5
|
// inline (not classes) so the legend survives copy-paste to an external document.
|
|
5
|
-
|
|
6
|
+
const SequenceLegend = observer(function SequenceLegend({ items, }) {
|
|
6
7
|
return (_jsx("div", { "data-no-fasta": true, style: {
|
|
7
8
|
display: 'flex',
|
|
8
9
|
flexWrap: 'wrap',
|
|
@@ -16,4 +17,5 @@ export default function SequenceLegend({ items, }) {
|
|
|
16
17
|
background: color,
|
|
17
18
|
border: '1px solid #999',
|
|
18
19
|
} }), label] }, label))) }));
|
|
19
|
-
}
|
|
20
|
+
});
|
|
21
|
+
export default SequenceLegend;
|
|
@@ -12,17 +12,17 @@ const baseSeqStyle = {
|
|
|
12
12
|
background: 'white',
|
|
13
13
|
fontSize: 11,
|
|
14
14
|
};
|
|
15
|
-
function WordWrap({ children }) {
|
|
15
|
+
const WordWrap = observer(function WordWrap({ children, }) {
|
|
16
16
|
return _jsx("pre", { style: baseSeqStyle, children: children });
|
|
17
|
-
}
|
|
18
|
-
function NoWordWrap({ children }) {
|
|
17
|
+
});
|
|
18
|
+
const NoWordWrap = observer(function NoWordWrap({ children, }) {
|
|
19
19
|
return (_jsx("div", { style: {
|
|
20
20
|
...baseSeqStyle,
|
|
21
21
|
maxWidth: 600,
|
|
22
22
|
whiteSpace: 'normal',
|
|
23
23
|
wordBreak: 'break-all',
|
|
24
24
|
}, children: children }));
|
|
25
|
-
}
|
|
25
|
+
});
|
|
26
26
|
const SequencePanel = observer(function SequencePanel({ sequence, model, feature, mode, revcomp = false, assemblyGeneticCodeId, assemblyName, hoverTarget, ref, }) {
|
|
27
27
|
const { showCoordinates } = model;
|
|
28
28
|
const Container = showCoordinates ? WordWrap : NoWordWrap;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { AbstractSessionModel, SimpleFeatureSerialized } from '../../../util/index.ts';
|
|
2
|
+
import type { CanonicalTranscripts } from '../../../util/isoformRank.ts';
|
|
2
3
|
import type { SequenceHoverTarget } from '../model.ts';
|
|
3
|
-
declare const FeatureSequenceDialog: ({ feature, error, session, assemblyName, hoverTarget, handleClose, }: {
|
|
4
|
+
declare const FeatureSequenceDialog: ({ feature, error, session, assemblyName, hoverTarget, canonicalTranscripts, handleClose, }: {
|
|
4
5
|
feature: SimpleFeatureSerialized | undefined;
|
|
5
6
|
error?: unknown;
|
|
6
7
|
session: AbstractSessionModel;
|
|
7
8
|
assemblyName: string | undefined;
|
|
8
9
|
hoverTarget?: SequenceHoverTarget;
|
|
10
|
+
canonicalTranscripts?: CanonicalTranscripts;
|
|
9
11
|
handleClose: () => void;
|
|
10
12
|
}) => import("react").JSX.Element;
|
|
11
13
|
export default FeatureSequenceDialog;
|
|
@@ -17,13 +17,13 @@ const useStyles = makeStyles()({
|
|
|
17
17
|
// The settings model lives for as long as the dialog does: it holds no
|
|
18
18
|
// snapshot and reads no tree, so nothing has to carry one around on the chance
|
|
19
19
|
// a sequence panel is opened.
|
|
20
|
-
const FeatureSequenceDialog = observer(function FeatureSequenceDialog({ feature, error, session, assemblyName, hoverTarget, handleClose, }) {
|
|
20
|
+
const FeatureSequenceDialog = observer(function FeatureSequenceDialog({ feature, error, session, assemblyName, hoverTarget, canonicalTranscripts, handleClose, }) {
|
|
21
21
|
const { classes } = useStyles();
|
|
22
22
|
const [model] = useState(() => SequenceFeatureDetailsF().create());
|
|
23
23
|
return (_jsx(InfoDialog, { maxWidth: "xl", open: true, title: feature
|
|
24
24
|
? `Feature sequence - ${feature.name || feature.id || feature.type}`
|
|
25
25
|
: 'Feature sequence', onClose: () => {
|
|
26
26
|
handleClose();
|
|
27
|
-
}, children: _jsx("div", { className: classes.content, children: error ? (_jsx(ErrorBanner, { error: error })) : feature ? (_jsx(SequenceFeatureDetails, { model: model, session: session, assemblyName: assemblyName, feature: feature, hoverTarget: hoverTarget, showOpenInDialog: false })) : (_jsx(LoadingEllipses, { message: "Loading feature" })) }) }));
|
|
27
|
+
}, children: _jsx("div", { className: classes.content, children: error ? (_jsx(ErrorBanner, { error: error })) : feature ? (_jsx(SequenceFeatureDetails, { model: model, session: session, assemblyName: assemblyName, feature: feature, hoverTarget: hoverTarget, showOpenInDialog: false, canonicalTranscripts: canonicalTranscripts })) : (_jsx(LoadingEllipses, { message: "Loading feature" })) }) }));
|
|
28
28
|
});
|
|
29
29
|
export default FeatureSequenceDialog;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import SettingsIcon from '@mui/icons-material/Settings';
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
4
5
|
import { InfoDialog } from '../../../ui/index.js';
|
|
5
|
-
|
|
6
|
+
const HelpDialog = observer(function HelpDialog({ handleClose, }) {
|
|
6
7
|
return (_jsxs(InfoDialog, { maxWidth: "xl", open: true, onClose: () => {
|
|
7
8
|
handleClose();
|
|
8
9
|
}, title: "Feature sequence panel help", children: [_jsx(Typography, { children: "The \"Feature sequence\" panel shows the underlying genomic sequence for a given feature, fetched from the reference genome." }), _jsx(Typography, { children: "For gene features, this panel does special calculations to e.g. stitch together the coding sequence, the options are:" }), _jsxs("ul", { children: [_jsx("li", { children: "CDS - shows the stitched together CDS sequences" }), _jsx("li", { children: "Protein - the translated coding sequence, with the \"standard\" genetic code" }), _jsx("li", { children: "cDNA - shows the 'copy DNA' of transcript, formed from exon sequences" }), _jsx("li", { children: "Genomic w/ introns +/- Nbp up+down stream - the sequence underlying the entire gene including introns, with UTR and CDS highlighted" })] }), _jsx(Typography, { children: "For other feature types, the options are:" }), _jsx("ul", { children: _jsx("li", { children: "Genomic +/- Nbp up+down stream - the reference genome sequence underlying the feature, with the up and downstream sequence" }) }), _jsxs(Typography, { children: ["Note 1: you can use the \"gear icon\" ", _jsx(SettingsIcon, {}), " to edit the number of bp displayed up/downstream and in the intron region"] }), _jsx(Typography, { children: "Note 2: The 'Copy HTML' function retains the colors from the sequence panel but cannot be pasted into some programs like notepad that only expect plain text." })] }));
|
|
9
|
-
}
|
|
10
|
+
});
|
|
11
|
+
export default HelpDialog;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { AbstractSessionModel, RpcStatus, SimpleFeatureSerialized } from '../../../util/index.ts';
|
|
2
2
|
import type { ErrorState, SeqState } from '../../util.tsx';
|
|
3
3
|
import type { SequenceDisplayMode, SequenceFeatureDetailsModel, SequenceHoverTarget } from '../model.ts';
|
|
4
|
-
declare const SequenceDialog: ({ handleClose, sequenceFeatureDetails, session, transcriptSelector, feature, mode,
|
|
4
|
+
declare const SequenceDialog: ({ handleClose, sequenceFeatureDetails, session, transcriptSelector, feature, mode, revcomp, setRevcomp, sequence, error, status, assemblyGeneticCodeId, assemblyName, hoverTarget, onForceLoad, }: {
|
|
5
5
|
handleClose: () => void;
|
|
6
6
|
feature: SimpleFeatureSerialized;
|
|
7
7
|
sequenceFeatureDetails: SequenceFeatureDetailsModel;
|
|
8
8
|
session: Pick<AbstractSessionModel, 'notify' | 'notifyError'>;
|
|
9
9
|
transcriptSelector?: React.ReactNode;
|
|
10
10
|
mode: SequenceDisplayMode;
|
|
11
|
-
setMode: (mode: SequenceDisplayMode) => void;
|
|
12
11
|
revcomp: boolean;
|
|
13
12
|
setRevcomp: (arg: boolean) => void;
|
|
14
13
|
sequence: SeqState | ErrorState | undefined;
|
|
@@ -11,11 +11,11 @@ const useStyles = makeStyles()({
|
|
|
11
11
|
width: '80em',
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
|
-
const SequenceDialog = observer(function SequenceDialog({ handleClose, sequenceFeatureDetails, session, transcriptSelector, feature, mode,
|
|
14
|
+
const SequenceDialog = observer(function SequenceDialog({ handleClose, sequenceFeatureDetails, session, transcriptSelector, feature, mode, revcomp, setRevcomp, sequence, error, status, assemblyGeneticCodeId, assemblyName, hoverTarget, onForceLoad, }) {
|
|
15
15
|
const { classes } = useStyles();
|
|
16
16
|
const seqPanelRef = useRef(null);
|
|
17
17
|
return (_jsx(InfoDialog, { maxWidth: "xl", open: true, title: "Sequence view", onClose: () => {
|
|
18
18
|
handleClose();
|
|
19
|
-
}, children: _jsxs("div", { className: classes.content, children: [_jsxs("div", { children: [transcriptSelector, _jsx(SequenceTypeSelector, { model: sequenceFeatureDetails, feature: feature, mode: mode
|
|
19
|
+
}, children: _jsxs("div", { className: classes.content, children: [_jsxs("div", { children: [transcriptSelector, _jsx(SequenceTypeSelector, { model: sequenceFeatureDetails, feature: feature, mode: mode }), _jsx(SequenceFeatureMenu, { ref: seqPanelRef, model: sequenceFeatureDetails, session: session, mode: mode, revcomp: revcomp, setRevcomp: setRevcomp })] }), _jsx(SequenceBody, { error: error, sequence: sequence, status: status, feature: feature, seqPanelRef: seqPanelRef, model: sequenceFeatureDetails, mode: mode, revcomp: revcomp, assemblyGeneticCodeId: assemblyGeneticCodeId, assemblyName: assemblyName, hoverTarget: hoverTarget, onForceLoad: onForceLoad })] }) }));
|
|
20
20
|
});
|
|
21
21
|
export default SequenceDialog;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { SimpleFeatureSerialized } from '../../../util/index.ts';
|
|
2
2
|
import type { SequenceDisplayMode, SequenceFeatureDetailsModel } from '../model.ts';
|
|
3
|
-
declare const SequenceTypeSelector: ({ model, feature, mode,
|
|
3
|
+
declare const SequenceTypeSelector: ({ model, feature, mode, }: {
|
|
4
4
|
model: SequenceFeatureDetailsModel;
|
|
5
5
|
feature: SimpleFeatureSerialized;
|
|
6
6
|
mode: SequenceDisplayMode;
|
|
7
|
-
setMode: (mode: SequenceDisplayMode) => void;
|
|
8
7
|
}) => import("react").JSX.Element;
|
|
9
8
|
export default SequenceTypeSelector;
|
|
@@ -2,50 +2,29 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { FormControl, MenuItem, Select } from '@mui/material';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { makeStyles } from '../../../util/tss-react/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { getAvailableModes } from '../featureTypeUtil.js';
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
formControl: {
|
|
8
8
|
margin: 0,
|
|
9
9
|
marginLeft: 4,
|
|
10
10
|
},
|
|
11
11
|
});
|
|
12
|
-
const SequenceTypeSelector = observer(function SequenceTypeSelector({ model, feature, mode,
|
|
12
|
+
const SequenceTypeSelector = observer(function SequenceTypeSelector({ model, feature, mode, }) {
|
|
13
13
|
const { classes } = useStyles();
|
|
14
14
|
const { intronBp, upDownBp } = model;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
[
|
|
27
|
-
'gene_updownstream',
|
|
28
|
-
`Genomic w/ full introns +/- ${upDownBp}bp up+down stream`,
|
|
29
|
-
],
|
|
30
|
-
['gene_collapsed_intron', `Genomic w/ ${intronBp}bp intron`],
|
|
31
|
-
[
|
|
32
|
-
'gene_updownstream_collapsed_intron',
|
|
33
|
-
`Genomic w/ ${intronBp}bp intron +/- ${upDownBp}bp up+down stream`,
|
|
34
|
-
],
|
|
35
|
-
];
|
|
36
|
-
const plainGenomicOptions = [
|
|
37
|
-
['genomic', 'Genomic'],
|
|
38
|
-
[
|
|
39
|
-
'genomic_sequence_updownstream',
|
|
40
|
-
`Genomic +/- ${upDownBp}bp up+down stream`,
|
|
41
|
-
],
|
|
42
|
-
];
|
|
43
|
-
const options = [
|
|
44
|
-
...(hasCDS ? codingOptions : []),
|
|
45
|
-
...(hasExonOrCDS ? splicedOptions : plainGenomicOptions),
|
|
46
|
-
];
|
|
15
|
+
const labels = {
|
|
16
|
+
cds: 'CDS',
|
|
17
|
+
protein: 'Protein',
|
|
18
|
+
cdna: 'cDNA',
|
|
19
|
+
gene: 'Genomic w/ full introns',
|
|
20
|
+
gene_updownstream: `Genomic w/ full introns +/- ${upDownBp}bp up+down stream`,
|
|
21
|
+
gene_collapsed_intron: `Genomic w/ ${intronBp}bp intron`,
|
|
22
|
+
gene_updownstream_collapsed_intron: `Genomic w/ ${intronBp}bp intron +/- ${upDownBp}bp up+down stream`,
|
|
23
|
+
genomic: 'Genomic',
|
|
24
|
+
genomic_sequence_updownstream: `Genomic +/- ${upDownBp}bp up+down stream`,
|
|
25
|
+
};
|
|
47
26
|
return (_jsx(FormControl, { className: classes.formControl, children: _jsx(Select, { size: "small", value: mode, onChange: event => {
|
|
48
|
-
setMode(event.target.value);
|
|
49
|
-
}, "aria-label": "Sequence type", children:
|
|
27
|
+
model.setMode(event.target.value);
|
|
28
|
+
}, "aria-label": "Sequence type", children: getAvailableModes(feature).map(key => (_jsx(MenuItem, { value: key, "data-testid": `sequence_type_${key}`, children: labels[key] }, key))) }) }));
|
|
50
29
|
});
|
|
51
30
|
export default SequenceTypeSelector;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SimpleFeatureSerialized } from '../../../util/index.ts';
|
|
2
|
-
|
|
2
|
+
declare const TranscriptSelector: ({ transcripts, transcriptIndex, setTranscriptIndex, }: {
|
|
3
3
|
transcripts: SimpleFeatureSerialized[];
|
|
4
4
|
transcriptIndex: number;
|
|
5
5
|
setTranscriptIndex: (index: number) => void;
|
|
6
|
-
})
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
export default TranscriptSelector;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FormControl, MenuItem, Select } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import { coarseStripHTML } from '../../../util/index.js';
|
|
4
5
|
import { makeStyles } from '../../../util/tss-react/index.js';
|
|
5
6
|
const useStyles = makeStyles()({
|
|
@@ -11,10 +12,11 @@ const useStyles = makeStyles()({
|
|
|
11
12
|
// Only rendered when a container feature (a gene) has more than one
|
|
12
13
|
// transcript child — picks which transcript's exon/CDS structure the
|
|
13
14
|
// sequence-type selector and body compute from.
|
|
14
|
-
|
|
15
|
+
const TranscriptSelector = observer(function TranscriptSelector({ transcripts, transcriptIndex, setTranscriptIndex, }) {
|
|
15
16
|
const { classes } = useStyles();
|
|
16
17
|
return (_jsx(FormControl, { className: classes.formControl, children: _jsx(Select, { size: "small", value: transcriptIndex, onChange: event => {
|
|
17
18
|
setTranscriptIndex(Number(event.target.value));
|
|
18
19
|
}, "aria-label": "Transcript", children: transcripts.map((transcript, idx) => (_jsx(MenuItem, { value: idx, "data-testid": `transcript_${idx}`, children: coarseStripHTML(`${transcript.name || transcript.id || ''}`) ||
|
|
19
20
|
`Transcript ${idx + 1}` }, transcript.uniqueId))) }) }));
|
|
20
|
-
}
|
|
21
|
+
});
|
|
22
|
+
export default TranscriptSelector;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { SimpleFeatureSerialized, SimpleFeatureSerializedNoId } from '../../util/index.ts';
|
|
2
|
+
import type { CanonicalTranscripts } from '../../util/isoformRank.ts';
|
|
2
3
|
import type { SequenceDisplayMode, ShowCoordinatesMode } from './model.ts';
|
|
3
4
|
export declare function featureHasCDS(feature: SimpleFeatureSerializedNoId): boolean;
|
|
4
5
|
export declare function featureHasExon(feature: SimpleFeatureSerializedNoId): boolean;
|
|
5
6
|
export declare function featureHasExonOrCDS(feature: SimpleFeatureSerializedNoId): boolean;
|
|
6
7
|
export declare function getTranscripts(feature: SimpleFeatureSerialized): SimpleFeatureSerialized[];
|
|
7
|
-
export declare function pickDefaultTranscriptIndex(transcripts: SimpleFeatureSerialized[]): number;
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function pickDefaultTranscriptIndex(transcripts: SimpleFeatureSerialized[], canonical?: CanonicalTranscripts): number;
|
|
9
|
+
export declare function getAvailableModes(feature: SimpleFeatureSerializedNoId): SequenceDisplayMode[];
|
|
10
|
+
export declare function resolveMode(recentModes: readonly SequenceDisplayMode[], feature: SimpleFeatureSerializedNoId): "cdna" | "cds" | "gene" | "gene_collapsed_intron" | "gene_updownstream" | "gene_updownstream_collapsed_intron" | "genomic" | "genomic_sequence_updownstream" | "protein";
|
|
9
11
|
export declare function modeHasUpDownstream(mode: SequenceDisplayMode): boolean;
|
|
10
12
|
export declare function modeSupportsRevcomp(mode: SequenceDisplayMode): boolean;
|
|
11
13
|
export declare function showGenomicCoordsOption(mode: SequenceDisplayMode): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_CANONICAL_TRANSCRIPTS, isoformScorer, rankIsoforms, serializedIsoformReader, } from '../../util/isoformRank.js';
|
|
1
2
|
// these predicates only ever read type/subfeatures, so they accept a bare
|
|
2
3
|
// subfeature (no guaranteed uniqueId) as readily as a full feature
|
|
3
4
|
export function featureHasCDS(feature) {
|
|
@@ -30,27 +31,35 @@ export function getTranscripts(feature) {
|
|
|
30
31
|
uniqueId: `${feature.uniqueId}_${idx}`,
|
|
31
32
|
})) ?? []);
|
|
32
33
|
}
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
34
|
+
// The isoform the canvas gene glyph draws first, so the panel opens on the
|
|
35
|
+
// transcript the track showed. A feature that is itself a transcript has no
|
|
36
|
+
// nested transcripts to pick from.
|
|
37
|
+
export function pickDefaultTranscriptIndex(transcripts, canonical = DEFAULT_CANONICAL_TRANSCRIPTS) {
|
|
38
|
+
const [best] = rankIsoforms(transcripts, isoformScorer(serializedIsoformReader, canonical));
|
|
39
|
+
return best ? transcripts.indexOf(best) : 0;
|
|
40
|
+
}
|
|
41
|
+
// the sequence types the selector offers, the first being the default
|
|
42
|
+
export function getAvailableModes(feature) {
|
|
43
|
+
const coding = featureHasCDS(feature)
|
|
44
|
+
? ['cds', 'protein']
|
|
45
|
+
: [];
|
|
46
|
+
const rest = featureHasExonOrCDS(feature)
|
|
47
|
+
? [
|
|
48
|
+
'cdna',
|
|
49
|
+
'gene',
|
|
50
|
+
'gene_updownstream',
|
|
51
|
+
'gene_collapsed_intron',
|
|
52
|
+
'gene_updownstream_collapsed_intron',
|
|
53
|
+
]
|
|
54
|
+
: ['genomic', 'genomic_sequence_updownstream'];
|
|
55
|
+
return [...coding, ...rest];
|
|
47
56
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
// The most recent pick this feature offers, so clicking from one gene to the
|
|
58
|
+
// next keeps e.g. the protein readout, and picking Genomic on a plain feature
|
|
59
|
+
// in between does not cost a gene its Protein.
|
|
60
|
+
export function resolveMode(recentModes, feature) {
|
|
61
|
+
const modes = getAvailableModes(feature);
|
|
62
|
+
return recentModes.find(m => modes.includes(m)) ?? modes[0];
|
|
54
63
|
}
|
|
55
64
|
// whether the mode renders up/downstream flanks. shared by the sequence body
|
|
56
65
|
// (which fetches+renders the flanks) and the FASTA header (which annotates
|
|
@@ -9,7 +9,8 @@ export interface SequenceHoverPosition {
|
|
|
9
9
|
export interface SequenceHoverTarget {
|
|
10
10
|
setSequenceHoverPosition: (pos: SequenceHoverPosition | undefined) => void;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
declare const sequenceDisplayModes: readonly ['gene', 'gene_collapsed_intron', 'gene_updownstream', 'gene_updownstream_collapsed_intron', 'cdna', 'cds', 'genomic', 'genomic_sequence_updownstream', 'protein'];
|
|
13
|
+
export type SequenceDisplayMode = (typeof sequenceDisplayModes)[number];
|
|
13
14
|
/**
|
|
14
15
|
* #stateModel SequenceFeatureDetails
|
|
15
16
|
* #category Widget
|
|
@@ -47,6 +48,12 @@ export declare function SequenceFeatureDetailsF(): import("@jbrowse/mobx-state-t
|
|
|
47
48
|
* state.
|
|
48
49
|
*/
|
|
49
50
|
charactersPerRow: number;
|
|
51
|
+
/**
|
|
52
|
+
* #volatile
|
|
53
|
+
* the sequence types picked in any panel, most recent first;
|
|
54
|
+
* `resolveMode` shows the first one a feature offers
|
|
55
|
+
*/
|
|
56
|
+
recentModes: ("cdna" | "cds" | "gene" | "gene_collapsed_intron" | "gene_updownstream" | "gene_updownstream_collapsed_intron" | "genomic" | "genomic_sequence_updownstream" | "protein")[];
|
|
50
57
|
} & {
|
|
51
58
|
/**
|
|
52
59
|
* #action
|
|
@@ -68,6 +75,10 @@ export declare function SequenceFeatureDetailsF(): import("@jbrowse/mobx-state-t
|
|
|
68
75
|
* #action
|
|
69
76
|
*/
|
|
70
77
|
setShowCoordinates(f: ShowCoordinatesMode): void;
|
|
78
|
+
/**
|
|
79
|
+
* #action
|
|
80
|
+
*/
|
|
81
|
+
setMode(f: SequenceDisplayMode): void;
|
|
71
82
|
} & {
|
|
72
83
|
/**
|
|
73
84
|
* #getter
|
|
@@ -76,3 +87,4 @@ export declare function SequenceFeatureDetailsF(): import("@jbrowse/mobx-state-t
|
|
|
76
87
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
77
88
|
export type SequenceFeatureDetailsStateModel = ReturnType<typeof SequenceFeatureDetailsF>;
|
|
78
89
|
export type SequenceFeatureDetailsModel = Instance<SequenceFeatureDetailsStateModel>;
|
|
90
|
+
export {};
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { types } from '@jbrowse/mobx-state-tree';
|
|
2
|
-
import { localStorageGetBoolean, localStorageGetItem, localStorageGetNumber, localStorageSetBoolean, localStorageSetItem, localStorageSetNumber, } from '../../util/index.js';
|
|
2
|
+
import { localStorageGetBoolean, localStorageGetItem, localStorageGetNumber, localStorageGetStringArray, localStorageSetBoolean, localStorageSetItem, localStorageSetJSON, localStorageSetNumber, } from '../../util/index.js';
|
|
3
3
|
function parseShowCoordinatesMode(val) {
|
|
4
4
|
return val === 'relative' || val === 'genomic' ? val : 'none';
|
|
5
5
|
}
|
|
6
|
+
const sequenceDisplayModes = [
|
|
7
|
+
'gene',
|
|
8
|
+
'gene_collapsed_intron',
|
|
9
|
+
'gene_updownstream',
|
|
10
|
+
'gene_updownstream_collapsed_intron',
|
|
11
|
+
'cdna',
|
|
12
|
+
'cds',
|
|
13
|
+
'genomic',
|
|
14
|
+
'genomic_sequence_updownstream',
|
|
15
|
+
'protein',
|
|
16
|
+
];
|
|
17
|
+
function isSequenceDisplayMode(val) {
|
|
18
|
+
return sequenceDisplayModes.includes(val);
|
|
19
|
+
}
|
|
6
20
|
const p = 'sequenceFeatureDetails';
|
|
7
21
|
// A row has to hold at least one base: `splitString` advances the string by
|
|
8
22
|
// this, so a width of zero never finishes it.
|
|
@@ -49,6 +63,12 @@ export function SequenceFeatureDetailsF() {
|
|
|
49
63
|
* state.
|
|
50
64
|
*/
|
|
51
65
|
charactersPerRow: clampCharactersPerRow(localStorageGetNumber(`${p}-charactersPerRow`, 100)),
|
|
66
|
+
/**
|
|
67
|
+
* #volatile
|
|
68
|
+
* the sequence types picked in any panel, most recent first;
|
|
69
|
+
* `resolveMode` shows the first one a feature offers
|
|
70
|
+
*/
|
|
71
|
+
recentModes: localStorageGetStringArray(`${p}-recentModes`).filter(isSequenceDisplayMode),
|
|
52
72
|
}))
|
|
53
73
|
.actions(self => ({
|
|
54
74
|
/**
|
|
@@ -87,6 +107,13 @@ export function SequenceFeatureDetailsF() {
|
|
|
87
107
|
self.showCoordinatesSetting = f;
|
|
88
108
|
localStorageSetItem(`${p}-showCoordinatesSetting`, f);
|
|
89
109
|
},
|
|
110
|
+
/**
|
|
111
|
+
* #action
|
|
112
|
+
*/
|
|
113
|
+
setMode(f) {
|
|
114
|
+
self.recentModes = [f, ...self.recentModes.filter(m => m !== f)];
|
|
115
|
+
localStorageSetJSON(`${p}-recentModes`, self.recentModes);
|
|
116
|
+
},
|
|
90
117
|
}))
|
|
91
118
|
.views(self => ({
|
|
92
119
|
/**
|
|
@@ -51,9 +51,9 @@ const CDNASequence = observer(function CDNASequence({ cds, exons, sequence, upst
|
|
|
51
51
|
}
|
|
52
52
|
// The stretches of the feature its own exons do not reach. Real annotations
|
|
53
53
|
// produce them: CAT/liftoff emits a transcript spanning the source alignment
|
|
54
|
-
// with exons only where the CDS is supported, so KCNT2 in
|
|
55
|
-
//
|
|
56
|
-
//
|
|
54
|
+
// with exons only where the CDS is supported, so KCNT2 in HG00099.1's HPRC CAT
|
|
55
|
+
// annotation runs 10,207 bp past its first exon, and 28 of the 438 transcripts
|
|
56
|
+
// around CFH do the same.
|
|
57
57
|
//
|
|
58
58
|
// Uncolored, like the inter-exon gaps they are — the annotation does not call
|
|
59
59
|
// them exonic, so stretching the first and last exon over them (which is what
|
|
@@ -65,7 +65,7 @@ function nonSpaceCharsBeforeCursor(event, chunk) {
|
|
|
65
65
|
// Renders a chunk one character per span, applying `highlight` to each
|
|
66
66
|
// non-space character. Spaces keep the base `color` so the row background stays
|
|
67
67
|
// contiguous.
|
|
68
|
-
function HighlightedChunk({ chunk, sequenceOffset, color, highlight, }) {
|
|
68
|
+
const HighlightedChunk = observer(function HighlightedChunk({ chunk, sequenceOffset, color, highlight, }) {
|
|
69
69
|
let seqIndex = sequenceOffset;
|
|
70
70
|
const spans = [];
|
|
71
71
|
for (let i = 0; i < chunk.length; i++) {
|
|
@@ -74,5 +74,5 @@ function HighlightedChunk({ chunk, sequenceOffset, color, highlight, }) {
|
|
|
74
74
|
spans.push(_jsx("span", { style: { background }, children: ch }, i));
|
|
75
75
|
}
|
|
76
76
|
return _jsx(_Fragment, { children: spans });
|
|
77
|
-
}
|
|
77
|
+
});
|
|
78
78
|
export default SequenceDisplay;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type PluginManager from '../PluginManager.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '../configuration/index.ts';
|
|
3
3
|
import type { ParentFeatureSummary, SimpleFeatureSerialized } from '../util/index.ts';
|
|
4
|
+
import type { CanonicalTranscripts } from '../util/isoformRank.ts';
|
|
4
5
|
import type { SequenceHoverPosition } from './SequenceFeatureDetails/model.ts';
|
|
5
6
|
import type { FormatDetailsTiers } from './formatDetails.ts';
|
|
6
7
|
import type { Descriptors, MaybeSerializedFeat } from './types.tsx';
|
|
@@ -52,12 +53,14 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
52
53
|
upDownBp: number;
|
|
53
54
|
upperCaseCDS: boolean;
|
|
54
55
|
charactersPerRow: number;
|
|
56
|
+
recentModes: ("cdna" | "cds" | "gene" | "gene_collapsed_intron" | "gene_updownstream" | "gene_updownstream_collapsed_intron" | "genomic" | "genomic_sequence_updownstream" | "protein")[];
|
|
55
57
|
} & {
|
|
56
58
|
setUpDownBp(f: number): void;
|
|
57
59
|
setIntronBp(f: number): void;
|
|
58
60
|
setUpperCaseCDS(f: boolean): void;
|
|
59
61
|
setCharactersPerRow(f: number): void;
|
|
60
62
|
setShowCoordinates(f: import("./index.ts").ShowCoordinatesMode): void;
|
|
63
|
+
setMode(f: import("./SequenceFeatureDetails/model.ts").SequenceDisplayMode): void;
|
|
61
64
|
} & {
|
|
62
65
|
readonly showCoordinates: boolean;
|
|
63
66
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
@@ -88,6 +91,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
88
91
|
feature?: SimpleFeatureSerialized;
|
|
89
92
|
error?: Error;
|
|
90
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* #getter
|
|
96
|
+
* the isoform tags the open track's display ranks by, so the sequence
|
|
97
|
+
* panel opens on the transcript the track draws first
|
|
98
|
+
*/
|
|
99
|
+
readonly canonicalTranscripts: CanonicalTranscripts;
|
|
91
100
|
/**
|
|
92
101
|
* #getter
|
|
93
102
|
* levels of subfeature card the panel renders; unset means no limit
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getEnv, isStateTreeNode, types } from '@jbrowse/mobx-state-tree';
|
|
2
2
|
import { hydrateTrackConfig } from '../configuration/index.js';
|
|
3
3
|
import { getSession } from '../util/index.js';
|
|
4
|
+
import { DEFAULT_CANONICAL_TRANSCRIPTS, isCanonicalTranscriptsHost, } from '../util/isoformRank.js';
|
|
4
5
|
import { ElementId } from '../util/types/mst.js';
|
|
5
6
|
import { SequenceFeatureDetailsF } from './SequenceFeatureDetails/model.js';
|
|
6
7
|
import { applyFormatDetails, formatDetailsNumber } from './formatDetails.js';
|
|
@@ -116,6 +117,16 @@ export function stateModelFactory(pluginManager) {
|
|
|
116
117
|
return { error };
|
|
117
118
|
}
|
|
118
119
|
},
|
|
120
|
+
/**
|
|
121
|
+
* #getter
|
|
122
|
+
* the isoform tags the open track's display ranks by, so the sequence
|
|
123
|
+
* panel opens on the transcript the track draws first
|
|
124
|
+
*/
|
|
125
|
+
get canonicalTranscripts() {
|
|
126
|
+
const track = self.track;
|
|
127
|
+
return (track?.displays.find(isCanonicalTranscriptsHost)
|
|
128
|
+
?.canonicalTranscripts ?? DEFAULT_CANONICAL_TRANSCRIPTS);
|
|
129
|
+
},
|
|
119
130
|
/**
|
|
120
131
|
* #getter
|
|
121
132
|
* levels of subfeature card the panel renders; unset means no limit
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MenuItem } from '../ui/MenuTypes.ts';
|
|
2
|
+
import type { CanonicalTranscripts } from '../util/isoformRank.ts';
|
|
2
3
|
import type { SimpleFeatureSerialized } from '../util/simpleFeature.ts';
|
|
3
4
|
import type { SequenceFeatureDetailsModel, SequenceHoverTarget } from './SequenceFeatureDetails/model.ts';
|
|
4
5
|
import type { IStateTreeNode } from '@jbrowse/mobx-state-tree';
|
|
@@ -9,6 +10,7 @@ export interface FeatureDetailsModel extends IStateTreeNode, SequenceHoverTarget
|
|
|
9
10
|
view: {
|
|
10
11
|
assemblyNames: string[];
|
|
11
12
|
} | undefined;
|
|
13
|
+
canonicalTranscripts?: CanonicalTranscripts;
|
|
12
14
|
}
|
|
13
15
|
export interface Descriptors {
|
|
14
16
|
[key: string]: React.ReactNode | Descriptors;
|