@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,21 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useTheme } from '@mui/material'
|
|
3
|
-
|
|
4
|
-
export default function SVGBackground({
|
|
5
|
-
width,
|
|
6
|
-
height,
|
|
7
|
-
shift,
|
|
8
|
-
}: {
|
|
9
|
-
width: number
|
|
10
|
-
height: number
|
|
11
|
-
shift: number
|
|
12
|
-
}) {
|
|
13
|
-
const theme = useTheme()
|
|
14
|
-
return (
|
|
15
|
-
<rect
|
|
16
|
-
width={width + shift * 2}
|
|
17
|
-
height={height}
|
|
18
|
-
fill={theme.palette.background.default}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { getSession } from '@jbrowse/core/util'
|
|
3
|
-
import Base1DView from '@jbrowse/core/util/Base1DViewModel'
|
|
4
|
-
import { useTheme } from '@mui/material'
|
|
5
|
-
|
|
6
|
-
// locals
|
|
7
|
-
import { LinearGenomeViewModel, HEADER_OVERVIEW_HEIGHT } from '..'
|
|
8
|
-
import Cytobands from '../components/Cytobands'
|
|
9
|
-
import { Polygon } from '../components/OverviewScalebar'
|
|
10
|
-
import SVGRuler from './SVGRuler'
|
|
11
|
-
import SVGScalebar from './SVGScalebar'
|
|
12
|
-
|
|
13
|
-
type LGV = LinearGenomeViewModel
|
|
14
|
-
|
|
15
|
-
export default function SVGHeader({
|
|
16
|
-
model,
|
|
17
|
-
fontSize,
|
|
18
|
-
cytobandHeight,
|
|
19
|
-
rulerHeight,
|
|
20
|
-
}: {
|
|
21
|
-
model: LGV
|
|
22
|
-
rulerHeight: number
|
|
23
|
-
fontSize: number
|
|
24
|
-
cytobandHeight: number
|
|
25
|
-
}) {
|
|
26
|
-
const { width, assemblyNames, showCytobands, displayedRegions } = model
|
|
27
|
-
const { assemblyManager } = getSession(model)
|
|
28
|
-
const assemblyName = assemblyNames.length > 1 ? '' : assemblyNames[0]
|
|
29
|
-
const assembly = assemblyManager.get(assemblyName)
|
|
30
|
-
const theme = useTheme()
|
|
31
|
-
|
|
32
|
-
const overview = Base1DView.create({
|
|
33
|
-
displayedRegions: JSON.parse(JSON.stringify(displayedRegions)),
|
|
34
|
-
interRegionPaddingWidth: 0,
|
|
35
|
-
minimumBlockWidth: model.minimumBlockWidth,
|
|
36
|
-
})
|
|
37
|
-
const visibleRegions = model.dynamicBlocks.contentBlocks
|
|
38
|
-
|
|
39
|
-
overview.setVolatileWidth(width)
|
|
40
|
-
overview.showAllRegions()
|
|
41
|
-
const block = overview.dynamicBlocks.contentBlocks[0]
|
|
42
|
-
|
|
43
|
-
const first = visibleRegions[0]
|
|
44
|
-
const firstOverviewPx =
|
|
45
|
-
overview.bpToPx({
|
|
46
|
-
...first,
|
|
47
|
-
coord: first.reversed ? first.end : first.start,
|
|
48
|
-
}) || 0
|
|
49
|
-
|
|
50
|
-
const last = visibleRegions[visibleRegions.length - 1]
|
|
51
|
-
const lastOverviewPx =
|
|
52
|
-
overview.bpToPx({
|
|
53
|
-
...last,
|
|
54
|
-
coord: last.reversed ? last.start : last.end,
|
|
55
|
-
}) || 0
|
|
56
|
-
const c = +showCytobands * cytobandHeight
|
|
57
|
-
return (
|
|
58
|
-
<g id="header">
|
|
59
|
-
<text
|
|
60
|
-
x={0}
|
|
61
|
-
y={fontSize}
|
|
62
|
-
fontSize={fontSize}
|
|
63
|
-
fill={theme.palette.text.primary}
|
|
64
|
-
>
|
|
65
|
-
{assemblyName}
|
|
66
|
-
</text>
|
|
67
|
-
|
|
68
|
-
{showCytobands ? (
|
|
69
|
-
<g transform={`translate(0 ${rulerHeight})`}>
|
|
70
|
-
<Cytobands overview={overview} assembly={assembly} block={block} />
|
|
71
|
-
<rect
|
|
72
|
-
stroke="red"
|
|
73
|
-
fill="rgb(255,0,0,0.1)"
|
|
74
|
-
width={Math.max(lastOverviewPx - firstOverviewPx, 0.5)}
|
|
75
|
-
height={HEADER_OVERVIEW_HEIGHT - 1}
|
|
76
|
-
x={firstOverviewPx}
|
|
77
|
-
y={0.5}
|
|
78
|
-
/>
|
|
79
|
-
<g transform={`translate(0,${HEADER_OVERVIEW_HEIGHT})`}>
|
|
80
|
-
<Polygon overview={overview} model={model} useOffset={false} />
|
|
81
|
-
</g>
|
|
82
|
-
</g>
|
|
83
|
-
) : null}
|
|
84
|
-
|
|
85
|
-
<g transform={`translate(0 ${fontSize + c})`}>
|
|
86
|
-
<SVGScalebar model={model} fontSize={fontSize} />
|
|
87
|
-
</g>
|
|
88
|
-
<g transform={`translate(0 ${rulerHeight + c})`}>
|
|
89
|
-
<SVGRuler model={model} fontSize={fontSize} />
|
|
90
|
-
</g>
|
|
91
|
-
</g>
|
|
92
|
-
)
|
|
93
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { renderToStaticMarkup } from 'react-dom/server'
|
|
3
|
-
import { when } from 'mobx'
|
|
4
|
-
import { getSession, max, measureText, sum } from '@jbrowse/core/util'
|
|
5
|
-
import { ThemeProvider } from '@mui/material'
|
|
6
|
-
import { createJBrowseTheme } from '@jbrowse/core/ui'
|
|
7
|
-
|
|
8
|
-
// locals
|
|
9
|
-
import { LinearGenomeViewModel, ExportSvgOptions } from '..'
|
|
10
|
-
import SVGBackground from './SVGBackground'
|
|
11
|
-
import SVGTracks from './SVGTracks'
|
|
12
|
-
import SVGHeader from './SVGHeader'
|
|
13
|
-
|
|
14
|
-
import { getTrackName } from '@jbrowse/core/util/tracks'
|
|
15
|
-
|
|
16
|
-
type LGV = LinearGenomeViewModel
|
|
17
|
-
|
|
18
|
-
interface Display {
|
|
19
|
-
height: number
|
|
20
|
-
}
|
|
21
|
-
interface Track {
|
|
22
|
-
displays: Display[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function totalHeight(
|
|
26
|
-
tracks: Track[],
|
|
27
|
-
textHeight: number,
|
|
28
|
-
trackLabels: string,
|
|
29
|
-
) {
|
|
30
|
-
return sum(
|
|
31
|
-
tracks.map(
|
|
32
|
-
t =>
|
|
33
|
-
t.displays[0].height +
|
|
34
|
-
(['none', 'left'].includes(trackLabels) ? 0 : textHeight),
|
|
35
|
-
),
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// render LGV to SVG
|
|
40
|
-
export async function renderToSvg(model: LGV, opts: ExportSvgOptions) {
|
|
41
|
-
await when(() => model.initialized)
|
|
42
|
-
const {
|
|
43
|
-
textHeight = 18,
|
|
44
|
-
headerHeight = 40,
|
|
45
|
-
rulerHeight = 50,
|
|
46
|
-
fontSize = 13,
|
|
47
|
-
cytobandHeight = 100,
|
|
48
|
-
trackLabels = 'offset',
|
|
49
|
-
themeName = 'default',
|
|
50
|
-
Wrapper = ({ children }) => <>{children}</>,
|
|
51
|
-
} = opts
|
|
52
|
-
const session = getSession(model)
|
|
53
|
-
const theme = session.allThemes?.()[themeName]
|
|
54
|
-
const { width, tracks, showCytobands } = model
|
|
55
|
-
const shift = 50
|
|
56
|
-
const c = +showCytobands * cytobandHeight
|
|
57
|
-
const offset = headerHeight + rulerHeight + c + 10
|
|
58
|
-
const height = totalHeight(tracks, textHeight, trackLabels) + offset + 100
|
|
59
|
-
const displayResults = await Promise.all(
|
|
60
|
-
tracks.map(async track => {
|
|
61
|
-
const display = track.displays[0]
|
|
62
|
-
await when(() => (display.ready !== undefined ? display.ready : true))
|
|
63
|
-
return { track, result: await display.renderSvg({ ...opts, theme }) }
|
|
64
|
-
}),
|
|
65
|
-
)
|
|
66
|
-
const trackLabelMaxLen =
|
|
67
|
-
max(
|
|
68
|
-
tracks.map(t =>
|
|
69
|
-
measureText(getTrackName(t.configuration, session), fontSize),
|
|
70
|
-
),
|
|
71
|
-
0,
|
|
72
|
-
) + 40
|
|
73
|
-
const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0
|
|
74
|
-
const w = width + trackLabelOffset
|
|
75
|
-
|
|
76
|
-
// the xlink namespace is used for rendering <image> tag
|
|
77
|
-
return renderToStaticMarkup(
|
|
78
|
-
<ThemeProvider theme={createJBrowseTheme(theme)}>
|
|
79
|
-
<Wrapper>
|
|
80
|
-
<svg
|
|
81
|
-
width={w}
|
|
82
|
-
height={height}
|
|
83
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
84
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
85
|
-
viewBox={[0, 0, w + shift * 2, height].toString()}
|
|
86
|
-
>
|
|
87
|
-
<SVGBackground width={w} height={height} shift={shift} />
|
|
88
|
-
<g transform={`translate(${shift} 0)`}>
|
|
89
|
-
<g transform={`translate(${trackLabelOffset})`}>
|
|
90
|
-
<SVGHeader
|
|
91
|
-
model={model}
|
|
92
|
-
fontSize={fontSize}
|
|
93
|
-
rulerHeight={rulerHeight}
|
|
94
|
-
cytobandHeight={cytobandHeight}
|
|
95
|
-
/>
|
|
96
|
-
</g>
|
|
97
|
-
<SVGTracks
|
|
98
|
-
textHeight={textHeight}
|
|
99
|
-
fontSize={fontSize}
|
|
100
|
-
model={model}
|
|
101
|
-
displayResults={displayResults}
|
|
102
|
-
offset={offset}
|
|
103
|
-
trackLabels={trackLabels}
|
|
104
|
-
trackLabelOffset={trackLabelOffset}
|
|
105
|
-
/>
|
|
106
|
-
</g>
|
|
107
|
-
</svg>
|
|
108
|
-
</Wrapper>
|
|
109
|
-
</ThemeProvider>,
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export { default as SVGRuler } from './SVGRuler'
|
|
114
|
-
export { default as SVGTracks } from './SVGTracks'
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
// locals
|
|
4
|
-
import { LinearGenomeViewModel } from '..'
|
|
5
|
-
|
|
6
|
-
type LGV = LinearGenomeViewModel
|
|
7
|
-
|
|
8
|
-
// SVG component, region separator
|
|
9
|
-
export default function SVGRegionSeparators({
|
|
10
|
-
model,
|
|
11
|
-
height,
|
|
12
|
-
}: {
|
|
13
|
-
height: number
|
|
14
|
-
model: LGV
|
|
15
|
-
}) {
|
|
16
|
-
const { dynamicBlocks, offsetPx, interRegionPaddingWidth } = model
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
{dynamicBlocks.contentBlocks.slice(1).map(block => (
|
|
20
|
-
<rect
|
|
21
|
-
key={block.key}
|
|
22
|
-
x={block.offsetPx - offsetPx - interRegionPaddingWidth}
|
|
23
|
-
width={interRegionPaddingWidth}
|
|
24
|
-
y={0}
|
|
25
|
-
height={height}
|
|
26
|
-
fill="grey"
|
|
27
|
-
/>
|
|
28
|
-
))}
|
|
29
|
-
</>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { getTickDisplayStr } from '@jbrowse/core/util'
|
|
3
|
-
import { useTheme } from '@mui/material'
|
|
4
|
-
|
|
5
|
-
// locals
|
|
6
|
-
import { makeTicks } from '../util'
|
|
7
|
-
|
|
8
|
-
import { LinearGenomeViewModel } from '..'
|
|
9
|
-
import SVGRegionSeparators from './SVGRegionSeparators'
|
|
10
|
-
|
|
11
|
-
type LGV = LinearGenomeViewModel
|
|
12
|
-
|
|
13
|
-
function Ruler({
|
|
14
|
-
start,
|
|
15
|
-
end,
|
|
16
|
-
bpPerPx,
|
|
17
|
-
reversed = false,
|
|
18
|
-
major = true,
|
|
19
|
-
minor = true,
|
|
20
|
-
hideText = false,
|
|
21
|
-
}: {
|
|
22
|
-
start: number
|
|
23
|
-
end: number
|
|
24
|
-
bpPerPx: number
|
|
25
|
-
reversed?: boolean
|
|
26
|
-
major?: boolean
|
|
27
|
-
minor?: boolean
|
|
28
|
-
hideText?: boolean
|
|
29
|
-
}) {
|
|
30
|
-
const ticks = makeTicks(start, end, bpPerPx, major, minor)
|
|
31
|
-
const theme = useTheme()
|
|
32
|
-
return (
|
|
33
|
-
<>
|
|
34
|
-
{ticks.map(tick => {
|
|
35
|
-
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx
|
|
36
|
-
return (
|
|
37
|
-
<line
|
|
38
|
-
key={tick.base}
|
|
39
|
-
x1={x}
|
|
40
|
-
x2={x}
|
|
41
|
-
y1={0}
|
|
42
|
-
y2={tick.type === 'major' ? 6 : 4}
|
|
43
|
-
strokeWidth={1}
|
|
44
|
-
stroke={theme.palette.text.secondary}
|
|
45
|
-
/>
|
|
46
|
-
)
|
|
47
|
-
})}
|
|
48
|
-
{!hideText
|
|
49
|
-
? ticks
|
|
50
|
-
.filter(tick => tick.type === 'major')
|
|
51
|
-
.map(tick => {
|
|
52
|
-
const x =
|
|
53
|
-
(reversed ? end - tick.base : tick.base - start) / bpPerPx
|
|
54
|
-
return (
|
|
55
|
-
<text
|
|
56
|
-
x={x - 3}
|
|
57
|
-
y={7 + 11}
|
|
58
|
-
key={`label-${tick.base}`}
|
|
59
|
-
fontSize={11}
|
|
60
|
-
fill={theme.palette.text.primary}
|
|
61
|
-
>
|
|
62
|
-
{getTickDisplayStr(tick.base + 1, bpPerPx)}
|
|
63
|
-
</text>
|
|
64
|
-
)
|
|
65
|
-
})
|
|
66
|
-
: null}
|
|
67
|
-
</>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export default function SVGRuler({
|
|
72
|
-
model,
|
|
73
|
-
fontSize,
|
|
74
|
-
}: {
|
|
75
|
-
model: LGV
|
|
76
|
-
fontSize: number
|
|
77
|
-
}) {
|
|
78
|
-
const {
|
|
79
|
-
dynamicBlocks: { contentBlocks },
|
|
80
|
-
offsetPx: viewOffsetPx,
|
|
81
|
-
bpPerPx,
|
|
82
|
-
} = model
|
|
83
|
-
const renderRuler = contentBlocks.length < 5
|
|
84
|
-
const theme = useTheme()
|
|
85
|
-
return (
|
|
86
|
-
<>
|
|
87
|
-
<SVGRegionSeparators model={model} height={30} />
|
|
88
|
-
{contentBlocks.map(block => {
|
|
89
|
-
const { start, end, key, reversed, offsetPx, refName, widthPx } = block
|
|
90
|
-
const offset = offsetPx - viewOffsetPx
|
|
91
|
-
const clipid = `clip-${key}`
|
|
92
|
-
return (
|
|
93
|
-
<g key={key}>
|
|
94
|
-
<defs>
|
|
95
|
-
<clipPath id={clipid}>
|
|
96
|
-
<rect x={0} y={0} width={widthPx} height={100} />
|
|
97
|
-
</clipPath>
|
|
98
|
-
</defs>
|
|
99
|
-
<g transform={`translate(${offset} 0)`}>
|
|
100
|
-
<g clipPath={`url(#${clipid})`}>
|
|
101
|
-
<text
|
|
102
|
-
x={4}
|
|
103
|
-
y={fontSize}
|
|
104
|
-
fontSize={fontSize}
|
|
105
|
-
fill={theme.palette.text.primary}
|
|
106
|
-
>
|
|
107
|
-
{refName}
|
|
108
|
-
</text>
|
|
109
|
-
<g transform="translate(0 20)">
|
|
110
|
-
<Ruler
|
|
111
|
-
hideText={!renderRuler}
|
|
112
|
-
start={start}
|
|
113
|
-
end={end}
|
|
114
|
-
bpPerPx={bpPerPx}
|
|
115
|
-
reversed={reversed}
|
|
116
|
-
/>
|
|
117
|
-
</g>
|
|
118
|
-
</g>
|
|
119
|
-
</g>
|
|
120
|
-
</g>
|
|
121
|
-
)
|
|
122
|
-
})}
|
|
123
|
-
</>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { getBpDisplayStr } from '@jbrowse/core/util'
|
|
3
|
-
import { useTheme } from '@mui/material'
|
|
4
|
-
import { LinearGenomeViewModel } from '..'
|
|
5
|
-
|
|
6
|
-
type LGV = LinearGenomeViewModel
|
|
7
|
-
|
|
8
|
-
export default function SVGScalebar({
|
|
9
|
-
model,
|
|
10
|
-
fontSize,
|
|
11
|
-
}: {
|
|
12
|
-
model: LGV
|
|
13
|
-
fontSize: number
|
|
14
|
-
}) {
|
|
15
|
-
const {
|
|
16
|
-
offsetPx,
|
|
17
|
-
dynamicBlocks: { totalWidthPxWithoutBorders: totalWidthPx, totalBp },
|
|
18
|
-
} = model
|
|
19
|
-
const theme = useTheme()
|
|
20
|
-
const displayBp = getBpDisplayStr(totalBp)
|
|
21
|
-
const x0 = Math.max(-offsetPx, 0)
|
|
22
|
-
const x1 = x0 + totalWidthPx
|
|
23
|
-
return (
|
|
24
|
-
<>
|
|
25
|
-
<line
|
|
26
|
-
x1={x0}
|
|
27
|
-
x2={x1}
|
|
28
|
-
y1={10}
|
|
29
|
-
y2={10}
|
|
30
|
-
stroke={theme.palette.text.secondary}
|
|
31
|
-
/>
|
|
32
|
-
<line
|
|
33
|
-
x1={x0}
|
|
34
|
-
x2={x0}
|
|
35
|
-
y1={5}
|
|
36
|
-
y2={15}
|
|
37
|
-
stroke={theme.palette.text.secondary}
|
|
38
|
-
/>
|
|
39
|
-
<line
|
|
40
|
-
x1={x1}
|
|
41
|
-
x2={x1}
|
|
42
|
-
y1={5}
|
|
43
|
-
y2={15}
|
|
44
|
-
stroke={theme.palette.text.secondary}
|
|
45
|
-
/>
|
|
46
|
-
<text
|
|
47
|
-
x={x0 + (x1 - x0) / 2}
|
|
48
|
-
y={fontSize * 2}
|
|
49
|
-
textAnchor="middle"
|
|
50
|
-
fontSize={fontSize}
|
|
51
|
-
fill={theme.palette.text.primary}
|
|
52
|
-
>
|
|
53
|
-
{displayBp}
|
|
54
|
-
</text>
|
|
55
|
-
</>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useTheme } from '@mui/material'
|
|
3
|
-
|
|
4
|
-
export default function SVGTrackLabel({
|
|
5
|
-
trackLabels,
|
|
6
|
-
trackName,
|
|
7
|
-
fontSize,
|
|
8
|
-
trackLabelOffset,
|
|
9
|
-
x,
|
|
10
|
-
}: {
|
|
11
|
-
trackName: string
|
|
12
|
-
trackLabels: string
|
|
13
|
-
fontSize: number
|
|
14
|
-
trackLabelOffset: number
|
|
15
|
-
x: number
|
|
16
|
-
}) {
|
|
17
|
-
const theme = useTheme()
|
|
18
|
-
const fill = theme.palette.text.primary
|
|
19
|
-
const xoff = trackLabels === 'overlay' ? 5 : 0
|
|
20
|
-
const yoff = trackLabels === 'offset' ? 5 : 0
|
|
21
|
-
return trackLabels !== 'none' ? (
|
|
22
|
-
<g>
|
|
23
|
-
{trackLabels === 'left' ? (
|
|
24
|
-
<text
|
|
25
|
-
x={trackLabelOffset - 40}
|
|
26
|
-
y={20}
|
|
27
|
-
fill={fill}
|
|
28
|
-
fontSize={fontSize}
|
|
29
|
-
dominantBaseline="hanging"
|
|
30
|
-
textAnchor="end"
|
|
31
|
-
>
|
|
32
|
-
{trackName}
|
|
33
|
-
</text>
|
|
34
|
-
) : (
|
|
35
|
-
<text
|
|
36
|
-
x={x + xoff}
|
|
37
|
-
y={yoff}
|
|
38
|
-
fill={fill}
|
|
39
|
-
fontSize={fontSize}
|
|
40
|
-
dominantBaseline="hanging"
|
|
41
|
-
>
|
|
42
|
-
{trackName}
|
|
43
|
-
</text>
|
|
44
|
-
)}
|
|
45
|
-
</g>
|
|
46
|
-
) : null
|
|
47
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration'
|
|
3
|
-
import { getTrackName } from '@jbrowse/core/util/tracks'
|
|
4
|
-
import { getSession } from '@jbrowse/core/util'
|
|
5
|
-
// locals
|
|
6
|
-
import { LinearGenomeViewModel } from '..'
|
|
7
|
-
import SVGRegionSeparators from './SVGRegionSeparators'
|
|
8
|
-
import SVGTrackLabel from './SVGTrackLabel'
|
|
9
|
-
|
|
10
|
-
type LGV = LinearGenomeViewModel
|
|
11
|
-
|
|
12
|
-
interface DisplayResult {
|
|
13
|
-
track: {
|
|
14
|
-
configuration: AnyConfigurationModel
|
|
15
|
-
displays: { height: number }[]
|
|
16
|
-
}
|
|
17
|
-
result: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// SVG component, tracks
|
|
21
|
-
export default function SVGTracks({
|
|
22
|
-
displayResults,
|
|
23
|
-
model,
|
|
24
|
-
offset,
|
|
25
|
-
textHeight,
|
|
26
|
-
fontSize,
|
|
27
|
-
trackLabels = 'offset',
|
|
28
|
-
trackLabelOffset = 0,
|
|
29
|
-
}: {
|
|
30
|
-
displayResults: DisplayResult[]
|
|
31
|
-
model: LGV
|
|
32
|
-
offset: number
|
|
33
|
-
textHeight: number
|
|
34
|
-
fontSize: number
|
|
35
|
-
trackLabels?: string
|
|
36
|
-
trackLabelOffset?: number
|
|
37
|
-
}) {
|
|
38
|
-
const session = getSession(model)
|
|
39
|
-
const textOffset = trackLabels === 'offset' ? textHeight : 0
|
|
40
|
-
return (
|
|
41
|
-
<>
|
|
42
|
-
{displayResults.map(({ track, result }) => {
|
|
43
|
-
const current = offset
|
|
44
|
-
const conf = track.configuration
|
|
45
|
-
const trackName = getTrackName(conf, session)
|
|
46
|
-
const display = track.displays[0]
|
|
47
|
-
const x = Math.max(-model.offsetPx, 0)
|
|
48
|
-
offset += display.height + textOffset
|
|
49
|
-
return (
|
|
50
|
-
<g key={conf.trackId} transform={`translate(0 ${current})`}>
|
|
51
|
-
<g transform={`translate(${trackLabelOffset} ${textOffset})`}>
|
|
52
|
-
<SVGRegionSeparators model={model} height={display.height} />
|
|
53
|
-
{result}
|
|
54
|
-
</g>
|
|
55
|
-
<SVGTrackLabel
|
|
56
|
-
trackName={trackName}
|
|
57
|
-
fontSize={fontSize}
|
|
58
|
-
trackLabels={trackLabels}
|
|
59
|
-
trackLabelOffset={trackLabelOffset}
|
|
60
|
-
x={x}
|
|
61
|
-
/>
|
|
62
|
-
</g>
|
|
63
|
-
)
|
|
64
|
-
})}
|
|
65
|
-
</>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { makeTicks } from './util'
|
|
2
|
-
|
|
3
|
-
describe('tick calculation', () => {
|
|
4
|
-
test('one', () => {
|
|
5
|
-
const result = Array.from(makeTicks(0, 10, 0.05))
|
|
6
|
-
expect(result).toEqual([
|
|
7
|
-
{ type: 'major', base: -1, index: 0 },
|
|
8
|
-
{ type: 'minor', base: 0, index: 1 },
|
|
9
|
-
{ type: 'minor', base: 1, index: 2 },
|
|
10
|
-
{ type: 'minor', base: 2, index: 3 },
|
|
11
|
-
{ type: 'minor', base: 3, index: 4 },
|
|
12
|
-
{ type: 'minor', base: 4, index: 5 },
|
|
13
|
-
{ type: 'minor', base: 5, index: 6 },
|
|
14
|
-
{ type: 'minor', base: 6, index: 7 },
|
|
15
|
-
{ type: 'minor', base: 7, index: 8 },
|
|
16
|
-
{ type: 'minor', base: 8, index: 9 },
|
|
17
|
-
{ type: 'major', base: 9, index: 10 },
|
|
18
|
-
{ type: 'minor', base: 10, index: 11 },
|
|
19
|
-
{ type: 'minor', base: 11, index: 12 },
|
|
20
|
-
])
|
|
21
|
-
})
|
|
22
|
-
test('two', () => {
|
|
23
|
-
const result = Array.from(makeTicks(0, 50, 1))
|
|
24
|
-
expect(result).toEqual([
|
|
25
|
-
{ type: 'minor', base: -21, index: 0 },
|
|
26
|
-
{ type: 'major', base: -1, index: 1 },
|
|
27
|
-
{ type: 'minor', base: 19, index: 2 },
|
|
28
|
-
{ type: 'minor', base: 39, index: 3 },
|
|
29
|
-
{ type: 'minor', base: 59, index: 4 },
|
|
30
|
-
{ type: 'minor', base: 79, index: 5 },
|
|
31
|
-
])
|
|
32
|
-
})
|
|
33
|
-
})
|