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
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MSA Coordinate Systems:
|
|
3
|
+
*
|
|
4
|
+
* 1. **Global Column (globalCol)**: The column index in the full, unfiltered MSA.
|
|
5
|
+
* Range: 0 to (MSA width - 1)
|
|
6
|
+
* This is the "true" column position before any gap-hiding is applied.
|
|
7
|
+
*
|
|
8
|
+
* 2. **Visible Column (visibleCol)**: The column index after hiding gappy columns.
|
|
9
|
+
* Range: 0 to (numColumns - 1) where numColumns = MSA width - blanks.length
|
|
10
|
+
* This is what the user sees on screen when "Hide columns w/ N% gaps" is enabled.
|
|
11
|
+
* When gap hiding is disabled, visibleCol === globalCol.
|
|
12
|
+
*
|
|
13
|
+
* 3. **Sequence Position (seqPos)**: The position within a specific row's ungapped sequence.
|
|
14
|
+
* Range: 0 to (ungapped sequence length - 1)
|
|
15
|
+
* This counts only non-gap characters ('-' and '.' are gaps).
|
|
16
|
+
* Each row can have different seqPos values for the same globalCol due to gaps.
|
|
17
|
+
*/
|
|
1
18
|
/**
|
|
2
19
|
* Convert a visible column index to a global column index.
|
|
3
20
|
* This is used when translating mouse/screen coordinates to MSA coordinates.
|
|
@@ -21,40 +38,21 @@ export declare function globalColToVisibleCol(blanks: number[], globalCol: numbe
|
|
|
21
38
|
* that is its own visible index; for a hidden one it is the index of the next
|
|
22
39
|
* visible column, i.e. where the hidden column collapses to.
|
|
23
40
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* in a hidden column.
|
|
41
|
+
* Spans use this, since globalColToVisibleCol drops a span whenever either end
|
|
42
|
+
* lands in a hidden column.
|
|
27
43
|
*
|
|
28
44
|
* @param blanks - Sorted array of global column indices that are hidden
|
|
29
45
|
* @param globalCol - The global column index in the full MSA
|
|
30
46
|
*/
|
|
31
47
|
export declare function visibleColsBefore(blanks: number[], globalCol: number): number;
|
|
32
48
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
49
|
+
* The ungapped position a row holds at a global column, or undefined when that
|
|
50
|
+
* column is a gap in the row or past its end.
|
|
35
51
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param visibleCol - The visible column index
|
|
39
|
-
* @returns The sequence position, or undefined if it's a gap
|
|
40
|
-
*/
|
|
41
|
-
export declare function visibleColToSeqPos({ seq, blanks, visibleCol, }: {
|
|
42
|
-
seq: string;
|
|
43
|
-
blanks: number[];
|
|
44
|
-
visibleCol: number;
|
|
45
|
-
}): number | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Convert a visible column to a row-specific sequence position, with row lookup.
|
|
52
|
+
* Binary-searches the row's ascending seqPos index; it runs on every mouse
|
|
53
|
+
* move, and scanning a 30k-column row per event takes the whole frame.
|
|
48
54
|
*
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @param rowMap - Map from row name to sequence string
|
|
52
|
-
* @param blanks - Sorted array of global column indices that are hidden
|
|
53
|
-
* @returns The sequence position, or undefined if row not found or position is a gap
|
|
55
|
+
* @param index - The row's seqPos -> global column index (buildSeqPosIndex)
|
|
56
|
+
* @param globalCol - The global column index in the full MSA
|
|
54
57
|
*/
|
|
55
|
-
export declare function
|
|
56
|
-
rowName: string;
|
|
57
|
-
visibleCol: number;
|
|
58
|
-
rowMap: Map<string, string>;
|
|
59
|
-
blanks: number[];
|
|
60
|
-
}): number | undefined;
|
|
58
|
+
export declare function seqPosOfGlobalCol(index: Int32Array | undefined, globalCol: number): number | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isBlank } from './util.js';
|
|
2
1
|
/**
|
|
3
2
|
* MSA Coordinate Systems:
|
|
4
3
|
*
|
|
@@ -71,9 +70,8 @@ function countBlanksBefore(blanks, globalCol) {
|
|
|
71
70
|
* that is its own visible index; for a hidden one it is the index of the next
|
|
72
71
|
* visible column, i.e. where the hidden column collapses to.
|
|
73
72
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* in a hidden column.
|
|
73
|
+
* Spans use this, since globalColToVisibleCol drops a span whenever either end
|
|
74
|
+
* lands in a hidden column.
|
|
77
75
|
*
|
|
78
76
|
* @param blanks - Sorted array of global column indices that are hidden
|
|
79
77
|
* @param globalCol - The global column index in the full MSA
|
|
@@ -82,44 +80,20 @@ export function visibleColsBefore(blanks, globalCol) {
|
|
|
82
80
|
return globalCol - countBlanksBefore(blanks, globalCol);
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
83
|
+
* The ungapped position a row holds at a global column, or undefined when that
|
|
84
|
+
* column is a gap in the row or past its end.
|
|
87
85
|
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* @
|
|
86
|
+
* Binary-searches the row's ascending seqPos index; it runs on every mouse
|
|
87
|
+
* move, and scanning a 30k-column row per event takes the whole frame.
|
|
88
|
+
*
|
|
89
|
+
* @param index - The row's seqPos -> global column index (buildSeqPosIndex)
|
|
90
|
+
* @param globalCol - The global column index in the full MSA
|
|
92
91
|
*/
|
|
93
|
-
export function
|
|
94
|
-
|
|
95
|
-
const globalCol = visibleColToGlobalCol(blanks, visibleCol);
|
|
96
|
-
const seqLen = seq.length;
|
|
97
|
-
// Check if the position in the sequence is a gap
|
|
98
|
-
if (globalCol < seqLen && isBlank(seq[globalCol])) {
|
|
92
|
+
export function seqPosOfGlobalCol(index, globalCol) {
|
|
93
|
+
if (!index) {
|
|
99
94
|
return undefined;
|
|
100
95
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
for (let i = 0; i < globalCol && i < seqLen; i++) {
|
|
104
|
-
if (!isBlank(seq[i])) {
|
|
105
|
-
seqPos++;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return globalCol < seqLen ? seqPos : undefined;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Convert a visible column to a row-specific sequence position, with row lookup.
|
|
112
|
-
*
|
|
113
|
-
* @param rowName - The name of the row
|
|
114
|
-
* @param visibleCol - The visible column index
|
|
115
|
-
* @param rowMap - Map from row name to sequence string
|
|
116
|
-
* @param blanks - Sorted array of global column indices that are hidden
|
|
117
|
-
* @returns The sequence position, or undefined if row not found or position is a gap
|
|
118
|
-
*/
|
|
119
|
-
export function visibleColToSeqPosForRow({ rowName, visibleCol, rowMap, blanks, }) {
|
|
120
|
-
const seq = rowMap.get(rowName);
|
|
121
|
-
return seq !== undefined
|
|
122
|
-
? visibleColToSeqPos({ seq, visibleCol, blanks })
|
|
123
|
-
: undefined;
|
|
96
|
+
const seqPos = partitionPoint(index.length, i => index[i] >= globalCol);
|
|
97
|
+
return index[seqPos] === globalCol ? seqPos : undefined;
|
|
124
98
|
}
|
|
125
99
|
//# sourceMappingURL=rowCoordinateCalculations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowCoordinateCalculations.js","sourceRoot":"","sources":["../src/rowCoordinateCalculations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rowCoordinateCalculations.js","sourceRoot":"","sources":["../src/rowCoordinateCalculations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,IAA4B;IAC/D,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,KAAK,GAAG,GAAG,CAAA;IACf,OAAO,IAAI,GAAG,KAAK,EAAE,CAAC;QACpB,MAAM,GAAG,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACd,KAAK,GAAG,GAAG,CAAA;QACb,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,GAAG,GAAG,CAAC,CAAA;QAChB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAgB,EAAE,UAAkB;IACxE,2EAA2E;IAC3E,4EAA4E;IAC5E,6EAA6E;IAC7E,OAAO,CACL,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAE,GAAG,CAAC,GAAG,UAAU,CAAC,CAC7E,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAgB,EAChB,SAAiB;IAEjB,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACzD,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,SAAS;QACvC,CAAC,CAAC,SAAS,CAAC,mBAAmB;QAC/B,CAAC,CAAC,SAAS,GAAG,YAAY,CAAA;AAC9B,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAgB,EAAE,SAAiB;IAC5D,OAAO,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAE,IAAI,SAAS,CAAC,CAAA;AACpE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAgB,EAAE,SAAiB;IACnE,OAAO,SAAS,GAAG,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACzD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAA6B,EAC7B,SAAiB;IAEjB,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAE,IAAI,SAAS,CAAC,CAAA;IACxE,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AACzD,CAAC"}
|
package/dist/scales.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LegendEntry } from './types.ts';
|
|
2
|
+
/** how a channel reads a field: a palette by name, or a color per value */
|
|
3
|
+
export interface ScaleSpec {
|
|
4
|
+
palette?: string;
|
|
5
|
+
map?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolvedScale {
|
|
8
|
+
kind: 'categorical';
|
|
9
|
+
colorOf: (value: string) => string | undefined;
|
|
10
|
+
legend: LegendEntry[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The scale a channel reads its field through. `values` are the field's values,
|
|
14
|
+
* in any order and with repeats; the domain is their distinct values sorted, so
|
|
15
|
+
* a value keeps its color when rows are re-ordered, collapsed or filtered.
|
|
16
|
+
*
|
|
17
|
+
* `{map}` colors the values the producer named and leaves the rest uncolored.
|
|
18
|
+
* `{palette}` takes the colors of a named palette, and a spec with neither
|
|
19
|
+
* takes the ggplot palette of the domain's size. Every scale is categorical
|
|
20
|
+
* today; a continuous one waits for a caller.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveScale(spec: ScaleSpec | undefined, values: Iterable<string>): ResolvedScale;
|
package/dist/scales.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createPaletteMap } from './createPaletteMap.js';
|
|
2
|
+
import { paletteNamed } from './ggplotPalettes.js';
|
|
3
|
+
/**
|
|
4
|
+
* The scale a channel reads its field through. `values` are the field's values,
|
|
5
|
+
* in any order and with repeats; the domain is their distinct values sorted, so
|
|
6
|
+
* a value keeps its color when rows are re-ordered, collapsed or filtered.
|
|
7
|
+
*
|
|
8
|
+
* `{map}` colors the values the producer named and leaves the rest uncolored.
|
|
9
|
+
* `{palette}` takes the colors of a named palette, and a spec with neither
|
|
10
|
+
* takes the ggplot palette of the domain's size. Every scale is categorical
|
|
11
|
+
* today; a continuous one waits for a caller.
|
|
12
|
+
*/
|
|
13
|
+
export function resolveScale(spec, values) {
|
|
14
|
+
const domain = [...new Set(values)].sort((a, b) => a.localeCompare(b));
|
|
15
|
+
const { map, palette } = spec ?? {};
|
|
16
|
+
const colors = map ?? createPaletteMap(domain, paletteNamed(palette));
|
|
17
|
+
const present = new Set(domain);
|
|
18
|
+
const labels = map ? Object.keys(map).filter(v => present.has(v)) : domain;
|
|
19
|
+
return {
|
|
20
|
+
kind: 'categorical',
|
|
21
|
+
colorOf: (value) => colors[value],
|
|
22
|
+
// a categorical value is its own label, and the id a legend keys on
|
|
23
|
+
legend: labels.map(value => ({
|
|
24
|
+
id: value,
|
|
25
|
+
label: value,
|
|
26
|
+
color: colors[value],
|
|
27
|
+
})),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=scales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../src/scales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAgBlD;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,IAA2B,EAC3B,MAAwB;IAExB,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACtE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;IACnC,MAAM,MAAM,GAAG,GAAG,IAAI,gBAAgB,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAA;IACrE,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAC1E,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;QACzC,oEAAoE;QACpE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3B,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,MAAM,CAAC,KAAK,CAAE;SACtB,CAAC,CAAC;KACJ,CAAA;AACH,CAAC"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* The global column of every ungapped sequence position in a row, i.e.
|
|
3
3
|
* index[seqPos] is the column holding the seqPos-th non-gap character.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* per row on every redraw, and scanning the row for each would be quadratic.
|
|
5
|
+
* The domain overlay resolves one position per feature per row on every redraw,
|
|
6
|
+
* and scanning the row for each would be quadratic.
|
|
8
7
|
*
|
|
9
8
|
* @example
|
|
10
9
|
* // Row: "A-TG-C" (A at 0, T at 2, G at 3, C at 5)
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* The global column of every ungapped sequence position in a row, i.e.
|
|
3
3
|
* index[seqPos] is the column holding the seqPos-th non-gap character.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* per row on every redraw, and scanning the row for each would be quadratic.
|
|
5
|
+
* The domain overlay resolves one position per feature per row on every redraw,
|
|
6
|
+
* and scanning the row for each would be quadratic.
|
|
8
7
|
*
|
|
9
8
|
* @example
|
|
10
9
|
* // Row: "A-TG-C" (A at 0, T at 2, G at 3, C at 5)
|
|
@@ -19,6 +18,8 @@ export function buildSeqPosIndex(row) {
|
|
|
19
18
|
index[n++] = col;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
// slice, not subarray: a subarray keeps the whole row-length buffer alive,
|
|
22
|
+
// and a gappy alignment's indexes are held for as long as the parse is
|
|
23
|
+
return index.slice(0, n);
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=seqPosToGlobalCol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seqPosToGlobalCol.js","sourceRoot":"","sources":["../src/seqPosToGlobalCol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"seqPosToGlobalCol.js","sourceRoot":"","sources":["../src/seqPosToGlobalCol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACxC,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;QAC1C,oEAAoE;QACpE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC7C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAA;QAClB,CAAC;IACH,CAAC;IACD,2EAA2E;IAC3E,uEAAuE;IACvE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1B,CAAC"}
|
package/dist/sequenceLogo.d.ts
CHANGED
|
@@ -12,17 +12,12 @@ export declare function maxBitsFor(sequenceType: 'dna' | 'rna' | 'amino'): numbe
|
|
|
12
12
|
* stack bottom-up in array order.
|
|
13
13
|
*
|
|
14
14
|
* Heights follow Schneider & Stephens: the column's information content is
|
|
15
|
-
* `log2(alphabet) - H` bits,
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* ten-way one -- otherwise every gappy column would look uninformative for the
|
|
19
|
-
* wrong reason.
|
|
15
|
+
* `log2(alphabet) - H` bits, split among residues by frequency. Frequencies
|
|
16
|
+
* count non-gap residues only, so two residues and eight gaps form a two-way
|
|
17
|
+
* choice.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* full-height stack off its one remaining pair of residues reads as a conserved
|
|
25
|
-
* site. Scaling makes stack height mean "how much this column tells you about
|
|
26
|
-
* the family", matching what the conservation track above it already plots.
|
|
19
|
+
* Unlike plain WebLogo, the stack is then scaled by the non-gap fraction, so a
|
|
20
|
+
* 90%-gap column with one conserved pair does not draw a full-height stack, and
|
|
21
|
+
* stack height matches the conservation track.
|
|
27
22
|
*/
|
|
28
23
|
export declare function columnLogoStack(colStats: ColumnCounts, col: number, maxBits: number): LogoLetter[];
|
package/dist/sequenceLogo.js
CHANGED
|
@@ -9,18 +9,13 @@ export function maxBitsFor(sequenceType) {
|
|
|
9
9
|
* stack bottom-up in array order.
|
|
10
10
|
*
|
|
11
11
|
* Heights follow Schneider & Stephens: the column's information content is
|
|
12
|
-
* `log2(alphabet) - H` bits,
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* ten-way one -- otherwise every gappy column would look uninformative for the
|
|
16
|
-
* wrong reason.
|
|
12
|
+
* `log2(alphabet) - H` bits, split among residues by frequency. Frequencies
|
|
13
|
+
* count non-gap residues only, so two residues and eight gaps form a two-way
|
|
14
|
+
* choice.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* full-height stack off its one remaining pair of residues reads as a conserved
|
|
22
|
-
* site. Scaling makes stack height mean "how much this column tells you about
|
|
23
|
-
* the family", matching what the conservation track above it already plots.
|
|
16
|
+
* Unlike plain WebLogo, the stack is then scaled by the non-gap fraction, so a
|
|
17
|
+
* 90%-gap column with one conserved pair does not draw a full-height stack, and
|
|
18
|
+
* stack height matches the conservation track.
|
|
24
19
|
*/
|
|
25
20
|
export function columnLogoStack(colStats, col, maxBits) {
|
|
26
21
|
const total = colStats.total(col);
|
package/dist/sequenceLogo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceLogo.js","sourceRoot":"","sources":["../src/sequenceLogo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAUvD;uCACuC;AACvC,MAAM,UAAU,UAAU,CAAC,YAAqC;IAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"sequenceLogo.js","sourceRoot":"","sources":["../src/sequenceLogo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAUvD;uCACuC;AACvC,MAAM,UAAU,UAAU,CAAC,YAAqC;IAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAsB,EACtB,GAAW,EACX,OAAe;IAEf,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACjC,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAClD,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,kBAAkB,GACtB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC,CAAA;IACtE,IAAI,kBAAkB,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,KAAK,GAAiB,EAAE,CAAA;IAC9B,QAAQ,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC3C,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,mBAAmB,CAAC,IAAI,CAAC;YACjC,IAAI,EAAE,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,kBAAkB;SACjD,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,8EAA8E;IAC9E,4DAA4D;IAC5D,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACzE,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/stripDefault.d.ts
CHANGED
|
@@ -2,20 +2,13 @@ import type { IAnyType, IOptionalIType, OptionalDefaultValueOrFunction } from '@
|
|
|
2
2
|
/**
|
|
3
3
|
* `types.stripDefault`, degrading to `types.optional` on hosts that lack it.
|
|
4
4
|
*
|
|
5
|
-
* stripDefault keeps defaulted properties out of snapshots,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* stripDefault keeps defaulted properties out of snapshots, and only the
|
|
6
|
+
* mobx-state-tree in unreleased @jbrowse/core has it. The plugin bundle
|
|
7
|
+
* externalizes mobx-state-tree, so the host's copy is known only at runtime, and
|
|
8
|
+
* calling a missing stripDefault during model construction makes PluginLoader
|
|
9
|
+
* reject and the whole app show its error page.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* its error page. Losing minimal snapshots is a far better failure than losing
|
|
14
|
-
* the session, so this degrades instead.
|
|
15
|
-
*
|
|
16
|
-
* The two signatures are identical, so behaviour differs only in that defaults
|
|
17
|
-
* reappear in snapshots on older hosts (bigger session snapshots and shared
|
|
18
|
-
* URLs, nothing incorrect). stripDefaultSnapshot.test.ts still pins the stripped
|
|
19
|
-
* behaviour, since dev runs against a version that has it.
|
|
11
|
+
* The signatures are identical; on older hosts, defaults reappear in snapshots
|
|
12
|
+
* and shared URLs. stripDefaultSnapshot.test.ts pins the stripped behaviour.
|
|
20
13
|
*/
|
|
21
14
|
export declare function stripDefault<IT extends IAnyType>(type: IT, defaultValue: OptionalDefaultValueOrFunction<IT>): IOptionalIType<IT, [undefined]>;
|
package/dist/stripDefault.js
CHANGED
|
@@ -2,21 +2,14 @@ import { types } from '@jbrowse/mobx-state-tree';
|
|
|
2
2
|
/**
|
|
3
3
|
* `types.stripDefault`, degrading to `types.optional` on hosts that lack it.
|
|
4
4
|
*
|
|
5
|
-
* stripDefault keeps defaulted properties out of snapshots,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* stripDefault keeps defaulted properties out of snapshots, and only the
|
|
6
|
+
* mobx-state-tree in unreleased @jbrowse/core has it. The plugin bundle
|
|
7
|
+
* externalizes mobx-state-tree, so the host's copy is known only at runtime, and
|
|
8
|
+
* calling a missing stripDefault during model construction makes PluginLoader
|
|
9
|
+
* reject and the whole app show its error page.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* its error page. Losing minimal snapshots is a far better failure than losing
|
|
14
|
-
* the session, so this degrades instead.
|
|
15
|
-
*
|
|
16
|
-
* The two signatures are identical, so behaviour differs only in that defaults
|
|
17
|
-
* reappear in snapshots on older hosts (bigger session snapshots and shared
|
|
18
|
-
* URLs, nothing incorrect). stripDefaultSnapshot.test.ts still pins the stripped
|
|
19
|
-
* behaviour, since dev runs against a version that has it.
|
|
11
|
+
* The signatures are identical; on older hosts, defaults reappear in snapshots
|
|
12
|
+
* and shared URLs. stripDefaultSnapshot.test.ts pins the stripped behaviour.
|
|
20
13
|
*/
|
|
21
14
|
export function stripDefault(type, defaultValue) {
|
|
22
15
|
return typeof types.stripDefault === 'function'
|
package/dist/stripDefault.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripDefault.js","sourceRoot":"","sources":["../src/stripDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAQhD
|
|
1
|
+
{"version":3,"file":"stripDefault.js","sourceRoot":"","sources":["../src/stripDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAQhD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAQ,EACR,YAAgD;IAEhD,OAAO,OAAO,KAAK,CAAC,YAAY,KAAK,UAAU;QAC7C,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;QACxC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;AACxC,CAAC"}
|