react-msaview 6.5.0 → 8.0.0
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/README.md +13 -11
- package/bundle/index.js +122 -112
- package/bundle/index.js.map +4 -4
- package/dist/colorSchemes.js +1 -2
- package/dist/colorSchemes.js.map +1 -1
- package/dist/columnStats.d.ts +28 -0
- package/dist/columnStats.js +34 -0
- package/dist/columnStats.js.map +1 -0
- package/dist/components/DragHandle.d.ts +3 -2
- package/dist/components/DragHandle.js +11 -5
- package/dist/components/DragHandle.js.map +1 -1
- package/dist/components/Loading.js +2 -2
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/MSAView.js +17 -6
- package/dist/components/MSAView.js.map +1 -1
- package/dist/components/MSAViewer.d.ts +69 -4
- package/dist/components/MSAViewer.js +201 -8
- package/dist/components/MSAViewer.js.map +1 -1
- package/dist/components/PortalTooltip.d.ts +11 -0
- package/dist/components/PortalTooltip.js +29 -0
- package/dist/components/PortalTooltip.js.map +1 -0
- package/dist/components/ResizeHandles.d.ts +3 -3
- package/dist/components/ResizeHandles.js +13 -24
- package/dist/components/ResizeHandles.js.map +1 -1
- package/dist/components/SequenceTextArea.js +3 -3
- package/dist/components/SequenceTextArea.js.map +1 -1
- package/dist/components/Track.js +41 -22
- package/dist/components/Track.js.map +1 -1
- package/dist/components/dialogs/{InterProScanDialog.d.ts → AnnotationFileDialog.d.ts} +2 -2
- package/dist/components/dialogs/AnnotationFileDialog.js +92 -0
- package/dist/components/dialogs/AnnotationFileDialog.js.map +1 -0
- package/dist/components/dialogs/ExportSVGDialog.js +5 -3
- package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
- package/dist/components/dialogs/FeatureDialog.js +13 -9
- package/dist/components/dialogs/FeatureDialog.js.map +1 -1
- package/dist/components/dialogs/TrackInfoDialog.js +1 -1
- package/dist/components/dialogs/TrackInfoDialog.js.map +1 -1
- package/dist/components/header/GappynessSlider.js +6 -11
- package/dist/components/header/GappynessSlider.js.map +1 -1
- package/dist/components/header/Header.js +7 -0
- package/dist/components/header/Header.js.map +1 -1
- package/dist/components/header/HeaderStatusArea.js +0 -2
- package/dist/components/header/HeaderStatusArea.js.map +1 -1
- package/dist/components/header/LoadWarnings.d.ts +6 -0
- package/dist/components/header/LoadWarnings.js +35 -0
- package/dist/components/header/LoadWarnings.js.map +1 -0
- package/dist/components/header/MultiAlignmentSelector.js +0 -0
- package/dist/components/header/MultiAlignmentSelector.js.map +1 -1
- package/dist/components/header/ScrollZoomIcons.d.ts +6 -0
- package/dist/components/header/ScrollZoomIcons.js +35 -0
- package/dist/components/header/ScrollZoomIcons.js.map +1 -0
- package/dist/components/header/TreeSettingsMenu.js +7 -1
- package/dist/components/header/TreeSettingsMenu.js.map +1 -1
- package/dist/components/header/UnshareableDataWarning.d.ts +6 -0
- package/dist/components/header/UnshareableDataWarning.js +40 -0
- package/dist/components/header/UnshareableDataWarning.js.map +1 -0
- package/dist/components/header/ZoomControls.js +49 -6
- package/dist/components/header/ZoomControls.js.map +1 -1
- package/dist/components/header/getAnnotationsMenu.js +11 -14
- package/dist/components/header/getAnnotationsMenu.js.map +1 -1
- package/dist/components/header/settingsMenuItems.js +10 -7
- package/dist/components/header/settingsMenuItems.js.map +1 -1
- package/dist/components/import/ImportForm.js +1 -1
- package/dist/components/import/ImportForm.js.map +1 -1
- package/dist/components/import/ImportFormExamples.js +2 -6
- package/dist/components/import/ImportFormExamples.js.map +1 -1
- package/dist/components/import/util.js +2 -0
- package/dist/components/import/util.js.map +1 -1
- package/dist/components/minimap/Minimap.js +1 -2
- package/dist/components/minimap/Minimap.js.map +1 -1
- package/dist/components/msa/AnnotationLegend.js +27 -19
- package/dist/components/msa/AnnotationLegend.js.map +1 -1
- package/dist/components/msa/MSACanvas.js +1 -1
- package/dist/components/msa/MSACanvas.js.map +1 -1
- package/dist/components/msa/MSACanvasBlock.js +17 -20
- package/dist/components/msa/MSACanvasBlock.js.map +1 -1
- package/dist/components/msa/MSAMouseoverCanvas.js +2 -1
- package/dist/components/msa/MSAMouseoverCanvas.js.map +1 -1
- package/dist/components/msa/domainBandCursor.d.ts +7 -11
- package/dist/components/msa/domainBandCursor.js +7 -11
- package/dist/components/msa/domainBandCursor.js.map +1 -1
- package/dist/components/msa/drawFeatureSpans.d.ts +53 -0
- package/dist/components/msa/drawFeatureSpans.js +78 -0
- package/dist/components/msa/drawFeatureSpans.js.map +1 -0
- package/dist/components/msa/legendRows.d.ts +8 -0
- package/dist/components/msa/legendRows.js +16 -0
- package/dist/components/msa/legendRows.js.map +1 -0
- package/dist/components/msa/msaRaster.d.ts +30 -27
- package/dist/components/msa/msaRaster.js +193 -90
- package/dist/components/msa/msaRaster.js.map +1 -1
- package/dist/components/msa/packDomainLanes.d.ts +20 -0
- package/dist/components/msa/packDomainLanes.js +33 -0
- package/dist/components/msa/packDomainLanes.js.map +1 -0
- package/dist/components/msa/renderBoxFeatureCanvasBlock.d.ts +3 -1
- package/dist/components/msa/renderBoxFeatureCanvasBlock.js +51 -87
- package/dist/components/msa/renderBoxFeatureCanvasBlock.js.map +1 -1
- package/dist/components/msa/renderHighlights.d.ts +44 -4
- package/dist/components/msa/renderHighlights.js +99 -11
- package/dist/components/msa/renderHighlights.js.map +1 -1
- package/dist/components/msa/renderMSABlock.d.ts +1 -2
- package/dist/components/msa/renderMSABlock.js +28 -31
- package/dist/components/msa/renderMSABlock.js.map +1 -1
- package/dist/components/msa/renderMSAMouseover.js +9 -30
- package/dist/components/msa/renderMSAMouseover.js.map +1 -1
- package/dist/components/msa/tileColor.js +4 -7
- package/dist/components/msa/tileColor.js.map +1 -1
- package/dist/components/msa/useMsaBlockMouse.d.ts +5 -3
- package/dist/components/msa/useMsaBlockMouse.js +6 -6
- package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
- package/dist/components/renderCtx.d.ts +1 -1
- package/dist/components/rowpanels/RowPanelBlock.d.ts +9 -0
- package/dist/components/rowpanels/RowPanelBlock.js +86 -0
- package/dist/components/rowpanels/RowPanelBlock.js.map +1 -0
- package/dist/components/rowpanels/RowPanelHeaders.d.ts +12 -0
- package/dist/components/rowpanels/RowPanelHeaders.js +38 -0
- package/dist/components/rowpanels/RowPanelHeaders.js.map +1 -0
- package/dist/components/{msa/ColumnStats.d.ts → rowpanels/RowPanels.d.ts} +2 -2
- package/dist/components/rowpanels/RowPanels.js +32 -0
- package/dist/components/rowpanels/RowPanels.js.map +1 -0
- package/dist/components/rowpanels/headerLayout.d.ts +1 -0
- package/dist/components/rowpanels/headerLayout.js +5 -0
- package/dist/components/rowpanels/headerLayout.js.map +1 -0
- package/dist/components/rowpanels/renderFeaturePanel.d.ts +21 -0
- package/dist/components/rowpanels/renderFeaturePanel.js +37 -0
- package/dist/components/rowpanels/renderFeaturePanel.js.map +1 -0
- package/dist/components/rowpanels/renderRowPanel.d.ts +23 -0
- package/dist/components/rowpanels/renderRowPanel.js +22 -0
- package/dist/components/rowpanels/renderRowPanel.js.map +1 -0
- package/dist/components/rowpanels/renderStrip.d.ts +20 -0
- package/dist/components/rowpanels/renderStrip.js +26 -0
- package/dist/components/rowpanels/renderStrip.js.map +1 -0
- package/dist/components/tracks/TrackBlocks.js +13 -16
- package/dist/components/tracks/TrackBlocks.js.map +1 -1
- package/dist/components/tracks/TrackTooltipContent.d.ts +15 -0
- package/dist/components/tracks/TrackTooltipContent.js +109 -0
- package/dist/components/tracks/TrackTooltipContent.js.map +1 -0
- package/dist/components/tracks/drawTracks.d.ts +30 -12
- package/dist/components/tracks/drawTracks.js +127 -34
- package/dist/components/tracks/drawTracks.js.map +1 -1
- package/dist/components/tracks/useTrackHover.d.ts +22 -0
- package/dist/components/tracks/useTrackHover.js +30 -0
- package/dist/components/tracks/useTrackHover.js.map +1 -0
- package/dist/components/tree/CladeLabels.d.ts +12 -0
- package/dist/components/tree/CladeLabels.js +48 -0
- package/dist/components/tree/CladeLabels.js.map +1 -0
- package/dist/components/tree/TreeCanvas.js +6 -4
- package/dist/components/tree/TreeCanvas.js.map +1 -1
- package/dist/components/tree/TreeCanvasBlock.js +6 -21
- package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
- package/dist/components/tree/TreeOverview.d.ts +14 -0
- package/dist/components/tree/TreeOverview.js +75 -0
- package/dist/components/tree/TreeOverview.js.map +1 -0
- package/dist/components/tree/TreeRuler.js +11 -5
- package/dist/components/tree/TreeRuler.js.map +1 -1
- package/dist/components/tree/cladeBrackets.d.ts +25 -0
- package/dist/components/tree/cladeBrackets.js +51 -0
- package/dist/components/tree/cladeBrackets.js.map +1 -0
- package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +2 -2
- package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
- package/dist/components/tree/renderTreeCanvas.d.ts +0 -1
- package/dist/components/tree/renderTreeCanvas.js +221 -47
- package/dist/components/tree/renderTreeCanvas.js.map +1 -1
- package/dist/components/tree/renderTreeOverview.d.ts +52 -0
- package/dist/components/tree/renderTreeOverview.js +138 -0
- package/dist/components/tree/renderTreeOverview.js.map +1 -0
- package/dist/components/tree/scaleBar.d.ts +10 -0
- package/dist/components/tree/scaleBar.js +24 -0
- package/dist/components/tree/scaleBar.js.map +1 -0
- package/dist/components/tree/useTreeHover.js +2 -4
- package/dist/components/tree/useTreeHover.js.map +1 -1
- package/dist/constants.d.ts +18 -1
- package/dist/constants.js +51 -8
- package/dist/constants.js.map +1 -1
- package/dist/createPaletteMap.d.ts +7 -6
- package/dist/createPaletteMap.js +10 -9
- package/dist/createPaletteMap.js.map +1 -1
- package/dist/element.d.ts +13 -0
- package/dist/element.js +269 -0
- package/dist/element.js.map +1 -0
- package/dist/featureFields.d.ts +11 -0
- package/dist/featureFields.js +17 -0
- package/dist/featureFields.js.map +1 -0
- package/dist/fetchUtils.d.ts +7 -7
- package/dist/fetchUtils.js +4 -32
- package/dist/fetchUtils.js.map +1 -1
- package/dist/flatToTree.js +1 -2
- package/dist/flatToTree.js.map +1 -1
- package/dist/ggplotPalettes.d.ts +10 -0
- package/dist/ggplotPalettes.js +58 -0
- package/dist/ggplotPalettes.js.map +1 -1
- package/dist/hierarchy.d.ts +29 -1
- package/dist/hierarchy.js +82 -19
- package/dist/hierarchy.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/model/DataModel.js +4 -4
- package/dist/model/DataModel.js.map +1 -1
- package/dist/model/msaModel.d.ts +3 -2
- package/dist/model/msaModel.js +3 -2
- package/dist/model/msaModel.js.map +1 -1
- package/dist/model/treeModel.d.ts +30 -0
- package/dist/model/treeModel.js +37 -1
- package/dist/model/treeModel.js.map +1 -1
- package/dist/model.d.ts +792 -259
- package/dist/model.js +2092 -675
- package/dist/model.js.map +1 -1
- package/dist/mount.d.ts +11 -0
- package/dist/mount.js +22 -0
- package/dist/mount.js.map +1 -0
- package/dist/neighborJoining.js +8 -32
- package/dist/neighborJoining.js.map +1 -1
- package/dist/renderToStaticMarkup.d.ts +15 -13
- package/dist/renderToStaticMarkup.js +37 -25
- package/dist/renderToStaticMarkup.js.map +1 -1
- package/dist/renderToSvg.js +198 -68
- package/dist/renderToSvg.js.map +1 -1
- package/dist/rowCoordinateCalculations.d.ts +26 -28
- package/dist/rowCoordinateCalculations.js +13 -39
- package/dist/rowCoordinateCalculations.js.map +1 -1
- package/dist/scales.d.ts +22 -0
- package/dist/scales.js +30 -0
- package/dist/scales.js.map +1 -0
- package/dist/seqPosToGlobalCol.d.ts +2 -3
- package/dist/seqPosToGlobalCol.js +5 -4
- package/dist/seqPosToGlobalCol.js.map +1 -1
- package/dist/sequenceLogo.d.ts +6 -11
- package/dist/sequenceLogo.js +6 -11
- package/dist/sequenceLogo.js.map +1 -1
- package/dist/stripDefault.d.ts +7 -14
- package/dist/stripDefault.js +7 -14
- package/dist/stripDefault.js.map +1 -1
- package/dist/svgTestUtil.d.ts +306 -124
- package/dist/types.d.ts +295 -3
- package/dist/umd.d.ts +2 -0
- package/dist/umd.js +4 -2
- package/dist/umd.js.map +1 -1
- package/dist/useCanvasAutorun.d.ts +5 -10
- package/dist/useCanvasAutorun.js +5 -10
- package/dist/useCanvasAutorun.js.map +1 -1
- package/dist/useMsaSvgFigure.d.ts +20 -0
- package/dist/useMsaSvgFigure.js +46 -0
- package/dist/useMsaSvgFigure.js.map +1 -0
- package/dist/util.d.ts +10 -4
- package/dist/util.js +37 -10
- package/dist/util.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wuss.d.ts +14 -0
- package/dist/wuss.js +55 -0
- package/dist/wuss.js.map +1 -0
- package/package.json +23 -14
- package/src/colorSchemes.ts +1 -2
- package/src/columnStats.ts +58 -0
- package/src/components/DragHandle.tsx +18 -7
- package/src/components/Loading.tsx +14 -8
- package/src/components/MSAView.tsx +19 -5
- package/src/components/MSAViewer.tsx +326 -10
- package/src/components/PortalTooltip.tsx +47 -0
- package/src/components/ResizeHandles.tsx +21 -36
- package/src/components/SequenceTextArea.tsx +3 -3
- package/src/components/Track.tsx +55 -18
- package/src/components/dialogs/AnnotationFileDialog.tsx +162 -0
- package/src/components/dialogs/ExportSVGDialog.tsx +7 -2
- package/src/components/dialogs/FeatureDialog.tsx +13 -9
- package/src/components/dialogs/TrackInfoDialog.tsx +1 -1
- package/src/components/header/GappynessSlider.tsx +6 -11
- package/src/components/header/Header.tsx +10 -0
- package/src/components/header/HeaderStatusArea.tsx +0 -5
- package/src/components/header/LoadWarnings.tsx +48 -0
- package/src/components/header/MultiAlignmentSelector.tsx +0 -0
- package/src/components/header/ScrollZoomIcons.tsx +52 -0
- package/src/components/header/TreeSettingsMenu.tsx +7 -1
- package/src/components/header/UnshareableDataWarning.tsx +56 -0
- package/src/components/header/ZoomControls.tsx +74 -14
- package/src/components/header/getAnnotationsMenu.ts +13 -17
- package/src/components/header/settingsMenuItems.ts +11 -6
- package/src/components/import/ImportForm.tsx +2 -2
- package/src/components/import/ImportFormExamples.tsx +4 -8
- package/src/components/import/util.ts +2 -0
- package/src/components/minimap/Minimap.tsx +1 -2
- package/src/components/msa/AnnotationLegend.tsx +48 -38
- package/src/components/msa/MSACanvas.tsx +3 -5
- package/src/components/msa/MSACanvasBlock.tsx +17 -21
- package/src/components/msa/MSAMouseoverCanvas.tsx +2 -1
- package/src/components/msa/domainBandCursor.ts +7 -11
- package/src/components/msa/drawFeatureSpans.ts +150 -0
- package/src/components/msa/legendRows.ts +24 -0
- package/src/components/msa/msaRaster.ts +236 -88
- package/src/components/msa/packDomainLanes.ts +36 -0
- package/src/components/msa/renderBoxFeatureCanvasBlock.ts +69 -123
- package/src/components/msa/renderHighlights.ts +141 -10
- package/src/components/msa/renderMSABlock.ts +29 -38
- package/src/components/msa/renderMSAMouseover.ts +9 -39
- package/src/components/msa/tileColor.ts +4 -7
- package/src/components/msa/useMsaBlockMouse.ts +6 -6
- package/src/components/renderCtx.ts +1 -0
- package/src/components/rowpanels/RowPanelBlock.tsx +139 -0
- package/src/components/rowpanels/RowPanelHeaders.tsx +57 -0
- package/src/components/rowpanels/RowPanels.tsx +77 -0
- package/src/components/rowpanels/headerLayout.ts +5 -0
- package/src/components/rowpanels/renderFeaturePanel.ts +66 -0
- package/src/components/rowpanels/renderRowPanel.ts +41 -0
- package/src/components/rowpanels/renderStrip.ts +46 -0
- package/src/components/tracks/TrackBlocks.tsx +13 -18
- package/src/components/tracks/TrackTooltipContent.tsx +156 -0
- package/src/components/tracks/drawTracks.ts +169 -38
- package/src/components/tracks/useTrackHover.ts +42 -0
- package/src/components/tree/CladeLabels.tsx +77 -0
- package/src/components/tree/TreeCanvas.tsx +4 -3
- package/src/components/tree/TreeCanvasBlock.tsx +10 -32
- package/src/components/tree/TreeOverview.tsx +106 -0
- package/src/components/tree/TreeRuler.tsx +29 -5
- package/src/components/tree/cladeBrackets.ts +73 -0
- package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +2 -2
- package/src/components/tree/renderTreeCanvas.ts +312 -48
- package/src/components/tree/renderTreeOverview.ts +212 -0
- package/src/components/tree/scaleBar.ts +23 -0
- package/src/components/tree/useTreeHover.ts +2 -4
- package/src/constants.ts +61 -8
- package/src/createPaletteMap.ts +10 -9
- package/src/element.ts +321 -0
- package/src/featureFields.ts +19 -0
- package/src/fetchUtils.ts +7 -40
- package/src/flatToTree.ts +1 -2
- package/src/ggplotPalettes.ts +60 -0
- package/src/hierarchy.ts +97 -20
- package/src/index.ts +46 -6
- package/src/model/DataModel.ts +5 -4
- package/src/model/msaModel.ts +3 -2
- package/src/model/treeModel.ts +42 -0
- package/src/model.ts +2492 -793
- package/src/mount.tsx +32 -0
- package/src/neighborJoining.ts +8 -32
- package/src/rawImports.d.ts +9 -0
- package/src/renderToStaticMarkup.ts +41 -25
- package/src/renderToSvg.tsx +365 -92
- package/src/rowCoordinateCalculations.ts +16 -62
- package/src/scales.ts +47 -0
- package/src/seqPosToGlobalCol.ts +5 -4
- package/src/sequenceLogo.ts +6 -11
- package/src/stripDefault.ts +7 -14
- package/src/types.ts +352 -12
- package/src/umd.ts +4 -2
- package/src/useCanvasAutorun.ts +5 -10
- package/src/useMsaSvgFigure.ts +72 -0
- package/src/util.ts +40 -14
- package/src/version.ts +1 -1
- package/src/wuss.ts +62 -0
- package/dist/components/dialogs/InterProScanDialog.js +0 -137
- package/dist/components/dialogs/InterProScanDialog.js.map +0 -1
- package/dist/components/dialogs/InterProScanFileDialog.d.ts +0 -7
- package/dist/components/dialogs/InterProScanFileDialog.js +0 -64
- package/dist/components/dialogs/InterProScanFileDialog.js.map +0 -1
- package/dist/components/msa/ColumnStats.js +0 -42
- package/dist/components/msa/ColumnStats.js.map +0 -1
- package/dist/launchInterProScan.d.ts +0 -13
- package/dist/launchInterProScan.js +0 -110
- package/dist/launchInterProScan.js.map +0 -1
- package/dist/useColorContrast.d.ts +0 -10
- package/dist/useColorContrast.js +0 -13
- package/dist/useColorContrast.js.map +0 -1
- package/src/clustalX.test.ts +0 -74
- package/src/colSpace.test.ts +0 -67
- package/src/collapseLogic.test.ts +0 -115
- package/src/colorSchemes.docs.test.ts +0 -57
- package/src/columnCounts.test.ts +0 -73
- package/src/columnStats.test.ts +0 -94
- package/src/columnTracks.test.ts +0 -97
- package/src/components/dialogs/InterProScanDialog.tsx +0 -214
- package/src/components/dialogs/InterProScanFileDialog.tsx +0 -138
- package/src/components/minimap/minimapLayout.test.ts +0 -71
- package/src/components/msa/ColumnStats.tsx +0 -54
- package/src/components/msa/msaRaster.test.ts +0 -145
- package/src/components/msa/renderBoxFeatureCanvasBlock.test.ts +0 -51
- package/src/components/tree/renderTreeCanvas.test.ts +0 -296
- package/src/dataInitialized.test.ts +0 -42
- package/src/domainBands.test.ts +0 -122
- package/src/domainLetterColor.test.ts +0 -80
- package/src/exportFileName.test.ts +0 -40
- package/src/fetchUtils.test.ts +0 -83
- package/src/flatToTree.test.ts +0 -51
- package/src/hierarchy.test.ts +0 -228
- package/src/highlights.test.ts +0 -70
- package/src/impgRender.test.tsx +0 -68
- package/src/largeTree.test.ts +0 -67
- package/src/launchInterProScan.ts +0 -167
- package/src/loadErrorDisplay.test.tsx +0 -102
- package/src/modelFilehandleLoaders.test.ts +0 -137
- package/src/modelReset.test.ts +0 -120
- package/src/neighborJoining.test.ts +0 -164
- package/src/parseAsn1.test.ts +0 -36
- package/src/propertyConservation.test.ts +0 -36
- package/src/renderColumnTracksSvg.test.tsx +0 -108
- package/src/renderDomainsSvg.test.tsx +0 -118
- package/src/renderHighlightsSvg.test.tsx +0 -85
- package/src/renderMinimapSvg.test.tsx +0 -62
- package/src/renderRasterSvg.test.tsx +0 -144
- package/src/renderSequenceLogoSvg.test.tsx +0 -165
- package/src/renderToSvg.test.tsx +0 -65
- package/src/reset.test.ts +0 -61
- package/src/rowCoordinateCalculations.test.ts +0 -211
- package/src/rowSpace.test.ts +0 -46
- package/src/segmentOverlay.test.ts +0 -70
- package/src/seqPosToGlobalCol.test.ts +0 -59
- package/src/sequenceLogo.test.ts +0 -88
- package/src/setFontSize.test.ts +0 -33
- package/src/stripDefault.test.ts +0 -48
- package/src/stripDefaultSnapshot.test.ts +0 -87
- package/src/treeMetadata.test.ts +0 -39
- package/src/useCanvasAutorun.test.tsx +0 -98
- package/src/useColorContrast.ts +0 -18
- package/src/viewChrome.test.tsx +0 -134
- package/src/wheelZoom.test.ts +0 -46
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Annotation } from './types.ts'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The value a feature gives an encoded field: an Annotation property, else one
|
|
5
|
+
* of the GFF attributes the parser kept.
|
|
6
|
+
*/
|
|
7
|
+
export function featureField(annotation: Annotation, field: string) {
|
|
8
|
+
const own = (annotation as unknown as Record<string, unknown>)[field]
|
|
9
|
+
const value = own ?? annotation.attributes?.[field]
|
|
10
|
+
return typeof value === 'string' ? value : undefined
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The name a feature answers to in a transform: its GFF `Name` attribute, else
|
|
15
|
+
* the name the parser gave it.
|
|
16
|
+
*/
|
|
17
|
+
export function featureName(annotation: Annotation) {
|
|
18
|
+
return featureField(annotation, 'Name') ?? featureField(annotation, 'name')
|
|
19
|
+
}
|
package/src/fetchUtils.ts
CHANGED
|
@@ -19,7 +19,6 @@ function statusMessageText(status: RpcStatus | undefined) {
|
|
|
19
19
|
|
|
20
20
|
export interface FetchStatus {
|
|
21
21
|
msg: string
|
|
22
|
-
url?: string
|
|
23
22
|
onCancel?: () => void
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -34,14 +33,18 @@ type ProgressFetcher = (
|
|
|
34
33
|
* Fetch text from a filehandle while reporting download/unzip progress through
|
|
35
34
|
* setStatus, and wiring a Cancel handler that aborts the underlying request.
|
|
36
35
|
* The status is always cleared once the fetch settles. The fetcher is injectable
|
|
37
|
-
* for testing
|
|
36
|
+
* for testing, and so is the AbortController: a caller that can supersede its
|
|
37
|
+
* own request -- the model's loaders, when the filehandle changes under them --
|
|
38
|
+
* holds one and aborts the download it no longer wants.
|
|
38
39
|
*/
|
|
39
40
|
export async function fetchTextWithProgress(
|
|
40
41
|
loc: Filehandle,
|
|
41
42
|
setStatus: (status?: FetchStatus) => void,
|
|
42
|
-
|
|
43
|
+
{
|
|
44
|
+
fetcher = fetchAndMaybeUnzipText,
|
|
45
|
+
controller = new AbortController(),
|
|
46
|
+
}: { fetcher?: ProgressFetcher; controller?: AbortController } = {},
|
|
43
47
|
) {
|
|
44
|
-
const controller = new AbortController()
|
|
45
48
|
try {
|
|
46
49
|
return await fetcher(loc, {
|
|
47
50
|
signal: controller.signal,
|
|
@@ -64,42 +67,6 @@ export async function fetchTextWithProgress(
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
export async function myfetch(url: string, args?: RequestInit) {
|
|
68
|
-
const response = await fetch(url, args)
|
|
69
|
-
|
|
70
|
-
if (!response.ok) {
|
|
71
|
-
throw new Error(
|
|
72
|
-
`HTTP ${response.status} fetching ${url} ${await response.text()}`,
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return response
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export async function textfetch(url: string, args?: RequestInit) {
|
|
80
|
-
const response = await myfetch(url, args)
|
|
81
|
-
return response.text()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export async function jsonfetch<T>(url: string, args?: RequestInit) {
|
|
85
|
-
const response = await myfetch(url, args)
|
|
86
|
-
return response.json() as T
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function timeout(time: number, signal?: AbortSignal) {
|
|
90
|
-
return new Promise<void>((resolve, reject) => {
|
|
91
|
-
if (signal?.aborted) {
|
|
92
|
-
reject(new DOMException('Aborted', 'AbortError'))
|
|
93
|
-
} else {
|
|
94
|
-
const id = setTimeout(resolve, time)
|
|
95
|
-
signal?.addEventListener('abort', () => {
|
|
96
|
-
clearTimeout(id)
|
|
97
|
-
reject(new DOMException('Aborted', 'AbortError'))
|
|
98
|
-
})
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
|
|
103
70
|
export function isAbortError(e: unknown) {
|
|
104
71
|
return e instanceof DOMException && e.name === 'AbortError'
|
|
105
72
|
}
|
package/src/flatToTree.ts
CHANGED
|
@@ -22,8 +22,7 @@ export function flatToTree(items: FlatItem[]): TreeNode {
|
|
|
22
22
|
item.id,
|
|
23
23
|
{
|
|
24
24
|
id: `${item.id}`,
|
|
25
|
-
//
|
|
26
|
-
// node id would render a tree of bare numbers
|
|
25
|
+
// NCBI's tree viewer shows the label
|
|
27
26
|
name: item.label || `${item.id}`,
|
|
28
27
|
...(length !== undefined && Number.isFinite(length)
|
|
29
28
|
? { length }
|
package/src/ggplotPalettes.ts
CHANGED
|
@@ -19,3 +19,63 @@ const palettes = [
|
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
export default palettes
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Fixed categorical palettes a scale names. `ggplot` is not one of them: it is
|
|
25
|
+
* the ramp above, which picks its colors from the number of keys.
|
|
26
|
+
*/
|
|
27
|
+
export const namedPalettes: Record<string, readonly string[]> = {
|
|
28
|
+
set1: [
|
|
29
|
+
'#e41a1c',
|
|
30
|
+
'#377eb8',
|
|
31
|
+
'#4daf4a',
|
|
32
|
+
'#984ea3',
|
|
33
|
+
'#ff7f00',
|
|
34
|
+
'#ffff33',
|
|
35
|
+
'#a65628',
|
|
36
|
+
'#f781bf',
|
|
37
|
+
'#999999',
|
|
38
|
+
],
|
|
39
|
+
dark2: [
|
|
40
|
+
'#1b9e77',
|
|
41
|
+
'#d95f02',
|
|
42
|
+
'#7570b3',
|
|
43
|
+
'#e7298a',
|
|
44
|
+
'#66a61e',
|
|
45
|
+
'#e6ab02',
|
|
46
|
+
'#a6761d',
|
|
47
|
+
'#666666',
|
|
48
|
+
],
|
|
49
|
+
// Okabe-Ito, which stays distinguishable under the common forms of color
|
|
50
|
+
// blindness
|
|
51
|
+
okabeito: [
|
|
52
|
+
'#e69f00',
|
|
53
|
+
'#56b4e9',
|
|
54
|
+
'#009e73',
|
|
55
|
+
'#f0e442',
|
|
56
|
+
'#0072b2',
|
|
57
|
+
'#d55e00',
|
|
58
|
+
'#cc79a7',
|
|
59
|
+
'#000000',
|
|
60
|
+
],
|
|
61
|
+
tableau: [
|
|
62
|
+
'#4e79a7',
|
|
63
|
+
'#f28e2b',
|
|
64
|
+
'#e15759',
|
|
65
|
+
'#76b7b2',
|
|
66
|
+
'#59a14f',
|
|
67
|
+
'#edc948',
|
|
68
|
+
'#b07aa1',
|
|
69
|
+
'#ff9da7',
|
|
70
|
+
'#9c755f',
|
|
71
|
+
'#bab0ac',
|
|
72
|
+
],
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The colors a palette name asks for. `ggplot`, an unknown name, and no name at
|
|
77
|
+
* all give undefined, which `createPaletteMap` answers with the hue ramp.
|
|
78
|
+
*/
|
|
79
|
+
export function paletteNamed(name?: string) {
|
|
80
|
+
return name === undefined ? undefined : namedPalettes[name]
|
|
81
|
+
}
|
package/src/hierarchy.ts
CHANGED
|
@@ -25,6 +25,11 @@ export interface HierarchyNode<T = NodeWithIds> extends CoreHierarchyNode<T> {
|
|
|
25
25
|
parent: HierarchyNode<T> | null
|
|
26
26
|
x?: number
|
|
27
27
|
y?: number
|
|
28
|
+
// the span of `x` over this node's subtree, set by clusterLayout. Leaves are
|
|
29
|
+
// laid out in order, so a subtree occupies one contiguous run of rows and a
|
|
30
|
+
// renderer can skip the whole thing when the run misses its block.
|
|
31
|
+
xMin?: number
|
|
32
|
+
xMax?: number
|
|
28
33
|
len?: number
|
|
29
34
|
depthToLeaf?: number
|
|
30
35
|
_children?: HierarchyNode<T>[] | null
|
|
@@ -33,10 +38,8 @@ export interface HierarchyNode<T = NodeWithIds> extends CoreHierarchyNode<T> {
|
|
|
33
38
|
collapsedTipXFar?: number
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
// The
|
|
37
|
-
//
|
|
38
|
-
// a phylogenetic tree can be a caterpillar, whose depth equals its leaf count,
|
|
39
|
-
// and the recursive form overflows the stack somewhere past 5000 tips.
|
|
41
|
+
// The @gmod/newick traversals are iterative: a caterpillar tree's depth equals
|
|
42
|
+
// its leaf count, and recursion overflows the stack past about 5000 tips.
|
|
40
43
|
export {
|
|
41
44
|
descendants,
|
|
42
45
|
find,
|
|
@@ -49,11 +52,8 @@ export {
|
|
|
49
52
|
}
|
|
50
53
|
export type { HierarchyLink } from '@gmod/newick'
|
|
51
54
|
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
// two node types are mutually assignable and this needs no cast -- it exists
|
|
55
|
-
// only to declare the wider return type, which is what lets those later
|
|
56
|
-
// assignments typecheck.
|
|
55
|
+
// declares the wider return type so the layout code can assign the optional
|
|
56
|
+
// fields above onto coreHierarchy's nodes
|
|
57
57
|
export function hierarchy<T>(
|
|
58
58
|
data: T,
|
|
59
59
|
childrenAccessor: (d: T) => T[] | undefined,
|
|
@@ -75,16 +75,26 @@ export function clusterLayout<T>(
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// x of an internal node is the mean of its children's x, so process in
|
|
78
|
-
// post-order (children before parents)
|
|
78
|
+
// post-order (children before parents). The subtree span comes from the same
|
|
79
|
+
// pass, for the block culls in the tree renderer.
|
|
79
80
|
const nodes = descendants(root)
|
|
80
81
|
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
81
82
|
const node = nodes[i]!
|
|
82
83
|
if (node.children) {
|
|
83
84
|
let sum = 0
|
|
85
|
+
let min = Infinity
|
|
86
|
+
let max = -Infinity
|
|
84
87
|
for (const child of node.children) {
|
|
85
88
|
sum += child.x!
|
|
89
|
+
min = Math.min(min, child.xMin!)
|
|
90
|
+
max = Math.max(max, child.xMax!)
|
|
86
91
|
}
|
|
87
92
|
node.x = sum / node.children.length
|
|
93
|
+
node.xMin = min
|
|
94
|
+
node.xMax = max
|
|
95
|
+
} else {
|
|
96
|
+
node.xMin = node.x
|
|
97
|
+
node.xMax = node.x
|
|
88
98
|
}
|
|
89
99
|
}
|
|
90
100
|
|
|
@@ -172,15 +182,9 @@ export function calcDepthToLeaf<T>(node: HierarchyNode<T>): number {
|
|
|
172
182
|
return node.depthToLeaf!
|
|
173
183
|
}
|
|
174
184
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
maxLen = Math.max(maxLen, n.len || 0)
|
|
179
|
-
}
|
|
180
|
-
return maxLen
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Max root-to-leaf sum of branch lengths within the subtree at d
|
|
185
|
+
// Max root-to-leaf sum of branch lengths within the subtree at d. Negative
|
|
186
|
+
// lengths are floored at zero, the same as setBrLength does when it lays the
|
|
187
|
+
// tree out, so the extent this reports is the one that gets drawn
|
|
184
188
|
export function maxLength(d: HierarchyNode): number {
|
|
185
189
|
const nodes = descendants(d)
|
|
186
190
|
const pathLen = new Map<HierarchyNode, number>()
|
|
@@ -192,7 +196,7 @@ export function maxLength(d: HierarchyNode): number {
|
|
|
192
196
|
childMax = Math.max(childMax, pathLen.get(child)!)
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
|
-
pathLen.set(n, (n.data.length || 0) + childMax)
|
|
199
|
+
pathLen.set(n, Math.max(n.data.length || 0, 0) + childMax)
|
|
196
200
|
}
|
|
197
201
|
return pathLen.get(d)!
|
|
198
202
|
}
|
|
@@ -210,3 +214,76 @@ export function setBrLength(d: HierarchyNode, y0: number, k: number) {
|
|
|
210
214
|
}
|
|
211
215
|
}
|
|
212
216
|
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Every leaf by name, with a name two leaves share mapping to undefined: a tip
|
|
220
|
+
* set naming it cannot say which tip it means.
|
|
221
|
+
*/
|
|
222
|
+
export function leafIndex<T extends { name: string }>(root: HierarchyNode<T>) {
|
|
223
|
+
const index = new Map<string, HierarchyNode<T> | undefined>()
|
|
224
|
+
for (const leaf of leaves(root)) {
|
|
225
|
+
const { name } = leaf.data
|
|
226
|
+
index.set(name, index.has(name) ? undefined : leaf)
|
|
227
|
+
}
|
|
228
|
+
return index
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The most recent common ancestor of a set of tip names, or undefined when a
|
|
233
|
+
* name is not a tip of this tree or names two of them.
|
|
234
|
+
*
|
|
235
|
+
* Each name lifts through `parent` to the ancestor the names before it share,
|
|
236
|
+
* so the walk holds two nodes. Recording a root-to-tip path per name instead
|
|
237
|
+
* costs the depth in memory per name, and a caterpillar tree's depth is its tip
|
|
238
|
+
* count. `index` is `leafIndex(root)`, which a caller resolving several tip
|
|
239
|
+
* sets against one tree builds once.
|
|
240
|
+
*/
|
|
241
|
+
export function mrca<T extends { name: string }>(
|
|
242
|
+
root: HierarchyNode<T>,
|
|
243
|
+
names: string[],
|
|
244
|
+
index = leafIndex(root),
|
|
245
|
+
) {
|
|
246
|
+
let node: HierarchyNode<T> | undefined
|
|
247
|
+
for (const name of names) {
|
|
248
|
+
let other = index.get(name)
|
|
249
|
+
if (!other) {
|
|
250
|
+
return undefined
|
|
251
|
+
}
|
|
252
|
+
if (!node) {
|
|
253
|
+
node = other
|
|
254
|
+
continue
|
|
255
|
+
}
|
|
256
|
+
while (node.depth > other.depth) {
|
|
257
|
+
node = node.parent!
|
|
258
|
+
}
|
|
259
|
+
while (other.depth > node.depth) {
|
|
260
|
+
other = other.parent!
|
|
261
|
+
}
|
|
262
|
+
while (node !== other) {
|
|
263
|
+
node = node.parent!
|
|
264
|
+
other = other.parent!
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return node
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The deepest node whose subtree covers a run of rows, given in the row-space
|
|
272
|
+
* coordinates clusterLayout writes to xMin/xMax. A subtree's leaves are one
|
|
273
|
+
* contiguous run, so at most one child per level covers the run and the descent
|
|
274
|
+
* visits the tree's depth rather than its nodes.
|
|
275
|
+
*/
|
|
276
|
+
export function nodeCoveringRows<T>(
|
|
277
|
+
root: HierarchyNode<T>,
|
|
278
|
+
top: number,
|
|
279
|
+
bottom: number,
|
|
280
|
+
) {
|
|
281
|
+
let node = root
|
|
282
|
+
for (;;) {
|
|
283
|
+
const child = node.children?.find(c => c.xMin! <= top && c.xMax! >= bottom)
|
|
284
|
+
if (!child) {
|
|
285
|
+
return node
|
|
286
|
+
}
|
|
287
|
+
node = child
|
|
288
|
+
}
|
|
289
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// PUBLIC API — consumed by external JBrowse 2 plugins. Changing or removing any
|
|
2
2
|
// export here is a breaking change for downstream repos:
|
|
3
|
-
// - jbrowse-plugin-msaview
|
|
4
|
-
// - jbrowse-plugin-
|
|
3
|
+
// - jbrowse-plugin-msaview (wraps MSAModelF + MSAView into a JBrowse view)
|
|
4
|
+
// - jbrowse-plugin-tview (the same, for a tree-first view)
|
|
5
5
|
// Those plugins also reach into the MsaViewModel instance at runtime; the model
|
|
6
6
|
// members they rely on (e.g. mouseCol/setMousePos, setHighlightedColumns,
|
|
7
7
|
// seqPosToVisibleCol/visibleColToSeqPos) are flagged inline in model.ts.
|
|
8
|
+
// jbrowse-plugin-protein3d no longer depends on this package at all: it reads
|
|
9
|
+
// the msaview plugin's model through a structural type of its own.
|
|
8
10
|
export { renderToSvg } from './renderToSvg.tsx'
|
|
9
11
|
export type { ExportSvgOptions } from './renderToSvg.tsx'
|
|
10
12
|
// renderToSvg outside a browser needs DOM bits jsdom omits; react-msaview-cli
|
|
@@ -13,31 +15,69 @@ export {
|
|
|
13
15
|
CHAR_WIDTH_RATIO,
|
|
14
16
|
installHeadlessRenderEnv,
|
|
15
17
|
} from './headlessRenderEnv.ts'
|
|
18
|
+
// the row count above which calculateNeighborJoiningTreeFromMSA throws, for
|
|
19
|
+
// hosts gating their own menu item
|
|
20
|
+
export { maxNeighborJoiningRows } from './constants.ts'
|
|
16
21
|
export { default as MSAView } from './components/Loading.tsx'
|
|
17
22
|
export { default as MSAViewer } from './components/MSAViewer.tsx'
|
|
23
|
+
export type { MSAViewerProps } from './components/MSAViewer.tsx'
|
|
24
|
+
export { mount } from './mount.tsx'
|
|
25
|
+
export { defineMsaElement } from './element.ts'
|
|
26
|
+
export { useMsaSvgFigure } from './useMsaSvgFigure.ts'
|
|
27
|
+
export type { MsaSvgFigure } from './useMsaSvgFigure.ts'
|
|
28
|
+
export type { MountedViewer } from './mount.tsx'
|
|
18
29
|
export { type MsaViewModel, default as MSAModelF } from './model.ts'
|
|
19
30
|
export type { MSAFormat, MSAParserType } from 'msa-parsers'
|
|
20
31
|
export type { HierarchyNode } from './hierarchy.ts'
|
|
21
32
|
// InterProScanResults is the EBI wire format that setDomains still accepts;
|
|
22
33
|
// Annotation is the source-agnostic shape everything else is written against
|
|
23
34
|
export type { InterProScanResults } from 'msa-parsers'
|
|
24
|
-
// ColumnCounts, DomainBand and TidyDomainAnnotation surface in the
|
|
25
|
-
// of the composed state model, so a downstream plugin cannot emit
|
|
26
|
-
// for its own stateModelFactory without being able to name them
|
|
27
|
-
// jbrowse-plugin-msaview already re-exports MSAFormat for exactly this
|
|
35
|
+
// ColumnCounts, ColumnStats, DomainBand and TidyDomainAnnotation surface in the
|
|
36
|
+
// inferred type of the composed state model, so a downstream plugin cannot emit
|
|
37
|
+
// declarations for its own stateModelFactory without being able to name them
|
|
38
|
+
// (TS2883). jbrowse-plugin-msaview already re-exports MSAFormat for exactly this
|
|
39
|
+
// reason.
|
|
28
40
|
export type { ColumnCounts } from './columnCounts.ts'
|
|
41
|
+
export type { ColumnStats } from './columnStats.ts'
|
|
42
|
+
// the scale an encoding reads its field through, and what resolving one gives
|
|
43
|
+
export type { ResolvedScale, ScaleSpec } from './scales.ts'
|
|
29
44
|
export type {
|
|
30
45
|
Accession,
|
|
31
46
|
Annotation,
|
|
47
|
+
Arc,
|
|
48
|
+
ArcSpec,
|
|
49
|
+
ArcTrackModel,
|
|
32
50
|
BasicTrack,
|
|
33
51
|
BasicTrackModel,
|
|
52
|
+
Cell,
|
|
53
|
+
Clade,
|
|
54
|
+
CladeMark,
|
|
34
55
|
ColumnTrackSpec,
|
|
35
56
|
DomainBand,
|
|
57
|
+
Encoding,
|
|
58
|
+
EncodingChannel,
|
|
36
59
|
Highlight,
|
|
60
|
+
Legend,
|
|
61
|
+
LegendEntry,
|
|
37
62
|
Node,
|
|
63
|
+
MappedStructure,
|
|
38
64
|
NodeWithIds,
|
|
39
65
|
NodeWithIdsAndLength,
|
|
66
|
+
Region,
|
|
67
|
+
ResidueEncoding,
|
|
68
|
+
ResidueMapping,
|
|
69
|
+
ResidueMappingProblem,
|
|
70
|
+
ResidueSegment,
|
|
71
|
+
ResolvedClade,
|
|
72
|
+
ResolvedEncoding,
|
|
40
73
|
ResolvedHighlight,
|
|
74
|
+
ResolvedRowPanel,
|
|
75
|
+
RowPanelSpec,
|
|
76
|
+
RowResidue,
|
|
77
|
+
StructureResidue,
|
|
41
78
|
TextTrackModel,
|
|
42
79
|
TidyDomainAnnotation,
|
|
80
|
+
TrackKind,
|
|
81
|
+
UnshareableData,
|
|
82
|
+
Viewport,
|
|
43
83
|
} from './types.ts'
|
package/src/model/DataModel.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { types } from '@jbrowse/mobx-state-tree'
|
|
2
2
|
|
|
3
|
+
import { maxInlineSnapshotBytes } from '../constants.ts'
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* #stateModel DataModel
|
|
5
7
|
* the data stored for the model. this is sometimes temporary in the case that
|
|
@@ -54,13 +56,12 @@ export function DataModelF() {
|
|
|
54
56
|
},
|
|
55
57
|
}))
|
|
56
58
|
.postProcessSnapshot(snap =>
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
// the rule is the same for all of them
|
|
59
|
+
// drops any field over maxInlineSnapshotBytes; the parent model's
|
|
60
|
+
// `unshareableData` reports what was dropped
|
|
60
61
|
Object.fromEntries(
|
|
61
62
|
Object.entries(snap).map(([key, text]) => [
|
|
62
63
|
key,
|
|
63
|
-
text && text.length >
|
|
64
|
+
text && text.length > maxInlineSnapshotBytes ? undefined : text,
|
|
64
65
|
]),
|
|
65
66
|
),
|
|
66
67
|
)
|
package/src/model/msaModel.ts
CHANGED
|
@@ -31,8 +31,9 @@ export function MSAModelF() {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* #property
|
|
34
|
-
* show a
|
|
35
|
-
*
|
|
34
|
+
* show a tooltip with the hovered column's value for a track while
|
|
35
|
+
* hovering that track: the conservation scores, the logo's composition,
|
|
36
|
+
* an arc's partner columns
|
|
36
37
|
*/
|
|
37
38
|
showColumnStats: stripDefault(types.boolean, defaultShowColumnStats),
|
|
38
39
|
|
package/src/model/treeModel.ts
CHANGED
|
@@ -3,9 +3,12 @@ import { types } from '@jbrowse/mobx-state-tree'
|
|
|
3
3
|
import {
|
|
4
4
|
defaultDrawLabels,
|
|
5
5
|
defaultDrawNodeBubbles,
|
|
6
|
+
defaultDrawNodeLabels,
|
|
6
7
|
defaultDrawTree,
|
|
7
8
|
defaultLabelsAlignRight,
|
|
9
|
+
defaultOverviewHeight,
|
|
8
10
|
defaultShowBranchLen,
|
|
11
|
+
defaultShowTreeOverview,
|
|
9
12
|
defaultTreeAreaWidth,
|
|
10
13
|
defaultTreeWidth,
|
|
11
14
|
} from '../constants.ts'
|
|
@@ -60,6 +63,26 @@ export function TreeModelF() {
|
|
|
60
63
|
*/
|
|
61
64
|
drawNodeBubbles: stripDefault(types.boolean, defaultDrawNodeBubbles),
|
|
62
65
|
|
|
66
|
+
/**
|
|
67
|
+
* #property
|
|
68
|
+
* draw the label a newick file gives an internal node, which is where a
|
|
69
|
+
* bootstrap or posterior support value lands
|
|
70
|
+
*/
|
|
71
|
+
drawNodeLabels: stripDefault(types.boolean, defaultDrawNodeLabels),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* #property
|
|
75
|
+
* draw the whole tree small above the tree panel, with the focused
|
|
76
|
+
* subtree boxed. A click on it focuses the subtree under the pointer
|
|
77
|
+
*/
|
|
78
|
+
showTreeOverview: stripDefault(types.boolean, defaultShowTreeOverview),
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* #property
|
|
82
|
+
* height of the tree overview band, px
|
|
83
|
+
*/
|
|
84
|
+
overviewHeight: stripDefault(types.number, defaultOverviewHeight),
|
|
85
|
+
|
|
63
86
|
/**
|
|
64
87
|
* #property
|
|
65
88
|
* auto-size treeAreaWidth to fit the row labels (plus the tree, if drawn)
|
|
@@ -116,6 +139,25 @@ export function TreeModelF() {
|
|
|
116
139
|
setDrawNodeBubbles(arg: boolean) {
|
|
117
140
|
self.drawNodeBubbles = arg
|
|
118
141
|
},
|
|
142
|
+
/**
|
|
143
|
+
* #action
|
|
144
|
+
*/
|
|
145
|
+
setDrawNodeLabels(arg: boolean) {
|
|
146
|
+
self.drawNodeLabels = arg
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* #action
|
|
150
|
+
*/
|
|
151
|
+
setShowTreeOverview(arg: boolean) {
|
|
152
|
+
self.showTreeOverview = arg
|
|
153
|
+
},
|
|
154
|
+
/**
|
|
155
|
+
* #action
|
|
156
|
+
* set the height of the tree overview band (px)
|
|
157
|
+
*/
|
|
158
|
+
setOverviewHeight(n: number) {
|
|
159
|
+
self.overviewHeight = Math.round(n)
|
|
160
|
+
},
|
|
119
161
|
/**
|
|
120
162
|
* #action
|
|
121
163
|
*/
|