@jbrowse/plugin-linear-genome-view 2.4.2 → 2.6.1
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/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -3
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +5 -5
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +7 -3
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -1
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +2 -2
- package/dist/BaseLinearDisplay/index.d.ts +5 -2
- package/dist/BaseLinearDisplay/index.js +7 -1
- package/dist/BaseLinearDisplay/index.js.map +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +107 -126
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +37 -352
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +190 -0
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +56 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +42 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +35 -1
- package/dist/BaseLinearDisplay/models/configSchema.js +10 -0
- package/dist/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/dist/BaseLinearDisplay/models/renderSvg.js +83 -0
- package/dist/BaseLinearDisplay/models/renderSvg.js.map +1 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +30 -22
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/dist/BaseLinearDisplay/models/util.d.ts +6 -2
- package/dist/BaseLinearDisplay/models/util.js +4 -4
- package/dist/BaseLinearDisplay/models/util.js.map +1 -1
- package/dist/BasicTrack/configSchema.d.ts +73 -1
- package/dist/BasicTrack/configSchema.js +1 -0
- package/dist/BasicTrack/configSchema.js.map +1 -1
- package/dist/FeatureTrack/configSchema.d.ts +73 -1
- package/dist/FeatureTrack/configSchema.js +1 -0
- package/dist/FeatureTrack/configSchema.js.map +1 -1
- package/dist/LinearBareDisplay/configSchema.d.ts +29 -1
- package/dist/LinearBareDisplay/configSchema.js +1 -0
- package/dist/LinearBareDisplay/configSchema.js.map +1 -1
- package/dist/LinearBareDisplay/model.d.ts +106 -42
- package/dist/LinearBareDisplay/model.js +3 -2
- package/dist/LinearBareDisplay/model.js.map +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -2
- package/dist/LinearBasicDisplay/configSchema.d.ts +29 -1
- package/dist/LinearBasicDisplay/configSchema.js +1 -9
- package/dist/LinearBasicDisplay/configSchema.js.map +1 -1
- package/dist/LinearBasicDisplay/model.d.ts +124 -62
- package/dist/LinearBasicDisplay/model.js +1 -0
- package/dist/LinearBasicDisplay/model.js.map +1 -1
- package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -2
- package/dist/LinearGenomeView/components/Cytobands.d.ts +24 -24
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +14 -16
- package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/Gridlines.d.ts +2 -2
- package/dist/LinearGenomeView/components/Header.d.ts +2 -2
- package/dist/LinearGenomeView/components/ImportForm.d.ts +2 -2
- package/dist/LinearGenomeView/components/ImportForm.js +4 -7
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +2 -2
- package/dist/LinearGenomeView/components/LinearGenomeView.js +28 -8
- package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
- package/dist/LinearGenomeView/components/MiniControls.d.ts +3 -3
- package/dist/LinearGenomeView/components/MiniControls.js +20 -40
- package/dist/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/dist/LinearGenomeView/components/OverviewScalebar.js +12 -5
- package/dist/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +22 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +52 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
- package/dist/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +111 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +59 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
- package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +2 -2
- package/dist/LinearGenomeView/components/SearchBox.d.ts +2 -2
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -4
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +6 -82
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +9 -0
- package/dist/LinearGenomeView/components/SearchResultsTable.js +83 -0
- package/dist/LinearGenomeView/components/SearchResultsTable.js.map +1 -0
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -4
- package/dist/LinearGenomeView/components/TrackContainer.js +17 -67
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackLabel.js +6 -10
- package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +32 -0
- package/dist/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +74 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +5 -7
- package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +2 -2
- package/dist/LinearGenomeView/components/ZoomControls.d.ts +2 -2
- package/dist/LinearGenomeView/components/util.js +1 -1
- package/dist/LinearGenomeView/components/util.js.map +1 -1
- package/dist/LinearGenomeView/model.d.ts +51 -37
- package/dist/LinearGenomeView/model.js +132 -209
- package/dist/LinearGenomeView/model.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -5
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -2
- package/dist/LinearGenomeView/util.d.ts +29 -0
- package/dist/LinearGenomeView/util.js +79 -1
- package/dist/LinearGenomeView/util.js.map +1 -1
- package/dist/index.d.ts +325 -180
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +5 -5
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +7 -3
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -1
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -2
- package/esm/BaseLinearDisplay/index.d.ts +5 -2
- package/esm/BaseLinearDisplay/index.js +3 -0
- package/esm/BaseLinearDisplay/index.js.map +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +107 -126
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +39 -331
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +184 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +53 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +39 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +35 -1
- package/esm/BaseLinearDisplay/models/configSchema.js +10 -0
- package/esm/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/esm/BaseLinearDisplay/models/renderSvg.js +54 -0
- package/esm/BaseLinearDisplay/models/renderSvg.js.map +1 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +30 -22
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/esm/BaseLinearDisplay/models/util.d.ts +6 -2
- package/esm/BaseLinearDisplay/models/util.js +2 -2
- package/esm/BaseLinearDisplay/models/util.js.map +1 -1
- package/esm/BasicTrack/configSchema.d.ts +73 -1
- package/esm/BasicTrack/configSchema.js +1 -0
- package/esm/BasicTrack/configSchema.js.map +1 -1
- package/esm/FeatureTrack/configSchema.d.ts +73 -1
- package/esm/FeatureTrack/configSchema.js +1 -0
- package/esm/FeatureTrack/configSchema.js.map +1 -1
- package/esm/LinearBareDisplay/configSchema.d.ts +29 -1
- package/esm/LinearBareDisplay/configSchema.js +1 -0
- package/esm/LinearBareDisplay/configSchema.js.map +1 -1
- package/esm/LinearBareDisplay/model.d.ts +106 -42
- package/esm/LinearBareDisplay/model.js +2 -1
- package/esm/LinearBareDisplay/model.js.map +1 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -2
- package/esm/LinearBasicDisplay/configSchema.d.ts +29 -1
- package/esm/LinearBasicDisplay/configSchema.js +1 -9
- package/esm/LinearBasicDisplay/configSchema.js.map +1 -1
- package/esm/LinearBasicDisplay/model.d.ts +124 -62
- package/esm/LinearBasicDisplay/model.js +1 -0
- package/esm/LinearBasicDisplay/model.js.map +1 -1
- package/esm/LinearGenomeView/components/CenterLine.d.ts +2 -2
- package/esm/LinearGenomeView/components/Cytobands.d.ts +24 -24
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +15 -17
- package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/Gridlines.d.ts +2 -2
- package/esm/LinearGenomeView/components/Header.d.ts +2 -2
- package/esm/LinearGenomeView/components/ImportForm.d.ts +2 -2
- package/esm/LinearGenomeView/components/ImportForm.js +5 -8
- package/esm/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +2 -2
- package/esm/LinearGenomeView/components/LinearGenomeView.js +4 -7
- package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
- package/esm/LinearGenomeView/components/MiniControls.d.ts +3 -3
- package/esm/LinearGenomeView/components/MiniControls.js +20 -17
- package/esm/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +12 -5
- package/esm/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +16 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +23 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
- package/esm/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +83 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +50 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +2 -2
- package/esm/LinearGenomeView/components/SearchBox.d.ts +2 -2
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -4
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +7 -83
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchResultsTable.js +77 -0
- package/esm/LinearGenomeView/components/SearchResultsTable.js.map +1 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +3 -4
- package/esm/LinearGenomeView/components/TrackContainer.js +18 -68
- package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackLabel.js +6 -10
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +27 -0
- package/esm/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +49 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +5 -7
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -2
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +2 -2
- package/esm/LinearGenomeView/components/util.js +1 -1
- package/esm/LinearGenomeView/components/util.js.map +1 -1
- package/esm/LinearGenomeView/model.d.ts +51 -37
- package/esm/LinearGenomeView/model.js +129 -206
- package/esm/LinearGenomeView/model.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -5
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -2
- package/esm/LinearGenomeView/util.d.ts +29 -0
- package/esm/LinearGenomeView/util.js +76 -0
- package/esm/LinearGenomeView/util.js.map +1 -1
- package/esm/index.d.ts +325 -180
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/BaseLinearDisplay/components/TooLargeMessage.tsx +10 -6
- package/src/BaseLinearDisplay/index.ts +5 -1
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +50 -401
- package/src/BaseLinearDisplay/models/FeatureDensityMixin.tsx +213 -0
- package/src/BaseLinearDisplay/models/TrackHeightMixin.tsx +59 -0
- package/src/BaseLinearDisplay/models/autorunFeatureDensityStats.ts +46 -0
- package/src/BaseLinearDisplay/models/configSchema.ts +11 -0
- package/src/BaseLinearDisplay/models/renderSvg.tsx +101 -0
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +40 -32
- package/src/BaseLinearDisplay/models/util.ts +10 -4
- package/src/BasicTrack/configSchema.ts +1 -0
- package/src/FeatureTrack/configSchema.ts +1 -0
- package/src/LinearBareDisplay/configSchema.ts +1 -0
- package/src/LinearBareDisplay/model.ts +2 -1
- package/src/LinearBasicDisplay/configSchema.ts +1 -10
- package/src/LinearBasicDisplay/model.ts +1 -0
- package/src/LinearGenomeView/components/GetSequenceDialog.tsx +15 -25
- package/src/LinearGenomeView/components/ImportForm.tsx +4 -14
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +3 -3
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +6 -17
- package/src/LinearGenomeView/components/MiniControls.tsx +37 -38
- package/src/LinearGenomeView/components/OverviewScalebar.tsx +13 -6
- package/src/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.tsx +53 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.tsx +44 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/index.tsx +160 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/util.ts +65 -0
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +17 -112
- package/src/LinearGenomeView/components/SearchResultsTable.tsx +121 -0
- package/src/LinearGenomeView/components/TrackContainer.tsx +25 -104
- package/src/LinearGenomeView/components/TrackLabel.tsx +7 -27
- package/src/LinearGenomeView/components/TrackLabelContainer.tsx +48 -0
- package/src/LinearGenomeView/components/TrackRenderingContainer.tsx +96 -0
- package/src/LinearGenomeView/components/TracksContainer.tsx +9 -6
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +14 -14
- package/src/LinearGenomeView/components/util.ts +2 -1
- package/src/LinearGenomeView/index.test.ts +10 -12
- package/src/LinearGenomeView/model.ts +175 -247
- package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +8 -6
- package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +1 -1
- package/src/LinearGenomeView/util.ts +98 -0
- package/src/index.ts +11 -5
- package/dist/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +0 -182
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/esm/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +0 -154
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +0 -279
- /package/dist/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
- /package/esm/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
- /package/src/LinearGenomeView/components/{HelpDialog.tsx → RefNameAutocomplete/HelpDialog.tsx} +0 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { getConf } from '@jbrowse/core/configuration'
|
|
4
|
+
import { getContainingView } from '@jbrowse/core/util'
|
|
5
|
+
import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
6
|
+
import { Region } from '@jbrowse/core/util/types'
|
|
7
|
+
import { autorun } from 'mobx'
|
|
8
|
+
import { addDisposer, isAlive, types } from 'mobx-state-tree'
|
|
9
|
+
|
|
10
|
+
// locals
|
|
11
|
+
import { LinearGenomeViewModel } from '../../LinearGenomeView'
|
|
12
|
+
import TooLargeMessage from '../components/TooLargeMessage'
|
|
13
|
+
import { getDisplayStr, getFeatureDensityStatsPre } from './util'
|
|
14
|
+
import autorunFeatureDensityStats from './autorunFeatureDensityStats'
|
|
15
|
+
|
|
16
|
+
type LGV = LinearGenomeViewModel
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* #stateModel FeatureDensityMixin
|
|
20
|
+
* #category display
|
|
21
|
+
*/
|
|
22
|
+
export default function FeatureDensityMixin() {
|
|
23
|
+
return types
|
|
24
|
+
.model({
|
|
25
|
+
/**
|
|
26
|
+
* #property
|
|
27
|
+
*/
|
|
28
|
+
userBpPerPxLimit: types.maybe(types.number),
|
|
29
|
+
/**
|
|
30
|
+
* #property
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
userByteSizeLimit: types.maybe(types.number),
|
|
34
|
+
})
|
|
35
|
+
.volatile(() => ({
|
|
36
|
+
featureDensityStatsP: undefined as
|
|
37
|
+
| undefined
|
|
38
|
+
| Promise<FeatureDensityStats>,
|
|
39
|
+
featureDensityStats: undefined as undefined | FeatureDensityStats,
|
|
40
|
+
currStatsBpPerPx: 0,
|
|
41
|
+
}))
|
|
42
|
+
.views(self => ({
|
|
43
|
+
/**
|
|
44
|
+
* #getter
|
|
45
|
+
*/
|
|
46
|
+
get currentBytesRequested() {
|
|
47
|
+
return self.featureDensityStats?.bytes || 0
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* #getter
|
|
52
|
+
*/
|
|
53
|
+
get currentFeatureScreenDensity() {
|
|
54
|
+
const view = getContainingView(self) as LGV
|
|
55
|
+
return (self.featureDensityStats?.featureDensity || 0) * view.bpPerPx
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* #getter
|
|
60
|
+
*/
|
|
61
|
+
get maxFeatureScreenDensity() {
|
|
62
|
+
// @ts-expect-error
|
|
63
|
+
return getConf(self, 'maxFeatureScreenDensity')
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* #getter
|
|
67
|
+
*/
|
|
68
|
+
get featureDensityStatsReady() {
|
|
69
|
+
const view = getContainingView(self)
|
|
70
|
+
return (
|
|
71
|
+
self.currStatsBpPerPx === view.bpPerPx &&
|
|
72
|
+
(!!self.featureDensityStats || !!self.userBpPerPxLimit)
|
|
73
|
+
)
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* #getter
|
|
78
|
+
*/
|
|
79
|
+
get maxAllowableBytes() {
|
|
80
|
+
return (
|
|
81
|
+
self.userByteSizeLimit ||
|
|
82
|
+
self.featureDensityStats?.fetchSizeLimit ||
|
|
83
|
+
// @ts-expect-error
|
|
84
|
+
(getConf(self, 'fetchSizeLimit') as number)
|
|
85
|
+
)
|
|
86
|
+
},
|
|
87
|
+
}))
|
|
88
|
+
.actions(self => ({
|
|
89
|
+
afterAttach() {
|
|
90
|
+
addDisposer(
|
|
91
|
+
self,
|
|
92
|
+
autorun(() => autorunFeatureDensityStats(self as any)),
|
|
93
|
+
)
|
|
94
|
+
},
|
|
95
|
+
}))
|
|
96
|
+
.actions(self => ({
|
|
97
|
+
/**
|
|
98
|
+
* #action
|
|
99
|
+
*/
|
|
100
|
+
setCurrStatsBpPerPx(n: number) {
|
|
101
|
+
self.currStatsBpPerPx = n
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* #action
|
|
105
|
+
*/
|
|
106
|
+
setFeatureDensityStatsLimit(stats?: FeatureDensityStats) {
|
|
107
|
+
const view = getContainingView(self) as LGV
|
|
108
|
+
if (stats?.bytes) {
|
|
109
|
+
self.userByteSizeLimit = stats.bytes
|
|
110
|
+
} else {
|
|
111
|
+
self.userBpPerPxLimit = view.bpPerPx
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* #action
|
|
116
|
+
*/
|
|
117
|
+
async getFeatureDensityStats() {
|
|
118
|
+
if (!self.featureDensityStatsP) {
|
|
119
|
+
self.featureDensityStatsP = getFeatureDensityStatsPre(
|
|
120
|
+
self as any,
|
|
121
|
+
).catch(e => {
|
|
122
|
+
if (isAlive(self)) {
|
|
123
|
+
this.setFeatureDensityStatsP(undefined)
|
|
124
|
+
}
|
|
125
|
+
throw e
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
return self.featureDensityStatsP
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* #action
|
|
133
|
+
*/
|
|
134
|
+
setFeatureDensityStatsP(arg: any) {
|
|
135
|
+
self.featureDensityStatsP = arg
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* #action
|
|
140
|
+
*/
|
|
141
|
+
setFeatureDensityStats(featureDensityStats?: FeatureDensityStats) {
|
|
142
|
+
self.featureDensityStats = featureDensityStats
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* #action
|
|
146
|
+
*/
|
|
147
|
+
clearFeatureDensityStats() {
|
|
148
|
+
self.featureDensityStatsP = undefined
|
|
149
|
+
self.featureDensityStats = undefined
|
|
150
|
+
},
|
|
151
|
+
}))
|
|
152
|
+
.views(self => ({
|
|
153
|
+
/**
|
|
154
|
+
* #getter
|
|
155
|
+
* region is too large if:
|
|
156
|
+
* - stats are ready
|
|
157
|
+
* - region is greater than 20kb (don't warn when zoomed in less than that)
|
|
158
|
+
* - and bytes is greater than max allowed bytes or density greater than max
|
|
159
|
+
* density
|
|
160
|
+
*/
|
|
161
|
+
get regionTooLarge() {
|
|
162
|
+
const view = getContainingView(self) as LGV
|
|
163
|
+
if (
|
|
164
|
+
!self.featureDensityStatsReady ||
|
|
165
|
+
view.dynamicBlocks.totalBp < 20_000
|
|
166
|
+
) {
|
|
167
|
+
return false
|
|
168
|
+
}
|
|
169
|
+
return (
|
|
170
|
+
self.currentBytesRequested > self.maxAllowableBytes ||
|
|
171
|
+
(self.userBpPerPxLimit
|
|
172
|
+
? view.bpPerPx > self.userBpPerPxLimit
|
|
173
|
+
: self.currentFeatureScreenDensity > self.maxFeatureScreenDensity)
|
|
174
|
+
)
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* #getter
|
|
179
|
+
* only shows a message of bytes requested is defined, the feature density
|
|
180
|
+
* based stats don't produce any helpful message besides to zoom in
|
|
181
|
+
*/
|
|
182
|
+
get regionTooLargeReason() {
|
|
183
|
+
const req = self.currentBytesRequested
|
|
184
|
+
const max = self.maxAllowableBytes
|
|
185
|
+
|
|
186
|
+
return req && req > max
|
|
187
|
+
? `Requested too much data (${getDisplayStr(req)})`
|
|
188
|
+
: ''
|
|
189
|
+
},
|
|
190
|
+
}))
|
|
191
|
+
.views(self => ({
|
|
192
|
+
/**
|
|
193
|
+
* #method
|
|
194
|
+
*/
|
|
195
|
+
regionCannotBeRenderedText(_region: Region) {
|
|
196
|
+
return self.regionTooLarge ? 'Force load to see features' : ''
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* #method
|
|
201
|
+
* @param region -
|
|
202
|
+
* @returns falsy if the region is fine to try rendering. Otherwise,
|
|
203
|
+
* return a react node + string of text.
|
|
204
|
+
* string of text describes why it cannot be rendered
|
|
205
|
+
* react node allows user to force load at current setting
|
|
206
|
+
*/
|
|
207
|
+
regionCannotBeRendered(_region: Region) {
|
|
208
|
+
return self.regionTooLarge ? (
|
|
209
|
+
<TooLargeMessage model={self as any} />
|
|
210
|
+
) : null
|
|
211
|
+
},
|
|
212
|
+
}))
|
|
213
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { getConf } from '@jbrowse/core/configuration'
|
|
2
|
+
import { types } from 'mobx-state-tree'
|
|
3
|
+
|
|
4
|
+
const minDisplayHeight = 20
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* #stateModel TrackHeightMixin
|
|
8
|
+
* #category display
|
|
9
|
+
*/
|
|
10
|
+
export default function TrackHeightMixin() {
|
|
11
|
+
return types
|
|
12
|
+
.model({
|
|
13
|
+
/**
|
|
14
|
+
* #property
|
|
15
|
+
*/
|
|
16
|
+
heightPreConfig: types.maybe(
|
|
17
|
+
types.refinement(
|
|
18
|
+
'displayHeight',
|
|
19
|
+
types.number,
|
|
20
|
+
n => n >= minDisplayHeight,
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
})
|
|
24
|
+
.volatile(() => ({
|
|
25
|
+
/**
|
|
26
|
+
* #property
|
|
27
|
+
*/
|
|
28
|
+
scrollTop: 0,
|
|
29
|
+
}))
|
|
30
|
+
.views(self => ({
|
|
31
|
+
get height() {
|
|
32
|
+
// @ts-expect-error
|
|
33
|
+
return self.heightPreConfig ?? (getConf(self, 'height') as number)
|
|
34
|
+
},
|
|
35
|
+
}))
|
|
36
|
+
.actions(self => ({
|
|
37
|
+
/**
|
|
38
|
+
* #action
|
|
39
|
+
*/
|
|
40
|
+
setScrollTop(scrollTop: number) {
|
|
41
|
+
self.scrollTop = scrollTop
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* #action
|
|
45
|
+
*/
|
|
46
|
+
setHeight(displayHeight: number) {
|
|
47
|
+
self.heightPreConfig = Math.max(displayHeight, minDisplayHeight)
|
|
48
|
+
return self.height
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* #action
|
|
52
|
+
*/
|
|
53
|
+
resizeHeight(distance: number) {
|
|
54
|
+
const oldHeight = self.height
|
|
55
|
+
const newHeight = this.setHeight(self.height + distance)
|
|
56
|
+
return newHeight - oldHeight
|
|
57
|
+
},
|
|
58
|
+
}))
|
|
59
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getContainingView, isAbortException } from '@jbrowse/core/util'
|
|
2
|
+
import { LinearGenomeViewModel } from '../../LinearGenomeView'
|
|
3
|
+
import { isAlive } from 'mobx-state-tree'
|
|
4
|
+
import { BaseLinearDisplayModel } from './BaseLinearDisplayModel'
|
|
5
|
+
|
|
6
|
+
// stats estimation autorun calls getFeatureDensityStats against the data
|
|
7
|
+
// adapter which by default uses featureDensity, but can also respond with a
|
|
8
|
+
// byte size estimate and fetch size limit (data adapter can define what is too
|
|
9
|
+
// much data)
|
|
10
|
+
export default async function autorunFeatureDensityStats(
|
|
11
|
+
self: BaseLinearDisplayModel,
|
|
12
|
+
) {
|
|
13
|
+
try {
|
|
14
|
+
const view = getContainingView(self) as LinearGenomeViewModel
|
|
15
|
+
|
|
16
|
+
// extra check for contentBlocks.length
|
|
17
|
+
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
18
|
+
if (
|
|
19
|
+
!view.initialized ||
|
|
20
|
+
!view.staticBlocks.contentBlocks.length ||
|
|
21
|
+
view.bpPerPx === self.currStatsBpPerPx ||
|
|
22
|
+
self.error
|
|
23
|
+
) {
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// don't re-estimate featureDensity even if zoom level changes,
|
|
28
|
+
// jbrowse1-style assume it's sort of representative
|
|
29
|
+
if (self.featureDensityStats?.featureDensity !== undefined) {
|
|
30
|
+
self.setCurrStatsBpPerPx(view.bpPerPx)
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
self.clearFeatureDensityStats()
|
|
35
|
+
self.setCurrStatsBpPerPx(view.bpPerPx)
|
|
36
|
+
const stats = await self.getFeatureDensityStats()
|
|
37
|
+
if (isAlive(self)) {
|
|
38
|
+
self.setFeatureDensityStats(stats)
|
|
39
|
+
}
|
|
40
|
+
} catch (e) {
|
|
41
|
+
if (!isAbortException(e) && isAlive(self)) {
|
|
42
|
+
console.error(e)
|
|
43
|
+
self.setError(e)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -2,6 +2,7 @@ import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* #config BaseLinearDisplay
|
|
5
|
+
* #category display
|
|
5
6
|
* `BaseLinearDisplay` is a "base" config that is extended by classes like
|
|
6
7
|
* `LinearBasicDisplay` (used for feature tracks, etc) and `LinearBareDisplay`
|
|
7
8
|
* (more stripped down than even the basic display, not commonly used)
|
|
@@ -37,6 +38,16 @@ const baseLinearDisplayConfigSchema = ConfigurationSchema(
|
|
|
37
38
|
defaultValue: 100,
|
|
38
39
|
description: 'default height for the track',
|
|
39
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* #slot
|
|
43
|
+
*/
|
|
44
|
+
mouseover: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'text to display when the cursor hovers over a feature',
|
|
47
|
+
defaultValue: `jexl:get(feature,'name')`,
|
|
48
|
+
|
|
49
|
+
contextVariable: ['feature'],
|
|
50
|
+
},
|
|
40
51
|
},
|
|
41
52
|
{
|
|
42
53
|
/**
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { ThemeOptions } from '@mui/material'
|
|
3
|
+
import {
|
|
4
|
+
getContainingView,
|
|
5
|
+
getViewParams,
|
|
6
|
+
ReactRendering,
|
|
7
|
+
} from '@jbrowse/core/util'
|
|
8
|
+
|
|
9
|
+
// locals
|
|
10
|
+
import { ExportSvgOptions, LinearGenomeViewModel } from '../../LinearGenomeView'
|
|
11
|
+
import BlockState, { renderBlockData } from './serverSideRenderedBlock'
|
|
12
|
+
import { getId } from './util'
|
|
13
|
+
|
|
14
|
+
import { BaseLinearDisplayModel } from './BaseLinearDisplayModel'
|
|
15
|
+
|
|
16
|
+
export default async function renderBaseLinearDisplaySvg(
|
|
17
|
+
self: BaseLinearDisplayModel,
|
|
18
|
+
opts: ExportSvgOptions & {
|
|
19
|
+
overrideHeight: number
|
|
20
|
+
theme: ThemeOptions
|
|
21
|
+
},
|
|
22
|
+
) {
|
|
23
|
+
const { height, id } = self
|
|
24
|
+
const { overrideHeight } = opts
|
|
25
|
+
const view = getContainingView(self) as LinearGenomeViewModel
|
|
26
|
+
const { offsetPx: viewOffsetPx, roundedDynamicBlocks, width } = view
|
|
27
|
+
const renderings = await Promise.all(
|
|
28
|
+
roundedDynamicBlocks.map(async block => {
|
|
29
|
+
const blockState = BlockState.create({
|
|
30
|
+
key: block.key,
|
|
31
|
+
region: block,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
// regionCannotBeRendered can return jsx so look for plaintext
|
|
35
|
+
// version, or just get the default if none available
|
|
36
|
+
const cannotBeRenderedReason =
|
|
37
|
+
self.regionCannotBeRenderedText(block) ||
|
|
38
|
+
self.regionCannotBeRendered(block)
|
|
39
|
+
|
|
40
|
+
if (cannotBeRenderedReason) {
|
|
41
|
+
return [
|
|
42
|
+
block,
|
|
43
|
+
{
|
|
44
|
+
reactElement: (
|
|
45
|
+
<>
|
|
46
|
+
<rect x={0} y={0} width={width} height={20} fill="#aaa" />
|
|
47
|
+
<text x={0} y={15}>
|
|
48
|
+
{cannotBeRenderedReason}
|
|
49
|
+
</text>
|
|
50
|
+
</>
|
|
51
|
+
),
|
|
52
|
+
},
|
|
53
|
+
] as const
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const { rpcManager, renderArgs, renderProps, rendererType } =
|
|
57
|
+
renderBlockData(blockState, self)
|
|
58
|
+
|
|
59
|
+
return [
|
|
60
|
+
block,
|
|
61
|
+
await rendererType.renderInClient(rpcManager, {
|
|
62
|
+
...renderArgs,
|
|
63
|
+
...renderProps,
|
|
64
|
+
viewParams: getViewParams(self, true),
|
|
65
|
+
exportSVG: opts,
|
|
66
|
+
theme: opts.theme || renderProps.theme,
|
|
67
|
+
}),
|
|
68
|
+
] as const
|
|
69
|
+
}),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
{renderings.map(([block, rendering], index) => {
|
|
75
|
+
const { offsetPx, widthPx } = block
|
|
76
|
+
const offset = offsetPx - viewOffsetPx
|
|
77
|
+
const clipid = getId(id, index)
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<React.Fragment key={`frag-${index}`}>
|
|
81
|
+
<defs>
|
|
82
|
+
<clipPath id={clipid}>
|
|
83
|
+
<rect
|
|
84
|
+
x={0}
|
|
85
|
+
y={0}
|
|
86
|
+
width={widthPx}
|
|
87
|
+
height={overrideHeight || height}
|
|
88
|
+
/>
|
|
89
|
+
</clipPath>
|
|
90
|
+
</defs>
|
|
91
|
+
<g transform={`translate(${offset} 0)`}>
|
|
92
|
+
<g clipPath={`url(#${clipid})`}>
|
|
93
|
+
<ReactRendering rendering={rendering} />
|
|
94
|
+
</g>
|
|
95
|
+
</g>
|
|
96
|
+
</React.Fragment>
|
|
97
|
+
)
|
|
98
|
+
})}
|
|
99
|
+
</>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
@@ -63,19 +63,25 @@ const blockState = types
|
|
|
63
63
|
},
|
|
64
64
|
afterAttach() {
|
|
65
65
|
const display = getContainingDisplay(self)
|
|
66
|
-
|
|
67
|
-
self
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
if (isAlive(self)) {
|
|
68
|
+
makeAbortableReaction(
|
|
69
|
+
self as any,
|
|
70
|
+
renderBlockData,
|
|
71
|
+
renderBlockEffect, // reaction doesn't expect async here
|
|
72
|
+
{
|
|
73
|
+
name: `${display.id}/${assembleLocString(
|
|
74
|
+
self.region,
|
|
75
|
+
)} rendering`,
|
|
76
|
+
delay: display.renderDelay,
|
|
77
|
+
fireImmediately: true,
|
|
78
|
+
},
|
|
79
|
+
this.setLoading,
|
|
80
|
+
this.setRendered,
|
|
81
|
+
this.setError,
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
}, display.renderDelay)
|
|
79
85
|
},
|
|
80
86
|
setStatus(message: string) {
|
|
81
87
|
self.status = message
|
|
@@ -175,25 +181,27 @@ const blockState = types
|
|
|
175
181
|
getParent<any>(self, 2).reload()
|
|
176
182
|
},
|
|
177
183
|
beforeDestroy() {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
184
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
185
|
+
;(async () => {
|
|
186
|
+
try {
|
|
187
|
+
if (renderInProgress && !renderInProgress.signal.aborted) {
|
|
188
|
+
renderInProgress.abort()
|
|
189
|
+
}
|
|
190
|
+
const display = getContainingDisplay(self)
|
|
191
|
+
const { rpcManager } = getSession(self)
|
|
192
|
+
const { rendererType } = display
|
|
193
|
+
const { renderArgs } = renderBlockData(cast(self))
|
|
194
|
+
// renderArgs can be undefined if an error occurred in this block
|
|
195
|
+
if (renderArgs) {
|
|
196
|
+
await rendererType.freeResourcesInClient(
|
|
197
|
+
rpcManager,
|
|
198
|
+
JSON.parse(JSON.stringify(renderArgs)),
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
} catch (e) {
|
|
202
|
+
console.error('Error while destroying block', e)
|
|
203
|
+
}
|
|
204
|
+
})()
|
|
197
205
|
},
|
|
198
206
|
}
|
|
199
207
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyConfigurationModel } from '@jbrowse/core/configuration'
|
|
2
|
+
import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
2
3
|
import { getContainingView, getSession } from '@jbrowse/core/util'
|
|
3
4
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks'
|
|
4
5
|
import { IAnyStateTreeNode, isAlive } from 'mobx-state-tree'
|
|
@@ -35,7 +36,12 @@ export function getId(id: string, index: number) {
|
|
|
35
36
|
return `clip-${isJest ? id : 'jest'}-${index}`
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
export async function
|
|
39
|
+
export async function getFeatureDensityStatsPre(
|
|
40
|
+
self: IAnyStateTreeNode & {
|
|
41
|
+
adapterConfig?: AnyConfigurationModel
|
|
42
|
+
setMessage: (arg: string) => void
|
|
43
|
+
},
|
|
44
|
+
) {
|
|
39
45
|
const view = getContainingView(self) as LinearGenomeViewModel
|
|
40
46
|
const regions = view.staticBlocks.contentBlocks
|
|
41
47
|
|
|
@@ -48,7 +54,7 @@ export async function estimateRegionsStatsPre(self: IAnyStateTreeNode) {
|
|
|
48
54
|
}
|
|
49
55
|
const sessionId = getRpcSessionId(self)
|
|
50
56
|
|
|
51
|
-
return rpcManager.call(sessionId, '
|
|
57
|
+
return rpcManager.call(sessionId, 'CoreGetFeatureDensityStats', {
|
|
52
58
|
sessionId,
|
|
53
59
|
regions,
|
|
54
60
|
adapterConfig,
|
|
@@ -57,5 +63,5 @@ export async function estimateRegionsStatsPre(self: IAnyStateTreeNode) {
|
|
|
57
63
|
self.setMessage(message)
|
|
58
64
|
}
|
|
59
65
|
},
|
|
60
|
-
}) as Promise<
|
|
66
|
+
}) as Promise<FeatureDensityStats>
|
|
61
67
|
}
|
|
@@ -4,6 +4,7 @@ import PluginManager from '@jbrowse/core/PluginManager'
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* #config FeatureTrack
|
|
7
|
+
* #category track
|
|
7
8
|
* used for basic gene and feature tracks, generally used with LinearBasicDisplay
|
|
8
9
|
*/
|
|
9
10
|
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnyConfigurationSchemaType,
|
|
3
3
|
ConfigurationReference,
|
|
4
|
-
} from '@jbrowse/core/configuration
|
|
4
|
+
} from '@jbrowse/core/configuration'
|
|
5
5
|
import { getParentRenderProps } from '@jbrowse/core/util/tracks'
|
|
6
6
|
import { types } from 'mobx-state-tree'
|
|
7
7
|
import { BaseLinearDisplay } from '../BaseLinearDisplay'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* #stateModel LinearBareDisplay
|
|
11
|
+
* #category display
|
|
11
12
|
* extends `BaseLinearDisplay`
|
|
12
13
|
*/
|
|
13
14
|
export function stateModelFactory(configSchema: AnyConfigurationSchemaType) {
|
|
@@ -4,21 +4,12 @@ import { baseLinearDisplayConfigSchema } from '../BaseLinearDisplay'
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* #config LinearBasicDisplay
|
|
7
|
+
* #category display
|
|
7
8
|
*/
|
|
8
9
|
function configSchemaFactory(pluginManager: PluginManager) {
|
|
9
10
|
return ConfigurationSchema(
|
|
10
11
|
'LinearBasicDisplay',
|
|
11
12
|
{
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
*/
|
|
15
|
-
mouseover: {
|
|
16
|
-
type: 'string',
|
|
17
|
-
description: 'what to display in a given mouseover',
|
|
18
|
-
defaultValue: `jexl:get(feature,'name')`,
|
|
19
|
-
|
|
20
|
-
contextVariable: ['feature'],
|
|
21
|
-
},
|
|
22
13
|
/**
|
|
23
14
|
* #slot
|
|
24
15
|
*/
|