@jbrowse/plugin-linear-genome-view 2.5.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -1
- package/dist/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/dist/BaseLinearDisplay/components/Block.js +0 -1
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -2
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -1
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -1
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +2 -1
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -1
- package/dist/BaseLinearDisplay/index.d.ts +5 -2
- package/dist/BaseLinearDisplay/index.js +7 -2
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +62 -142
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +34 -356
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +189 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +55 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +41 -0
- package/dist/BaseLinearDisplay/models/configSchema.js +1 -1
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/dist/BaseLinearDisplay/models/renderSvg.js +82 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +20 -17
- package/dist/BaseLinearDisplay/models/util.js +0 -1
- package/dist/BasicTrack/configSchema.js +1 -1
- package/dist/BasicTrack/index.js +0 -1
- package/dist/FeatureTrack/configSchema.d.ts +1 -3
- package/dist/FeatureTrack/configSchema.js +1 -1
- package/dist/FeatureTrack/index.js +0 -1
- package/dist/LaunchLinearGenomeView/index.js +0 -1
- package/dist/LinearBareDisplay/configSchema.d.ts +1 -0
- package/dist/LinearBareDisplay/configSchema.js +1 -1
- package/dist/LinearBareDisplay/index.js +0 -1
- package/dist/LinearBareDisplay/model.d.ts +52 -39
- package/dist/LinearBareDisplay/model.js +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
- package/dist/LinearBasicDisplay/configSchema.d.ts +1 -0
- package/dist/LinearBasicDisplay/configSchema.js +1 -1
- package/dist/LinearBasicDisplay/index.js +0 -1
- package/dist/LinearBasicDisplay/model.d.ts +67 -66
- package/dist/LinearBasicDisplay/model.js +1 -1
- package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -1
- package/dist/LinearGenomeView/components/CenterLine.js +0 -1
- package/dist/LinearGenomeView/components/Cytobands.d.ts +2 -1
- package/dist/LinearGenomeView/components/Cytobands.js +0 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -1
- package/dist/LinearGenomeView/components/Gridlines.d.ts +2 -1
- package/dist/LinearGenomeView/components/Gridlines.js +0 -1
- package/dist/LinearGenomeView/components/Header.d.ts +2 -1
- package/dist/LinearGenomeView/components/Header.js +0 -1
- package/dist/LinearGenomeView/components/ImportForm.d.ts +2 -1
- package/dist/LinearGenomeView/components/ImportForm.js +0 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +2 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.js +28 -5
- package/dist/LinearGenomeView/components/MiniControls.d.ts +3 -2
- package/dist/LinearGenomeView/components/MiniControls.js +20 -41
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/dist/LinearGenomeView/components/OverviewScalebar.js +10 -5
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +21 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +51 -0
- package/dist/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -1
- package/dist/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +110 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +58 -0
- package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/Rubberband.js +0 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +2 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -1
- package/dist/LinearGenomeView/components/Scalebar.js +0 -1
- package/dist/LinearGenomeView/components/SearchBox.d.ts +2 -1
- package/dist/LinearGenomeView/components/SearchBox.js +0 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +2 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +2 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -1
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -1
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -3
- package/dist/LinearGenomeView/components/TrackContainer.js +12 -69
- package/dist/LinearGenomeView/components/TrackLabel.js +7 -12
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +31 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +73 -0
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +2 -3
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +2 -1
- package/dist/LinearGenomeView/components/VerticalGuide.js +0 -1
- package/dist/LinearGenomeView/components/ZoomControls.d.ts +2 -1
- package/dist/LinearGenomeView/components/ZoomControls.js +0 -1
- package/dist/LinearGenomeView/components/hooks.js +0 -1
- package/dist/LinearGenomeView/components/util.js +0 -1
- package/dist/LinearGenomeView/index.js +0 -1
- package/dist/LinearGenomeView/model.d.ts +13 -12
- package/dist/LinearGenomeView/model.js +25 -26
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -4
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +7 -3
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
- package/dist/LinearGenomeView/util.d.ts +2 -2
- package/dist/LinearGenomeView/util.js +0 -1
- package/dist/index.d.ts +160 -134
- package/dist/index.js +6 -4
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -1
- package/esm/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/Block.js +0 -1
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -2
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -1
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -1
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -1
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -1
- package/esm/BaseLinearDisplay/index.d.ts +5 -2
- package/esm/BaseLinearDisplay/index.js +3 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +62 -142
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +36 -335
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +183 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +52 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +38 -0
- package/esm/BaseLinearDisplay/models/configSchema.js +1 -1
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/esm/BaseLinearDisplay/models/renderSvg.js +53 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +20 -17
- package/esm/BaseLinearDisplay/models/util.js +0 -1
- package/esm/BasicTrack/configSchema.js +1 -1
- package/esm/BasicTrack/index.js +0 -1
- package/esm/FeatureTrack/configSchema.d.ts +1 -3
- package/esm/FeatureTrack/configSchema.js +1 -1
- package/esm/FeatureTrack/index.js +0 -1
- package/esm/LaunchLinearGenomeView/index.js +0 -1
- package/esm/LinearBareDisplay/configSchema.d.ts +1 -0
- package/esm/LinearBareDisplay/configSchema.js +1 -1
- package/esm/LinearBareDisplay/index.js +0 -1
- package/esm/LinearBareDisplay/model.d.ts +52 -39
- package/esm/LinearBareDisplay/model.js +1 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
- package/esm/LinearBasicDisplay/configSchema.d.ts +1 -0
- package/esm/LinearBasicDisplay/configSchema.js +1 -1
- package/esm/LinearBasicDisplay/index.js +0 -1
- package/esm/LinearBasicDisplay/model.d.ts +67 -66
- package/esm/LinearBasicDisplay/model.js +1 -1
- package/esm/LinearGenomeView/components/CenterLine.d.ts +2 -1
- package/esm/LinearGenomeView/components/CenterLine.js +0 -1
- package/esm/LinearGenomeView/components/Cytobands.d.ts +2 -1
- package/esm/LinearGenomeView/components/Cytobands.js +0 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +0 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +0 -1
- package/esm/LinearGenomeView/components/Gridlines.d.ts +2 -1
- package/esm/LinearGenomeView/components/Gridlines.js +0 -1
- package/esm/LinearGenomeView/components/Header.d.ts +2 -1
- package/esm/LinearGenomeView/components/Header.js +0 -1
- package/esm/LinearGenomeView/components/ImportForm.d.ts +2 -1
- package/esm/LinearGenomeView/components/ImportForm.js +0 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +2 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +4 -4
- package/esm/LinearGenomeView/components/MiniControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/MiniControls.js +20 -18
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.js +0 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +10 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +15 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +22 -0
- package/esm/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -1
- package/esm/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +82 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +49 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +0 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +2 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -1
- package/esm/LinearGenomeView/components/Scalebar.js +0 -1
- package/esm/LinearGenomeView/components/SearchBox.d.ts +2 -1
- package/esm/LinearGenomeView/components/SearchBox.js +0 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +2 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +0 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +2 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +0 -1
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -1
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +3 -3
- package/esm/LinearGenomeView/components/TrackContainer.js +13 -70
- package/esm/LinearGenomeView/components/TrackLabel.js +7 -12
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +26 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +48 -0
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +2 -3
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +0 -1
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +2 -1
- package/esm/LinearGenomeView/components/ZoomControls.js +0 -1
- package/esm/LinearGenomeView/components/hooks.js +0 -1
- package/esm/LinearGenomeView/components/util.js +0 -1
- package/esm/LinearGenomeView/index.js +0 -1
- package/esm/LinearGenomeView/model.d.ts +13 -12
- package/esm/LinearGenomeView/model.js +21 -22
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -4
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +7 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
- package/esm/LinearGenomeView/util.d.ts +2 -2
- package/esm/LinearGenomeView/util.js +0 -1
- package/esm/index.d.ts +160 -134
- package/esm/index.js +1 -2
- package/package.json +3 -4
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +0 -1
- package/dist/BaseLinearDisplay/components/Block.js.map +0 -1
- package/dist/BaseLinearDisplay/components/BlockMsg.js.map +0 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +0 -1
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +0 -1
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js.map +0 -1
- package/dist/BaseLinearDisplay/components/Tooltip.js.map +0 -1
- package/dist/BaseLinearDisplay/index.js.map +0 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +0 -1
- package/dist/BaseLinearDisplay/models/configSchema.js.map +0 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +0 -1
- package/dist/BaseLinearDisplay/models/util.js.map +0 -1
- package/dist/BasicTrack/configSchema.js.map +0 -1
- package/dist/BasicTrack/index.js.map +0 -1
- package/dist/FeatureTrack/configSchema.js.map +0 -1
- package/dist/FeatureTrack/index.js.map +0 -1
- package/dist/LaunchLinearGenomeView/index.js.map +0 -1
- package/dist/LinearBareDisplay/configSchema.js.map +0 -1
- package/dist/LinearBareDisplay/index.js.map +0 -1
- package/dist/LinearBareDisplay/model.js.map +0 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +0 -1
- package/dist/LinearBasicDisplay/configSchema.js.map +0 -1
- package/dist/LinearBasicDisplay/index.js.map +0 -1
- package/dist/LinearBasicDisplay/model.js.map +0 -1
- package/dist/LinearGenomeView/components/CenterLine.js.map +0 -1
- package/dist/LinearGenomeView/components/Cytobands.js.map +0 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/Gridlines.js.map +0 -1
- package/dist/LinearGenomeView/components/Header.js.map +0 -1
- package/dist/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/ImportForm.js.map +0 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.js.map +0 -1
- package/dist/LinearGenomeView/components/MiniControls.js.map +0 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.js.map +0 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +0 -189
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/dist/LinearGenomeView/components/Rubberband.js.map +0 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.js.map +0 -1
- package/dist/LinearGenomeView/components/Scalebar.js.map +0 -1
- package/dist/LinearGenomeView/components/SearchBox.js.map +0 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.js.map +0 -1
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/TrackContainer.js.map +0 -1
- package/dist/LinearGenomeView/components/TrackLabel.js.map +0 -1
- package/dist/LinearGenomeView/components/TracksContainer.js.map +0 -1
- package/dist/LinearGenomeView/components/VerticalGuide.js.map +0 -1
- package/dist/LinearGenomeView/components/ZoomControls.js.map +0 -1
- package/dist/LinearGenomeView/components/hooks.js.map +0 -1
- package/dist/LinearGenomeView/components/util.js.map +0 -1
- package/dist/LinearGenomeView/index.js.map +0 -1
- package/dist/LinearGenomeView/model.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js.map +0 -1
- package/dist/LinearGenomeView/util.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +0 -1
- package/esm/BaseLinearDisplay/components/Block.js.map +0 -1
- package/esm/BaseLinearDisplay/components/BlockMsg.js.map +0 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +0 -1
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +0 -1
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js.map +0 -1
- package/esm/BaseLinearDisplay/components/Tooltip.js.map +0 -1
- package/esm/BaseLinearDisplay/index.js.map +0 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +0 -1
- package/esm/BaseLinearDisplay/models/configSchema.js.map +0 -1
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +0 -1
- package/esm/BaseLinearDisplay/models/util.js.map +0 -1
- package/esm/BasicTrack/configSchema.js.map +0 -1
- package/esm/BasicTrack/index.js.map +0 -1
- package/esm/FeatureTrack/configSchema.js.map +0 -1
- package/esm/FeatureTrack/index.js.map +0 -1
- package/esm/LaunchLinearGenomeView/index.js.map +0 -1
- package/esm/LinearBareDisplay/configSchema.js.map +0 -1
- package/esm/LinearBareDisplay/index.js.map +0 -1
- package/esm/LinearBareDisplay/model.js.map +0 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +0 -1
- package/esm/LinearBasicDisplay/configSchema.js.map +0 -1
- package/esm/LinearBasicDisplay/index.js.map +0 -1
- package/esm/LinearBasicDisplay/model.js.map +0 -1
- package/esm/LinearGenomeView/components/CenterLine.js.map +0 -1
- package/esm/LinearGenomeView/components/Cytobands.js.map +0 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/Gridlines.js.map +0 -1
- package/esm/LinearGenomeView/components/Header.js.map +0 -1
- package/esm/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/ImportForm.js.map +0 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js.map +0 -1
- package/esm/LinearGenomeView/components/MiniControls.js.map +0 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.js.map +0 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +0 -161
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/esm/LinearGenomeView/components/Rubberband.js.map +0 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.js.map +0 -1
- package/esm/LinearGenomeView/components/Scalebar.js.map +0 -1
- package/esm/LinearGenomeView/components/SearchBox.js.map +0 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js.map +0 -1
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/TrackContainer.js.map +0 -1
- package/esm/LinearGenomeView/components/TrackLabel.js.map +0 -1
- package/esm/LinearGenomeView/components/TracksContainer.js.map +0 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js.map +0 -1
- package/esm/LinearGenomeView/components/ZoomControls.js.map +0 -1
- package/esm/LinearGenomeView/components/hooks.js.map +0 -1
- package/esm/LinearGenomeView/components/util.js.map +0 -1
- package/esm/LinearGenomeView/index.js.map +0 -1
- package/esm/LinearGenomeView/model.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js.map +0 -1
- package/esm/LinearGenomeView/util.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +0 -117
- package/src/BaseLinearDisplay/components/Block.tsx +0 -77
- package/src/BaseLinearDisplay/components/BlockMsg.tsx +0 -42
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +0 -119
- package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +0 -69
- package/src/BaseLinearDisplay/components/TooLargeMessage.tsx +0 -36
- package/src/BaseLinearDisplay/components/Tooltip.tsx +0 -107
- package/src/BaseLinearDisplay/index.ts +0 -12
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +0 -768
- package/src/BaseLinearDisplay/models/configSchema.ts +0 -59
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +0 -318
- package/src/BaseLinearDisplay/models/util.ts +0 -67
- package/src/BasicTrack/configSchema.ts +0 -23
- package/src/BasicTrack/index.ts +0 -18
- package/src/FeatureTrack/configSchema.ts +0 -27
- package/src/FeatureTrack/index.ts +0 -18
- package/src/LaunchLinearGenomeView/index.ts +0 -66
- package/src/LinearBareDisplay/configSchema.ts +0 -27
- package/src/LinearBareDisplay/index.test.js +0 -34
- package/src/LinearBareDisplay/index.ts +0 -25
- package/src/LinearBareDisplay/model.ts +0 -53
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +0 -73
- package/src/LinearBasicDisplay/configSchema.ts +0 -27
- package/src/LinearBasicDisplay/index.ts +0 -25
- package/src/LinearBasicDisplay/model.ts +0 -214
- package/src/LinearGenomeView/README.md +0 -9
- package/src/LinearGenomeView/components/CenterLine.tsx +0 -65
- package/src/LinearGenomeView/components/Cytobands.tsx +0 -154
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +0 -149
- package/src/LinearGenomeView/components/GetSequenceDialog.tsx +0 -269
- package/src/LinearGenomeView/components/Gridlines.tsx +0 -119
- package/src/LinearGenomeView/components/Header.tsx +0 -126
- package/src/LinearGenomeView/components/HelpDialog.tsx +0 -69
- package/src/LinearGenomeView/components/ImportForm.tsx +0 -217
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +0 -167
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +0 -72
- package/src/LinearGenomeView/components/MiniControls.tsx +0 -55
- package/src/LinearGenomeView/components/OverviewRubberband.tsx +0 -219
- package/src/LinearGenomeView/components/OverviewScalebar.tsx +0 -345
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +0 -321
- package/src/LinearGenomeView/components/Rubberband.tsx +0 -89
- package/src/LinearGenomeView/components/RubberbandSpan.tsx +0 -99
- package/src/LinearGenomeView/components/Scalebar.test.tsx +0 -145
- package/src/LinearGenomeView/components/Scalebar.tsx +0 -199
- package/src/LinearGenomeView/components/SearchBox.tsx +0 -123
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +0 -57
- package/src/LinearGenomeView/components/SearchResultsTable.tsx +0 -121
- package/src/LinearGenomeView/components/SequenceSearchDialog.tsx +0 -136
- package/src/LinearGenomeView/components/TrackContainer.tsx +0 -180
- package/src/LinearGenomeView/components/TrackLabel.tsx +0 -143
- package/src/LinearGenomeView/components/TracksContainer.tsx +0 -114
- package/src/LinearGenomeView/components/VerticalGuide.tsx +0 -37
- package/src/LinearGenomeView/components/ZoomControls.tsx +0 -62
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +0 -1520
- package/src/LinearGenomeView/components/hooks.ts +0 -306
- package/src/LinearGenomeView/components/util.ts +0 -76
- package/src/LinearGenomeView/hg38DisplayedRegions.json +0 -3187
- package/src/LinearGenomeView/index.test.ts +0 -993
- package/src/LinearGenomeView/index.ts +0 -17
- package/src/LinearGenomeView/model.ts +0 -1532
- package/src/LinearGenomeView/svgcomponents/SVGBackground.tsx +0 -21
- package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +0 -93
- package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +0 -114
- package/src/LinearGenomeView/svgcomponents/SVGRegionSeparators.tsx +0 -31
- package/src/LinearGenomeView/svgcomponents/SVGRuler.tsx +0 -125
- package/src/LinearGenomeView/svgcomponents/SVGScalebar.tsx +0 -57
- package/src/LinearGenomeView/svgcomponents/SVGTrackLabel.tsx +0 -47
- package/src/LinearGenomeView/svgcomponents/SVGTracks.tsx +0 -67
- package/src/LinearGenomeView/util.test.ts +0 -33
- package/src/LinearGenomeView/util.ts +0 -182
- package/src/LinearGenomeView/volvoxDisplayedRegions.json +0 -16
- package/src/index.ts +0 -85
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { Paper, Typography } from '@mui/material'
|
|
2
|
-
import { makeStyles } from 'tss-react/mui'
|
|
3
|
-
import {
|
|
4
|
-
ContentBlock,
|
|
5
|
-
ElidedBlock,
|
|
6
|
-
InterRegionPaddingBlock,
|
|
7
|
-
} from '@jbrowse/core/util/blockTypes'
|
|
8
|
-
import { observer } from 'mobx-react'
|
|
9
|
-
import React from 'react'
|
|
10
|
-
import { LinearGenomeViewModel } from '..'
|
|
11
|
-
import {
|
|
12
|
-
ContentBlock as ContentBlockComponent,
|
|
13
|
-
ElidedBlock as ElidedBlockComponent,
|
|
14
|
-
InterRegionPaddingBlock as InterRegionPaddingBlockComponent,
|
|
15
|
-
} from '../../BaseLinearDisplay/components/Block'
|
|
16
|
-
import { makeTicks } from '../util'
|
|
17
|
-
import { getTickDisplayStr } from '@jbrowse/core/util'
|
|
18
|
-
|
|
19
|
-
type LGV = LinearGenomeViewModel
|
|
20
|
-
|
|
21
|
-
const useStyles = makeStyles()(theme => ({
|
|
22
|
-
scalebarContainer: {
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
position: 'relative',
|
|
25
|
-
},
|
|
26
|
-
scalebarZoomContainer: {
|
|
27
|
-
position: 'relative',
|
|
28
|
-
zIndex: 1,
|
|
29
|
-
},
|
|
30
|
-
scalebar: {
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
display: 'flex',
|
|
33
|
-
pointerEvents: 'none',
|
|
34
|
-
},
|
|
35
|
-
majorTickLabel: {
|
|
36
|
-
fontSize: '11px',
|
|
37
|
-
zIndex: 1,
|
|
38
|
-
background: theme.palette.background.paper,
|
|
39
|
-
lineHeight: 'normal',
|
|
40
|
-
pointerEvents: 'none',
|
|
41
|
-
},
|
|
42
|
-
tick: {
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
width: 0,
|
|
45
|
-
display: 'flex',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
pointerEvents: 'none',
|
|
48
|
-
},
|
|
49
|
-
refLabel: {
|
|
50
|
-
fontSize: '11px',
|
|
51
|
-
position: 'absolute',
|
|
52
|
-
left: '2px',
|
|
53
|
-
top: '-1px',
|
|
54
|
-
fontWeight: 'bold',
|
|
55
|
-
lineHeight: 'normal',
|
|
56
|
-
zIndex: 1,
|
|
57
|
-
pointerEvents: 'none',
|
|
58
|
-
background: theme.palette.background.paper,
|
|
59
|
-
},
|
|
60
|
-
}))
|
|
61
|
-
|
|
62
|
-
const RenderedRefNameLabels = observer(({ model }: { model: LGV }) => {
|
|
63
|
-
const { classes } = useStyles()
|
|
64
|
-
|
|
65
|
-
// find the block that needs pinning to the left side for context
|
|
66
|
-
let lastLeftBlock = 0
|
|
67
|
-
model.staticBlocks.forEach((block, i) => {
|
|
68
|
-
if (block.offsetPx - model.offsetPx < 0) {
|
|
69
|
-
lastLeftBlock = i
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
return (
|
|
73
|
-
<>
|
|
74
|
-
{model.staticBlocks.map((block, index) => {
|
|
75
|
-
return block instanceof ContentBlock &&
|
|
76
|
-
(block.isLeftEndOfDisplayedRegion || index === lastLeftBlock) ? (
|
|
77
|
-
<Typography
|
|
78
|
-
key={`refLabel-${block.key}-${index}`}
|
|
79
|
-
style={{
|
|
80
|
-
left:
|
|
81
|
-
index === lastLeftBlock
|
|
82
|
-
? Math.max(0, -model.offsetPx)
|
|
83
|
-
: block.offsetPx - model.offsetPx - 1,
|
|
84
|
-
paddingLeft: index === lastLeftBlock ? 0 : 1,
|
|
85
|
-
}}
|
|
86
|
-
className={classes.refLabel}
|
|
87
|
-
data-testid={`refLabel-${block.refName}`}
|
|
88
|
-
>
|
|
89
|
-
{block.refName}
|
|
90
|
-
</Typography>
|
|
91
|
-
) : null
|
|
92
|
-
})}
|
|
93
|
-
</>
|
|
94
|
-
)
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
const RenderedScalebarLabels = observer(({ model }: { model: LGV }) => {
|
|
98
|
-
const { classes } = useStyles()
|
|
99
|
-
const { bpPerPx, staticBlocks } = model
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<>
|
|
103
|
-
{staticBlocks.map((block, index) => {
|
|
104
|
-
const { reversed, start, end, key, widthPx } = block
|
|
105
|
-
if (block instanceof ContentBlock) {
|
|
106
|
-
const ticks = makeTicks(start, end, bpPerPx, true, false)
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<ContentBlockComponent key={`${key}-${index}`} block={block}>
|
|
110
|
-
{ticks.map(tick => {
|
|
111
|
-
if (tick.type === 'major') {
|
|
112
|
-
const x =
|
|
113
|
-
(reversed ? end - tick.base : tick.base - start) / bpPerPx
|
|
114
|
-
const baseNumber = tick.base + 1
|
|
115
|
-
return (
|
|
116
|
-
<div
|
|
117
|
-
key={tick.base}
|
|
118
|
-
className={classes.tick}
|
|
119
|
-
style={{ left: x }}
|
|
120
|
-
>
|
|
121
|
-
{baseNumber ? (
|
|
122
|
-
<Typography className={classes.majorTickLabel}>
|
|
123
|
-
{getTickDisplayStr(baseNumber, bpPerPx)}
|
|
124
|
-
</Typography>
|
|
125
|
-
) : null}
|
|
126
|
-
</div>
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
return null
|
|
130
|
-
})}
|
|
131
|
-
</ContentBlockComponent>
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
if (block instanceof ElidedBlock) {
|
|
135
|
-
return <ElidedBlockComponent key={key} width={widthPx} />
|
|
136
|
-
}
|
|
137
|
-
if (block instanceof InterRegionPaddingBlock) {
|
|
138
|
-
return (
|
|
139
|
-
<InterRegionPaddingBlockComponent
|
|
140
|
-
key={key}
|
|
141
|
-
width={widthPx}
|
|
142
|
-
style={{ background: 'none' }}
|
|
143
|
-
boundary={block.variant === 'boundary'}
|
|
144
|
-
/>
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
return null
|
|
148
|
-
})}
|
|
149
|
-
</>
|
|
150
|
-
)
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
interface ScalebarProps {
|
|
154
|
-
model: LGV
|
|
155
|
-
style?: React.CSSProperties
|
|
156
|
-
className?: string
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const Scalebar = React.forwardRef<HTMLDivElement, ScalebarProps>(
|
|
160
|
-
({ model, style, className, ...other }, ref) => {
|
|
161
|
-
const { classes, cx } = useStyles()
|
|
162
|
-
|
|
163
|
-
const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx
|
|
164
|
-
return (
|
|
165
|
-
<Paper
|
|
166
|
-
data-resizer="true" // used to avoid click-and-drag scrolls on trackscontainer
|
|
167
|
-
className={cx(classes.scalebarContainer, className)}
|
|
168
|
-
variant="outlined"
|
|
169
|
-
ref={ref}
|
|
170
|
-
style={style}
|
|
171
|
-
{...other}
|
|
172
|
-
>
|
|
173
|
-
<div
|
|
174
|
-
className={classes.scalebarZoomContainer}
|
|
175
|
-
style={{
|
|
176
|
-
transform:
|
|
177
|
-
model.scaleFactor !== 1
|
|
178
|
-
? `scaleX(${model.scaleFactor})`
|
|
179
|
-
: undefined,
|
|
180
|
-
}}
|
|
181
|
-
>
|
|
182
|
-
<div
|
|
183
|
-
className={classes.scalebar}
|
|
184
|
-
style={{
|
|
185
|
-
left: offsetLeft - 1,
|
|
186
|
-
width: model.staticBlocks.totalWidthPx,
|
|
187
|
-
...style,
|
|
188
|
-
}}
|
|
189
|
-
>
|
|
190
|
-
<RenderedScalebarLabels model={model} />
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
<RenderedRefNameLabels model={model} />
|
|
194
|
-
</Paper>
|
|
195
|
-
)
|
|
196
|
-
},
|
|
197
|
-
)
|
|
198
|
-
|
|
199
|
-
export default observer(Scalebar)
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { observer } from 'mobx-react'
|
|
3
|
-
import { useTheme, alpha } from '@mui/material'
|
|
4
|
-
import { makeStyles } from 'tss-react/mui'
|
|
5
|
-
import { getSession } from '@jbrowse/core/util'
|
|
6
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
7
|
-
|
|
8
|
-
// locals
|
|
9
|
-
import RefNameAutocomplete from './RefNameAutocomplete'
|
|
10
|
-
import { fetchResults, splitLast } from './util'
|
|
11
|
-
import { LinearGenomeViewModel, SPACING, WIDGET_HEIGHT } from '..'
|
|
12
|
-
|
|
13
|
-
const useStyles = makeStyles()(() => ({
|
|
14
|
-
headerRefName: {
|
|
15
|
-
minWidth: 100,
|
|
16
|
-
},
|
|
17
|
-
}))
|
|
18
|
-
|
|
19
|
-
function SearchBox({
|
|
20
|
-
model,
|
|
21
|
-
showHelp,
|
|
22
|
-
}: {
|
|
23
|
-
showHelp?: boolean
|
|
24
|
-
model: LinearGenomeViewModel
|
|
25
|
-
}) {
|
|
26
|
-
const { classes } = useStyles()
|
|
27
|
-
const theme = useTheme()
|
|
28
|
-
const session = getSession(model)
|
|
29
|
-
|
|
30
|
-
const { textSearchManager, assemblyManager } = session
|
|
31
|
-
const { assemblyNames, rankSearchResults } = model
|
|
32
|
-
const assemblyName = assemblyNames[0]
|
|
33
|
-
const assembly = assemblyManager.get(assemblyName)
|
|
34
|
-
const searchScope = model.searchScope(assemblyName)
|
|
35
|
-
|
|
36
|
-
async function navToOption(option: BaseResult) {
|
|
37
|
-
const location = option.getLocation()
|
|
38
|
-
const trackId = option.getTrackId()
|
|
39
|
-
if (location) {
|
|
40
|
-
await model.navToLocString(location, assemblyName)
|
|
41
|
-
if (trackId) {
|
|
42
|
-
model.showTrack(trackId)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// gets a string as input, or use stored option results from previous query,
|
|
48
|
-
// then re-query and
|
|
49
|
-
// 1) if it has multiple results: pop a dialog
|
|
50
|
-
// 2) if it's a single result navigate to it
|
|
51
|
-
// 3) else assume it's a locstring and navigate to it
|
|
52
|
-
async function handleSelectedRegion(option: BaseResult) {
|
|
53
|
-
try {
|
|
54
|
-
if (option.hasLocation()) {
|
|
55
|
-
await navToOption(option)
|
|
56
|
-
} else if (option.results?.length) {
|
|
57
|
-
model.setSearchResults(option.results, option.getLabel())
|
|
58
|
-
} else {
|
|
59
|
-
const input = option.getLabel()
|
|
60
|
-
const [ref, rest] = splitLast(input, ':')
|
|
61
|
-
const allRefs = assembly?.allRefNamesWithLowerCase || []
|
|
62
|
-
if (
|
|
63
|
-
allRefs.includes(input) ||
|
|
64
|
-
(allRefs.includes(ref) && !Number.isNaN(Number.parseInt(rest, 10)))
|
|
65
|
-
) {
|
|
66
|
-
await model.navToLocString(input, assemblyName)
|
|
67
|
-
} else {
|
|
68
|
-
const results = await fetchResults({
|
|
69
|
-
queryString: input,
|
|
70
|
-
searchType: 'exact',
|
|
71
|
-
searchScope,
|
|
72
|
-
rankSearchResults,
|
|
73
|
-
textSearchManager,
|
|
74
|
-
assembly,
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
if (results.length > 1) {
|
|
78
|
-
model.setSearchResults(results, input.toLowerCase())
|
|
79
|
-
} else if (results.length === 1) {
|
|
80
|
-
await navToOption(results[0])
|
|
81
|
-
} else {
|
|
82
|
-
await model.navToLocString(input, assemblyName)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
} catch (e) {
|
|
87
|
-
console.error(e)
|
|
88
|
-
session.notify(`${e}`, 'warning')
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return (
|
|
92
|
-
<RefNameAutocomplete
|
|
93
|
-
showHelp={showHelp}
|
|
94
|
-
onSelect={handleSelectedRegion}
|
|
95
|
-
assemblyName={assemblyName}
|
|
96
|
-
fetchResults={queryString =>
|
|
97
|
-
fetchResults({
|
|
98
|
-
queryString,
|
|
99
|
-
searchScope,
|
|
100
|
-
rankSearchResults,
|
|
101
|
-
textSearchManager,
|
|
102
|
-
assembly,
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
model={model}
|
|
106
|
-
minWidth={175}
|
|
107
|
-
TextFieldProps={{
|
|
108
|
-
variant: 'outlined',
|
|
109
|
-
className: classes.headerRefName,
|
|
110
|
-
style: { margin: SPACING },
|
|
111
|
-
InputProps: {
|
|
112
|
-
style: {
|
|
113
|
-
padding: 0,
|
|
114
|
-
height: WIDGET_HEIGHT,
|
|
115
|
-
background: alpha(theme.palette.background.paper, 0.8),
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
}}
|
|
119
|
-
/>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export default observer(SearchBox)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Dialog } from '@jbrowse/core/ui'
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
DialogActions,
|
|
6
|
-
DialogContent,
|
|
7
|
-
Divider,
|
|
8
|
-
Typography,
|
|
9
|
-
} from '@mui/material'
|
|
10
|
-
|
|
11
|
-
import { LinearGenomeViewModel } from '../..'
|
|
12
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
13
|
-
import SearchResultsTable from './SearchResultsTable'
|
|
14
|
-
|
|
15
|
-
export default function SearchResultsDialog({
|
|
16
|
-
model,
|
|
17
|
-
assemblyName,
|
|
18
|
-
searchQuery,
|
|
19
|
-
searchResults,
|
|
20
|
-
handleClose,
|
|
21
|
-
}: {
|
|
22
|
-
model: LinearGenomeViewModel
|
|
23
|
-
assemblyName?: string
|
|
24
|
-
searchQuery: string
|
|
25
|
-
searchResults?: BaseResult[]
|
|
26
|
-
handleClose: () => void
|
|
27
|
-
}) {
|
|
28
|
-
return (
|
|
29
|
-
<Dialog open maxWidth="xl" onClose={handleClose} title="Search results">
|
|
30
|
-
<DialogContent>
|
|
31
|
-
{!searchResults?.length ? (
|
|
32
|
-
<Typography>
|
|
33
|
-
No results found for <b>{searchQuery}</b>
|
|
34
|
-
</Typography>
|
|
35
|
-
) : (
|
|
36
|
-
<>
|
|
37
|
-
<Typography>
|
|
38
|
-
Showing results for <b>{searchQuery}</b>
|
|
39
|
-
</Typography>
|
|
40
|
-
<SearchResultsTable
|
|
41
|
-
model={model}
|
|
42
|
-
handleClose={handleClose}
|
|
43
|
-
assemblyName={assemblyName}
|
|
44
|
-
searchResults={searchResults}
|
|
45
|
-
/>
|
|
46
|
-
</>
|
|
47
|
-
)}
|
|
48
|
-
</DialogContent>
|
|
49
|
-
<Divider />
|
|
50
|
-
<DialogActions>
|
|
51
|
-
<Button onClick={() => handleClose()} color="primary">
|
|
52
|
-
Cancel
|
|
53
|
-
</Button>
|
|
54
|
-
</DialogActions>
|
|
55
|
-
</Dialog>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Paper,
|
|
5
|
-
Table,
|
|
6
|
-
TableBody,
|
|
7
|
-
TableCell,
|
|
8
|
-
TableContainer,
|
|
9
|
-
TableHead,
|
|
10
|
-
TableRow,
|
|
11
|
-
} from '@mui/material'
|
|
12
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
13
|
-
import { getRoot, resolveIdentifier } from 'mobx-state-tree'
|
|
14
|
-
import { getEnv, getSession } from '@jbrowse/core/util'
|
|
15
|
-
|
|
16
|
-
// locals
|
|
17
|
-
import { LinearGenomeViewModel } from '../..'
|
|
18
|
-
|
|
19
|
-
export default function SearchResultsTable({
|
|
20
|
-
searchResults,
|
|
21
|
-
assemblyName: optAssemblyName,
|
|
22
|
-
model,
|
|
23
|
-
handleClose,
|
|
24
|
-
}: {
|
|
25
|
-
searchResults: BaseResult[]
|
|
26
|
-
assemblyName?: string
|
|
27
|
-
model: LinearGenomeViewModel
|
|
28
|
-
handleClose: () => void
|
|
29
|
-
}) {
|
|
30
|
-
const session = getSession(model)
|
|
31
|
-
const { pluginManager } = getEnv(session)
|
|
32
|
-
const { assemblyManager } = session
|
|
33
|
-
const assemblyName =
|
|
34
|
-
optAssemblyName || model.displayedRegions[0]?.assemblyName
|
|
35
|
-
|
|
36
|
-
const assembly = assemblyManager.get(assemblyName)
|
|
37
|
-
if (!assembly) {
|
|
38
|
-
throw new Error(`assembly ${assemblyName} not found`)
|
|
39
|
-
}
|
|
40
|
-
if (!assembly.regions) {
|
|
41
|
-
throw new Error(`assembly ${assemblyName} regions not loaded`)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getTrackName(trackId: string | undefined) {
|
|
45
|
-
if (trackId) {
|
|
46
|
-
const schema = pluginManager.pluggableConfigSchemaType('track')
|
|
47
|
-
const configuration = resolveIdentifier(schema, getRoot(model), trackId)
|
|
48
|
-
return configuration?.name?.value || ''
|
|
49
|
-
}
|
|
50
|
-
return ''
|
|
51
|
-
}
|
|
52
|
-
async function handleClick(location: string) {
|
|
53
|
-
try {
|
|
54
|
-
const newRegion = assembly?.regions?.find(
|
|
55
|
-
region => location === region.refName,
|
|
56
|
-
)
|
|
57
|
-
if (newRegion) {
|
|
58
|
-
model.setDisplayedRegions([newRegion])
|
|
59
|
-
// we use showAllRegions after setDisplayedRegions to make the entire
|
|
60
|
-
// region visible, xref #1703
|
|
61
|
-
model.showAllRegions()
|
|
62
|
-
} else {
|
|
63
|
-
await model.navToLocString(location, assemblyName)
|
|
64
|
-
}
|
|
65
|
-
} catch (e) {
|
|
66
|
-
console.warn(e)
|
|
67
|
-
session.notify(`${e}`, 'warning')
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return (
|
|
71
|
-
<TableContainer component={Paper}>
|
|
72
|
-
<Table>
|
|
73
|
-
<TableHead>
|
|
74
|
-
<TableRow>
|
|
75
|
-
<TableCell>Name</TableCell>
|
|
76
|
-
<TableCell align="right">Location</TableCell>
|
|
77
|
-
<TableCell align="right">Track</TableCell>
|
|
78
|
-
<TableCell align="right" />
|
|
79
|
-
</TableRow>
|
|
80
|
-
</TableHead>
|
|
81
|
-
<TableBody>
|
|
82
|
-
{searchResults.map(result => (
|
|
83
|
-
<TableRow key={`${result.getId()}`}>
|
|
84
|
-
<TableCell component="th" scope="row">
|
|
85
|
-
{result.getLabel()}
|
|
86
|
-
</TableCell>
|
|
87
|
-
<TableCell align="right">{result.getLocation()}</TableCell>
|
|
88
|
-
<TableCell align="right">
|
|
89
|
-
{getTrackName(result.getTrackId()) || 'N/A'}
|
|
90
|
-
</TableCell>
|
|
91
|
-
<TableCell align="right">
|
|
92
|
-
<Button
|
|
93
|
-
onClick={async () => {
|
|
94
|
-
try {
|
|
95
|
-
const location = result.getLocation()
|
|
96
|
-
if (location) {
|
|
97
|
-
await handleClick(location)
|
|
98
|
-
const resultTrackId = result.getTrackId()
|
|
99
|
-
if (resultTrackId) {
|
|
100
|
-
model.showTrack(resultTrackId)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
} catch (e) {
|
|
104
|
-
console.error(e)
|
|
105
|
-
session.notify(`${e}`, 'error')
|
|
106
|
-
}
|
|
107
|
-
handleClose()
|
|
108
|
-
}}
|
|
109
|
-
color="primary"
|
|
110
|
-
variant="contained"
|
|
111
|
-
>
|
|
112
|
-
Go
|
|
113
|
-
</Button>
|
|
114
|
-
</TableCell>
|
|
115
|
-
</TableRow>
|
|
116
|
-
))}
|
|
117
|
-
</TableBody>
|
|
118
|
-
</Table>
|
|
119
|
-
</TableContainer>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Checkbox,
|
|
5
|
-
DialogActions,
|
|
6
|
-
DialogContent,
|
|
7
|
-
FormGroup,
|
|
8
|
-
FormControlLabel,
|
|
9
|
-
TextField,
|
|
10
|
-
Typography,
|
|
11
|
-
} from '@mui/material'
|
|
12
|
-
import { Dialog } from '@jbrowse/core/ui'
|
|
13
|
-
import { getSnapshot } from 'mobx-state-tree'
|
|
14
|
-
import { makeStyles } from 'tss-react/mui'
|
|
15
|
-
import { observer } from 'mobx-react'
|
|
16
|
-
import { getSession } from '@jbrowse/core/util'
|
|
17
|
-
|
|
18
|
-
const useStyles = makeStyles()({
|
|
19
|
-
dialogContent: {
|
|
20
|
-
width: '40em',
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
function SequenceDialog({
|
|
25
|
-
model,
|
|
26
|
-
handleClose,
|
|
27
|
-
}: {
|
|
28
|
-
model: { assemblyNames: string[]; toggleTrack(trackId: string): void }
|
|
29
|
-
handleClose: () => void
|
|
30
|
-
}) {
|
|
31
|
-
const { classes } = useStyles()
|
|
32
|
-
const [value, setValue] = useState('')
|
|
33
|
-
const [searchForward, setSearchForward] = useState(true)
|
|
34
|
-
const [searchReverse, setSearchReverse] = useState(true)
|
|
35
|
-
const [caseInsensitive, setCaseInsensitive] = useState(true)
|
|
36
|
-
|
|
37
|
-
let error
|
|
38
|
-
|
|
39
|
-
try {
|
|
40
|
-
new RegExp(value)
|
|
41
|
-
} catch (e) {
|
|
42
|
-
error = e
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Dialog maxWidth="xl" open onClose={handleClose} title="Sequence search">
|
|
47
|
-
<DialogContent className={classes.dialogContent}>
|
|
48
|
-
<Typography>
|
|
49
|
-
Supply a sequence to search for. A track will be created with the
|
|
50
|
-
resulting matches once submitted. You can also supply regex style
|
|
51
|
-
expressions e.g. AACT(C|T).
|
|
52
|
-
</Typography>
|
|
53
|
-
<TextField
|
|
54
|
-
value={value}
|
|
55
|
-
onChange={e => setValue(e.target.value)}
|
|
56
|
-
helperText="Sequence search pattern"
|
|
57
|
-
/>
|
|
58
|
-
<FormGroup>
|
|
59
|
-
<FormControlLabel
|
|
60
|
-
control={
|
|
61
|
-
<Checkbox
|
|
62
|
-
checked={searchForward}
|
|
63
|
-
onChange={event => setSearchForward(event.target.checked)}
|
|
64
|
-
/>
|
|
65
|
-
}
|
|
66
|
-
label="Search forward strand"
|
|
67
|
-
/>
|
|
68
|
-
<FormControlLabel
|
|
69
|
-
control={
|
|
70
|
-
<Checkbox
|
|
71
|
-
checked={searchReverse}
|
|
72
|
-
onChange={event => setSearchReverse(event.target.checked)}
|
|
73
|
-
/>
|
|
74
|
-
}
|
|
75
|
-
label="Search reverse strand"
|
|
76
|
-
/>
|
|
77
|
-
<FormControlLabel
|
|
78
|
-
control={
|
|
79
|
-
<Checkbox
|
|
80
|
-
checked={caseInsensitive}
|
|
81
|
-
onChange={event => setCaseInsensitive(event.target.checked)}
|
|
82
|
-
/>
|
|
83
|
-
}
|
|
84
|
-
label="Case insensitive"
|
|
85
|
-
/>
|
|
86
|
-
</FormGroup>
|
|
87
|
-
{error ? <Typography color="error">{`${error}`}</Typography> : null}
|
|
88
|
-
</DialogContent>
|
|
89
|
-
<DialogActions>
|
|
90
|
-
<Button
|
|
91
|
-
onClick={() => {
|
|
92
|
-
if (value) {
|
|
93
|
-
const trackId = `sequence_search_${+Date.now()}`
|
|
94
|
-
const session = getSession(model)
|
|
95
|
-
const { assemblyManager } = session
|
|
96
|
-
const assemblyName = model.assemblyNames[0]
|
|
97
|
-
session.addTrackConf({
|
|
98
|
-
trackId,
|
|
99
|
-
name: `Sequence search ${value}`,
|
|
100
|
-
assemblyNames: [assemblyName],
|
|
101
|
-
type: 'FeatureTrack',
|
|
102
|
-
adapter: {
|
|
103
|
-
type: 'SequenceSearchAdapter',
|
|
104
|
-
search: value,
|
|
105
|
-
searchForward,
|
|
106
|
-
searchReverse,
|
|
107
|
-
caseInsensitive,
|
|
108
|
-
sequenceAdapter: getSnapshot(
|
|
109
|
-
assemblyManager.get(assemblyName)?.configuration.sequence
|
|
110
|
-
.adapter,
|
|
111
|
-
),
|
|
112
|
-
},
|
|
113
|
-
})
|
|
114
|
-
model.toggleTrack(trackId)
|
|
115
|
-
}
|
|
116
|
-
handleClose()
|
|
117
|
-
}}
|
|
118
|
-
variant="contained"
|
|
119
|
-
color="primary"
|
|
120
|
-
>
|
|
121
|
-
Submit
|
|
122
|
-
</Button>
|
|
123
|
-
|
|
124
|
-
<Button
|
|
125
|
-
onClick={() => handleClose()}
|
|
126
|
-
variant="contained"
|
|
127
|
-
color="secondary"
|
|
128
|
-
>
|
|
129
|
-
Close
|
|
130
|
-
</Button>
|
|
131
|
-
</DialogActions>
|
|
132
|
-
</Dialog>
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export default observer(SequenceDialog)
|