@jbrowse/plugin-linear-genome-view 2.6.1 → 2.6.3
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.js +0 -1
- package/dist/BaseLinearDisplay/components/Block.js +0 -1
- package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -1
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -1
- package/dist/BaseLinearDisplay/index.js +0 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -1
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -1
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -1
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -1
- package/dist/BaseLinearDisplay/models/configSchema.js +0 -1
- package/dist/BaseLinearDisplay/models/renderSvg.js +0 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -1
- package/dist/BaseLinearDisplay/models/util.js +0 -1
- package/dist/BasicTrack/configSchema.js +0 -1
- package/dist/BasicTrack/index.js +0 -1
- package/dist/FeatureTrack/configSchema.js +0 -1
- package/dist/FeatureTrack/index.js +0 -1
- package/dist/LaunchLinearGenomeView/index.js +0 -1
- package/dist/LinearBareDisplay/configSchema.js +0 -1
- package/dist/LinearBareDisplay/index.js +0 -1
- package/dist/LinearBareDisplay/model.js +0 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
- package/dist/LinearBasicDisplay/configSchema.js +0 -1
- package/dist/LinearBasicDisplay/index.js +0 -1
- package/dist/LinearBasicDisplay/model.js +0 -1
- package/dist/LinearGenomeView/components/CenterLine.js +0 -1
- package/dist/LinearGenomeView/components/Cytobands.js +0 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -1
- package/dist/LinearGenomeView/components/Gridlines.js +0 -1
- package/dist/LinearGenomeView/components/Header.js +0 -1
- package/dist/LinearGenomeView/components/ImportForm.js +0 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -1
- package/dist/LinearGenomeView/components/MiniControls.js +0 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -1
- package/dist/LinearGenomeView/components/Rubberband.js +0 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -1
- package/dist/LinearGenomeView/components/Scalebar.js +0 -1
- package/dist/LinearGenomeView/components/SearchBox.js +0 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -1
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
- package/dist/LinearGenomeView/components/TrackContainer.js +0 -1
- package/dist/LinearGenomeView/components/TrackLabel.js +1 -2
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -1
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +3 -2
- package/dist/LinearGenomeView/components/TracksContainer.js +0 -1
- package/dist/LinearGenomeView/components/VerticalGuide.js +0 -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.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +6 -5
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +6 -4
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +8 -5
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
- package/dist/LinearGenomeView/util.js +0 -1
- package/dist/index.js +0 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -1
- package/esm/BaseLinearDisplay/components/Block.js +0 -1
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -1
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -1
- package/esm/BaseLinearDisplay/index.js +0 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -1
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -1
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -1
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -1
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -1
- package/esm/BaseLinearDisplay/models/renderSvg.js +0 -1
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -1
- package/esm/BaseLinearDisplay/models/util.js +0 -1
- package/esm/BasicTrack/configSchema.js +0 -1
- package/esm/BasicTrack/index.js +0 -1
- package/esm/FeatureTrack/configSchema.js +0 -1
- package/esm/FeatureTrack/index.js +0 -1
- package/esm/LaunchLinearGenomeView/index.js +0 -1
- package/esm/LinearBareDisplay/configSchema.js +0 -1
- package/esm/LinearBareDisplay/index.js +0 -1
- package/esm/LinearBareDisplay/model.js +0 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
- package/esm/LinearBasicDisplay/configSchema.js +0 -1
- package/esm/LinearBasicDisplay/index.js +0 -1
- package/esm/LinearBasicDisplay/model.js +0 -1
- package/esm/LinearGenomeView/components/CenterLine.js +0 -1
- package/esm/LinearGenomeView/components/Cytobands.js +0 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +0 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +0 -1
- package/esm/LinearGenomeView/components/Gridlines.js +0 -1
- package/esm/LinearGenomeView/components/Header.js +0 -1
- package/esm/LinearGenomeView/components/ImportForm.js +0 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +0 -1
- package/esm/LinearGenomeView/components/MiniControls.js +0 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.js +0 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.js +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -1
- package/esm/LinearGenomeView/components/Rubberband.js +0 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -1
- package/esm/LinearGenomeView/components/Scalebar.js +0 -1
- package/esm/LinearGenomeView/components/SearchBox.js +0 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +0 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +0 -1
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +0 -1
- package/esm/LinearGenomeView/components/TrackLabel.js +1 -2
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +4 -3
- package/esm/LinearGenomeView/components/TracksContainer.js +0 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +0 -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.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +6 -5
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +6 -4
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +8 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
- package/esm/LinearGenomeView/util.js +0 -1
- package/esm/index.js +0 -1
- package/package.json +4 -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/FeatureDensityMixin.js.map +0 -1
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js.map +0 -1
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +0 -1
- package/dist/BaseLinearDisplay/models/configSchema.js.map +0 -1
- package/dist/BaseLinearDisplay/models/renderSvg.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/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/AutocompleteTextField.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.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/TrackLabelContainer.js.map +0 -1
- package/dist/LinearGenomeView/components/TrackRenderingContainer.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/FeatureDensityMixin.js.map +0 -1
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js.map +0 -1
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +0 -1
- package/esm/BaseLinearDisplay/models/configSchema.js.map +0 -1
- package/esm/BaseLinearDisplay/models/renderSvg.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/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/AutocompleteTextField.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.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/TrackLabelContainer.js.map +0 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.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 -16
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +0 -407
- package/src/BaseLinearDisplay/models/FeatureDensityMixin.tsx +0 -213
- package/src/BaseLinearDisplay/models/TrackHeightMixin.tsx +0 -59
- package/src/BaseLinearDisplay/models/autorunFeatureDensityStats.ts +0 -46
- package/src/BaseLinearDisplay/models/configSchema.ts +0 -60
- package/src/BaseLinearDisplay/models/renderSvg.tsx +0 -101
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +0 -320
- package/src/BaseLinearDisplay/models/util.ts +0 -67
- package/src/BasicTrack/configSchema.ts +0 -24
- package/src/BasicTrack/index.ts +0 -18
- package/src/FeatureTrack/configSchema.ts +0 -28
- package/src/FeatureTrack/index.ts +0 -18
- package/src/LaunchLinearGenomeView/index.ts +0 -66
- package/src/LinearBareDisplay/configSchema.ts +0 -28
- package/src/LinearBareDisplay/index.test.js +0 -34
- package/src/LinearBareDisplay/index.ts +0 -25
- package/src/LinearBareDisplay/model.ts +0 -54
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +0 -73
- package/src/LinearBasicDisplay/configSchema.ts +0 -28
- package/src/LinearBasicDisplay/index.ts +0 -25
- package/src/LinearBasicDisplay/model.ts +0 -215
- 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/ImportForm.tsx +0 -217
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +0 -167
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +0 -75
- package/src/LinearGenomeView/components/MiniControls.tsx +0 -54
- package/src/LinearGenomeView/components/OverviewRubberband.tsx +0 -219
- package/src/LinearGenomeView/components/OverviewScalebar.tsx +0 -351
- package/src/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.tsx +0 -53
- package/src/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.tsx +0 -44
- package/src/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.tsx +0 -69
- package/src/LinearGenomeView/components/RefNameAutocomplete/index.tsx +0 -160
- package/src/LinearGenomeView/components/RefNameAutocomplete/util.ts +0 -65
- 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 -92
- package/src/LinearGenomeView/components/TrackLabel.tsx +0 -123
- package/src/LinearGenomeView/components/TrackLabelContainer.tsx +0 -48
- package/src/LinearGenomeView/components/TrackRenderingContainer.tsx +0 -96
- 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 -1533
- package/src/LinearGenomeView/svgcomponents/SVGBackground.tsx +0 -21
- package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +0 -95
- 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 -91
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Checkbox,
|
|
5
|
-
CircularProgress,
|
|
6
|
-
DialogActions,
|
|
7
|
-
DialogContent,
|
|
8
|
-
FormControlLabel,
|
|
9
|
-
MenuItem,
|
|
10
|
-
TextField,
|
|
11
|
-
Typography,
|
|
12
|
-
} from '@mui/material'
|
|
13
|
-
import { Dialog, ErrorMessage } from '@jbrowse/core/ui'
|
|
14
|
-
import { getSession, useLocalStorage } from '@jbrowse/core/util'
|
|
15
|
-
|
|
16
|
-
// locals
|
|
17
|
-
import { ExportSvgOptions } from '..'
|
|
18
|
-
|
|
19
|
-
function LoadingMessage() {
|
|
20
|
-
return (
|
|
21
|
-
<div>
|
|
22
|
-
<CircularProgress size={20} style={{ marginRight: 20 }} />
|
|
23
|
-
<Typography display="inline">Creating SVG</Typography>
|
|
24
|
-
</div>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function useSvgLocal<T>(key: string, val: T) {
|
|
29
|
-
return useLocalStorage('svg-' + key, val)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default function ExportSvgDlg({
|
|
33
|
-
model,
|
|
34
|
-
handleClose,
|
|
35
|
-
}: {
|
|
36
|
-
model: { exportSvg(opts: ExportSvgOptions): Promise<void> }
|
|
37
|
-
handleClose: () => void
|
|
38
|
-
}) {
|
|
39
|
-
const session = getSession(model)
|
|
40
|
-
const offscreenCanvas = typeof OffscreenCanvas !== 'undefined'
|
|
41
|
-
const [rasterizeLayers, setRasterizeLayers] = useState(offscreenCanvas)
|
|
42
|
-
const [loading, setLoading] = useState(false)
|
|
43
|
-
const [error, setError] = useState<unknown>()
|
|
44
|
-
const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg')
|
|
45
|
-
const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset')
|
|
46
|
-
const [themeName, setThemeName] = useSvgLocal(
|
|
47
|
-
'theme',
|
|
48
|
-
session.themeName || 'default',
|
|
49
|
-
)
|
|
50
|
-
return (
|
|
51
|
-
<Dialog open onClose={handleClose} title="Export SVG">
|
|
52
|
-
<DialogContent>
|
|
53
|
-
{error ? (
|
|
54
|
-
<ErrorMessage error={error} />
|
|
55
|
-
) : loading ? (
|
|
56
|
-
<LoadingMessage />
|
|
57
|
-
) : null}
|
|
58
|
-
<TextField
|
|
59
|
-
helperText="filename"
|
|
60
|
-
value={filename}
|
|
61
|
-
onChange={event => setFilename(event.target.value)}
|
|
62
|
-
/>
|
|
63
|
-
<br />
|
|
64
|
-
<TextField
|
|
65
|
-
select
|
|
66
|
-
label="Track label positioning"
|
|
67
|
-
variant="outlined"
|
|
68
|
-
style={{ width: 150 }}
|
|
69
|
-
value={trackLabels}
|
|
70
|
-
onChange={event => setTrackLabels(event.target.value)}
|
|
71
|
-
>
|
|
72
|
-
<MenuItem value="offset">Offset</MenuItem>
|
|
73
|
-
<MenuItem value="overlay">Overlay</MenuItem>
|
|
74
|
-
<MenuItem value="left">Left</MenuItem>
|
|
75
|
-
<MenuItem value="none">None</MenuItem>
|
|
76
|
-
</TextField>
|
|
77
|
-
<br />
|
|
78
|
-
{session.allThemes ? (
|
|
79
|
-
<TextField
|
|
80
|
-
select
|
|
81
|
-
label="Theme"
|
|
82
|
-
variant="outlined"
|
|
83
|
-
value={themeName}
|
|
84
|
-
onChange={event => setThemeName(event.target.value)}
|
|
85
|
-
>
|
|
86
|
-
{Object.entries(session.allThemes()).map(([key, val]) => (
|
|
87
|
-
<MenuItem key={key} value={key}>
|
|
88
|
-
{
|
|
89
|
-
// @ts-expect-error
|
|
90
|
-
val.name || '(Unknown name)'
|
|
91
|
-
}
|
|
92
|
-
</MenuItem>
|
|
93
|
-
))}
|
|
94
|
-
</TextField>
|
|
95
|
-
) : null}
|
|
96
|
-
|
|
97
|
-
{offscreenCanvas ? (
|
|
98
|
-
<FormControlLabel
|
|
99
|
-
control={
|
|
100
|
-
<Checkbox
|
|
101
|
-
checked={rasterizeLayers}
|
|
102
|
-
onChange={() => setRasterizeLayers(val => !val)}
|
|
103
|
-
/>
|
|
104
|
-
}
|
|
105
|
-
label="Rasterize canvas based tracks? File may be much larger if this is turned off"
|
|
106
|
-
/>
|
|
107
|
-
) : (
|
|
108
|
-
<Typography>
|
|
109
|
-
Note: rasterizing layers not yet supported in this browser, so SVG
|
|
110
|
-
size may be large
|
|
111
|
-
</Typography>
|
|
112
|
-
)}
|
|
113
|
-
</DialogContent>
|
|
114
|
-
<DialogActions>
|
|
115
|
-
<Button
|
|
116
|
-
variant="contained"
|
|
117
|
-
color="secondary"
|
|
118
|
-
onClick={() => handleClose()}
|
|
119
|
-
>
|
|
120
|
-
Cancel
|
|
121
|
-
</Button>
|
|
122
|
-
<Button
|
|
123
|
-
variant="contained"
|
|
124
|
-
color="primary"
|
|
125
|
-
type="submit"
|
|
126
|
-
onClick={async () => {
|
|
127
|
-
setLoading(true)
|
|
128
|
-
setError(undefined)
|
|
129
|
-
try {
|
|
130
|
-
await model.exportSvg({
|
|
131
|
-
rasterizeLayers,
|
|
132
|
-
filename,
|
|
133
|
-
trackLabels,
|
|
134
|
-
themeName,
|
|
135
|
-
})
|
|
136
|
-
handleClose()
|
|
137
|
-
} catch (e) {
|
|
138
|
-
console.error(e)
|
|
139
|
-
setError(e)
|
|
140
|
-
setLoading(false)
|
|
141
|
-
}
|
|
142
|
-
}}
|
|
143
|
-
>
|
|
144
|
-
Submit
|
|
145
|
-
</Button>
|
|
146
|
-
</DialogActions>
|
|
147
|
-
</Dialog>
|
|
148
|
-
)
|
|
149
|
-
}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { makeStyles } from 'tss-react/mui'
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
Checkbox,
|
|
6
|
-
CircularProgress,
|
|
7
|
-
Container,
|
|
8
|
-
DialogActions,
|
|
9
|
-
DialogContent,
|
|
10
|
-
FormGroup,
|
|
11
|
-
FormControlLabel,
|
|
12
|
-
TextField,
|
|
13
|
-
Typography,
|
|
14
|
-
} from '@mui/material'
|
|
15
|
-
import { observer } from 'mobx-react'
|
|
16
|
-
import { saveAs } from 'file-saver'
|
|
17
|
-
import { getConf } from '@jbrowse/core/configuration'
|
|
18
|
-
import copy from 'copy-to-clipboard'
|
|
19
|
-
import { Dialog } from '@jbrowse/core/ui'
|
|
20
|
-
import {
|
|
21
|
-
getSession,
|
|
22
|
-
reverse,
|
|
23
|
-
complement,
|
|
24
|
-
Feature,
|
|
25
|
-
Region,
|
|
26
|
-
} from '@jbrowse/core/util'
|
|
27
|
-
import { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings'
|
|
28
|
-
|
|
29
|
-
// icons
|
|
30
|
-
import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons'
|
|
31
|
-
import GetAppIcon from '@mui/icons-material/GetApp'
|
|
32
|
-
|
|
33
|
-
// locals
|
|
34
|
-
import { LinearGenomeViewModel } from '..'
|
|
35
|
-
|
|
36
|
-
const useStyles = makeStyles()({
|
|
37
|
-
dialogContent: {
|
|
38
|
-
width: '80em',
|
|
39
|
-
},
|
|
40
|
-
textAreaFont: {
|
|
41
|
-
fontFamily: 'Courier New',
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
type LGV = LinearGenomeViewModel
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Fetches and returns a list features for a given list of regions
|
|
49
|
-
*/
|
|
50
|
-
async function fetchSequence(
|
|
51
|
-
model: LGV,
|
|
52
|
-
regions: Region[],
|
|
53
|
-
signal?: AbortSignal,
|
|
54
|
-
) {
|
|
55
|
-
const session = getSession(model)
|
|
56
|
-
const { leftOffset, rightOffset } = model
|
|
57
|
-
|
|
58
|
-
if (!leftOffset || !rightOffset) {
|
|
59
|
-
throw new Error('no offsets on model to use for range')
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (leftOffset.assemblyName !== rightOffset.assemblyName) {
|
|
63
|
-
throw new Error('not able to fetch sequences from multiple assemblies')
|
|
64
|
-
}
|
|
65
|
-
const { rpcManager, assemblyManager } = session
|
|
66
|
-
const assemblyName = leftOffset.assemblyName || rightOffset.assemblyName || ''
|
|
67
|
-
const assembly = assemblyManager.get(assemblyName)
|
|
68
|
-
if (!assembly) {
|
|
69
|
-
throw new Error(`assembly ${assemblyName} not found`)
|
|
70
|
-
}
|
|
71
|
-
const adapterConfig = getConf(assembly, ['sequence', 'adapter'])
|
|
72
|
-
|
|
73
|
-
const sessionId = 'getSequence'
|
|
74
|
-
return rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
75
|
-
adapterConfig,
|
|
76
|
-
regions,
|
|
77
|
-
sessionId,
|
|
78
|
-
signal,
|
|
79
|
-
}) as Promise<Feature[]>
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function SequenceDialog({
|
|
83
|
-
model,
|
|
84
|
-
handleClose,
|
|
85
|
-
}: {
|
|
86
|
-
model: LGV
|
|
87
|
-
handleClose: () => void
|
|
88
|
-
}) {
|
|
89
|
-
const { classes } = useStyles()
|
|
90
|
-
const session = getSession(model)
|
|
91
|
-
const [error, setError] = useState<unknown>()
|
|
92
|
-
const [sequenceChunks, setSequenceChunks] = useState<Feature[]>()
|
|
93
|
-
const [rev, setReverse] = useState(false)
|
|
94
|
-
const [copied, setCopied] = useState(false)
|
|
95
|
-
const [comp, setComplement] = useState(false)
|
|
96
|
-
const { leftOffset, rightOffset } = model
|
|
97
|
-
const loading = Boolean(sequenceChunks === undefined)
|
|
98
|
-
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
let active = true
|
|
101
|
-
const controller = new AbortController()
|
|
102
|
-
|
|
103
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
104
|
-
;(async () => {
|
|
105
|
-
try {
|
|
106
|
-
// random note: the current selected region can't be a computed because
|
|
107
|
-
// it uses action on base1dview even though it's on the ephemeral
|
|
108
|
-
// base1dview
|
|
109
|
-
const selection = model.getSelectedRegions(leftOffset, rightOffset)
|
|
110
|
-
if (selection.length === 0) {
|
|
111
|
-
throw new Error('Selected region is out of bounds')
|
|
112
|
-
}
|
|
113
|
-
const chunks = await fetchSequence(model, selection, controller.signal)
|
|
114
|
-
if (active) {
|
|
115
|
-
setSequenceChunks(chunks)
|
|
116
|
-
}
|
|
117
|
-
} catch (e) {
|
|
118
|
-
console.error(e)
|
|
119
|
-
if (active) {
|
|
120
|
-
setError(e)
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
})()
|
|
124
|
-
|
|
125
|
-
return () => {
|
|
126
|
-
controller.abort()
|
|
127
|
-
active = false
|
|
128
|
-
}
|
|
129
|
-
}, [model, session, leftOffset, rightOffset])
|
|
130
|
-
|
|
131
|
-
const sequence = sequenceChunks
|
|
132
|
-
? formatSeqFasta(
|
|
133
|
-
sequenceChunks
|
|
134
|
-
.filter(f => !!f)
|
|
135
|
-
.map(chunk => {
|
|
136
|
-
let chunkSeq = chunk.get('seq')
|
|
137
|
-
const chunkRefName = chunk.get('refName')
|
|
138
|
-
const chunkStart = chunk.get('start') + 1
|
|
139
|
-
const chunkEnd = chunk.get('end')
|
|
140
|
-
const loc = `${chunkRefName}:${chunkStart}-${chunkEnd}`
|
|
141
|
-
if (chunkSeq?.length !== chunkEnd - chunkStart + 1) {
|
|
142
|
-
throw new Error(
|
|
143
|
-
`${loc} returned ${chunkSeq.length.toLocaleString()} bases, but should have returned ${(
|
|
144
|
-
chunkEnd - chunkStart
|
|
145
|
-
).toLocaleString()}`,
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (rev) {
|
|
150
|
-
chunkSeq = reverse(chunkSeq)
|
|
151
|
-
}
|
|
152
|
-
if (comp) {
|
|
153
|
-
chunkSeq = complement(chunkSeq)
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
header: loc + (rev ? '-rev' : '') + (comp ? '-comp' : ''),
|
|
157
|
-
seq: chunkSeq,
|
|
158
|
-
}
|
|
159
|
-
}),
|
|
160
|
-
)
|
|
161
|
-
: ''
|
|
162
|
-
|
|
163
|
-
const sequenceTooLarge = sequence ? sequence.length > 1_000_000 : false
|
|
164
|
-
|
|
165
|
-
return (
|
|
166
|
-
<Dialog
|
|
167
|
-
maxWidth="xl"
|
|
168
|
-
open
|
|
169
|
-
onClose={() => {
|
|
170
|
-
handleClose()
|
|
171
|
-
model.setOffsets()
|
|
172
|
-
}}
|
|
173
|
-
title="Reference sequence"
|
|
174
|
-
>
|
|
175
|
-
<DialogContent>
|
|
176
|
-
{error ? (
|
|
177
|
-
<Typography color="error">{`${error}`}</Typography>
|
|
178
|
-
) : loading ? (
|
|
179
|
-
<Container>
|
|
180
|
-
Retrieving reference sequence...
|
|
181
|
-
<CircularProgress
|
|
182
|
-
style={{ marginLeft: 10 }}
|
|
183
|
-
size={20}
|
|
184
|
-
disableShrink
|
|
185
|
-
/>
|
|
186
|
-
</Container>
|
|
187
|
-
) : null}
|
|
188
|
-
<TextField
|
|
189
|
-
data-testid="rubberband-sequence"
|
|
190
|
-
variant="outlined"
|
|
191
|
-
multiline
|
|
192
|
-
minRows={5}
|
|
193
|
-
maxRows={10}
|
|
194
|
-
disabled={sequenceTooLarge}
|
|
195
|
-
className={classes.dialogContent}
|
|
196
|
-
fullWidth
|
|
197
|
-
value={
|
|
198
|
-
sequenceTooLarge
|
|
199
|
-
? 'Reference sequence too large to display, use the download FASTA button'
|
|
200
|
-
: sequence
|
|
201
|
-
}
|
|
202
|
-
InputProps={{
|
|
203
|
-
readOnly: true,
|
|
204
|
-
classes: {
|
|
205
|
-
input: classes.textAreaFont,
|
|
206
|
-
},
|
|
207
|
-
}}
|
|
208
|
-
/>
|
|
209
|
-
<FormGroup>
|
|
210
|
-
<FormControlLabel
|
|
211
|
-
control={
|
|
212
|
-
<Checkbox
|
|
213
|
-
value={rev}
|
|
214
|
-
onChange={event => setReverse(event.target.checked)}
|
|
215
|
-
/>
|
|
216
|
-
}
|
|
217
|
-
label="Reverse sequence"
|
|
218
|
-
/>
|
|
219
|
-
<FormControlLabel
|
|
220
|
-
control={
|
|
221
|
-
<Checkbox
|
|
222
|
-
value={comp}
|
|
223
|
-
onChange={event => setComplement(event.target.checked)}
|
|
224
|
-
/>
|
|
225
|
-
}
|
|
226
|
-
label="Complement sequence"
|
|
227
|
-
/>
|
|
228
|
-
</FormGroup>
|
|
229
|
-
<Typography style={{ margin: 10 }}>
|
|
230
|
-
Note: Check both boxes for the "reverse complement"
|
|
231
|
-
</Typography>
|
|
232
|
-
</DialogContent>
|
|
233
|
-
<DialogActions>
|
|
234
|
-
<Button
|
|
235
|
-
onClick={() => {
|
|
236
|
-
copy(sequence)
|
|
237
|
-
setCopied(true)
|
|
238
|
-
setTimeout(() => setCopied(false), 500)
|
|
239
|
-
}}
|
|
240
|
-
disabled={loading || !!error || sequenceTooLarge}
|
|
241
|
-
color="primary"
|
|
242
|
-
startIcon={<ContentCopyIcon />}
|
|
243
|
-
>
|
|
244
|
-
{copied ? 'Copied' : 'Copy to clipboard'}
|
|
245
|
-
</Button>
|
|
246
|
-
<Button
|
|
247
|
-
onClick={() => {
|
|
248
|
-
saveAs(
|
|
249
|
-
new Blob([sequence || ''], {
|
|
250
|
-
type: 'text/x-fasta;charset=utf-8',
|
|
251
|
-
}),
|
|
252
|
-
'jbrowse_ref_seq.fa',
|
|
253
|
-
)
|
|
254
|
-
}}
|
|
255
|
-
disabled={loading || !!error}
|
|
256
|
-
color="primary"
|
|
257
|
-
startIcon={<GetAppIcon />}
|
|
258
|
-
>
|
|
259
|
-
Download FASTA
|
|
260
|
-
</Button>
|
|
261
|
-
<Button onClick={handleClose} variant="contained">
|
|
262
|
-
Close
|
|
263
|
-
</Button>
|
|
264
|
-
</DialogActions>
|
|
265
|
-
</Dialog>
|
|
266
|
-
)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export default observer(SequenceDialog)
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
ContentBlock,
|
|
4
|
-
ElidedBlock,
|
|
5
|
-
InterRegionPaddingBlock,
|
|
6
|
-
} from '@jbrowse/core/util/blockTypes'
|
|
7
|
-
import { makeStyles } from 'tss-react/mui'
|
|
8
|
-
import { observer } from 'mobx-react'
|
|
9
|
-
import { LinearGenomeViewModel } from '..'
|
|
10
|
-
import {
|
|
11
|
-
ContentBlock as ContentBlockComponent,
|
|
12
|
-
ElidedBlock as ElidedBlockComponent,
|
|
13
|
-
InterRegionPaddingBlock as InterRegionPaddingBlockComponent,
|
|
14
|
-
} from '../../BaseLinearDisplay/components/Block'
|
|
15
|
-
|
|
16
|
-
import { makeTicks } from '../util'
|
|
17
|
-
|
|
18
|
-
type LGV = LinearGenomeViewModel
|
|
19
|
-
|
|
20
|
-
const useStyles = makeStyles()(theme => ({
|
|
21
|
-
verticalGuidesZoomContainer: {
|
|
22
|
-
position: 'absolute',
|
|
23
|
-
height: '100%',
|
|
24
|
-
width: '100%',
|
|
25
|
-
zIndex: 1,
|
|
26
|
-
pointerEvents: 'none',
|
|
27
|
-
},
|
|
28
|
-
verticalGuidesContainer: {
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
height: '100%',
|
|
31
|
-
zIndex: 1,
|
|
32
|
-
pointerEvents: 'none',
|
|
33
|
-
display: 'flex',
|
|
34
|
-
},
|
|
35
|
-
tick: {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
height: '100%',
|
|
38
|
-
width: 1,
|
|
39
|
-
},
|
|
40
|
-
majorTick: {
|
|
41
|
-
background: theme.palette.action.disabled,
|
|
42
|
-
},
|
|
43
|
-
minorTick: {
|
|
44
|
-
background: theme.palette.divider,
|
|
45
|
-
},
|
|
46
|
-
}))
|
|
47
|
-
const RenderedVerticalGuides = observer(({ model }: { model: LGV }) => {
|
|
48
|
-
const { classes, cx } = useStyles()
|
|
49
|
-
return (
|
|
50
|
-
<>
|
|
51
|
-
{model.staticBlocks.map((block, index) => {
|
|
52
|
-
if (block instanceof ContentBlock) {
|
|
53
|
-
const ticks = makeTicks(block.start, block.end, model.bpPerPx)
|
|
54
|
-
return (
|
|
55
|
-
<ContentBlockComponent key={`${block.key}-${index}`} block={block}>
|
|
56
|
-
{ticks.map(tick => {
|
|
57
|
-
const x =
|
|
58
|
-
(block.reversed
|
|
59
|
-
? block.end - tick.base
|
|
60
|
-
: tick.base - block.start) / model.bpPerPx
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
key={tick.base}
|
|
64
|
-
className={cx(
|
|
65
|
-
classes.tick,
|
|
66
|
-
tick.type === 'major' || tick.type === 'labeledMajor'
|
|
67
|
-
? classes.majorTick
|
|
68
|
-
: classes.minorTick,
|
|
69
|
-
)}
|
|
70
|
-
style={{ left: x }}
|
|
71
|
-
/>
|
|
72
|
-
)
|
|
73
|
-
})}
|
|
74
|
-
</ContentBlockComponent>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
if (block instanceof ElidedBlock) {
|
|
78
|
-
return <ElidedBlockComponent key={block.key} width={block.widthPx} />
|
|
79
|
-
}
|
|
80
|
-
if (block instanceof InterRegionPaddingBlock) {
|
|
81
|
-
return (
|
|
82
|
-
<InterRegionPaddingBlockComponent
|
|
83
|
-
key={block.key}
|
|
84
|
-
width={block.widthPx}
|
|
85
|
-
boundary={block.variant === 'boundary'}
|
|
86
|
-
/>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
return null
|
|
90
|
-
})}
|
|
91
|
-
</>
|
|
92
|
-
)
|
|
93
|
-
})
|
|
94
|
-
function VerticalGuides({ model }: { model: LGV }) {
|
|
95
|
-
const { classes } = useStyles()
|
|
96
|
-
// find the block that needs pinning to the left side for context
|
|
97
|
-
const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx
|
|
98
|
-
return (
|
|
99
|
-
<div
|
|
100
|
-
className={classes.verticalGuidesZoomContainer}
|
|
101
|
-
style={{
|
|
102
|
-
transform:
|
|
103
|
-
model.scaleFactor !== 1 ? `scaleX(${model.scaleFactor})` : undefined,
|
|
104
|
-
}}
|
|
105
|
-
>
|
|
106
|
-
<div
|
|
107
|
-
className={classes.verticalGuidesContainer}
|
|
108
|
-
style={{
|
|
109
|
-
left: offsetLeft,
|
|
110
|
-
width: model.staticBlocks.totalWidthPx,
|
|
111
|
-
}}
|
|
112
|
-
>
|
|
113
|
-
<RenderedVerticalGuides model={model} />
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export default observer(VerticalGuides)
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { observer } from 'mobx-react'
|
|
3
|
-
import { Button, IconButton, FormGroup, Typography, alpha } from '@mui/material'
|
|
4
|
-
import { makeStyles } from 'tss-react/mui'
|
|
5
|
-
import { getBpDisplayStr } from '@jbrowse/core/util'
|
|
6
|
-
|
|
7
|
-
// icons
|
|
8
|
-
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons'
|
|
9
|
-
import ArrowForwardIcon from '@mui/icons-material/ArrowForward'
|
|
10
|
-
import ArrowBackIcon from '@mui/icons-material/ArrowBack'
|
|
11
|
-
|
|
12
|
-
// locals
|
|
13
|
-
import { LinearGenomeViewModel, SPACING } from '..'
|
|
14
|
-
import OverviewScalebar from './OverviewScalebar'
|
|
15
|
-
import ZoomControls from './ZoomControls'
|
|
16
|
-
import SearchBox from './SearchBox'
|
|
17
|
-
|
|
18
|
-
type LGV = LinearGenomeViewModel
|
|
19
|
-
const useStyles = makeStyles()(theme => ({
|
|
20
|
-
headerBar: {
|
|
21
|
-
display: 'flex',
|
|
22
|
-
},
|
|
23
|
-
headerForm: {
|
|
24
|
-
flexWrap: 'nowrap',
|
|
25
|
-
marginRight: 7,
|
|
26
|
-
},
|
|
27
|
-
spacer: {
|
|
28
|
-
flexGrow: 1,
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
panButton: {
|
|
32
|
-
background: alpha(theme.palette.background.paper, 0.8),
|
|
33
|
-
color: theme.palette.text.primary,
|
|
34
|
-
margin: SPACING,
|
|
35
|
-
},
|
|
36
|
-
bp: {
|
|
37
|
-
display: 'flex',
|
|
38
|
-
alignItems: 'center',
|
|
39
|
-
marginLeft: 5,
|
|
40
|
-
},
|
|
41
|
-
toggleButton: {
|
|
42
|
-
height: 44,
|
|
43
|
-
border: 'none',
|
|
44
|
-
marginLeft: theme.spacing(4),
|
|
45
|
-
},
|
|
46
|
-
buttonSpacer: {
|
|
47
|
-
marginRight: theme.spacing(2),
|
|
48
|
-
},
|
|
49
|
-
}))
|
|
50
|
-
|
|
51
|
-
const HeaderButtons = observer(({ model }: { model: LGV }) => {
|
|
52
|
-
const { classes } = useStyles()
|
|
53
|
-
return (
|
|
54
|
-
<IconButton
|
|
55
|
-
onClick={model.activateTrackSelector}
|
|
56
|
-
className={classes.toggleButton}
|
|
57
|
-
title="Open track selector"
|
|
58
|
-
value="track_select"
|
|
59
|
-
>
|
|
60
|
-
<TrackSelectorIcon className={classes.buttonSpacer} />
|
|
61
|
-
</IconButton>
|
|
62
|
-
)
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
function PanControls({ model }: { model: LGV }) {
|
|
66
|
-
const { classes } = useStyles()
|
|
67
|
-
return (
|
|
68
|
-
<>
|
|
69
|
-
<Button
|
|
70
|
-
variant="outlined"
|
|
71
|
-
className={classes.panButton}
|
|
72
|
-
onClick={() => model.slide(-0.9)}
|
|
73
|
-
>
|
|
74
|
-
<ArrowBackIcon />
|
|
75
|
-
</Button>
|
|
76
|
-
<Button
|
|
77
|
-
variant="outlined"
|
|
78
|
-
className={classes.panButton}
|
|
79
|
-
onClick={() => model.slide(0.9)}
|
|
80
|
-
>
|
|
81
|
-
<ArrowForwardIcon />
|
|
82
|
-
</Button>
|
|
83
|
-
</>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const RegionWidth = observer(({ model }: { model: LGV }) => {
|
|
88
|
-
const { classes } = useStyles()
|
|
89
|
-
const { coarseTotalBp } = model
|
|
90
|
-
return (
|
|
91
|
-
<Typography variant="body2" color="textSecondary" className={classes.bp}>
|
|
92
|
-
{getBpDisplayStr(coarseTotalBp)}
|
|
93
|
-
</Typography>
|
|
94
|
-
)
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
const Controls = ({ model }: { model: LGV }) => {
|
|
98
|
-
const { classes } = useStyles()
|
|
99
|
-
return (
|
|
100
|
-
<div className={classes.headerBar}>
|
|
101
|
-
<HeaderButtons model={model} />
|
|
102
|
-
<div className={classes.spacer} />
|
|
103
|
-
<FormGroup row className={classes.headerForm}>
|
|
104
|
-
<PanControls model={model} />
|
|
105
|
-
<SearchBox model={model} />
|
|
106
|
-
</FormGroup>
|
|
107
|
-
<RegionWidth model={model} />
|
|
108
|
-
<ZoomControls model={model} />
|
|
109
|
-
<div className={classes.spacer} />
|
|
110
|
-
</div>
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const LinearGenomeViewHeader = observer(({ model }: { model: LGV }) => {
|
|
115
|
-
return !model.hideHeader ? (
|
|
116
|
-
model.hideHeaderOverview ? (
|
|
117
|
-
<Controls model={model} />
|
|
118
|
-
) : (
|
|
119
|
-
<OverviewScalebar model={model}>
|
|
120
|
-
<Controls model={model} />
|
|
121
|
-
</OverviewScalebar>
|
|
122
|
-
)
|
|
123
|
-
) : null
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
export default LinearGenomeViewHeader
|