@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
|
@@ -31,7 +31,6 @@ const react_1 = require("react");
|
|
|
31
31
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
32
32
|
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
33
33
|
const mst_1 = require("@jbrowse/core/util/types/mst");
|
|
34
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
35
34
|
const util_1 = require("@jbrowse/core/util");
|
|
36
35
|
const calculateDynamicBlocks_1 = __importDefault(require("@jbrowse/core/util/calculateDynamicBlocks"));
|
|
37
36
|
const calculateStaticBlocks_1 = __importDefault(require("@jbrowse/core/util/calculateStaticBlocks"));
|
|
@@ -51,13 +50,15 @@ const FolderOpen_1 = __importDefault(require("@mui/icons-material/FolderOpen"));
|
|
|
51
50
|
const PhotoCamera_1 = __importDefault(require("@mui/icons-material/PhotoCamera"));
|
|
52
51
|
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
53
52
|
const MenuOpen_1 = __importDefault(require("@mui/icons-material/MenuOpen"));
|
|
54
|
-
// locals
|
|
55
|
-
const SVGLinearGenomeView_1 = require("./svgcomponents/SVGLinearGenomeView");
|
|
56
|
-
const ExportSvgDialog_1 = __importDefault(require("./components/ExportSvgDialog"));
|
|
57
53
|
const MiniControls_1 = __importDefault(require("./components/MiniControls"));
|
|
58
54
|
const Header_1 = __importDefault(require("./components/Header"));
|
|
55
|
+
const util_2 = require("./util");
|
|
59
56
|
// lazies
|
|
57
|
+
const ReturnToImportFormDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@jbrowse/core/ui/ReturnToImportFormDialog'))));
|
|
60
58
|
const SequenceSearchDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SequenceSearchDialog'))));
|
|
59
|
+
const ExportSvgDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ExportSvgDialog'))));
|
|
60
|
+
const GetSequenceDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/GetSequenceDialog'))));
|
|
61
|
+
const SearchResultsDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SearchResultsDialog'))));
|
|
61
62
|
function calculateVisibleLocStrings(contentBlocks) {
|
|
62
63
|
if (!contentBlocks.length) {
|
|
63
64
|
return '';
|
|
@@ -80,6 +81,7 @@ exports.SPACING = 7;
|
|
|
80
81
|
exports.WIDGET_HEIGHT = 32;
|
|
81
82
|
/**
|
|
82
83
|
* #stateModel LinearGenomeView
|
|
84
|
+
* #category view
|
|
83
85
|
*/
|
|
84
86
|
function stateModelFactory(pluginManager) {
|
|
85
87
|
return mobx_state_tree_1.types
|
|
@@ -137,7 +139,8 @@ function stateModelFactory(pluginManager) {
|
|
|
137
139
|
trackSelectorType: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.enumeration(['hierarchical']), 'hierarchical'),
|
|
138
140
|
/**
|
|
139
141
|
* #property
|
|
140
|
-
* how to display the track labels, can be "overlapping", "offset", or
|
|
142
|
+
* how to display the track labels, can be "overlapping", "offset", or
|
|
143
|
+
* "hidden"
|
|
141
144
|
*/
|
|
142
145
|
trackLabels: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, () => (0, util_1.localStorageGetItem)('lgv-trackLabels') || 'overlapping'),
|
|
143
146
|
/**
|
|
@@ -165,15 +168,11 @@ function stateModelFactory(pluginManager) {
|
|
|
165
168
|
// which is basically like an onLoad
|
|
166
169
|
afterDisplayedRegionsSetCallbacks: [],
|
|
167
170
|
scaleFactor: 1,
|
|
168
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
171
|
trackRefs: {},
|
|
170
172
|
coarseDynamicBlocks: [],
|
|
171
173
|
coarseTotalBp: 0,
|
|
172
174
|
leftOffset: undefined,
|
|
173
175
|
rightOffset: undefined,
|
|
174
|
-
searchResults: undefined,
|
|
175
|
-
searchQuery: undefined,
|
|
176
|
-
seqDialogDisplayed: false,
|
|
177
176
|
}))
|
|
178
177
|
.views(self => ({
|
|
179
178
|
/**
|
|
@@ -246,12 +245,6 @@ function stateModelFactory(pluginManager) {
|
|
|
246
245
|
get hasDisplayedRegions() {
|
|
247
246
|
return self.displayedRegions.length > 0;
|
|
248
247
|
},
|
|
249
|
-
/**
|
|
250
|
-
* #getter
|
|
251
|
-
*/
|
|
252
|
-
get isSearchDialogDisplayed() {
|
|
253
|
-
return self.searchResults !== undefined;
|
|
254
|
-
},
|
|
255
248
|
/**
|
|
256
249
|
* #getter
|
|
257
250
|
*/
|
|
@@ -486,7 +479,9 @@ function stateModelFactory(pluginManager) {
|
|
|
486
479
|
},
|
|
487
480
|
/**
|
|
488
481
|
* #action
|
|
489
|
-
* sets offsets used in the get sequence dialog
|
|
482
|
+
* sets offsets of rubberband, used in the get sequence dialog can call
|
|
483
|
+
* view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
|
|
484
|
+
* the selected regions from the offsets
|
|
490
485
|
*/
|
|
491
486
|
setOffsets(left, right) {
|
|
492
487
|
self.leftOffset = left;
|
|
@@ -495,15 +490,17 @@ function stateModelFactory(pluginManager) {
|
|
|
495
490
|
/**
|
|
496
491
|
* #action
|
|
497
492
|
*/
|
|
498
|
-
setSearchResults(
|
|
499
|
-
self.
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
493
|
+
setSearchResults(searchResults, searchQuery, assemblyName) {
|
|
494
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
495
|
+
SearchResultsDialog,
|
|
496
|
+
{
|
|
497
|
+
model: self,
|
|
498
|
+
searchResults,
|
|
499
|
+
searchQuery,
|
|
500
|
+
handleClose,
|
|
501
|
+
assemblyName,
|
|
502
|
+
},
|
|
503
|
+
]);
|
|
507
504
|
},
|
|
508
505
|
/**
|
|
509
506
|
* #action
|
|
@@ -650,10 +647,13 @@ function stateModelFactory(pluginManager) {
|
|
|
650
647
|
/**
|
|
651
648
|
* #method
|
|
652
649
|
* Helper method for the fetchSequence.
|
|
653
|
-
* Retrieves the corresponding regions that were selected by the
|
|
650
|
+
* Retrieves the corresponding regions that were selected by the
|
|
651
|
+
* rubberband
|
|
654
652
|
*
|
|
655
|
-
* @param leftOffset - `object as {start, end, index, offset}`, offset = start
|
|
656
|
-
*
|
|
653
|
+
* @param leftOffset - `object as {start, end, index, offset}`, offset = start
|
|
654
|
+
* of user drag
|
|
655
|
+
* @param rightOffset - `object as {start, end, index, offset}`,
|
|
656
|
+
* offset = end of user drag
|
|
657
657
|
* @returns array of Region[]
|
|
658
658
|
*/
|
|
659
659
|
getSelectedRegions(leftOffset, rightOffset) {
|
|
@@ -672,7 +672,8 @@ function stateModelFactory(pluginManager) {
|
|
|
672
672
|
},
|
|
673
673
|
/**
|
|
674
674
|
* #action
|
|
675
|
-
* schedule something to be run after the next time displayedRegions is
|
|
675
|
+
* schedule something to be run after the next time displayedRegions is
|
|
676
|
+
* set
|
|
676
677
|
*/
|
|
677
678
|
afterDisplayedRegionsSet(cb) {
|
|
678
679
|
self.afterDisplayedRegionsSetCallbacks.push(cb);
|
|
@@ -756,8 +757,8 @@ function stateModelFactory(pluginManager) {
|
|
|
756
757
|
* creates an svg export and save using FileSaver
|
|
757
758
|
*/
|
|
758
759
|
async exportSvg(opts = {}) {
|
|
759
|
-
|
|
760
|
-
const html = await
|
|
760
|
+
const { renderToSvg } = await Promise.resolve().then(() => __importStar(require('./svgcomponents/SVGLinearGenomeView')));
|
|
761
|
+
const html = await renderToSvg(self, opts);
|
|
761
762
|
const blob = new Blob([html], { type: 'image/svg+xml' });
|
|
762
763
|
(0, file_saver_1.saveAs)(blob, opts.filename || 'image.svg');
|
|
763
764
|
},
|
|
@@ -824,8 +825,8 @@ function stateModelFactory(pluginManager) {
|
|
|
824
825
|
},
|
|
825
826
|
/**
|
|
826
827
|
* #getter
|
|
827
|
-
* the cytoband is displayed to the right of the chromosome name,
|
|
828
|
-
*
|
|
828
|
+
* the cytoband is displayed to the right of the chromosome name, and
|
|
829
|
+
* that offset is calculated manually with this method
|
|
829
830
|
*/
|
|
830
831
|
get cytobandOffset() {
|
|
831
832
|
return this.showCytobands
|
|
@@ -846,7 +847,7 @@ function stateModelFactory(pluginManager) {
|
|
|
846
847
|
label: 'Return to import form',
|
|
847
848
|
onClick: () => {
|
|
848
849
|
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
849
|
-
|
|
850
|
+
ReturnToImportFormDialog,
|
|
850
851
|
{ model: self, handleClose },
|
|
851
852
|
]);
|
|
852
853
|
},
|
|
@@ -870,7 +871,7 @@ function stateModelFactory(pluginManager) {
|
|
|
870
871
|
icon: PhotoCamera_1.default,
|
|
871
872
|
onClick: () => {
|
|
872
873
|
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
873
|
-
|
|
874
|
+
ExportSvgDialog,
|
|
874
875
|
{ model: self, handleClose },
|
|
875
876
|
]);
|
|
876
877
|
},
|
|
@@ -982,10 +983,9 @@ function stateModelFactory(pluginManager) {
|
|
|
982
983
|
* #getter
|
|
983
984
|
* static blocks are an important concept jbrowse uses to avoid
|
|
984
985
|
* re-rendering when you scroll to the side. when you horizontally
|
|
985
|
-
* scroll to the right, old blocks to the left may be removed, and
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
* the block
|
|
986
|
+
* scroll to the right, old blocks to the left may be removed, and new
|
|
987
|
+
* blocks may be instantiated on the right. tracks may use the static
|
|
988
|
+
* blocks to render their data for the region represented by the block
|
|
989
989
|
*/
|
|
990
990
|
get staticBlocks() {
|
|
991
991
|
const ret = (0, calculateStaticBlocks_1.default)(self);
|
|
@@ -1000,7 +1000,7 @@ function stateModelFactory(pluginManager) {
|
|
|
1000
1000
|
* #getter
|
|
1001
1001
|
* dynamic blocks represent the exact coordinates of the currently
|
|
1002
1002
|
* visible genome regions on the screen. they are similar to static
|
|
1003
|
-
* blocks, but
|
|
1003
|
+
* blocks, but static blocks can go offscreen while dynamic blocks
|
|
1004
1004
|
* represent exactly what is on screen
|
|
1005
1005
|
*/
|
|
1006
1006
|
get dynamicBlocks() {
|
|
@@ -1019,8 +1019,8 @@ function stateModelFactory(pluginManager) {
|
|
|
1019
1019
|
},
|
|
1020
1020
|
/**
|
|
1021
1021
|
* #getter
|
|
1022
|
-
* a single "combo-locstring" representing all the regions visible
|
|
1023
|
-
*
|
|
1022
|
+
* a single "combo-locstring" representing all the regions visible on
|
|
1023
|
+
* the screen
|
|
1024
1024
|
*/
|
|
1025
1025
|
get visibleLocStrings() {
|
|
1026
1026
|
return calculateVisibleLocStrings(this.dynamicBlocks.contentBlocks);
|
|
@@ -1062,8 +1062,8 @@ function stateModelFactory(pluginManager) {
|
|
|
1062
1062
|
.actions(self => ({
|
|
1063
1063
|
/**
|
|
1064
1064
|
* #action
|
|
1065
|
-
* offset is the base-pair-offset in the displayed region, index is the
|
|
1066
|
-
* displayed region in the linear genome view
|
|
1065
|
+
* offset is the base-pair-offset in the displayed region, index is the
|
|
1066
|
+
* index of the displayed region in the linear genome view
|
|
1067
1067
|
*
|
|
1068
1068
|
* @param start - object as `{start, end, offset, index}`
|
|
1069
1069
|
* @param end - object as `{start, end, offset, index}`
|
|
@@ -1073,76 +1073,38 @@ function stateModelFactory(pluginManager) {
|
|
|
1073
1073
|
},
|
|
1074
1074
|
/**
|
|
1075
1075
|
* #action
|
|
1076
|
-
*
|
|
1076
|
+
* Navigate to the given locstring, will change displayed regions if
|
|
1077
|
+
* needed, and wait for assemblies to be initialized
|
|
1077
1078
|
*
|
|
1078
|
-
* @param
|
|
1079
|
-
* @param optAssemblyName - (optional) the assembly name to use when
|
|
1079
|
+
* @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
|
|
1080
|
+
* @param optAssemblyName - (optional) the assembly name to use when
|
|
1081
|
+
* navigating to the locstring
|
|
1080
1082
|
*/
|
|
1081
|
-
async navToLocString(
|
|
1083
|
+
async navToLocString(input, optAssemblyName) {
|
|
1082
1084
|
const { assemblyNames } = self;
|
|
1083
1085
|
const { assemblyManager } = (0, util_1.getSession)(self);
|
|
1084
1086
|
const { isValidRefName } = assemblyManager;
|
|
1085
|
-
await (0, mobx_1.when)(() => self.volatileWidth !== undefined);
|
|
1086
1087
|
const assemblyName = optAssemblyName || assemblyNames[0];
|
|
1087
|
-
let parsedLocStrings;
|
|
1088
|
-
const inputs = locString
|
|
1089
|
-
.split(/(\s+)/)
|
|
1090
|
-
.map(f => f.trim())
|
|
1091
|
-
.filter(f => !!f);
|
|
1092
1088
|
if (assemblyName) {
|
|
1089
|
+
// wait before isValidRefName can be called
|
|
1093
1090
|
await assemblyManager.waitForAssembly(assemblyName);
|
|
1094
1091
|
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
parsedLocStrings = [
|
|
1108
|
-
(0, util_1.parseLocString)(refName + ':' + start + '..' + end, ref => isValidRefName(ref, assemblyName)),
|
|
1109
|
-
];
|
|
1110
|
-
}
|
|
1111
|
-
else {
|
|
1112
|
-
throw e;
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
const locations = await Promise.all(parsedLocStrings === null || parsedLocStrings === void 0 ? void 0 : parsedLocStrings.map(async (region) => {
|
|
1116
|
-
const asmName = region.assemblyName || assemblyName;
|
|
1117
|
-
const asm = await assemblyManager.waitForAssembly(asmName);
|
|
1118
|
-
const { refName } = region;
|
|
1119
|
-
if (!asm) {
|
|
1120
|
-
throw new Error(`assembly ${asmName} not found`);
|
|
1121
|
-
}
|
|
1122
|
-
const { regions } = asm;
|
|
1123
|
-
if (!regions) {
|
|
1124
|
-
throw new Error(`regions not loaded yet for ${asmName}`);
|
|
1125
|
-
}
|
|
1126
|
-
const canonicalRefName = asm.getCanonicalRefName(region.refName);
|
|
1127
|
-
if (!canonicalRefName) {
|
|
1128
|
-
throw new Error(`Could not find refName ${refName} in ${asm.name}`);
|
|
1129
|
-
}
|
|
1130
|
-
const parentRegion = regions.find(r => r.refName === canonicalRefName);
|
|
1131
|
-
if (!parentRegion) {
|
|
1132
|
-
throw new Error(`Could not find refName ${refName} in ${asmName}`);
|
|
1133
|
-
}
|
|
1134
|
-
return {
|
|
1135
|
-
...region,
|
|
1136
|
-
assemblyName: asmName,
|
|
1137
|
-
parentRegion,
|
|
1138
|
-
};
|
|
1139
|
-
}));
|
|
1092
|
+
return this.navToLocations((0, util_2.parseLocStrings)(input, assemblyName, isValidRefName), assemblyName);
|
|
1093
|
+
},
|
|
1094
|
+
/**
|
|
1095
|
+
* #action
|
|
1096
|
+
* Similar to `navToLocString`, but accepts parsed location objects
|
|
1097
|
+
* instead of strings. Will try to perform `setDisplayedRegions` if
|
|
1098
|
+
* changing regions
|
|
1099
|
+
*/
|
|
1100
|
+
async navToLocations(parsedLocStrings, assemblyName) {
|
|
1101
|
+
const { assemblyManager } = (0, util_1.getSession)(self);
|
|
1102
|
+
await (0, mobx_1.when)(() => self.volatileWidth !== undefined);
|
|
1103
|
+
const locations = await (0, util_2.generateLocations)(parsedLocStrings, assemblyManager, assemblyName);
|
|
1140
1104
|
if (locations.length === 1) {
|
|
1141
1105
|
const loc = locations[0];
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
]);
|
|
1145
|
-
const { start, end, parentRegion } = loc;
|
|
1106
|
+
const { reversed, parentRegion, start, end } = loc;
|
|
1107
|
+
self.setDisplayedRegions([{ reversed, ...parentRegion }]);
|
|
1146
1108
|
this.navTo({
|
|
1147
1109
|
...loc,
|
|
1148
1110
|
start: (0, util_1.clamp)(start !== null && start !== void 0 ? start : 0, 0, parentRegion.end),
|
|
@@ -1159,10 +1121,10 @@ function stateModelFactory(pluginManager) {
|
|
|
1159
1121
|
/**
|
|
1160
1122
|
* #action
|
|
1161
1123
|
* Navigate to a location based on its refName and optionally start, end,
|
|
1162
|
-
* and assemblyName.
|
|
1163
|
-
*
|
|
1164
|
-
* within a displayedRegion. Navigates to the first matching
|
|
1165
|
-
* encountered.
|
|
1124
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
1125
|
+
* `navToLocations` instead. Only navigates to a location if it is
|
|
1126
|
+
* entirely within a displayedRegion. Navigates to the first matching
|
|
1127
|
+
* location encountered.
|
|
1166
1128
|
*
|
|
1167
1129
|
* Throws an error if navigation was unsuccessful
|
|
1168
1130
|
*
|
|
@@ -1173,105 +1135,65 @@ function stateModelFactory(pluginManager) {
|
|
|
1173
1135
|
},
|
|
1174
1136
|
/**
|
|
1175
1137
|
* #action
|
|
1138
|
+
* Navigate to a location based on its refName and optionally start, end,
|
|
1139
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
1140
|
+
* navToLocations instead. Only navigates to a location if it is entirely
|
|
1141
|
+
* within a displayedRegion. Navigates to the first matching location
|
|
1142
|
+
* encountered.
|
|
1143
|
+
*
|
|
1144
|
+
* Throws an error if navigation was unsuccessful
|
|
1145
|
+
*
|
|
1146
|
+
* @param locations - proposed location to navigate to
|
|
1176
1147
|
*/
|
|
1177
1148
|
navToMultiple(locations) {
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
const { start, end, assemblyName = self.assemblyNames[0], } = firstLocation;
|
|
1181
|
-
if (start !== undefined && end !== undefined && start > end) {
|
|
1182
|
-
throw new Error(`start "${start + 1}" is greater than end "${end}"`);
|
|
1149
|
+
if (locations.some(l => l.start !== undefined && l.end !== undefined && l.start > l.end)) {
|
|
1150
|
+
throw new Error('found start greater than end');
|
|
1183
1151
|
}
|
|
1184
|
-
const
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
const canonicalRefName = assembly.getCanonicalRefName(refName);
|
|
1189
|
-
if (canonicalRefName) {
|
|
1190
|
-
refName = canonicalRefName;
|
|
1191
|
-
}
|
|
1152
|
+
const f1 = locations.at(0);
|
|
1153
|
+
const f2 = locations.at(-1);
|
|
1154
|
+
if (!f1 || !f2) {
|
|
1155
|
+
return;
|
|
1192
1156
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
}
|
|
1224
|
-
if (!refNameMatched) {
|
|
1225
|
-
throw new Error(`could not find a region with refName "${refName}"`);
|
|
1226
|
-
}
|
|
1227
|
-
if (s === undefined) {
|
|
1228
|
-
throw new Error(`could not find a region with refName "${refName}" that contained an end position ${e}`);
|
|
1229
|
-
}
|
|
1230
|
-
if (e === undefined) {
|
|
1231
|
-
throw new Error(`could not find a region with refName "${refName}" that contained a start position ${s + 1}`);
|
|
1232
|
-
}
|
|
1233
|
-
if (index === -1) {
|
|
1234
|
-
throw new Error(`could not find a region that completely contained "${(0, util_1.assembleLocString)(firstLocation)}"`);
|
|
1235
|
-
}
|
|
1236
|
-
if (locations.length === 1) {
|
|
1237
|
-
const f = self.displayedRegions[index];
|
|
1238
|
-
this.moveTo({ index, offset: f.reversed ? f.end - e : s - f.start }, { index, offset: f.reversed ? f.end - s : e - f.start });
|
|
1239
|
-
return;
|
|
1240
|
-
}
|
|
1241
|
-
let idx = 0;
|
|
1242
|
-
let start = 0;
|
|
1243
|
-
let end = 0;
|
|
1244
|
-
for (idx; idx < locations.length; idx++) {
|
|
1245
|
-
const location = locations[idx];
|
|
1246
|
-
const region = self.displayedRegions[index + idx];
|
|
1247
|
-
start = location.start || region.start;
|
|
1248
|
-
end = location.end || region.end;
|
|
1249
|
-
if (location.refName !== region.refName) {
|
|
1250
|
-
throw new Error(`Entered location ${(0, util_1.assembleLocString)(location)} does not match with displayed regions`);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
idx -= 1;
|
|
1254
|
-
const startDisplayedRegion = self.displayedRegions[index];
|
|
1255
|
-
const endDisplayedRegion = self.displayedRegions[index + idx];
|
|
1256
|
-
this.moveTo({
|
|
1257
|
-
index,
|
|
1258
|
-
offset: startDisplayedRegion.reversed
|
|
1259
|
-
? startDisplayedRegion.end - e
|
|
1260
|
-
: s - startDisplayedRegion.start,
|
|
1261
|
-
}, {
|
|
1262
|
-
index: index + idx,
|
|
1263
|
-
offset: endDisplayedRegion.reversed
|
|
1264
|
-
? endDisplayedRegion.end - start
|
|
1265
|
-
: end - endDisplayedRegion.start,
|
|
1266
|
-
});
|
|
1267
|
-
return;
|
|
1268
|
-
}
|
|
1269
|
-
catch (error) {
|
|
1270
|
-
if (index === lastIndex) {
|
|
1271
|
-
throw error;
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1157
|
+
const a = self.assemblyNames[0];
|
|
1158
|
+
const { assemblyManager } = (0, util_1.getSession)(self);
|
|
1159
|
+
const assembly1 = assemblyManager.get(f1.assemblyName || a);
|
|
1160
|
+
const assembly2 = assemblyManager.get(f2.assemblyName || a);
|
|
1161
|
+
const ref1 = (assembly1 === null || assembly1 === void 0 ? void 0 : assembly1.getCanonicalRefName(f1.refName)) || f1.refName;
|
|
1162
|
+
const ref2 = (assembly2 === null || assembly2 === void 0 ? void 0 : assembly2.getCanonicalRefName(f2.refName)) || f2.refName;
|
|
1163
|
+
const r1 = self.displayedRegions.find(r => r.refName === ref1);
|
|
1164
|
+
const r2 = (0, util_1.findLast)(self.displayedRegions, r => r.refName === ref2);
|
|
1165
|
+
if (!r1) {
|
|
1166
|
+
throw new Error(`could not find a region with refName "${ref1}"`);
|
|
1167
|
+
}
|
|
1168
|
+
if (!r2) {
|
|
1169
|
+
throw new Error(`could not find a region with refName "${ref2}"`);
|
|
1170
|
+
}
|
|
1171
|
+
const s1 = f1.start === undefined ? r1.start : f1.start;
|
|
1172
|
+
const e1 = f1.end === undefined ? r1.end : f1.end;
|
|
1173
|
+
const s2 = f2.start === undefined ? r2.start : f2.start;
|
|
1174
|
+
const e2 = f2.end === undefined ? r2.end : f2.end;
|
|
1175
|
+
const index = self.displayedRegions.findIndex(r => ref1 === r.refName &&
|
|
1176
|
+
s1 >= r.start &&
|
|
1177
|
+
s1 <= r.end &&
|
|
1178
|
+
e1 <= r.end &&
|
|
1179
|
+
e1 >= r.start);
|
|
1180
|
+
const index2 = self.displayedRegions.findIndex(r => ref2 === r.refName &&
|
|
1181
|
+
s2 >= r.start &&
|
|
1182
|
+
s2 <= r.end &&
|
|
1183
|
+
e2 <= r.end &&
|
|
1184
|
+
e2 >= r.start);
|
|
1185
|
+
if (index === -1 || index2 === -1) {
|
|
1186
|
+
throw new Error(`could not find a region that contained "${locations.map(l => (0, util_1.assembleLocString)(l))}"`);
|
|
1274
1187
|
}
|
|
1188
|
+
const sd = self.displayedRegions[index];
|
|
1189
|
+
const ed = self.displayedRegions[index2];
|
|
1190
|
+
this.moveTo({
|
|
1191
|
+
index,
|
|
1192
|
+
offset: sd.reversed ? sd.end - e1 : s1 - sd.start,
|
|
1193
|
+
}, {
|
|
1194
|
+
index: index2,
|
|
1195
|
+
offset: ed.reversed ? ed.end - s2 : e2 - ed.start,
|
|
1196
|
+
});
|
|
1275
1197
|
},
|
|
1276
1198
|
}))
|
|
1277
1199
|
.views(self => ({
|
|
@@ -1283,15 +1205,16 @@ function stateModelFactory(pluginManager) {
|
|
|
1283
1205
|
{
|
|
1284
1206
|
label: 'Zoom to region',
|
|
1285
1207
|
icon: ZoomIn_1.default,
|
|
1286
|
-
onClick: () =>
|
|
1287
|
-
const { leftOffset, rightOffset } = self;
|
|
1288
|
-
self.moveTo(leftOffset, rightOffset);
|
|
1289
|
-
},
|
|
1208
|
+
onClick: () => self.moveTo(self.leftOffset, self.rightOffset),
|
|
1290
1209
|
},
|
|
1291
1210
|
{
|
|
1292
1211
|
label: 'Get sequence',
|
|
1293
1212
|
icon: MenuOpen_1.default,
|
|
1294
|
-
onClick: () => self.
|
|
1213
|
+
onClick: () => (0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
1214
|
+
GetSequenceDialog,
|
|
1215
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1216
|
+
{ model: self, handleClose },
|
|
1217
|
+
]),
|
|
1295
1218
|
},
|
|
1296
1219
|
];
|
|
1297
1220
|
},
|
|
@@ -1315,7 +1238,7 @@ function stateModelFactory(pluginManager) {
|
|
|
1315
1238
|
coord,
|
|
1316
1239
|
regionNumber,
|
|
1317
1240
|
});
|
|
1318
|
-
if (centerPx) {
|
|
1241
|
+
if (centerPx !== undefined) {
|
|
1319
1242
|
self.scrollTo(Math.round(centerPx.offsetPx - self.width / 2));
|
|
1320
1243
|
}
|
|
1321
1244
|
},
|
|
@@ -1345,6 +1268,6 @@ var SearchBox_1 = require("./components/SearchBox");
|
|
|
1345
1268
|
Object.defineProperty(exports, "SearchBox", { enumerable: true, get: function () { return __importDefault(SearchBox_1).default; } });
|
|
1346
1269
|
var ZoomControls_1 = require("./components/ZoomControls");
|
|
1347
1270
|
Object.defineProperty(exports, "ZoomControls", { enumerable: true, get: function () { return __importDefault(ZoomControls_1).default; } });
|
|
1348
|
-
var
|
|
1349
|
-
Object.defineProperty(exports, "renderToSvg", { enumerable: true, get: function () { return
|
|
1271
|
+
var SVGLinearGenomeView_1 = require("./svgcomponents/SVGLinearGenomeView");
|
|
1272
|
+
Object.defineProperty(exports, "renderToSvg", { enumerable: true, get: function () { return SVGLinearGenomeView_1.renderToSvg; } });
|
|
1350
1273
|
//# sourceMappingURL=model.js.map
|