@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.2
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/esm/FeatureTrack/configSchema.d.ts +104 -65
- package/esm/FeatureTrack/configSchema.js +47 -1
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
- package/esm/LaunchLinearGenomeView/index.js +6 -12
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +250 -121
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +16 -7
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
- package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
- package/esm/LinearGenomeView/components/Cytobands.js +76 -53
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +29 -58
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.js +32 -16
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +19 -23
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
- package/esm/LinearGenomeView/components/ImportForm.js +95 -61
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +13 -10
- package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
- package/esm/LinearGenomeView/components/PaddingBlocks.js +61 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +13 -16
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +16 -21
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +58 -66
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
- package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
- package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
- package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
- package/esm/LinearGenomeView/components/searchModes.js +22 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
- package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
- package/esm/LinearGenomeView/components/util.d.ts +20 -6
- package/esm/LinearGenomeView/components/util.js +27 -6
- package/esm/LinearGenomeView/consts.d.ts +7 -2
- package/esm/LinearGenomeView/consts.js +18 -2
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +27 -0
- package/esm/LinearGenomeView/headerFit.js +59 -0
- package/esm/LinearGenomeView/index.d.ts +32 -2
- package/esm/LinearGenomeView/index.js +16 -6
- package/esm/LinearGenomeView/initKeys.d.ts +12 -0
- package/esm/LinearGenomeView/initKeys.js +68 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +23 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +58 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +3238 -136
- package/esm/LinearGenomeView/model.js +2425 -528
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
- package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
- package/esm/LinearGenomeView/stickyChrome.js +30 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
- package/esm/LinearGenomeView/types.d.ts +17 -31
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +332 -12
- package/esm/LinearGenomeView/util.js +606 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
- package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +1 -0
- package/esm/MultiLevelRubberband/types.d.ts +6 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
- package/esm/displayKitTests/perRegionTestEnv.js +138 -0
- package/esm/index.d.ts +122 -1235
- package/esm/index.js +101 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +55 -11
- package/esm/searchUtils.js +342 -45
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +33 -0
- package/esm/shared/coordLabels.d.ts +40 -0
- package/esm/shared/coordLabels.js +119 -0
- package/package.json +18 -19
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
- package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
- package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/esm/BaseLinearDisplay/components/Block.js +0 -45
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
- package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
- package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/util.js +0 -107
- package/esm/BaseLinearDisplay/index.d.ts +0 -17
- package/esm/BaseLinearDisplay/index.js +0 -13
- package/esm/BaseLinearDisplay/model.d.ts +0 -1197
- package/esm/BaseLinearDisplay/model.js +0 -432
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
- package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
- package/esm/BaseLinearDisplay/models/util.js +0 -43
- package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
- package/esm/BaseLinearDisplay/renderSvg.js +0 -63
- package/esm/BaseLinearDisplay/types.d.ts +0 -43
- package/esm/BaseLinearDisplay/types.js +0 -3
- package/esm/BaseLinearDisplay/util.d.ts +0 -16
- package/esm/BaseLinearDisplay/util.js +0 -71
- package/esm/BasicTrack/configSchema.d.ts +0 -85
- package/esm/BasicTrack/configSchema.js +0 -8
- package/esm/BasicTrack/index.d.ts +0 -2
- package/esm/BasicTrack/index.js +0 -12
- package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBareDisplay/configSchema.js +0 -11
- package/esm/LinearBareDisplay/index.d.ts +0 -4
- package/esm/LinearBareDisplay/index.js +0 -20
- package/esm/LinearBareDisplay/model.d.ts +0 -1196
- package/esm/LinearBareDisplay/model.js +0 -32
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
- package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBasicDisplay/configSchema.js +0 -11
- package/esm/LinearBasicDisplay/index.d.ts +0 -4
- package/esm/LinearBasicDisplay/index.js +0 -20
- package/esm/LinearBasicDisplay/model.d.ts +0 -1391
- package/esm/LinearBasicDisplay/model.js +0 -158
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
- package/esm/LinearFeatureDisplay/configSchema.js +0 -11
- package/esm/LinearFeatureDisplay/index.d.ts +0 -3
- package/esm/LinearFeatureDisplay/index.js +0 -2
- package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
- package/esm/LinearFeatureDisplay/model.js +0 -305
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
- package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
- package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
- package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
- package/esm/LinearGenomeView/svgExportUtil.js +0 -6
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
- /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-genome-view",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JBrowse 2 linear genome view",
|
|
6
6
|
"keywords": [
|
|
@@ -21,37 +21,36 @@
|
|
|
21
21
|
"esm"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@jbrowse/mobx-state-tree": "^5.
|
|
25
|
-
"@mui/icons-material": "^
|
|
26
|
-
"@mui/material": "^
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"@jbrowse/
|
|
33
|
-
"@jbrowse/core": "^4.3.0"
|
|
24
|
+
"@jbrowse/mobx-state-tree": "^6.5.1",
|
|
25
|
+
"@mui/icons-material": "^9.4.0",
|
|
26
|
+
"@mui/material": "^9.4.0",
|
|
27
|
+
"mobx": "^7.0.3",
|
|
28
|
+
"mobx-react": "^10.0.2",
|
|
29
|
+
"@jbrowse/core": "^5.0.0-beta.2",
|
|
30
|
+
"@jbrowse/render-core": "^5.0.0-beta.2",
|
|
31
|
+
"@jbrowse/display-ui": "^5.0.0-beta.2",
|
|
32
|
+
"@jbrowse/display-kit": "^5.0.0-beta.2"
|
|
34
33
|
},
|
|
35
34
|
"peerDependencies": {
|
|
36
|
-
"react": ">=
|
|
37
|
-
"react-dom": ">=
|
|
35
|
+
"react": ">=19.0.0",
|
|
36
|
+
"react-dom": ">=19.0.0"
|
|
38
37
|
},
|
|
39
38
|
"publishConfig": {
|
|
40
39
|
"access": "public"
|
|
41
40
|
},
|
|
42
41
|
"sideEffects": false,
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@jbrowse/display-test-utils": "^5.0.0-beta.2"
|
|
44
|
+
},
|
|
43
45
|
"scripts": {
|
|
44
46
|
"prebuild": "pnpm clean",
|
|
45
47
|
"build": "pnpm run /^build:/",
|
|
46
|
-
"build:esm": "tsc
|
|
48
|
+
"build:esm": "node ../../node_modules/typescript7/bin/tsc --build tsconfig.build.esm.json",
|
|
47
49
|
"clean": "rimraf esm *.tsbuildinfo",
|
|
48
|
-
"test": "
|
|
50
|
+
"test": "jest --config ../../jest.config.js --passWithNoTests --testPathPatterns plugins/linear-genome-view"
|
|
49
51
|
},
|
|
50
52
|
"types": "esm/index.d.ts",
|
|
51
53
|
"exports": {
|
|
52
|
-
".":
|
|
53
|
-
"types": "./esm/index.d.ts",
|
|
54
|
-
"import": "./esm/index.js"
|
|
55
|
-
}
|
|
54
|
+
".": "./esm/index.js"
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { measureText } from '@jbrowse/core/util';
|
|
3
|
-
const LEGEND_FONT_SIZE = 10;
|
|
4
|
-
const LEGEND_BOX_SIZE = 12;
|
|
5
|
-
const LEGEND_PADDING = 3;
|
|
6
|
-
export default function SVGLegend({ items, width, legendAreaWidth, }) {
|
|
7
|
-
if (items.length === 0) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
const itemHeight = LEGEND_BOX_SIZE + 2;
|
|
11
|
-
const legendHeight = items.length * itemHeight + LEGEND_PADDING * 2;
|
|
12
|
-
const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
|
|
13
|
-
const legendWidth = LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2;
|
|
14
|
-
const x = legendAreaWidth ? width + 10 : width - legendWidth - 10;
|
|
15
|
-
const y = 10;
|
|
16
|
-
return (_jsxs("g", { transform: `translate(${x}, ${y})`, children: [_jsx("rect", { x: 0, y: 0, width: legendWidth, height: legendHeight, fill: "rgba(255,255,255,0.9)", stroke: "#ccc", strokeWidth: 1, rx: 4 }), items.map((item, idx) => (_jsxs("g", { transform: `translate(${LEGEND_PADDING}, ${LEGEND_PADDING + idx * itemHeight})`, children: [item.color ? (_jsx("rect", { x: 0, y: 0, width: LEGEND_BOX_SIZE, height: LEGEND_BOX_SIZE, fill: item.color })) : null, _jsx("text", { x: LEGEND_BOX_SIZE + 6, y: LEGEND_BOX_SIZE - 2, fontSize: LEGEND_FONT_SIZE, fill: "black", children: item.label })] }, `legend-${idx}`)))] }));
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { measureText } from '@jbrowse/core/util';
|
|
2
|
-
const LEGEND_FONT_SIZE = 10;
|
|
3
|
-
const LEGEND_BOX_SIZE = 12;
|
|
4
|
-
const LEGEND_PADDING = 3;
|
|
5
|
-
export function calculateSvgLegendWidth(items) {
|
|
6
|
-
if (items.length === 0) {
|
|
7
|
-
return 0;
|
|
8
|
-
}
|
|
9
|
-
const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
|
|
10
|
-
return LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2 + 20;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { BaseLinearDisplayModel } from '../model.ts';
|
|
2
|
-
declare const BaseLinearDisplay: (props: {
|
|
3
|
-
model: BaseLinearDisplayModel;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default BaseLinearDisplay;
|
|
7
|
-
export { default as Tooltip } from './Tooltip.tsx';
|
|
8
|
-
export { default as BlockMsg } from './BlockMsg.tsx';
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense, useRef, useState } from 'react';
|
|
3
|
-
import { getConf } from '@jbrowse/core/configuration';
|
|
4
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
-
import { useTheme } from '@mui/material';
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
7
|
-
import FloatingLegend from "./FloatingLegend.js";
|
|
8
|
-
import LinearBlocks from "./LinearBlocks.js";
|
|
9
|
-
import MenuPage from "./MenuPage.js";
|
|
10
|
-
const useStyles = makeStyles()({
|
|
11
|
-
display: {
|
|
12
|
-
position: 'relative',
|
|
13
|
-
whiteSpace: 'nowrap',
|
|
14
|
-
textAlign: 'left',
|
|
15
|
-
width: '100%',
|
|
16
|
-
minHeight: '100%',
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
const BaseLinearDisplay = observer(function BaseLinearDisplay(props) {
|
|
20
|
-
const { classes } = useStyles();
|
|
21
|
-
const ref = useRef(null);
|
|
22
|
-
const [clientRect, setClientRect] = useState();
|
|
23
|
-
const [offsetMouseCoord, setOffsetMouseCoord] = useState([0, 0]);
|
|
24
|
-
const [clientMouseCoord, setClientMouseCoord] = useState([0, 0]);
|
|
25
|
-
const [contextCoord, setContextCoord] = useState();
|
|
26
|
-
const { model, children } = props;
|
|
27
|
-
const { TooltipComponent, DisplayMessageComponent, height, showLegend, showTooltipsEnabled, } = model;
|
|
28
|
-
const theme = useTheme();
|
|
29
|
-
const legendItems = model.legendItems(theme);
|
|
30
|
-
return (_jsxs("div", { ref: ref, "data-testid": `display-${getConf(model, 'displayId')}`, className: classes.display, onContextMenu: event => {
|
|
31
|
-
event.preventDefault();
|
|
32
|
-
if (contextCoord) {
|
|
33
|
-
setContextCoord(undefined);
|
|
34
|
-
}
|
|
35
|
-
else if (ref.current) {
|
|
36
|
-
setContextCoord([event.clientX, event.clientY]);
|
|
37
|
-
}
|
|
38
|
-
}, onMouseMove: event => {
|
|
39
|
-
if (!ref.current) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const rect = ref.current.getBoundingClientRect();
|
|
43
|
-
const { left, top } = rect;
|
|
44
|
-
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
45
|
-
setClientMouseCoord([event.clientX, event.clientY]);
|
|
46
|
-
setClientRect(rect);
|
|
47
|
-
}, children: [DisplayMessageComponent ? (_jsx(DisplayMessageComponent, { model: model })) : (_jsx(LinearBlocks, { ...props })), children, showLegend && legendItems.length > 0 ? (_jsx(FloatingLegend, { items: legendItems })) : null, showTooltipsEnabled ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }) })) : null, contextCoord ? (_jsx(MenuPage, { contextCoord: contextCoord, model: model, onClose: () => {
|
|
48
|
-
setContextCoord(undefined);
|
|
49
|
-
} })) : null] }));
|
|
50
|
-
});
|
|
51
|
-
export default BaseLinearDisplay;
|
|
52
|
-
export { default as Tooltip } from "./Tooltip.js";
|
|
53
|
-
export { default as BlockMsg } from "./BlockMsg.js";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
2
|
-
declare const ContentBlock: ({ block, children, }: {
|
|
3
|
-
block: BaseBlock;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function ElidedBlock({ width }: {
|
|
7
|
-
width: number;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function InterRegionPaddingBlock({ boundary, width, style, }: {
|
|
10
|
-
boundary: boolean;
|
|
11
|
-
width: number;
|
|
12
|
-
style?: React.CSSProperties;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export { ContentBlock, ElidedBlock, InterRegionPaddingBlock };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
const useStyles = makeStyles()(theme => ({
|
|
5
|
-
contentBlock: {
|
|
6
|
-
position: 'relative',
|
|
7
|
-
minHeight: '100%',
|
|
8
|
-
boxSizing: 'border-box',
|
|
9
|
-
whiteSpace: 'nowrap',
|
|
10
|
-
overflow: 'hidden',
|
|
11
|
-
},
|
|
12
|
-
elidedBlock: {
|
|
13
|
-
minHeight: '100%',
|
|
14
|
-
boxSizing: 'border-box',
|
|
15
|
-
backgroundColor: '#999',
|
|
16
|
-
backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
|
|
17
|
-
},
|
|
18
|
-
interRegionPaddingBlock: {
|
|
19
|
-
minHeight: '100%',
|
|
20
|
-
backgroundColor: theme.palette.text.disabled,
|
|
21
|
-
},
|
|
22
|
-
boundaryPaddingBlock: {
|
|
23
|
-
minHeight: '100%',
|
|
24
|
-
backgroundColor: theme.palette.action.disabledBackground,
|
|
25
|
-
},
|
|
26
|
-
}));
|
|
27
|
-
const ContentBlock = observer(function ContentBlock({ block, children, }) {
|
|
28
|
-
const { classes } = useStyles();
|
|
29
|
-
const { widthPx } = block;
|
|
30
|
-
return (_jsx("div", { style: { width: widthPx }, className: classes.contentBlock, children: children }));
|
|
31
|
-
});
|
|
32
|
-
function ElidedBlock({ width }) {
|
|
33
|
-
const { classes } = useStyles();
|
|
34
|
-
return _jsx("div", { className: classes.elidedBlock, style: { width } });
|
|
35
|
-
}
|
|
36
|
-
function InterRegionPaddingBlock({ boundary, width, style = {}, }) {
|
|
37
|
-
const { classes } = useStyles();
|
|
38
|
-
return (_jsx("div", { style: {
|
|
39
|
-
...style,
|
|
40
|
-
width,
|
|
41
|
-
}, className: boundary
|
|
42
|
-
? classes.boundaryPaddingBlock
|
|
43
|
-
: classes.interRegionPaddingBlock }));
|
|
44
|
-
}
|
|
45
|
-
export { ContentBlock, ElidedBlock, InterRegionPaddingBlock };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import ErrorMessageStackTraceDialog from '@jbrowse/core/ui/ErrorMessageStackTraceDialog';
|
|
3
|
-
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
5
|
-
import ReportIcon from '@mui/icons-material/Report';
|
|
6
|
-
import { IconButton, Tooltip } from '@mui/material';
|
|
7
|
-
import { observer } from 'mobx-react';
|
|
8
|
-
import BlockMsg from "./BlockMsg.js";
|
|
9
|
-
const BlockErrorMessage = observer(function BlockErrorMessage({ model, }) {
|
|
10
|
-
return (_jsx(BlockMsg, { message: `${model.error}`, severity: "error", action: _jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload track", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
11
|
-
model.reload();
|
|
12
|
-
}, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
|
|
13
|
-
getSession(model).queueDialog(onClose => [
|
|
14
|
-
ErrorMessageStackTraceDialog,
|
|
15
|
-
{
|
|
16
|
-
onClose,
|
|
17
|
-
error: model.error,
|
|
18
|
-
},
|
|
19
|
-
]);
|
|
20
|
-
}, children: _jsx(ReportIcon, {}) }) })] }) }));
|
|
21
|
-
});
|
|
22
|
-
export default BlockErrorMessage;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
import { Alert, Tooltip } from '@mui/material';
|
|
4
|
-
const useStyles = makeStyles()({
|
|
5
|
-
ellipses: {
|
|
6
|
-
textOverflow: 'ellipsis',
|
|
7
|
-
overflow: 'hidden',
|
|
8
|
-
},
|
|
9
|
-
content: {
|
|
10
|
-
textOverflow: 'ellipsis',
|
|
11
|
-
overflow: 'hidden',
|
|
12
|
-
whiteSpace: 'nowrap',
|
|
13
|
-
maxWidth: '80%',
|
|
14
|
-
textAlign: 'center',
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
export default function BlockMsg({ message, severity, action, }) {
|
|
18
|
-
const { classes } = useStyles();
|
|
19
|
-
return (_jsx(Alert, { severity: severity, action: action, classes: {
|
|
20
|
-
message: classes.ellipses,
|
|
21
|
-
}, onMouseDown: event => {
|
|
22
|
-
event.stopPropagation();
|
|
23
|
-
}, onClick: event => {
|
|
24
|
-
event.stopPropagation();
|
|
25
|
-
}, children: _jsx(Tooltip, { title: message, children: _jsx("div", { className: classes.content, children: message }) }) }));
|
|
26
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
-
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }: {
|
|
5
|
-
view: LinearGenomeViewModel;
|
|
6
|
-
transcripts: Feature[];
|
|
7
|
-
assembly: Assembly;
|
|
8
|
-
handleClose: () => void;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
-
import { getSession } from '@jbrowse/core/util';
|
|
5
|
-
import { Button, DialogActions, DialogContent, DialogContentText, TextField, } from '@mui/material';
|
|
6
|
-
import TranscriptTable from "./TranscriptTable.js";
|
|
7
|
-
import { collapseIntrons } from "./util.js";
|
|
8
|
-
export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }) {
|
|
9
|
-
const [showAll, setShowAll] = useState(false);
|
|
10
|
-
const [windowSize, setWindowSize] = useState('100');
|
|
11
|
-
const windowSizeNum = +windowSize;
|
|
12
|
-
const validWindowSize = !Number.isNaN(windowSizeNum) && windowSizeNum >= 0;
|
|
13
|
-
return (_jsxs(Dialog, { open: true, maxWidth: "md", onClose: handleClose, title: "Select transcript to collapse", children: [_jsxs(DialogContent, { children: [_jsxs(DialogContentText, { component: "div", children: [_jsx("p", { children: "Select the 'window size' which will be the extra space surrounding splice boundary to include. 10bp will only include a small 10bp region around splice boundary" }), _jsx("p", { children: "By default the union of exons from all transcripts will be used to create the collapsed intron view, but you can optionally use the exons of only a specific transcript by clicking \"Show all transcripts\" and then \"Select\"" })] }), _jsx(TextField, { label: "Number of bp around splice site to include", value: windowSize, onChange: event => {
|
|
14
|
-
setWindowSize(event.target.value);
|
|
15
|
-
}, error: windowSize !== '' && !validWindowSize, helperText: windowSize !== '' && !validWindowSize
|
|
16
|
-
? 'Must be a non-negative number'
|
|
17
|
-
: '', type: "number", slotProps: {
|
|
18
|
-
htmlInput: {
|
|
19
|
-
min: 0,
|
|
20
|
-
step: 10,
|
|
21
|
-
},
|
|
22
|
-
}, style: { marginBottom: 16, width: 250 } }), _jsxs(Button, { style: { float: 'right' }, onClick: () => {
|
|
23
|
-
setShowAll(s => !s);
|
|
24
|
-
}, children: [!showAll ? 'Show' : 'Hide', " all transcripts (", transcripts.length, ")"] }), showAll ? (_jsx(TranscriptTable, { transcripts: transcripts, view: view, assembly: assembly, padding: windowSizeNum, validPadding: validWindowSize, handleClose: handleClose })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validWindowSize, onClick: () => {
|
|
25
|
-
;
|
|
26
|
-
(async () => {
|
|
27
|
-
try {
|
|
28
|
-
await collapseIntrons({
|
|
29
|
-
view,
|
|
30
|
-
transcripts,
|
|
31
|
-
assembly,
|
|
32
|
-
padding: windowSizeNum,
|
|
33
|
-
});
|
|
34
|
-
handleClose();
|
|
35
|
-
}
|
|
36
|
-
catch (e) {
|
|
37
|
-
getSession(view).notifyError(`${e}`, e);
|
|
38
|
-
console.error(e);
|
|
39
|
-
}
|
|
40
|
-
})();
|
|
41
|
-
}, children: "Submit" }), _jsx(Button, { onClick: handleClose, variant: "contained", color: "secondary", children: "Cancel" })] })] }));
|
|
42
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
-
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }: {
|
|
5
|
-
transcripts: Feature[];
|
|
6
|
-
view: LinearGenomeViewModel;
|
|
7
|
-
assembly: Assembly;
|
|
8
|
-
padding: number;
|
|
9
|
-
validPadding: boolean;
|
|
10
|
-
handleClose: () => void;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getSession, toLocale } from '@jbrowse/core/util';
|
|
3
|
-
import { Box, Button, Table, TableBody, TableCell, TableHead, TableRow, } from '@mui/material';
|
|
4
|
-
import { collapseIntrons, getExonsAndCDS } from "./util.js";
|
|
5
|
-
export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }) {
|
|
6
|
-
const sorted = [...transcripts].sort((a, b) => {
|
|
7
|
-
const lenA = a.get('end') - a.get('start');
|
|
8
|
-
const lenB = b.get('end') - b.get('start');
|
|
9
|
-
return lenB - lenA;
|
|
10
|
-
});
|
|
11
|
-
return (_jsx(Box, { sx: { maxHeight: 600, overflow: 'auto' }, children: _jsxs(Table, { size: "small", stickyHeader: true, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name/ID" }), _jsx(TableCell, { children: "Type" }), _jsx(TableCell, { align: "right", children: "Length" }), _jsx(TableCell, { align: "right", children: "Exons" }), _jsx(TableCell, { align: "right", children: "CDS" }), _jsx(TableCell, {})] }) }), _jsx(TableBody, { children: sorted.map((transcript, idx) => {
|
|
12
|
-
const start = transcript.get('start');
|
|
13
|
-
const end = transcript.get('end');
|
|
14
|
-
const name = transcript.get('name') ||
|
|
15
|
-
transcript.get('id') ||
|
|
16
|
-
`Transcript ${idx + 1}`;
|
|
17
|
-
const type = transcript.get('type') || 'transcript';
|
|
18
|
-
const exonsAndCDS = getExonsAndCDS([transcript]);
|
|
19
|
-
const exonCount = exonsAndCDS.filter(f => f.get('type') === 'exon').length;
|
|
20
|
-
const cdsCount = exonsAndCDS.length - exonCount;
|
|
21
|
-
return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: name }), _jsx(TableCell, { children: type }), _jsxs(TableCell, { align: "right", children: [toLocale(end - start), " bp"] }), _jsx(TableCell, { align: "right", children: exonCount }), _jsx(TableCell, { align: "right", children: cdsCount }), _jsx(TableCell, { align: "right", children: _jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validPadding, onClick: () => {
|
|
22
|
-
;
|
|
23
|
-
(async () => {
|
|
24
|
-
try {
|
|
25
|
-
await collapseIntrons({
|
|
26
|
-
view,
|
|
27
|
-
transcripts: [transcript],
|
|
28
|
-
assembly,
|
|
29
|
-
padding,
|
|
30
|
-
});
|
|
31
|
-
handleClose();
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
getSession(view).notifyError(`${e}`, e);
|
|
35
|
-
console.error(e);
|
|
36
|
-
}
|
|
37
|
-
})();
|
|
38
|
-
}, children: "Select" }) })] }, transcript.id()));
|
|
39
|
-
}) })] }) }));
|
|
40
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
-
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
export declare function getExonsAndCDS(transcripts: Feature[]): Feature[];
|
|
5
|
-
interface ViewState {
|
|
6
|
-
bpPerPx: number;
|
|
7
|
-
offsetPx: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function calculateInitialViewState(regions: {
|
|
10
|
-
start: number;
|
|
11
|
-
end: number;
|
|
12
|
-
}[], viewWidth: number): ViewState;
|
|
13
|
-
export declare function collapseIntrons({ view, transcripts, assembly, padding, }: {
|
|
14
|
-
view: LinearGenomeViewModel;
|
|
15
|
-
transcripts: Feature[];
|
|
16
|
-
assembly: Assembly;
|
|
17
|
-
padding: number;
|
|
18
|
-
}): Promise<void>;
|
|
19
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { getSession, mergeIntervals } from '@jbrowse/core/util';
|
|
2
|
-
import { getSnapshot } from '@jbrowse/mobx-state-tree';
|
|
3
|
-
import { when } from 'mobx';
|
|
4
|
-
export function getExonsAndCDS(transcripts) {
|
|
5
|
-
return transcripts.flatMap(transcript => transcript
|
|
6
|
-
.get('subfeatures')
|
|
7
|
-
?.filter(f => f.get('type') === 'exon' || f.get('type') === 'CDS') ??
|
|
8
|
-
[]);
|
|
9
|
-
}
|
|
10
|
-
export function calculateInitialViewState(regions, viewWidth) {
|
|
11
|
-
const totalBp = regions.reduce((sum, r) => sum + (r.end - r.start), 0);
|
|
12
|
-
const bpPerPx = totalBp / (viewWidth * 0.9);
|
|
13
|
-
const numPaddings = Math.max(0, regions.length - 1);
|
|
14
|
-
const interRegionPaddingWidth = 2;
|
|
15
|
-
const totalPaddingPx = numPaddings * interRegionPaddingWidth;
|
|
16
|
-
const totalContentPx = totalBp / bpPerPx + totalPaddingPx;
|
|
17
|
-
const centerPx = totalContentPx / 2;
|
|
18
|
-
const offsetPx = Math.round(centerPx - viewWidth / 2);
|
|
19
|
-
return { bpPerPx, offsetPx };
|
|
20
|
-
}
|
|
21
|
-
export async function collapseIntrons({ view, transcripts, assembly, padding, }) {
|
|
22
|
-
const r0 = transcripts[0]?.get('refName');
|
|
23
|
-
if (!r0) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const refName = assembly.getCanonicalRefName2(r0);
|
|
27
|
-
const subs = getExonsAndCDS(transcripts);
|
|
28
|
-
const snapshot = getSnapshot(view);
|
|
29
|
-
const { id, offsetPx, bpPerPx, ...rest } = snapshot;
|
|
30
|
-
const mergedRegions = mergeIntervals(subs.map(f => ({
|
|
31
|
-
refName,
|
|
32
|
-
start: f.get('start') - padding,
|
|
33
|
-
end: f.get('end') + padding,
|
|
34
|
-
assemblyName: view.assemblyNames[0],
|
|
35
|
-
})), padding);
|
|
36
|
-
const initialState = calculateInitialViewState(mergedRegions, view.width);
|
|
37
|
-
const newView = getSession(view).addView('LinearGenomeView', {
|
|
38
|
-
...rest,
|
|
39
|
-
tracks: rest.tracks.map(({ id, ...r }) => r),
|
|
40
|
-
displayedRegions: mergedRegions,
|
|
41
|
-
bpPerPx: initialState.bpPerPx,
|
|
42
|
-
offsetPx: initialState.offsetPx,
|
|
43
|
-
});
|
|
44
|
-
await when(() => newView.initialized);
|
|
45
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import { calculateFloatingLabelPosition } from "./util.js";
|
|
6
|
-
const useStyles = makeStyles()({
|
|
7
|
-
container: {
|
|
8
|
-
position: 'absolute',
|
|
9
|
-
top: 0,
|
|
10
|
-
left: 0,
|
|
11
|
-
width: '100%',
|
|
12
|
-
height: '100%',
|
|
13
|
-
pointerEvents: 'none',
|
|
14
|
-
zIndex: 5,
|
|
15
|
-
},
|
|
16
|
-
label: {
|
|
17
|
-
position: 'absolute',
|
|
18
|
-
fontSize: 11,
|
|
19
|
-
cursor: 'default',
|
|
20
|
-
pointerEvents: 'auto',
|
|
21
|
-
},
|
|
22
|
-
overlay: {
|
|
23
|
-
backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
|
24
|
-
lineHeight: 1,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
function FloatingLabel({ text, color, isOverlay, featureLeftPx, featureRightPx, featureId, subfeatureId, labelWidth, y, offsetPx, tooltip, labelClass, overlayClass, }) {
|
|
28
|
-
const x = calculateFloatingLabelPosition(featureLeftPx, featureRightPx, labelWidth, offsetPx);
|
|
29
|
-
return (_jsx("div", { "data-feature-id": featureId, "data-subfeature-id": subfeatureId, "data-tooltip": tooltip, className: isOverlay ? `${labelClass} ${overlayClass}` : labelClass, style: { color, transform: `translate(${x}px,${y}px)` }, children: text }));
|
|
30
|
-
}
|
|
31
|
-
const FloatingLabels = observer(function FloatingLabels({ model, }) {
|
|
32
|
-
const { classes } = useStyles();
|
|
33
|
-
const view = getContainingView(model);
|
|
34
|
-
const { offsetPx } = view;
|
|
35
|
-
const featureLabels = model.floatingLabelData;
|
|
36
|
-
const { onFeatureClick, onFeatureContextMenu, onMouseMove } = model.renderingProps();
|
|
37
|
-
const labels = [];
|
|
38
|
-
for (const [key, { leftPx, topPx, totalFeatureHeight, floatingLabels: labelData, featureWidth, },] of featureLabels.entries()) {
|
|
39
|
-
const featureVisualBottom = topPx + totalFeatureHeight;
|
|
40
|
-
const featureRightPx = leftPx + featureWidth;
|
|
41
|
-
for (let i = 0, l = labelData.length; i < l; i++) {
|
|
42
|
-
const floatingLabel = labelData[i];
|
|
43
|
-
const { text, relativeY, color, isOverlay, textWidth: labelWidth, parentFeatureId, subfeatureId, tooltip, } = floatingLabel;
|
|
44
|
-
const y = featureVisualBottom + relativeY;
|
|
45
|
-
const labelKey = `${key}-${i}`;
|
|
46
|
-
const featureId = parentFeatureId ?? key;
|
|
47
|
-
labels.push(_jsx(FloatingLabel, { text: text, color: color, isOverlay: isOverlay ?? false, featureLeftPx: leftPx, featureRightPx: featureRightPx, featureId: featureId, subfeatureId: subfeatureId, labelWidth: labelWidth, y: y, offsetPx: offsetPx, tooltip: tooltip, labelClass: classes.label, overlayClass: classes.overlay }, labelKey));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return (_jsx("div", { className: classes.container, onClick: e => {
|
|
51
|
-
const target = e.target;
|
|
52
|
-
const subfeatureId = target.dataset.subfeatureId;
|
|
53
|
-
const featureId = subfeatureId ?? target.dataset.featureId;
|
|
54
|
-
if (featureId) {
|
|
55
|
-
onFeatureClick?.(e, featureId);
|
|
56
|
-
}
|
|
57
|
-
}, onContextMenu: e => {
|
|
58
|
-
const target = e.target;
|
|
59
|
-
const subfeatureId = target.dataset.subfeatureId;
|
|
60
|
-
const featureId = subfeatureId ?? target.dataset.featureId;
|
|
61
|
-
if (featureId) {
|
|
62
|
-
onFeatureContextMenu?.(e, featureId);
|
|
63
|
-
}
|
|
64
|
-
}, onMouseOver: e => {
|
|
65
|
-
const target = e.target;
|
|
66
|
-
const featureId = target.dataset.featureId;
|
|
67
|
-
if (featureId) {
|
|
68
|
-
const tooltip = target.dataset.tooltip;
|
|
69
|
-
const subfeatureId = target.dataset.subfeatureId;
|
|
70
|
-
onMouseMove?.(e, featureId, tooltip);
|
|
71
|
-
model.setSubfeatureIdUnderMouse(subfeatureId);
|
|
72
|
-
}
|
|
73
|
-
}, children: labels }));
|
|
74
|
-
});
|
|
75
|
-
export default FloatingLabels;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
const useStyles = makeStyles()(theme => ({
|
|
5
|
-
legend: {
|
|
6
|
-
position: 'absolute',
|
|
7
|
-
right: 10,
|
|
8
|
-
top: 10,
|
|
9
|
-
background: theme.palette.background.paper,
|
|
10
|
-
padding: 3,
|
|
11
|
-
fontSize: 10,
|
|
12
|
-
pointerEvents: 'none',
|
|
13
|
-
zIndex: 100,
|
|
14
|
-
maxWidth: 200,
|
|
15
|
-
},
|
|
16
|
-
item: {
|
|
17
|
-
display: 'flex',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
marginBottom: 1,
|
|
20
|
-
'&:last-child': {
|
|
21
|
-
marginBottom: 0,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
colorBox: {
|
|
25
|
-
width: 12,
|
|
26
|
-
height: 12,
|
|
27
|
-
marginRight: 6,
|
|
28
|
-
flexShrink: 0,
|
|
29
|
-
},
|
|
30
|
-
label: {
|
|
31
|
-
whiteSpace: 'nowrap',
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
textOverflow: 'ellipsis',
|
|
34
|
-
},
|
|
35
|
-
}));
|
|
36
|
-
const FloatingLegend = observer(function FloatingLegend({ items, }) {
|
|
37
|
-
const { classes } = useStyles();
|
|
38
|
-
if (items.length === 0) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return (_jsx("div", { className: classes.legend, children: items.map((item, idx) => (_jsxs("div", { className: classes.item, children: [_jsx("div", { className: classes.colorBox, style: { backgroundColor: item.color } }), _jsx("span", { className: classes.label, children: item.label })] }, `${item.label}-${idx}`))) }));
|
|
42
|
-
});
|
|
43
|
-
export default FloatingLegend;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import RenderedBlocks from "./RenderedBlocks.js";
|
|
6
|
-
const useStyles = makeStyles()({
|
|
7
|
-
linearBlocks: {
|
|
8
|
-
whiteSpace: 'nowrap',
|
|
9
|
-
textAlign: 'left',
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
minHeight: '100%',
|
|
12
|
-
display: 'flex',
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
const LinearBlocks = observer(function LinearBlocks({ model, }) {
|
|
16
|
-
const { classes } = useStyles();
|
|
17
|
-
const { blockDefinitions } = model;
|
|
18
|
-
const viewModel = getContainingView(model);
|
|
19
|
-
return (_jsx("div", { className: classes.linearBlocks, style: {
|
|
20
|
-
left: blockDefinitions.offsetPx - viewModel.offsetPx,
|
|
21
|
-
}, children: _jsx(RenderedBlocks, { model: model }) }));
|
|
22
|
-
});
|
|
23
|
-
export default LinearBlocks;
|