@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
|
@@ -2,8 +2,7 @@ import { lazy } from 'react';
|
|
|
2
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
3
|
import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
4
4
|
import { ElementId, Region as MUIRegion } from '@jbrowse/core/util/types/mst';
|
|
5
|
-
import {
|
|
6
|
-
import { assembleLocString, clamp, findLastIndex, getContainingView, getSession, isViewContainer, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetItem, measureText, parseLocString, springAnimate, sum, } from '@jbrowse/core/util';
|
|
5
|
+
import { assembleLocString, clamp, findLast, getContainingView, getSession, isViewContainer, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
|
|
7
6
|
import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
|
|
8
7
|
import calculateStaticBlocks from '@jbrowse/core/util/calculateStaticBlocks';
|
|
9
8
|
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
@@ -22,13 +21,15 @@ import FolderOpenIcon from '@mui/icons-material/FolderOpen';
|
|
|
22
21
|
import PhotoCameraIcon from '@mui/icons-material/PhotoCamera';
|
|
23
22
|
import ZoomInIcon from '@mui/icons-material/ZoomIn';
|
|
24
23
|
import MenuOpenIcon from '@mui/icons-material/MenuOpen';
|
|
25
|
-
// locals
|
|
26
|
-
import { renderToSvg } from './svgcomponents/SVGLinearGenomeView';
|
|
27
|
-
import ExportSvgDlg from './components/ExportSvgDialog';
|
|
28
24
|
import MiniControls from './components/MiniControls';
|
|
29
25
|
import Header from './components/Header';
|
|
26
|
+
import { generateLocations, parseLocStrings } from './util';
|
|
30
27
|
// lazies
|
|
28
|
+
const ReturnToImportFormDialog = lazy(() => import('@jbrowse/core/ui/ReturnToImportFormDialog'));
|
|
31
29
|
const SequenceSearchDialog = lazy(() => import('./components/SequenceSearchDialog'));
|
|
30
|
+
const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
|
|
31
|
+
const GetSequenceDialog = lazy(() => import('./components/GetSequenceDialog'));
|
|
32
|
+
const SearchResultsDialog = lazy(() => import('./components/SearchResultsDialog'));
|
|
32
33
|
function calculateVisibleLocStrings(contentBlocks) {
|
|
33
34
|
if (!contentBlocks.length) {
|
|
34
35
|
return '';
|
|
@@ -51,6 +52,7 @@ export const SPACING = 7;
|
|
|
51
52
|
export const WIDGET_HEIGHT = 32;
|
|
52
53
|
/**
|
|
53
54
|
* #stateModel LinearGenomeView
|
|
55
|
+
* #category view
|
|
54
56
|
*/
|
|
55
57
|
export function stateModelFactory(pluginManager) {
|
|
56
58
|
return types
|
|
@@ -108,7 +110,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
108
110
|
trackSelectorType: types.optional(types.enumeration(['hierarchical']), 'hierarchical'),
|
|
109
111
|
/**
|
|
110
112
|
* #property
|
|
111
|
-
* how to display the track labels, can be "overlapping", "offset", or
|
|
113
|
+
* how to display the track labels, can be "overlapping", "offset", or
|
|
114
|
+
* "hidden"
|
|
112
115
|
*/
|
|
113
116
|
trackLabels: types.optional(types.string, () => localStorageGetItem('lgv-trackLabels') || 'overlapping'),
|
|
114
117
|
/**
|
|
@@ -136,15 +139,11 @@ export function stateModelFactory(pluginManager) {
|
|
|
136
139
|
// which is basically like an onLoad
|
|
137
140
|
afterDisplayedRegionsSetCallbacks: [],
|
|
138
141
|
scaleFactor: 1,
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
140
142
|
trackRefs: {},
|
|
141
143
|
coarseDynamicBlocks: [],
|
|
142
144
|
coarseTotalBp: 0,
|
|
143
145
|
leftOffset: undefined,
|
|
144
146
|
rightOffset: undefined,
|
|
145
|
-
searchResults: undefined,
|
|
146
|
-
searchQuery: undefined,
|
|
147
|
-
seqDialogDisplayed: false,
|
|
148
147
|
}))
|
|
149
148
|
.views(self => ({
|
|
150
149
|
/**
|
|
@@ -217,12 +216,6 @@ export function stateModelFactory(pluginManager) {
|
|
|
217
216
|
get hasDisplayedRegions() {
|
|
218
217
|
return self.displayedRegions.length > 0;
|
|
219
218
|
},
|
|
220
|
-
/**
|
|
221
|
-
* #getter
|
|
222
|
-
*/
|
|
223
|
-
get isSearchDialogDisplayed() {
|
|
224
|
-
return self.searchResults !== undefined;
|
|
225
|
-
},
|
|
226
219
|
/**
|
|
227
220
|
* #getter
|
|
228
221
|
*/
|
|
@@ -457,7 +450,9 @@ export function stateModelFactory(pluginManager) {
|
|
|
457
450
|
},
|
|
458
451
|
/**
|
|
459
452
|
* #action
|
|
460
|
-
* sets offsets used in the get sequence dialog
|
|
453
|
+
* sets offsets of rubberband, used in the get sequence dialog can call
|
|
454
|
+
* view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
|
|
455
|
+
* the selected regions from the offsets
|
|
461
456
|
*/
|
|
462
457
|
setOffsets(left, right) {
|
|
463
458
|
self.leftOffset = left;
|
|
@@ -466,15 +461,17 @@ export function stateModelFactory(pluginManager) {
|
|
|
466
461
|
/**
|
|
467
462
|
* #action
|
|
468
463
|
*/
|
|
469
|
-
setSearchResults(
|
|
470
|
-
self.
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
464
|
+
setSearchResults(searchResults, searchQuery, assemblyName) {
|
|
465
|
+
getSession(self).queueDialog(handleClose => [
|
|
466
|
+
SearchResultsDialog,
|
|
467
|
+
{
|
|
468
|
+
model: self,
|
|
469
|
+
searchResults,
|
|
470
|
+
searchQuery,
|
|
471
|
+
handleClose,
|
|
472
|
+
assemblyName,
|
|
473
|
+
},
|
|
474
|
+
]);
|
|
478
475
|
},
|
|
479
476
|
/**
|
|
480
477
|
* #action
|
|
@@ -621,10 +618,13 @@ export function stateModelFactory(pluginManager) {
|
|
|
621
618
|
/**
|
|
622
619
|
* #method
|
|
623
620
|
* Helper method for the fetchSequence.
|
|
624
|
-
* Retrieves the corresponding regions that were selected by the
|
|
621
|
+
* Retrieves the corresponding regions that were selected by the
|
|
622
|
+
* rubberband
|
|
625
623
|
*
|
|
626
|
-
* @param leftOffset - `object as {start, end, index, offset}`, offset = start
|
|
627
|
-
*
|
|
624
|
+
* @param leftOffset - `object as {start, end, index, offset}`, offset = start
|
|
625
|
+
* of user drag
|
|
626
|
+
* @param rightOffset - `object as {start, end, index, offset}`,
|
|
627
|
+
* offset = end of user drag
|
|
628
628
|
* @returns array of Region[]
|
|
629
629
|
*/
|
|
630
630
|
getSelectedRegions(leftOffset, rightOffset) {
|
|
@@ -643,7 +643,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
643
643
|
},
|
|
644
644
|
/**
|
|
645
645
|
* #action
|
|
646
|
-
* schedule something to be run after the next time displayedRegions is
|
|
646
|
+
* schedule something to be run after the next time displayedRegions is
|
|
647
|
+
* set
|
|
647
648
|
*/
|
|
648
649
|
afterDisplayedRegionsSet(cb) {
|
|
649
650
|
self.afterDisplayedRegionsSetCallbacks.push(cb);
|
|
@@ -727,7 +728,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
727
728
|
* creates an svg export and save using FileSaver
|
|
728
729
|
*/
|
|
729
730
|
async exportSvg(opts = {}) {
|
|
730
|
-
|
|
731
|
+
const { renderToSvg } = await import('./svgcomponents/SVGLinearGenomeView');
|
|
731
732
|
const html = await renderToSvg(self, opts);
|
|
732
733
|
const blob = new Blob([html], { type: 'image/svg+xml' });
|
|
733
734
|
saveAs(blob, opts.filename || 'image.svg');
|
|
@@ -795,8 +796,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
795
796
|
},
|
|
796
797
|
/**
|
|
797
798
|
* #getter
|
|
798
|
-
* the cytoband is displayed to the right of the chromosome name,
|
|
799
|
-
*
|
|
799
|
+
* the cytoband is displayed to the right of the chromosome name, and
|
|
800
|
+
* that offset is calculated manually with this method
|
|
800
801
|
*/
|
|
801
802
|
get cytobandOffset() {
|
|
802
803
|
return this.showCytobands
|
|
@@ -841,7 +842,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
841
842
|
icon: PhotoCameraIcon,
|
|
842
843
|
onClick: () => {
|
|
843
844
|
getSession(self).queueDialog(handleClose => [
|
|
844
|
-
|
|
845
|
+
ExportSvgDialog,
|
|
845
846
|
{ model: self, handleClose },
|
|
846
847
|
]);
|
|
847
848
|
},
|
|
@@ -953,10 +954,9 @@ export function stateModelFactory(pluginManager) {
|
|
|
953
954
|
* #getter
|
|
954
955
|
* static blocks are an important concept jbrowse uses to avoid
|
|
955
956
|
* re-rendering when you scroll to the side. when you horizontally
|
|
956
|
-
* scroll to the right, old blocks to the left may be removed, and
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
* the block
|
|
957
|
+
* scroll to the right, old blocks to the left may be removed, and new
|
|
958
|
+
* blocks may be instantiated on the right. tracks may use the static
|
|
959
|
+
* blocks to render their data for the region represented by the block
|
|
960
960
|
*/
|
|
961
961
|
get staticBlocks() {
|
|
962
962
|
const ret = calculateStaticBlocks(self);
|
|
@@ -971,7 +971,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
971
971
|
* #getter
|
|
972
972
|
* dynamic blocks represent the exact coordinates of the currently
|
|
973
973
|
* visible genome regions on the screen. they are similar to static
|
|
974
|
-
* blocks, but
|
|
974
|
+
* blocks, but static blocks can go offscreen while dynamic blocks
|
|
975
975
|
* represent exactly what is on screen
|
|
976
976
|
*/
|
|
977
977
|
get dynamicBlocks() {
|
|
@@ -990,8 +990,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
990
990
|
},
|
|
991
991
|
/**
|
|
992
992
|
* #getter
|
|
993
|
-
* a single "combo-locstring" representing all the regions visible
|
|
994
|
-
*
|
|
993
|
+
* a single "combo-locstring" representing all the regions visible on
|
|
994
|
+
* the screen
|
|
995
995
|
*/
|
|
996
996
|
get visibleLocStrings() {
|
|
997
997
|
return calculateVisibleLocStrings(this.dynamicBlocks.contentBlocks);
|
|
@@ -1033,8 +1033,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
1033
1033
|
.actions(self => ({
|
|
1034
1034
|
/**
|
|
1035
1035
|
* #action
|
|
1036
|
-
* offset is the base-pair-offset in the displayed region, index is the
|
|
1037
|
-
* displayed region in the linear genome view
|
|
1036
|
+
* offset is the base-pair-offset in the displayed region, index is the
|
|
1037
|
+
* index of the displayed region in the linear genome view
|
|
1038
1038
|
*
|
|
1039
1039
|
* @param start - object as `{start, end, offset, index}`
|
|
1040
1040
|
* @param end - object as `{start, end, offset, index}`
|
|
@@ -1044,76 +1044,38 @@ export function stateModelFactory(pluginManager) {
|
|
|
1044
1044
|
},
|
|
1045
1045
|
/**
|
|
1046
1046
|
* #action
|
|
1047
|
-
*
|
|
1047
|
+
* Navigate to the given locstring, will change displayed regions if
|
|
1048
|
+
* needed, and wait for assemblies to be initialized
|
|
1048
1049
|
*
|
|
1049
|
-
* @param
|
|
1050
|
-
* @param optAssemblyName - (optional) the assembly name to use when
|
|
1050
|
+
* @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
|
|
1051
|
+
* @param optAssemblyName - (optional) the assembly name to use when
|
|
1052
|
+
* navigating to the locstring
|
|
1051
1053
|
*/
|
|
1052
|
-
async navToLocString(
|
|
1054
|
+
async navToLocString(input, optAssemblyName) {
|
|
1053
1055
|
const { assemblyNames } = self;
|
|
1054
1056
|
const { assemblyManager } = getSession(self);
|
|
1055
1057
|
const { isValidRefName } = assemblyManager;
|
|
1056
|
-
await when(() => self.volatileWidth !== undefined);
|
|
1057
1058
|
const assemblyName = optAssemblyName || assemblyNames[0];
|
|
1058
|
-
let parsedLocStrings;
|
|
1059
|
-
const inputs = locString
|
|
1060
|
-
.split(/(\s+)/)
|
|
1061
|
-
.map(f => f.trim())
|
|
1062
|
-
.filter(f => !!f);
|
|
1063
1059
|
if (assemblyName) {
|
|
1060
|
+
// wait before isValidRefName can be called
|
|
1064
1061
|
await assemblyManager.waitForAssembly(assemblyName);
|
|
1065
1062
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
parsedLocStrings = [
|
|
1079
|
-
parseLocString(refName + ':' + start + '..' + end, ref => isValidRefName(ref, assemblyName)),
|
|
1080
|
-
];
|
|
1081
|
-
}
|
|
1082
|
-
else {
|
|
1083
|
-
throw e;
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
const locations = await Promise.all(parsedLocStrings === null || parsedLocStrings === void 0 ? void 0 : parsedLocStrings.map(async (region) => {
|
|
1087
|
-
const asmName = region.assemblyName || assemblyName;
|
|
1088
|
-
const asm = await assemblyManager.waitForAssembly(asmName);
|
|
1089
|
-
const { refName } = region;
|
|
1090
|
-
if (!asm) {
|
|
1091
|
-
throw new Error(`assembly ${asmName} not found`);
|
|
1092
|
-
}
|
|
1093
|
-
const { regions } = asm;
|
|
1094
|
-
if (!regions) {
|
|
1095
|
-
throw new Error(`regions not loaded yet for ${asmName}`);
|
|
1096
|
-
}
|
|
1097
|
-
const canonicalRefName = asm.getCanonicalRefName(region.refName);
|
|
1098
|
-
if (!canonicalRefName) {
|
|
1099
|
-
throw new Error(`Could not find refName ${refName} in ${asm.name}`);
|
|
1100
|
-
}
|
|
1101
|
-
const parentRegion = regions.find(r => r.refName === canonicalRefName);
|
|
1102
|
-
if (!parentRegion) {
|
|
1103
|
-
throw new Error(`Could not find refName ${refName} in ${asmName}`);
|
|
1104
|
-
}
|
|
1105
|
-
return {
|
|
1106
|
-
...region,
|
|
1107
|
-
assemblyName: asmName,
|
|
1108
|
-
parentRegion,
|
|
1109
|
-
};
|
|
1110
|
-
}));
|
|
1063
|
+
return this.navToLocations(parseLocStrings(input, assemblyName, isValidRefName), assemblyName);
|
|
1064
|
+
},
|
|
1065
|
+
/**
|
|
1066
|
+
* #action
|
|
1067
|
+
* Similar to `navToLocString`, but accepts parsed location objects
|
|
1068
|
+
* instead of strings. Will try to perform `setDisplayedRegions` if
|
|
1069
|
+
* changing regions
|
|
1070
|
+
*/
|
|
1071
|
+
async navToLocations(parsedLocStrings, assemblyName) {
|
|
1072
|
+
const { assemblyManager } = getSession(self);
|
|
1073
|
+
await when(() => self.volatileWidth !== undefined);
|
|
1074
|
+
const locations = await generateLocations(parsedLocStrings, assemblyManager, assemblyName);
|
|
1111
1075
|
if (locations.length === 1) {
|
|
1112
1076
|
const loc = locations[0];
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
]);
|
|
1116
|
-
const { start, end, parentRegion } = loc;
|
|
1077
|
+
const { reversed, parentRegion, start, end } = loc;
|
|
1078
|
+
self.setDisplayedRegions([{ reversed, ...parentRegion }]);
|
|
1117
1079
|
this.navTo({
|
|
1118
1080
|
...loc,
|
|
1119
1081
|
start: clamp(start !== null && start !== void 0 ? start : 0, 0, parentRegion.end),
|
|
@@ -1130,10 +1092,10 @@ export function stateModelFactory(pluginManager) {
|
|
|
1130
1092
|
/**
|
|
1131
1093
|
* #action
|
|
1132
1094
|
* Navigate to a location based on its refName and optionally start, end,
|
|
1133
|
-
* and assemblyName.
|
|
1134
|
-
*
|
|
1135
|
-
* within a displayedRegion. Navigates to the first matching
|
|
1136
|
-
* encountered.
|
|
1095
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
1096
|
+
* `navToLocations` instead. Only navigates to a location if it is
|
|
1097
|
+
* entirely within a displayedRegion. Navigates to the first matching
|
|
1098
|
+
* location encountered.
|
|
1137
1099
|
*
|
|
1138
1100
|
* Throws an error if navigation was unsuccessful
|
|
1139
1101
|
*
|
|
@@ -1144,105 +1106,65 @@ export function stateModelFactory(pluginManager) {
|
|
|
1144
1106
|
},
|
|
1145
1107
|
/**
|
|
1146
1108
|
* #action
|
|
1109
|
+
* Navigate to a location based on its refName and optionally start, end,
|
|
1110
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
1111
|
+
* navToLocations instead. Only navigates to a location if it is entirely
|
|
1112
|
+
* within a displayedRegion. Navigates to the first matching location
|
|
1113
|
+
* encountered.
|
|
1114
|
+
*
|
|
1115
|
+
* Throws an error if navigation was unsuccessful
|
|
1116
|
+
*
|
|
1117
|
+
* @param locations - proposed location to navigate to
|
|
1147
1118
|
*/
|
|
1148
1119
|
navToMultiple(locations) {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
const { start, end, assemblyName = self.assemblyNames[0], } = firstLocation;
|
|
1152
|
-
if (start !== undefined && end !== undefined && start > end) {
|
|
1153
|
-
throw new Error(`start "${start + 1}" is greater than end "${end}"`);
|
|
1120
|
+
if (locations.some(l => l.start !== undefined && l.end !== undefined && l.start > l.end)) {
|
|
1121
|
+
throw new Error('found start greater than end');
|
|
1154
1122
|
}
|
|
1155
|
-
const
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
const canonicalRefName = assembly.getCanonicalRefName(refName);
|
|
1160
|
-
if (canonicalRefName) {
|
|
1161
|
-
refName = canonicalRefName;
|
|
1162
|
-
}
|
|
1123
|
+
const f1 = locations.at(0);
|
|
1124
|
+
const f2 = locations.at(-1);
|
|
1125
|
+
if (!f1 || !f2) {
|
|
1126
|
+
return;
|
|
1163
1127
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}
|
|
1195
|
-
if (!refNameMatched) {
|
|
1196
|
-
throw new Error(`could not find a region with refName "${refName}"`);
|
|
1197
|
-
}
|
|
1198
|
-
if (s === undefined) {
|
|
1199
|
-
throw new Error(`could not find a region with refName "${refName}" that contained an end position ${e}`);
|
|
1200
|
-
}
|
|
1201
|
-
if (e === undefined) {
|
|
1202
|
-
throw new Error(`could not find a region with refName "${refName}" that contained a start position ${s + 1}`);
|
|
1203
|
-
}
|
|
1204
|
-
if (index === -1) {
|
|
1205
|
-
throw new Error(`could not find a region that completely contained "${assembleLocString(firstLocation)}"`);
|
|
1206
|
-
}
|
|
1207
|
-
if (locations.length === 1) {
|
|
1208
|
-
const f = self.displayedRegions[index];
|
|
1209
|
-
this.moveTo({ index, offset: f.reversed ? f.end - e : s - f.start }, { index, offset: f.reversed ? f.end - s : e - f.start });
|
|
1210
|
-
return;
|
|
1211
|
-
}
|
|
1212
|
-
let idx = 0;
|
|
1213
|
-
let start = 0;
|
|
1214
|
-
let end = 0;
|
|
1215
|
-
for (idx; idx < locations.length; idx++) {
|
|
1216
|
-
const location = locations[idx];
|
|
1217
|
-
const region = self.displayedRegions[index + idx];
|
|
1218
|
-
start = location.start || region.start;
|
|
1219
|
-
end = location.end || region.end;
|
|
1220
|
-
if (location.refName !== region.refName) {
|
|
1221
|
-
throw new Error(`Entered location ${assembleLocString(location)} does not match with displayed regions`);
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
idx -= 1;
|
|
1225
|
-
const startDisplayedRegion = self.displayedRegions[index];
|
|
1226
|
-
const endDisplayedRegion = self.displayedRegions[index + idx];
|
|
1227
|
-
this.moveTo({
|
|
1228
|
-
index,
|
|
1229
|
-
offset: startDisplayedRegion.reversed
|
|
1230
|
-
? startDisplayedRegion.end - e
|
|
1231
|
-
: s - startDisplayedRegion.start,
|
|
1232
|
-
}, {
|
|
1233
|
-
index: index + idx,
|
|
1234
|
-
offset: endDisplayedRegion.reversed
|
|
1235
|
-
? endDisplayedRegion.end - start
|
|
1236
|
-
: end - endDisplayedRegion.start,
|
|
1237
|
-
});
|
|
1238
|
-
return;
|
|
1239
|
-
}
|
|
1240
|
-
catch (error) {
|
|
1241
|
-
if (index === lastIndex) {
|
|
1242
|
-
throw error;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1128
|
+
const a = self.assemblyNames[0];
|
|
1129
|
+
const { assemblyManager } = getSession(self);
|
|
1130
|
+
const assembly1 = assemblyManager.get(f1.assemblyName || a);
|
|
1131
|
+
const assembly2 = assemblyManager.get(f2.assemblyName || a);
|
|
1132
|
+
const ref1 = (assembly1 === null || assembly1 === void 0 ? void 0 : assembly1.getCanonicalRefName(f1.refName)) || f1.refName;
|
|
1133
|
+
const ref2 = (assembly2 === null || assembly2 === void 0 ? void 0 : assembly2.getCanonicalRefName(f2.refName)) || f2.refName;
|
|
1134
|
+
const r1 = self.displayedRegions.find(r => r.refName === ref1);
|
|
1135
|
+
const r2 = findLast(self.displayedRegions, r => r.refName === ref2);
|
|
1136
|
+
if (!r1) {
|
|
1137
|
+
throw new Error(`could not find a region with refName "${ref1}"`);
|
|
1138
|
+
}
|
|
1139
|
+
if (!r2) {
|
|
1140
|
+
throw new Error(`could not find a region with refName "${ref2}"`);
|
|
1141
|
+
}
|
|
1142
|
+
const s1 = f1.start === undefined ? r1.start : f1.start;
|
|
1143
|
+
const e1 = f1.end === undefined ? r1.end : f1.end;
|
|
1144
|
+
const s2 = f2.start === undefined ? r2.start : f2.start;
|
|
1145
|
+
const e2 = f2.end === undefined ? r2.end : f2.end;
|
|
1146
|
+
const index = self.displayedRegions.findIndex(r => ref1 === r.refName &&
|
|
1147
|
+
s1 >= r.start &&
|
|
1148
|
+
s1 <= r.end &&
|
|
1149
|
+
e1 <= r.end &&
|
|
1150
|
+
e1 >= r.start);
|
|
1151
|
+
const index2 = self.displayedRegions.findIndex(r => ref2 === r.refName &&
|
|
1152
|
+
s2 >= r.start &&
|
|
1153
|
+
s2 <= r.end &&
|
|
1154
|
+
e2 <= r.end &&
|
|
1155
|
+
e2 >= r.start);
|
|
1156
|
+
if (index === -1 || index2 === -1) {
|
|
1157
|
+
throw new Error(`could not find a region that contained "${locations.map(l => assembleLocString(l))}"`);
|
|
1245
1158
|
}
|
|
1159
|
+
const sd = self.displayedRegions[index];
|
|
1160
|
+
const ed = self.displayedRegions[index2];
|
|
1161
|
+
this.moveTo({
|
|
1162
|
+
index,
|
|
1163
|
+
offset: sd.reversed ? sd.end - e1 : s1 - sd.start,
|
|
1164
|
+
}, {
|
|
1165
|
+
index: index2,
|
|
1166
|
+
offset: ed.reversed ? ed.end - s2 : e2 - ed.start,
|
|
1167
|
+
});
|
|
1246
1168
|
},
|
|
1247
1169
|
}))
|
|
1248
1170
|
.views(self => ({
|
|
@@ -1254,15 +1176,16 @@ export function stateModelFactory(pluginManager) {
|
|
|
1254
1176
|
{
|
|
1255
1177
|
label: 'Zoom to region',
|
|
1256
1178
|
icon: ZoomInIcon,
|
|
1257
|
-
onClick: () =>
|
|
1258
|
-
const { leftOffset, rightOffset } = self;
|
|
1259
|
-
self.moveTo(leftOffset, rightOffset);
|
|
1260
|
-
},
|
|
1179
|
+
onClick: () => self.moveTo(self.leftOffset, self.rightOffset),
|
|
1261
1180
|
},
|
|
1262
1181
|
{
|
|
1263
1182
|
label: 'Get sequence',
|
|
1264
1183
|
icon: MenuOpenIcon,
|
|
1265
|
-
onClick: () => self.
|
|
1184
|
+
onClick: () => getSession(self).queueDialog(handleClose => [
|
|
1185
|
+
GetSequenceDialog,
|
|
1186
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1187
|
+
{ model: self, handleClose },
|
|
1188
|
+
]),
|
|
1266
1189
|
},
|
|
1267
1190
|
];
|
|
1268
1191
|
},
|
|
@@ -1286,7 +1209,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
1286
1209
|
coord,
|
|
1287
1210
|
regionNumber,
|
|
1288
1211
|
});
|
|
1289
|
-
if (centerPx) {
|
|
1212
|
+
if (centerPx !== undefined) {
|
|
1290
1213
|
self.scrollTo(Math.round(centerPx.offsetPx - self.width / 2));
|
|
1291
1214
|
}
|
|
1292
1215
|
},
|