@jbrowse/plugin-variants 3.7.0 → 4.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/esm/ChordVariantDisplay/components/ChordVariantDisplay.d.ts +11 -0
- package/esm/ChordVariantDisplay/components/ChordVariantDisplay.js +16 -0
- package/esm/ChordVariantDisplay/components/DisplayError.d.ts +9 -0
- package/esm/ChordVariantDisplay/components/DisplayError.js +7 -0
- package/esm/ChordVariantDisplay/components/Loading.d.ts +8 -0
- package/esm/ChordVariantDisplay/components/Loading.js +28 -0
- package/esm/ChordVariantDisplay/index.js +4 -4
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +4 -5
- package/esm/ChordVariantDisplay/models/configSchema.js +10 -5
- package/esm/ChordVariantDisplay/models/renderReaction.d.ts +30 -0
- package/esm/ChordVariantDisplay/models/renderReaction.js +48 -0
- package/esm/ChordVariantDisplay/models/renderSvg.d.ts +6 -0
- package/esm/ChordVariantDisplay/models/renderSvg.js +12 -0
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +535 -46
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +146 -8
- package/esm/LinearVariantDisplay/configSchema.d.ts +5 -5
- package/esm/LinearVariantDisplay/configSchema.js +2 -2
- package/esm/LinearVariantDisplay/index.js +6 -4
- package/esm/LinearVariantDisplay/model.d.ts +1086 -103
- package/esm/LinearVariantDisplay/model.js +10 -26
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +8 -18
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +6 -44
- package/esm/MultiLinearVariantDisplay/configSchema.js +2 -2
- package/esm/MultiLinearVariantDisplay/index.js +4 -3
- package/esm/MultiLinearVariantDisplay/model.d.ts +1031 -125
- package/esm/MultiLinearVariantDisplay/model.js +3 -23
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/renderSvg.js +4 -4
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +8 -2
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +26 -23
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +9 -20
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +6 -6
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/index.js +5 -4
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +1110 -131
- package/esm/MultiLinearVariantMatrixDisplay/model.js +22 -48
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +4 -35
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +19 -33
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +12 -1
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +48 -22
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -2
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +155 -135
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -14
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +3 -60
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +9 -18
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +7 -6
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +30 -26
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantRenderer/index.js +4 -4
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +14 -11
- package/esm/MultiLinearVariantRenderer/makeImageData.js +127 -110
- package/esm/MultiLinearVariantRenderer/types.d.ts +3 -20
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +1 -1
- package/esm/SplitVcfTabixAdapter/configSchema.d.ts +2 -2
- package/esm/SplitVcfTabixAdapter/index.d.ts +1 -1
- package/esm/SplitVcfTabixAdapter/index.js +3 -3
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/Chord.js +41 -58
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -3
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/index.js +3 -3
- package/esm/Tooltip.js +2 -2
- package/esm/VariantFeatureWidget/AltFormatter.js +1 -1
- package/esm/VariantFeatureWidget/Formatter.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.d.ts +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.js +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +1 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +8 -23
- package/esm/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -29
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +5 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +68 -59
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +13 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +72 -30
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +2 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +49 -26
- package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +3 -5
- package/esm/VariantFeatureWidget/configSchema.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +39 -39
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -7
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +3 -14
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +4 -2
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +2 -5
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +2 -2
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +34 -19
- package/esm/VariantRPC/MultiVariantGetSources.js +2 -6
- package/esm/VariantRPC/executeClusterGenotypeMatrix.d.ts +22 -0
- package/esm/VariantRPC/executeClusterGenotypeMatrix.js +19 -0
- package/esm/VariantRPC/getGenotypeMatrix.d.ts +18 -3
- package/esm/VariantRPC/getGenotypeMatrix.js +23 -40
- package/esm/VariantRPC/types.d.ts +10 -24
- package/esm/VariantTrack/configSchema.d.ts +16 -11
- package/esm/VariantTrack/index.js +13 -2
- package/esm/VariantTrack/saveTrackFormats/vcf.d.ts +4 -0
- package/esm/VariantTrack/saveTrackFormats/vcf.js +15 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +6 -3
- package/esm/VcfAdapter/VcfAdapter.js +36 -24
- package/esm/VcfAdapter/configSchema.d.ts +2 -2
- package/esm/VcfAdapter/index.js +3 -2
- package/esm/VcfExtensionPoints/index.d.ts +2 -0
- package/esm/{extensionPoints.js → VcfExtensionPoints/index.js} +1 -1
- package/esm/VcfFeature/index.js +20 -8
- package/esm/VcfFeature/util.d.ts +0 -1
- package/esm/VcfFeature/util.js +70 -188
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +2 -0
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +28 -3
- package/esm/VcfTabixAdapter/configSchema.d.ts +5 -5
- package/esm/VcfTabixAdapter/configSchema.js +1 -1
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/VcfTabixAdapter/index.js +4 -3
- package/esm/d3-hierarchy2/accessors.d.ts +2 -0
- package/esm/d3-hierarchy2/accessors.js +8 -0
- package/esm/d3-hierarchy2/array.d.ts +2 -0
- package/esm/d3-hierarchy2/array.js +15 -0
- package/esm/d3-hierarchy2/cluster.d.ts +8 -0
- package/esm/d3-hierarchy2/cluster.js +63 -0
- package/esm/d3-hierarchy2/constant.d.ts +2 -0
- package/esm/d3-hierarchy2/constant.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
- package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
- package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
- package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
- package/esm/d3-hierarchy2/index.d.ts +15 -0
- package/esm/d3-hierarchy2/index.js +15 -0
- package/esm/d3-hierarchy2/lcg.d.ts +1 -0
- package/esm/d3-hierarchy2/lcg.js +7 -0
- package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
- package/esm/d3-hierarchy2/pack/enclose.js +84 -0
- package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
- package/esm/d3-hierarchy2/pack/index.js +68 -0
- package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
- package/esm/d3-hierarchy2/pack/siblings.js +94 -0
- package/esm/d3-hierarchy2/partition.d.ts +6 -0
- package/esm/d3-hierarchy2/partition.js +42 -0
- package/esm/d3-hierarchy2/stratify.d.ts +9 -0
- package/esm/d3-hierarchy2/stratify.js +115 -0
- package/esm/d3-hierarchy2/tree.d.ts +8 -0
- package/esm/d3-hierarchy2/tree.js +153 -0
- package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/binary.js +36 -0
- package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/dice.js +7 -0
- package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
- package/esm/d3-hierarchy2/treemap/index.js +72 -0
- package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
- package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
- package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/round.js +6 -0
- package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/slice.js +7 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
- package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
- package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +19 -22
- package/esm/shared/MultiVariantBaseModel.d.ts +1103 -117
- package/esm/shared/MultiVariantBaseModel.js +231 -65
- package/esm/shared/SharedVariantConfigSchema.d.ts +2 -40
- package/esm/shared/SharedVariantConfigSchema.js +1 -46
- package/esm/shared/components/AddFiltersDialog.d.ts +2 -3
- package/esm/shared/components/AddFiltersDialog.js +20 -28
- package/esm/shared/components/{ui/SetColorDialog.d.ts → BaseSetColorDialog.d.ts} +2 -1
- package/esm/shared/components/BaseSetColorDialog.js +61 -0
- package/esm/shared/components/ClearTreeWarningDialog.d.ts +4 -0
- package/esm/shared/components/ClearTreeWarningDialog.js +9 -0
- package/esm/shared/components/MAFFilterDialog.d.ts +2 -3
- package/esm/shared/components/MAFFilterDialog.js +4 -8
- package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +1 -1
- package/esm/shared/components/MultiVariantBaseDisplayComponent.js +8 -17
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +3 -3
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +9 -14
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +11 -15
- package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +3 -2
- package/esm/shared/components/MultiVariantColorLegend.d.ts +1 -1
- package/esm/shared/components/MultiVariantColorLegend.js +22 -12
- package/esm/shared/components/MultiVariantCrosshairs.d.ts +4 -2
- package/esm/shared/components/MultiVariantCrosshairs.js +31 -23
- package/esm/shared/components/MultiVariantLegendBar.d.ts +4 -4
- package/esm/shared/components/MultiVariantLegendBar.js +24 -22
- package/esm/shared/components/MultiVariantLegendBarWrapper.d.ts +7 -0
- package/esm/shared/components/MultiVariantLegendBarWrapper.js +18 -0
- package/esm/shared/components/MultiVariantTooltip.d.ts +5 -6
- package/esm/shared/components/MultiVariantTooltip.js +35 -17
- package/esm/shared/components/ScrollableVariantContainer.d.ts +8 -0
- package/esm/shared/components/ScrollableVariantContainer.js +23 -0
- package/esm/shared/components/SetColorDialog.d.ts +3 -2
- package/esm/shared/components/SetColorDialog.js +2 -2
- package/esm/shared/components/SetColorDialogBulkEditPanel.d.ts +7 -8
- package/esm/shared/components/SetColorDialogBulkEditPanel.js +24 -54
- package/esm/shared/components/SetColorDialogRowPalettizer.js +13 -23
- package/esm/shared/components/SetRowHeightDialog.d.ts +2 -3
- package/esm/shared/components/SourcesDataGrid.d.ts +1 -1
- package/esm/shared/components/SourcesDataGrid.js +1 -1
- package/esm/shared/components/SourcesGrid.d.ts +1 -1
- package/esm/shared/components/SourcesGrid.js +2 -2
- package/esm/shared/components/SourcesGridHeader.d.ts +1 -1
- package/esm/shared/components/SourcesGridHeader.js +1 -1
- package/esm/shared/components/SvgTree.d.ts +5 -0
- package/esm/shared/components/SvgTree.js +19 -0
- package/esm/shared/components/TreeSidebar.d.ts +5 -0
- package/esm/shared/components/TreeSidebar.js +121 -0
- package/esm/shared/components/types.d.ts +43 -0
- package/esm/shared/components/types.js +1 -0
- package/esm/shared/constants.d.ts +8 -2
- package/esm/shared/constants.js +11 -2
- package/esm/shared/drawAlleleCount.d.ts +2 -1
- package/esm/shared/drawAlleleCount.js +50 -16
- package/esm/shared/drawPhased.js +11 -12
- package/{dist → esm/shared}/getMultiVariantFeaturesAutorun.d.ts +5 -4
- package/esm/{getMultiVariantFeaturesAutorun.js → shared/getMultiVariantFeaturesAutorun.js} +9 -2
- package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts} +4 -3
- package/esm/{getMultiVariantSourcesAutorun.js → shared/getMultiVariantSourcesAutorun.js} +10 -2
- package/esm/shared/getSources.d.ts +1 -1
- package/esm/shared/getSources.js +2 -2
- package/esm/shared/hooks/useMouseTracking.d.ts +6 -0
- package/esm/shared/hooks/useMouseTracking.js +34 -0
- package/esm/shared/makeSidebarSvg.d.ts +9 -0
- package/esm/shared/makeSidebarSvg.js +9 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -5
- package/esm/shared/minorAlleleFrequencyUtils.js +37 -38
- package/esm/shared/setupMultiVariantAutoruns.d.ts +2 -0
- package/esm/shared/setupMultiVariantAutoruns.js +8 -0
- package/esm/shared/treeDrawingAutorun.d.ts +16 -0
- package/esm/shared/treeDrawingAutorun.js +71 -0
- package/esm/shared/types.d.ts +15 -0
- package/package.json +38 -39
- package/dist/ChordVariantDisplay/index.d.ts +0 -2
- package/dist/ChordVariantDisplay/index.js +0 -25
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +0 -12
- package/dist/ChordVariantDisplay/models/configSchema.js +0 -15
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +0 -115
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -35
- package/dist/LinearVariantDisplay/configSchema.d.ts +0 -34
- package/dist/LinearVariantDisplay/configSchema.js +0 -12
- package/dist/LinearVariantDisplay/index.d.ts +0 -2
- package/dist/LinearVariantDisplay/index.js +0 -24
- package/dist/LinearVariantDisplay/model.d.ts +0 -278
- package/dist/LinearVariantDisplay/model.js +0 -37
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +0 -29
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +0 -80
- package/dist/MultiLinearVariantDisplay/configSchema.js +0 -30
- package/dist/MultiLinearVariantDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantDisplay/index.js +0 -57
- package/dist/MultiLinearVariantDisplay/model.d.ts +0 -422
- package/dist/MultiLinearVariantDisplay/model.js +0 -82
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantDisplay/renderSvg.js +0 -15
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +0 -6
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +0 -83
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +0 -31
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +0 -22
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixDisplay/index.js +0 -24
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +0 -431
- package/dist/MultiLinearVariantMatrixDisplay/model.js +0 -125
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +0 -17
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +0 -87
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +0 -8
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +0 -41
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +0 -6
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/index.js +0 -20
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +0 -154
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/types.js +0 -2
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +0 -63
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +0 -79
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +0 -33
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +0 -67
- package/dist/MultiLinearVariantRenderer/components/util.d.ts +0 -1
- package/dist/MultiLinearVariantRenderer/components/util.js +0 -15
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/configSchema.js +0 -8
- package/dist/MultiLinearVariantRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/index.js +0 -19
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantRenderer/makeImageData.js +0 -140
- package/dist/MultiLinearVariantRenderer/types.d.ts +0 -21
- package/dist/MultiLinearVariantRenderer/types.js +0 -2
- package/dist/MultiVariantBaseRenderer.d.ts +0 -46
- package/dist/MultiVariantBaseRenderer.js +0 -39
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -18
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -92
- package/dist/SplitVcfTabixAdapter/configSchema.d.ts +0 -23
- package/dist/SplitVcfTabixAdapter/configSchema.js +0 -29
- package/dist/SplitVcfTabixAdapter/index.d.ts +0 -3
- package/dist/SplitVcfTabixAdapter/index.js +0 -52
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +0 -13
- package/dist/StructuralVariantChordRenderer/Chord.js +0 -82
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +0 -16
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -30
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -21
- package/dist/StructuralVariantChordRenderer/configSchema.js +0 -25
- package/dist/StructuralVariantChordRenderer/index.d.ts +0 -2
- package/dist/StructuralVariantChordRenderer/index.js +0 -18
- package/dist/StructuralVariantChordRenderer/types.d.ts +0 -17
- package/dist/StructuralVariantChordRenderer/types.js +0 -2
- package/dist/Tooltip.d.ts +0 -19
- package/dist/Tooltip.js +0 -32
- package/dist/VariantFeatureWidget/AltFormatter.d.ts +0 -4
- package/dist/VariantFeatureWidget/AltFormatter.js +0 -13
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/dist/VariantFeatureWidget/Checkbox2.js +0 -8
- package/dist/VariantFeatureWidget/Formatter.d.ts +0 -3
- package/dist/VariantFeatureWidget/Formatter.js +0 -23
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +0 -7
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +0 -111
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -60
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +0 -15
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.js +0 -18
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -103
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +0 -4
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +0 -80
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.d.ts +0 -9
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +0 -10
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +0 -54
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +0 -51
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +0 -21
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +0 -2
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +0 -14
- package/dist/VariantFeatureWidget/configSchema.d.ts +0 -1
- package/dist/VariantFeatureWidget/configSchema.js +0 -5
- package/dist/VariantFeatureWidget/index.d.ts +0 -2
- package/dist/VariantFeatureWidget/index.js +0 -52
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +0 -104
- package/dist/VariantFeatureWidget/stateModelFactory.js +0 -12
- package/dist/VariantFeatureWidget/types.d.ts +0 -16
- package/dist/VariantFeatureWidget/types.js +0 -2
- package/dist/VariantFeatureWidget/variantFieldDescriptions.d.ts +0 -9
- package/dist/VariantFeatureWidget/variantFieldDescriptions.js +0 -12
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +0 -30
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +0 -21
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +0 -19
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +0 -58
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantGetSources.js +0 -22
- package/dist/VariantRPC/getGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/getGenotypeMatrix.js +0 -68
- package/dist/VariantRPC/types.d.ts +0 -36
- package/dist/VariantRPC/types.js +0 -2
- package/dist/VariantTrack/configSchema.d.ts +0 -79
- package/dist/VariantTrack/configSchema.js +0 -10
- package/dist/VariantTrack/index.d.ts +0 -2
- package/dist/VariantTrack/index.js +0 -20
- package/dist/VcfAdapter/VcfAdapter.d.ts +0 -35
- package/dist/VcfAdapter/VcfAdapter.js +0 -119
- package/dist/VcfAdapter/configSchema.d.ts +0 -18
- package/dist/VcfAdapter/configSchema.js +0 -35
- package/dist/VcfAdapter/index.d.ts +0 -2
- package/dist/VcfAdapter/index.js +0 -49
- package/dist/VcfAdapter/vcfParser.d.ts +0 -7
- package/dist/VcfAdapter/vcfParser.js +0 -26
- package/dist/VcfFeature/index.d.ts +0 -19
- package/dist/VcfFeature/index.js +0 -80
- package/dist/VcfFeature/util.d.ts +0 -6
- package/dist/VcfFeature/util.js +0 -227
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -25
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -117
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -32
- package/dist/VcfTabixAdapter/configSchema.js +0 -56
- package/dist/VcfTabixAdapter/index.d.ts +0 -3
- package/dist/VcfTabixAdapter/index.js +0 -52
- package/dist/extensionPoints.d.ts +0 -2
- package/dist/extensionPoints.js +0 -39
- package/dist/getMultiVariantFeaturesAutorun.js +0 -48
- package/dist/getMultiVariantSourcesAutorun.d.ts +0 -11
- package/dist/getMultiVariantSourcesAutorun.js +0 -38
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -52
- package/dist/shared/MultiVariantBaseModel.d.ts +0 -413
- package/dist/shared/MultiVariantBaseModel.js +0 -373
- package/dist/shared/SharedVariantConfigSchema.d.ts +0 -66
- package/dist/shared/SharedVariantConfigSchema.js +0 -56
- package/dist/shared/SharedVariantMixin.d.ts +0 -325
- package/dist/shared/SharedVariantMixin.js +0 -58
- package/dist/shared/components/AddFiltersDialog.d.ts +0 -9
- package/dist/shared/components/AddFiltersDialog.js +0 -61
- package/dist/shared/components/MAFFilterDialog.d.ts +0 -8
- package/dist/shared/components/MAFFilterDialog.js +0 -28
- package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +0 -5
- package/dist/shared/components/MultiVariantBaseDisplayComponent.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +0 -6
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +0 -74
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +0 -145
- package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +0 -10
- package/dist/shared/components/MultiVariantClusterDialog/types.js +0 -2
- package/dist/shared/components/MultiVariantColorLegend.d.ts +0 -10
- package/dist/shared/components/MultiVariantColorLegend.js +0 -24
- package/dist/shared/components/MultiVariantCrosshairs.d.ts +0 -7
- package/dist/shared/components/MultiVariantCrosshairs.js +0 -40
- package/dist/shared/components/MultiVariantLegendBar.d.ts +0 -7
- package/dist/shared/components/MultiVariantLegendBar.js +0 -32
- package/dist/shared/components/MultiVariantTooltip.d.ts +0 -10
- package/dist/shared/components/MultiVariantTooltip.js +0 -24
- package/dist/shared/components/RectBg.d.ts +0 -8
- package/dist/shared/components/RectBg.js +0 -10
- package/dist/shared/components/SetColorDialog.d.ts +0 -11
- package/dist/shared/components/SetColorDialog.js +0 -12
- package/dist/shared/components/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/components/SetMinMaxDialog.d.ts +0 -10
- package/dist/shared/components/SetMinMaxDialog.js +0 -26
- package/dist/shared/components/SetRowHeightDialog.d.ts +0 -8
- package/dist/shared/components/SetRowHeightDialog.js +0 -18
- package/dist/shared/components/SourcesDataGrid.d.ts +0 -7
- package/dist/shared/components/SourcesDataGrid.js +0 -68
- package/dist/shared/components/SourcesGrid.d.ts +0 -7
- package/dist/shared/components/SourcesGrid.js +0 -14
- package/dist/shared/components/SourcesGridHeader.d.ts +0 -8
- package/dist/shared/components/SourcesGridHeader.js +0 -41
- package/dist/shared/components/ui/SetColorDialog.d.ts +0 -31
- package/dist/shared/components/ui/SetColorDialog.js +0 -51
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/constants.d.ts +0 -2
- package/dist/shared/constants.js +0 -5
- package/dist/shared/drawAlleleCount.d.ts +0 -2
- package/dist/shared/drawAlleleCount.js +0 -50
- package/dist/shared/drawPhased.d.ts +0 -1
- package/dist/shared/drawPhased.js +0 -25
- package/dist/shared/findSecondLargestNumber.d.ts +0 -0
- package/dist/shared/findSecondLargestNumber.js +0 -1
- package/dist/shared/getSources.d.ts +0 -15
- package/dist/shared/getSources.js +0 -34
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +0 -14
- package/dist/shared/minorAlleleFrequencyUtils.js +0 -72
- package/dist/shared/sourcesGridUtils.d.ts +0 -11
- package/dist/shared/sourcesGridUtils.js +0 -32
- package/dist/shared/types.d.ts +0 -14
- package/dist/shared/types.js +0 -2
- package/dist/shared/util.d.ts +0 -2
- package/dist/shared/util.js +0 -21
- package/dist/util.d.ts +0 -0
- package/dist/util.js +0 -1
- package/esm/MultiVariantBaseRenderer.d.ts +0 -46
- package/esm/MultiVariantBaseRenderer.js +0 -33
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/esm/VariantFeatureWidget/Checkbox2.js +0 -5
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -24
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +0 -11
- package/esm/extensionPoints.d.ts +0 -2
- package/esm/getMultiVariantFeaturesAutorun.d.ts +0 -18
- package/esm/shared/SharedVariantMixin.d.ts +0 -325
- package/esm/shared/SharedVariantMixin.js +0 -55
- package/esm/shared/components/ui/SetColorDialog.js +0 -45
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -81
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.js +0 -4
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.js +0 -38
- package/esm/shared/findSecondLargestNumber.d.ts +0 -0
- package/esm/shared/findSecondLargestNumber.js +0 -1
- package/esm/shared/util.d.ts +0 -2
- package/esm/shared/util.js +0 -17
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import { Portal, alpha } from '@mui/material';
|
|
5
|
+
const useStyles = makeStyles()(theme => ({
|
|
6
|
+
tooltip: {
|
|
7
|
+
position: 'fixed',
|
|
8
|
+
top: 0,
|
|
9
|
+
left: 0,
|
|
10
|
+
pointerEvents: 'none',
|
|
11
|
+
backgroundColor: alpha(theme.palette.grey[700], 0.9),
|
|
12
|
+
borderRadius: theme.shape.borderRadius,
|
|
13
|
+
color: theme.palette.common.white,
|
|
14
|
+
fontFamily: theme.typography.fontFamily,
|
|
15
|
+
padding: '4px 8px',
|
|
16
|
+
fontSize: theme.typography.fontSize,
|
|
17
|
+
maxWidth: 300,
|
|
18
|
+
wordWrap: 'break-word',
|
|
19
|
+
zIndex: 100000,
|
|
20
|
+
},
|
|
21
|
+
row: {
|
|
22
|
+
whiteSpace: 'nowrap',
|
|
23
|
+
},
|
|
24
|
+
colorBox: {
|
|
25
|
+
width: 10,
|
|
26
|
+
height: 10,
|
|
27
|
+
display: 'inline-block',
|
|
28
|
+
marginRight: 4,
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
const EXCLUDE_KEYS = new Set(['color', 'HP', 'name', 'id']);
|
|
32
|
+
const MultiVariantTooltip = memo(function MultiVariantTooltip({ source, x, y, }) {
|
|
33
|
+
const { classes } = useStyles();
|
|
34
|
+
return (_jsx(Portal, { children: _jsxs("div", { className: classes.tooltip, style: { transform: `translate(${x + 10}px, ${y + 10}px)` }, children: [source.color ? (_jsx("div", { className: classes.colorBox, style: { backgroundColor: source.color } })) : null, Object.entries(source).map(([key, value]) => !EXCLUDE_KEYS.has(key) && value !== undefined ? (_jsxs("div", { className: classes.row, children: [key, ": ", String(value)] }, key)) : null)] }) }));
|
|
35
|
+
});
|
|
36
|
+
export default MultiVariantTooltip;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MultiVariantBaseModel } from '../MultiVariantBaseModel.ts';
|
|
2
|
+
interface ScrollableVariantContainerProps {
|
|
3
|
+
model: MultiVariantBaseModel;
|
|
4
|
+
topOffset?: number;
|
|
5
|
+
testId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ScrollableVariantContainer: ({ model, topOffset, testId, }: ScrollableVariantContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ScrollableVariantContainer;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import LegendBar from "./MultiVariantLegendBar.js";
|
|
5
|
+
import TreeSidebar from "./TreeSidebar.js";
|
|
6
|
+
const ScrollableVariantContainer = observer(function ScrollableVariantContainer({ model, topOffset = 0, testId, }) {
|
|
7
|
+
const { setScrollTop, autoHeight, availableHeight } = model;
|
|
8
|
+
return (_jsxs("div", { "data-testid": testId, style: {
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: topOffset,
|
|
11
|
+
height: availableHeight,
|
|
12
|
+
width: '100%',
|
|
13
|
+
overflowY: autoHeight ? 'hidden' : 'auto',
|
|
14
|
+
overflowX: 'hidden',
|
|
15
|
+
}, onScroll: evt => {
|
|
16
|
+
setScrollTop(evt.currentTarget.scrollTop);
|
|
17
|
+
}, children: [_jsx(TreeSidebar, { model: model }), _jsx(LegendBar, { model: model }), _jsx("div", { style: {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
left: 0,
|
|
20
|
+
width: '100%',
|
|
21
|
+
}, children: _jsx(BaseLinearDisplayComponent, { model: model }) })] }));
|
|
22
|
+
});
|
|
23
|
+
export default ScrollableVariantContainer;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Source } from '../types';
|
|
1
|
+
import type { Source } from '../types.ts';
|
|
2
2
|
interface ReducedModel {
|
|
3
3
|
sources?: Source[];
|
|
4
|
-
|
|
4
|
+
clusterTree?: string;
|
|
5
|
+
setLayout: (s: Source[], clearTree?: boolean) => void;
|
|
5
6
|
clearLayout: () => void;
|
|
6
7
|
}
|
|
7
8
|
export default function SetColorDialog({ model, handleClose, }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import SharedSetColorDialog from "./BaseSetColorDialog.js";
|
|
3
|
+
import SourcesGrid from "./SourcesGrid.js";
|
|
4
4
|
export default function SetColorDialog({ model, handleClose, }) {
|
|
5
5
|
return (_jsx(SharedSetColorDialog, { model: model, handleClose: handleClose, title: "Multi-sample variant display - Color/arrangement editor", enableBulkEdit: true, enableRowPalettizer: true, showTipsStorageKey: "multivariant-showTips", SourcesGridComponent: SourcesGrid }));
|
|
6
6
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
interface Row {
|
|
2
|
+
name: string;
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}
|
|
1
5
|
export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }: {
|
|
2
|
-
currLayout:
|
|
3
|
-
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}[];
|
|
6
|
-
onClose: (arg?: {
|
|
7
|
-
name: string;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}[]) => void;
|
|
6
|
+
currLayout: Row[];
|
|
7
|
+
onClose: (arg?: Row[]) => void;
|
|
10
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
textAreaFont: {
|
|
8
8
|
fontFamily: 'Courier New',
|
|
@@ -12,6 +12,27 @@ export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }) {
|
|
|
12
12
|
const { classes } = useStyles();
|
|
13
13
|
const [val, setVal] = useState('');
|
|
14
14
|
const [error, setError] = useState();
|
|
15
|
+
const processRows = (mergeExisting) => {
|
|
16
|
+
const lines = val
|
|
17
|
+
.split('\n')
|
|
18
|
+
.map(f => f.trim())
|
|
19
|
+
.filter(Boolean);
|
|
20
|
+
const fields = lines[0].split(/[,\t]/gm);
|
|
21
|
+
if (!fields.includes('name')) {
|
|
22
|
+
setError(new Error('No "name" column found on line 1'));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
setError('');
|
|
26
|
+
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
27
|
+
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
28
|
+
const cols = line.split(/[,\t]/gm);
|
|
29
|
+
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
30
|
+
return [newRecord.name, { ...newRecord, ...oldLayout[newRecord.name] }];
|
|
31
|
+
}));
|
|
32
|
+
onClose(currLayout.map(record => mergeExisting
|
|
33
|
+
? { ...record, ...newData[record.name] }
|
|
34
|
+
: { ...newData[record.name] }));
|
|
35
|
+
};
|
|
15
36
|
return (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { children: [_jsx(Typography, { children: "Paste CSV or TSV. If a header column is present. First line is a header. If a column called \"name\" is present, it uses that to connect to IDs in the table, otherwise it uses the first column no." }), error ? _jsx(ErrorMessage, { error: error }) : null, _jsx(TextField, { variant: "outlined", multiline: true, minRows: 5, placeholder: 'name,population\nHG00098,GBR\nHG00101,GBR\nHG00459,CHS\n...', maxRows: 10, fullWidth: true, value: val, onChange: event => {
|
|
16
37
|
setVal(event.target.value);
|
|
17
38
|
}, slotProps: {
|
|
@@ -21,60 +42,9 @@ export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }) {
|
|
|
21
42
|
},
|
|
22
43
|
},
|
|
23
44
|
} })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
24
|
-
|
|
25
|
-
.split('\n')
|
|
26
|
-
.map(f => f.trim())
|
|
27
|
-
.filter(f => !!f);
|
|
28
|
-
const fields = lines[0].split(/[,\t]/gm);
|
|
29
|
-
if (fields.includes('name')) {
|
|
30
|
-
setError('');
|
|
31
|
-
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
32
|
-
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
33
|
-
const cols = line.split(/[,\t]/gm);
|
|
34
|
-
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
35
|
-
return [
|
|
36
|
-
newRecord.name,
|
|
37
|
-
{
|
|
38
|
-
...newRecord,
|
|
39
|
-
...oldLayout[newRecord.name],
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
}));
|
|
43
|
-
onClose(currLayout.map(record => ({
|
|
44
|
-
...record,
|
|
45
|
-
...newData[record.name],
|
|
46
|
-
})));
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
setError(new Error('No "name" column found on line 1'));
|
|
50
|
-
}
|
|
45
|
+
processRows(true);
|
|
51
46
|
}, children: "Update rows" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
52
|
-
|
|
53
|
-
.split('\n')
|
|
54
|
-
.map(f => f.trim())
|
|
55
|
-
.filter(f => !!f);
|
|
56
|
-
const fields = lines[0].split(/[,\t]/gm);
|
|
57
|
-
if (fields.includes('name')) {
|
|
58
|
-
setError('');
|
|
59
|
-
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
60
|
-
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
61
|
-
const cols = line.split(/[,\t]/gm);
|
|
62
|
-
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
63
|
-
return [
|
|
64
|
-
newRecord.name,
|
|
65
|
-
{
|
|
66
|
-
...newRecord,
|
|
67
|
-
...oldLayout[newRecord.name],
|
|
68
|
-
},
|
|
69
|
-
];
|
|
70
|
-
}));
|
|
71
|
-
onClose(currLayout.map(record => ({
|
|
72
|
-
...newData[record.name],
|
|
73
|
-
})));
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
setError(new Error('No "name" column found on line 1'));
|
|
77
|
-
}
|
|
47
|
+
processRows(false);
|
|
78
48
|
}, children: "Replace rows" }), _jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
79
49
|
onClose();
|
|
80
50
|
}, children: "Cancel" })] })] }));
|
|
@@ -2,37 +2,27 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { set1 } from '@jbrowse/core/ui/colors';
|
|
3
3
|
import { randomColor } from '@jbrowse/core/util/color';
|
|
4
4
|
import { Button } from '@mui/material';
|
|
5
|
+
const excludedFields = new Set(['name', 'color', 'label', 'id', 'HP']);
|
|
5
6
|
export default function SetColorDialogRowPalettizer({ setCurrLayout, currLayout, }) {
|
|
6
|
-
|
|
7
|
+
const firstRow = currLayout[0];
|
|
8
|
+
if (!firstRow) {
|
|
7
9
|
return null;
|
|
8
10
|
}
|
|
9
|
-
const fields = Object.keys(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
f !== 'id' &&
|
|
13
|
-
f !== 'HP');
|
|
14
|
-
return (_jsxs("div", { children: ["Create color palette based on...", fields.map(r => (_jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
15
|
-
const map = new Map();
|
|
11
|
+
const fields = Object.keys(firstRow).filter(f => !excludedFields.has(f));
|
|
12
|
+
return (_jsxs("div", { children: ["Create color palette based on...", fields.map(field => (_jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
13
|
+
const counts = new Map();
|
|
16
14
|
for (const row of currLayout) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
map.set(row[r], 1);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
map.set(row[r], val + 1);
|
|
23
|
-
}
|
|
15
|
+
const key = row[field];
|
|
16
|
+
counts.set(key, (counts.get(key) || 0) + 1);
|
|
24
17
|
}
|
|
25
|
-
const
|
|
18
|
+
const colorMap = Object.fromEntries([...counts.entries()]
|
|
26
19
|
.sort((a, b) => a[1] - b[1])
|
|
27
|
-
.map((
|
|
20
|
+
.map(([key], idx) => [key, set1[idx] || randomColor(key)]));
|
|
28
21
|
setCurrLayout(currLayout.map(row => ({
|
|
29
22
|
...row,
|
|
30
|
-
color:
|
|
31
|
-
})));
|
|
32
|
-
}, children: r }, r))), _jsx(Button, { onClick: () => {
|
|
33
|
-
setCurrLayout(currLayout.map(row => ({
|
|
34
|
-
...row,
|
|
35
|
-
color: undefined,
|
|
23
|
+
color: colorMap[row[field]],
|
|
36
24
|
})));
|
|
25
|
+
}, children: field }, field))), _jsx(Button, { onClick: () => {
|
|
26
|
+
setCurrLayout(currLayout.map(row => ({ ...row, color: undefined })));
|
|
37
27
|
}, children: "Clear colors" })] }));
|
|
38
28
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Source } from '../types';
|
|
2
1
|
export default function SetRowHeight({ model, handleClose, }: {
|
|
3
2
|
model: {
|
|
4
|
-
rowHeight
|
|
5
|
-
setRowHeight: (arg: number) => void;
|
|
3
|
+
rowHeight: number;
|
|
4
|
+
setRowHeight: (arg: number | 'auto') => void;
|
|
6
5
|
};
|
|
7
6
|
handleClose: () => void;
|
|
8
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { useState } from 'react';
|
|
|
3
3
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
4
4
|
import ColorPicker from '@jbrowse/core/ui/ColorPicker';
|
|
5
5
|
import { getStr, measureGridWidth } from '@jbrowse/core/util';
|
|
6
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
7
|
import { DataGrid } from '@mui/x-data-grid';
|
|
7
|
-
import { makeStyles } from 'tss-react/mui';
|
|
8
8
|
const useStyles = makeStyles()({
|
|
9
9
|
cell: {
|
|
10
10
|
whiteSpace: 'nowrap',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import SourcesDataGrid from
|
|
4
|
-
import SourcesGridHeader from
|
|
3
|
+
import SourcesDataGrid from "./SourcesDataGrid.js";
|
|
4
|
+
import SourcesGridHeader from "./SourcesGridHeader.js";
|
|
5
5
|
function SourcesGrid({ rows, onChange, showTips, }) {
|
|
6
6
|
const [selected, setSelected] = useState([]);
|
|
7
7
|
return (_jsxs("div", { children: [_jsx(SourcesGridHeader, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }), rows.length ? (_jsx(SourcesDataGrid, { rows: rows, onChange: onChange, setSelected: setSelected })) : (_jsx("div", { children: "No rows" }))] }));
|
|
@@ -6,7 +6,7 @@ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
|
6
6
|
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
7
7
|
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
8
8
|
import { Button } from '@mui/material';
|
|
9
|
-
import { moveDown, moveUp } from
|
|
9
|
+
import { moveDown, moveUp } from "../sourcesGridUtils.js";
|
|
10
10
|
export default function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
|
|
11
11
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
12
12
|
const [widgetColor, setWidgetColor] = useState('blue');
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
const SvgTree = observer(function SvgTree({ model, }) {
|
|
4
|
+
const { treeAreaWidth: _treeAreaWidth, hierarchy } = model;
|
|
5
|
+
const svg = [];
|
|
6
|
+
let idx = 0;
|
|
7
|
+
if (hierarchy) {
|
|
8
|
+
for (const link of hierarchy.links()) {
|
|
9
|
+
const { source, target } = link;
|
|
10
|
+
const sy = source.x;
|
|
11
|
+
const ty = target.x;
|
|
12
|
+
const tx = target.y;
|
|
13
|
+
const sx = source.y;
|
|
14
|
+
svg.push(_jsx("line", { x1: sx, y1: sy, x2: sx, y2: ty, stroke: "black", opacity: "0.4" }, `${sx}-${sy}-${tx}-${ty}-${idx++}`), _jsx("line", { x1: sx, y1: ty, x2: tx, y2: ty, stroke: "black", opacity: "0.4" }, `${sx}-${sy}-${tx}-${ty}-${idx++}`));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return svg;
|
|
18
|
+
});
|
|
19
|
+
export default SvgTree;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { ResizeHandle } from '@jbrowse/core/ui';
|
|
4
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
5
|
+
import Flatbush from '@jbrowse/core/util/flatbush';
|
|
6
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
7
|
+
import { autorun } from 'mobx';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
resizeHandle: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 0,
|
|
13
|
+
height: '100%',
|
|
14
|
+
width: 4,
|
|
15
|
+
zIndex: 101,
|
|
16
|
+
background: 'transparent',
|
|
17
|
+
'&:hover': {
|
|
18
|
+
background: theme.palette.divider,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}));
|
|
22
|
+
function getDescendantNames(node) {
|
|
23
|
+
if (!node.children?.length) {
|
|
24
|
+
return [node.data.name];
|
|
25
|
+
}
|
|
26
|
+
return node.children.flatMap(child => getDescendantNames(child));
|
|
27
|
+
}
|
|
28
|
+
const TreeSidebar = observer(function TreeSidebar({ model, }) {
|
|
29
|
+
const { classes } = useStyles();
|
|
30
|
+
const { width: viewWidth } = getContainingView(model);
|
|
31
|
+
const [nodeIndex, setNodeIndex] = useState(null);
|
|
32
|
+
const [nodeData, setNodeData] = useState([]);
|
|
33
|
+
const { hierarchy, treeAreaWidth, height, scrollTop, showTree, sources } = model;
|
|
34
|
+
const treeCanvasRef = useCallback((ref) => {
|
|
35
|
+
model.setTreeCanvasRef(ref);
|
|
36
|
+
}, [model, treeAreaWidth, height]);
|
|
37
|
+
const mouseoverCanvasRef = useCallback((ref) => {
|
|
38
|
+
model.setMouseoverCanvasRef(ref);
|
|
39
|
+
}, [model, viewWidth, height]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
return autorun(function treeSpatialIndexAutorun() {
|
|
42
|
+
const { treeAreaWidth: _t, hierarchy: h, totalHeight: th } = model;
|
|
43
|
+
void th;
|
|
44
|
+
if (!h) {
|
|
45
|
+
setNodeIndex(null);
|
|
46
|
+
setNodeData([]);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const nodes = h.descendants().filter(node => node.children?.length);
|
|
50
|
+
const index = new Flatbush(nodes.length);
|
|
51
|
+
const hitRadius = 8;
|
|
52
|
+
for (const node of nodes) {
|
|
53
|
+
const x = node.y;
|
|
54
|
+
const y = node.x;
|
|
55
|
+
index.add(x - hitRadius, y - hitRadius, x + hitRadius, y + hitRadius);
|
|
56
|
+
}
|
|
57
|
+
index.finish();
|
|
58
|
+
setNodeIndex(index);
|
|
59
|
+
setNodeData(nodes);
|
|
60
|
+
}, { name: 'TreeSpatialIndex' });
|
|
61
|
+
}, [model]);
|
|
62
|
+
const handleMouseMove = useCallback((event) => {
|
|
63
|
+
if (!hierarchy || !nodeIndex) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
67
|
+
const x = event.clientX - rect.left;
|
|
68
|
+
const y = event.clientY - rect.top + scrollTop;
|
|
69
|
+
const results = nodeIndex.search(x, y, x, y);
|
|
70
|
+
const node = results.length > 0 ? nodeData[results[0]] : undefined;
|
|
71
|
+
if (node) {
|
|
72
|
+
model.setHoveredTreeNode({
|
|
73
|
+
node,
|
|
74
|
+
descendantNames: getDescendantNames(node),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
model.setHoveredTreeNode(undefined);
|
|
79
|
+
}
|
|
80
|
+
}, [hierarchy, nodeIndex, nodeData, scrollTop, model]);
|
|
81
|
+
const handleMouseLeave = useCallback(() => {
|
|
82
|
+
model.setHoveredTreeNode(undefined);
|
|
83
|
+
}, [model]);
|
|
84
|
+
if (!hierarchy || !showTree || !sources?.length) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
|
|
88
|
+
position: 'sticky',
|
|
89
|
+
top: 0,
|
|
90
|
+
left: 0,
|
|
91
|
+
height: 0,
|
|
92
|
+
zIndex: 100,
|
|
93
|
+
}, children: [_jsx("canvas", { ref: treeCanvasRef, width: treeAreaWidth * 2, height: height * 2, style: {
|
|
94
|
+
width: treeAreaWidth,
|
|
95
|
+
height,
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
pointerEvents: 'none',
|
|
100
|
+
} }), _jsx("canvas", { ref: mouseoverCanvasRef, width: viewWidth, height: height, style: {
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
top: 0,
|
|
103
|
+
left: 0,
|
|
104
|
+
zIndex: 1,
|
|
105
|
+
pointerEvents: 'none',
|
|
106
|
+
} }), _jsx("div", { onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, style: {
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
top: 0,
|
|
109
|
+
left: 0,
|
|
110
|
+
width: treeAreaWidth,
|
|
111
|
+
height,
|
|
112
|
+
zIndex: 2,
|
|
113
|
+
cursor: 'pointer',
|
|
114
|
+
} })] }), _jsx(ResizeHandle, { onDrag: distance => {
|
|
115
|
+
model.setTreeAreaWidth(Math.max(50, treeAreaWidth + distance));
|
|
116
|
+
return undefined;
|
|
117
|
+
}, className: classes.resizeHandle, style: {
|
|
118
|
+
left: treeAreaWidth,
|
|
119
|
+
}, vertical: true })] }));
|
|
120
|
+
});
|
|
121
|
+
export default TreeSidebar;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Source } from '../types.ts';
|
|
2
|
+
import type { HierarchyNode } from 'd3-hierarchy';
|
|
3
|
+
export interface ClusterNodeData {
|
|
4
|
+
name: string;
|
|
5
|
+
height: number;
|
|
6
|
+
children?: ClusterNodeData[];
|
|
7
|
+
}
|
|
8
|
+
export type ClusterHierarchyNode = HierarchyNode<ClusterNodeData>;
|
|
9
|
+
export interface HoveredTreeNode {
|
|
10
|
+
node: ClusterHierarchyNode;
|
|
11
|
+
descendantNames: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface TreeSidebarModel {
|
|
14
|
+
totalHeight: number;
|
|
15
|
+
hierarchy?: ClusterHierarchyNode;
|
|
16
|
+
treeAreaWidth: number;
|
|
17
|
+
height: number;
|
|
18
|
+
scrollTop: number;
|
|
19
|
+
showTree: boolean;
|
|
20
|
+
sources?: Source[];
|
|
21
|
+
setTreeCanvasRef: (ref: HTMLCanvasElement | null) => void;
|
|
22
|
+
setMouseoverCanvasRef: (ref: HTMLCanvasElement | null) => void;
|
|
23
|
+
setHoveredTreeNode: (node?: HoveredTreeNode) => void;
|
|
24
|
+
setTreeAreaWidth: (width: number) => void;
|
|
25
|
+
}
|
|
26
|
+
export interface LegendBarModel {
|
|
27
|
+
id: string;
|
|
28
|
+
scrollTop: number;
|
|
29
|
+
height: number;
|
|
30
|
+
hierarchy?: ClusterHierarchyNode;
|
|
31
|
+
treeAreaWidth: number;
|
|
32
|
+
totalHeight: number;
|
|
33
|
+
canDisplayLabels: boolean;
|
|
34
|
+
rowHeight: number;
|
|
35
|
+
sources?: Source[];
|
|
36
|
+
showTree: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface MouseState {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
offsetX: number;
|
|
42
|
+
offsetY: number;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const f2 = 0.3;
|
|
2
|
+
export declare const REFERENCE_COLOR = "#ccc";
|
|
3
|
+
export declare const NO_CALL_COLOR = "hsl(50,50%,50%)";
|
|
4
|
+
export declare const UNPHASED_COLOR = "black";
|
|
5
|
+
export declare const ALT_COLOR_HUE = 200;
|
|
6
|
+
export declare const ALT_COLOR_SATURATION = 50;
|
|
7
|
+
export declare const OTHER_ALT_COLOR = "hsl(0,100%,20%)";
|
|
8
|
+
export declare function getAltColorForDosage(dosage: number): string;
|
package/esm/shared/constants.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
1
|
+
export const f2 = 0.3;
|
|
2
|
+
export const REFERENCE_COLOR = '#ccc';
|
|
3
|
+
export const NO_CALL_COLOR = 'hsl(50,50%,50%)';
|
|
4
|
+
export const UNPHASED_COLOR = 'black';
|
|
5
|
+
export const ALT_COLOR_HUE = 200;
|
|
6
|
+
export const ALT_COLOR_SATURATION = 50;
|
|
7
|
+
export const OTHER_ALT_COLOR = 'hsl(0,100%,20%)';
|
|
8
|
+
export function getAltColorForDosage(dosage) {
|
|
9
|
+
const lightness = 80 - dosage * 50;
|
|
10
|
+
return `hsl(${ALT_COLOR_HUE},${ALT_COLOR_SATURATION}%,${lightness}%)`;
|
|
11
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function getAlleleColor(genotype: string, mostFrequentAlt: string, colorCache: Record<string, string | undefined>, splitCache: Record<string, string[]>, drawRef: boolean): string;
|
|
2
|
+
export declare function getColorAlleleCount(ref: number, alt: number, alt2: number, uncalled: number, total: number, drawReference?: boolean): string;
|
|
2
3
|
export declare function drawColorAlleleCount(c: string, ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, featureType?: string, featureStrand?: number, alpha?: number): void;
|