@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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import DraggableDialog from '@jbrowse/core/ui/DraggableDialog';
|
|
4
|
+
import { useLocalStorage } from '@jbrowse/core/util';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import { Button, DialogActions, DialogContent } from '@mui/material';
|
|
7
|
+
import ClearTreeWarningDialog from "./ClearTreeWarningDialog.js";
|
|
8
|
+
import SetColorDialogBulkEditPanel from "./SetColorDialogBulkEditPanel.js";
|
|
9
|
+
import SetColorDialogHelpfulTips from "./SetColorDialogHelpfulTips.js";
|
|
10
|
+
import SetColorDialogRowPalettizer from "./SetColorDialogRowPalettizer.js";
|
|
11
|
+
const useStyles = makeStyles()({
|
|
12
|
+
content: {
|
|
13
|
+
minWidth: 800,
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
float: 'right',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
gap: 8,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
export default function SetColorDialog({ model, handleClose, title = 'Color/arrangement editor', enableBulkEdit = false, enableRowPalettizer = false, showTipsStorageKey = 'setColorDialog-showTips', SourcesGridComponent, }) {
|
|
22
|
+
const { classes } = useStyles();
|
|
23
|
+
const { sources } = model;
|
|
24
|
+
const [showBulkEditor, setShowBulkEditor] = useState(false);
|
|
25
|
+
const [currLayout, setCurrLayout] = useState(structuredClone(sources || []));
|
|
26
|
+
const [showTips, setShowTips] = useLocalStorage(showTipsStorageKey, false);
|
|
27
|
+
const [showWarning, setShowWarning] = useState(false);
|
|
28
|
+
return (_jsxs(DraggableDialog, { open: true, onClose: handleClose, maxWidth: "xl", title: title, children: [showBulkEditor && enableBulkEdit ? (_jsx(SetColorDialogBulkEditPanel, { currLayout: currLayout, onClose: arg => {
|
|
29
|
+
if (arg) {
|
|
30
|
+
setCurrLayout(arg);
|
|
31
|
+
}
|
|
32
|
+
setShowBulkEditor(false);
|
|
33
|
+
} })) : (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { className: classes.content, children: [_jsxs("div", { className: classes.fr, children: [_jsx(Button, { variant: "contained", onClick: () => {
|
|
34
|
+
setShowTips(!showTips);
|
|
35
|
+
}, children: showTips ? 'Hide tips' : 'Show tips' }), enableBulkEdit ? (_jsx(Button, { color: "secondary", variant: "contained", onClick: () => {
|
|
36
|
+
setShowBulkEditor(!showBulkEditor);
|
|
37
|
+
}, children: "Show Bulk row editor" })) : null] }), showTips ? _jsx(SetColorDialogHelpfulTips, {}) : null, enableRowPalettizer ? (_jsxs(_Fragment, { children: [_jsx("br", {}), _jsx(SetColorDialogRowPalettizer, { currLayout: currLayout, setCurrLayout: setCurrLayout })] })) : null, _jsx(SourcesGridComponent, { rows: currLayout, onChange: setCurrLayout, showTips: showTips })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", type: "submit", color: "inherit", onClick: () => {
|
|
38
|
+
model.clearLayout();
|
|
39
|
+
setCurrLayout(model.sources || []);
|
|
40
|
+
}, children: "Clear custom settings" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
41
|
+
handleClose();
|
|
42
|
+
setCurrLayout([...(model.sources || [])]);
|
|
43
|
+
}, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", type: "submit", onClick: () => {
|
|
44
|
+
const { sources, clusterTree } = model;
|
|
45
|
+
const orderChanged = clusterTree &&
|
|
46
|
+
sources?.length === currLayout.length &&
|
|
47
|
+
sources.some((source, idx) => source.name !== currLayout[idx]?.name);
|
|
48
|
+
if (orderChanged) {
|
|
49
|
+
setShowWarning(true);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
model.setLayout(currLayout);
|
|
53
|
+
handleClose();
|
|
54
|
+
}
|
|
55
|
+
}, children: "Submit" })] })] })), showWarning ? (_jsx(ClearTreeWarningDialog, { handleClose: () => {
|
|
56
|
+
setShowWarning(false);
|
|
57
|
+
}, onConfirm: () => {
|
|
58
|
+
model.setLayout(currLayout);
|
|
59
|
+
handleClose();
|
|
60
|
+
} })) : null] }));
|
|
61
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Button, DialogActions, DialogContent, DialogContentText, } from '@mui/material';
|
|
4
|
+
export default function ClearTreeWarningDialog({ handleClose, onConfirm, }) {
|
|
5
|
+
return (_jsxs(Dialog, { open: true, title: "Clear cluster tree?", onClose: handleClose, children: [_jsx(DialogContent, { children: _jsx(DialogContentText, { children: "You have changed the row order. This will clear the cluster tree visualization. Do you want to continue?" }) }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: handleClose, color: "primary", children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
6
|
+
onConfirm();
|
|
7
|
+
handleClose();
|
|
8
|
+
}, children: "Continue" })] })] }));
|
|
9
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export default function MAFFilterDialog({ model, handleClose, }: {
|
|
2
2
|
model: {
|
|
3
3
|
minorAlleleFrequencyFilter?: number;
|
|
4
4
|
setMafFilter: (arg: number) => void;
|
|
5
5
|
};
|
|
6
6
|
handleClose: () => void;
|
|
7
|
-
})
|
|
8
|
-
export default MAFFilterDialog;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { Button, Dialog, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
5
|
const useStyles = makeStyles()({
|
|
7
6
|
root: {
|
|
8
7
|
width: 500,
|
|
9
8
|
},
|
|
10
9
|
});
|
|
11
|
-
|
|
10
|
+
export default function MAFFilterDialog({ model, handleClose, }) {
|
|
12
11
|
const { minorAlleleFrequencyFilter = '' } = model;
|
|
13
12
|
const { classes } = useStyles();
|
|
14
13
|
const [maf, setMaf] = useState(`${minorAlleleFrequencyFilter}`);
|
|
@@ -19,8 +18,5 @@ const MAFFilterDialog = observer(function ({ model, handleClose, }) {
|
|
|
19
18
|
model.setMafFilter(+maf);
|
|
20
19
|
}
|
|
21
20
|
handleClose();
|
|
22
|
-
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick:
|
|
23
|
-
|
|
24
|
-
}, children: "Cancel" })] })] }) }));
|
|
25
|
-
});
|
|
26
|
-
export default MAFFilterDialog;
|
|
21
|
+
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: handleClose, children: "Cancel" })] })] }) }));
|
|
22
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MultiVariantBaseModel } from '../MultiVariantBaseModel';
|
|
1
|
+
import type { MultiVariantBaseModel } from '../MultiVariantBaseModel.ts';
|
|
2
2
|
declare const MultiVariantBaseDisplayComponent: (props: {
|
|
3
3
|
model: MultiVariantBaseModel;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef
|
|
2
|
+
import { useRef } from 'react';
|
|
3
3
|
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
import Crosshair from
|
|
6
|
-
import LegendBar from
|
|
7
|
-
|
|
5
|
+
import Crosshair from "./MultiVariantCrosshairs.js";
|
|
6
|
+
import LegendBar from "./MultiVariantLegendBar.js";
|
|
7
|
+
import TreeSidebar from "./TreeSidebar.js";
|
|
8
|
+
import { useMouseTracking } from "../hooks/useMouseTracking.js";
|
|
9
|
+
const MultiVariantBaseDisplayComponent = observer(function MultiVariantBaseDisplayComponent(props) {
|
|
8
10
|
const { model } = props;
|
|
9
11
|
const ref = useRef(null);
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
return (_jsxs("div", { ref: ref, onMouseMove: event => {
|
|
13
|
-
var _a;
|
|
14
|
-
const rect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
15
|
-
const top = (rect === null || rect === void 0 ? void 0 : rect.top) || 0;
|
|
16
|
-
const left = (rect === null || rect === void 0 ? void 0 : rect.left) || 0;
|
|
17
|
-
setMouseY(event.clientY - top);
|
|
18
|
-
setMouseX(event.clientX - left);
|
|
19
|
-
}, onMouseLeave: () => {
|
|
20
|
-
setMouseY(undefined);
|
|
21
|
-
setMouseX(undefined);
|
|
22
|
-
}, children: [_jsx(BaseLinearDisplayComponent, { ...props }), _jsx(LegendBar, { model: model }), mouseX && mouseY ? (_jsx(Crosshair, { mouseX: mouseX, mouseY: mouseY, model: model })) : null] }));
|
|
12
|
+
const { mouseState, handleMouseMove, handleMouseLeave } = useMouseTracking(ref);
|
|
13
|
+
return (_jsxs("div", { ref: ref, onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: [_jsx(BaseLinearDisplayComponent, { ...props }), _jsx(TreeSidebar, { model: model }), _jsx(LegendBar, { model: model }), mouseState ? (_jsx(Crosshair, { mouseX: mouseState.x, mouseY: mouseState.y, offsetX: mouseState.offsetX, offsetY: mouseState.offsetY, model: model })) : null] }));
|
|
23
14
|
});
|
|
24
15
|
export default MultiVariantBaseDisplayComponent;
|
|
@@ -3,8 +3,8 @@ import { useState } from 'react';
|
|
|
3
3
|
import { Dialog } from '@jbrowse/core/ui';
|
|
4
4
|
import { FormControlLabel, Radio, RadioGroup, Typography } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
import ClusterDialogAuto from
|
|
7
|
-
import ClusterDialogManual from
|
|
6
|
+
import ClusterDialogAuto from "./ClusterDialogAuto.js";
|
|
7
|
+
import ClusterDialogManual from "./ClusterDialogManual.js";
|
|
8
8
|
function Header({ activeMode, setActiveMode, }) {
|
|
9
9
|
return (_jsxs("div", { children: [_jsx(Typography, { style: { marginBottom: 30 }, children: "This procedure will cluster the visible genotype data using hierarchical clustering" }), _jsx(RadioGroup, { children: Object.entries({
|
|
10
10
|
auto: (_jsx("div", { children: "Run in-app clustering (slower, particularly for large numbers of samples, uses JS implementation of hclust)" })),
|
|
@@ -13,7 +13,7 @@ function Header({ activeMode, setActiveMode, }) {
|
|
|
13
13
|
setActiveMode(key);
|
|
14
14
|
} }), label: val }, key))) })] }));
|
|
15
15
|
}
|
|
16
|
-
const ClusterDialog = observer(function ({ model, handleClose, }) {
|
|
16
|
+
const ClusterDialog = observer(function ClusterDialog({ model, handleClose, }) {
|
|
17
17
|
const [activeMode, setActiveMode] = useState('auto');
|
|
18
18
|
return (_jsx(Dialog, { open: true, title: "Cluster by genotype", onClose: (_, reason) => {
|
|
19
19
|
if (reason !== 'backdropClick') {
|
|
@@ -4,17 +4,19 @@ import { ErrorMessage } from '@jbrowse/core/ui';
|
|
|
4
4
|
import { getContainingView, getSession, isAbortException, } from '@jbrowse/core/util';
|
|
5
5
|
import { createStopToken, stopStopToken } from '@jbrowse/core/util/stopToken';
|
|
6
6
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
7
|
+
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
7
8
|
import { Button, DialogActions, DialogContent } from '@mui/material';
|
|
8
9
|
import { observer } from 'mobx-react';
|
|
9
|
-
|
|
10
|
-
const ClusterDialogAuto = observer(function ({ model, children, handleClose, }) {
|
|
10
|
+
const ClusterDialogAuto = observer(function ClusterDialogAuto({ model, children, handleClose, }) {
|
|
11
11
|
const [progress, setProgress] = useState('');
|
|
12
12
|
const [loading, setLoading] = useState(false);
|
|
13
13
|
const [error, setError] = useState();
|
|
14
|
-
const [stopToken, setStopToken] = useState(
|
|
14
|
+
const [stopToken, setStopToken] = useState();
|
|
15
|
+
const { rpcManager } = getSession(model);
|
|
16
|
+
const { sourcesWithoutLayout, minorAlleleFrequencyFilter, lengthCutoffFilter, adapterConfig, } = model;
|
|
15
17
|
return (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { children: [children, _jsxs("div", { children: [loading ? (_jsxs("div", { style: { padding: 50 }, children: [_jsx("span", { children: progress || 'Loading...' }), _jsx(Button, { onClick: () => {
|
|
16
18
|
stopStopToken(stopToken);
|
|
17
|
-
}, children: "Stop" })] })) : null, error ? _jsx(ErrorMessage, { error: error }) : null] })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", disabled: loading, onClick: async () => {
|
|
19
|
+
}, children: "Stop" })] })) : null, error ? _jsx(ErrorMessage, { error: error }) : null] })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", disabled: loading || !model.sourcesWithoutLayout, onClick: async () => {
|
|
18
20
|
try {
|
|
19
21
|
setError(undefined);
|
|
20
22
|
setProgress('Initializing');
|
|
@@ -23,8 +25,6 @@ const ClusterDialogAuto = observer(function ({ model, children, handleClose, })
|
|
|
23
25
|
if (!view.initialized) {
|
|
24
26
|
return;
|
|
25
27
|
}
|
|
26
|
-
const { rpcManager } = getSession(model);
|
|
27
|
-
const { sourcesWithoutLayout, minorAlleleFrequencyFilter, lengthCutoffFilter, adapterConfig, } = model;
|
|
28
28
|
if (sourcesWithoutLayout) {
|
|
29
29
|
const sessionId = getRpcSessionId(model);
|
|
30
30
|
const stopToken = createStopToken();
|
|
@@ -41,13 +41,8 @@ const ClusterDialogAuto = observer(function ({ model, children, handleClose, })
|
|
|
41
41
|
setProgress(arg);
|
|
42
42
|
},
|
|
43
43
|
}));
|
|
44
|
-
model.setLayout(ret.order.map(idx =>
|
|
45
|
-
|
|
46
|
-
if (!ret) {
|
|
47
|
-
throw new Error(`out of bounds at ${idx}`);
|
|
48
|
-
}
|
|
49
|
-
return ret;
|
|
50
|
-
}));
|
|
44
|
+
model.setLayout(ret.order.map(idx => sourcesWithoutLayout[idx]), false);
|
|
45
|
+
model.setClusterTree(ret.tree);
|
|
51
46
|
}
|
|
52
47
|
handleClose();
|
|
53
48
|
}
|
|
@@ -60,7 +55,7 @@ const ClusterDialogAuto = observer(function ({ model, children, handleClose, })
|
|
|
60
55
|
finally {
|
|
61
56
|
setLoading(false);
|
|
62
57
|
setProgress('');
|
|
63
|
-
setStopToken(
|
|
58
|
+
setStopToken(undefined);
|
|
64
59
|
}
|
|
65
60
|
}, children: "Run clustering" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
66
61
|
handleClose();
|
|
@@ -3,23 +3,16 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
|
|
4
4
|
import { getContainingView, getSession, isAbortException, useLocalStorage, } from '@jbrowse/core/util';
|
|
5
5
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
6
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
7
|
+
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
6
8
|
import { Button, DialogActions, DialogContent, FormControlLabel, Paper, Radio, RadioGroup, TextField, Typography, } from '@mui/material';
|
|
7
|
-
import copy from 'copy-to-clipboard';
|
|
8
|
-
import { saveAs } from 'file-saver';
|
|
9
9
|
import { observer } from 'mobx-react';
|
|
10
|
-
|
|
11
|
-
import { makeStyles } from 'tss-react/mui';
|
|
12
|
-
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
const useStyles = makeStyles()({
|
|
13
11
|
textAreaFont: {
|
|
14
12
|
fontFamily: 'Courier New',
|
|
15
13
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
gap: theme.spacing(4),
|
|
20
|
-
},
|
|
21
|
-
}));
|
|
22
|
-
const ClusterDialogManuals = observer(function ({ model, handleClose, children, }) {
|
|
14
|
+
});
|
|
15
|
+
const ClusterDialogManuals = observer(function ClusterDialogManuals({ model, handleClose, children, }) {
|
|
23
16
|
const { classes } = useStyles();
|
|
24
17
|
const [paste, setPaste] = useState('');
|
|
25
18
|
const [ret, setRet] = useState();
|
|
@@ -83,13 +76,16 @@ cat(resultClusters$order,sep='\n')`
|
|
|
83
76
|
gap: '8px',
|
|
84
77
|
flexWrap: 'wrap',
|
|
85
78
|
marginBottom: '16px',
|
|
86
|
-
}, children: [_jsx(Button, { variant: "contained", onClick: () => {
|
|
79
|
+
}, children: [_jsx(Button, { variant: "contained", onClick: async () => {
|
|
80
|
+
const { saveAs } = await import('file-saver-es');
|
|
87
81
|
saveAs(new Blob([results || ''], {
|
|
88
82
|
type: 'text/plain;charset=utf-8',
|
|
89
83
|
}), 'cluster.R');
|
|
90
|
-
}, children: "Download Rscript" }), ' ', "or", ' ', _jsx(Button, { variant: "contained", onClick: () => {
|
|
84
|
+
}, children: "Download Rscript" }), ' ', "or", ' ', _jsx(Button, { variant: "contained", onClick: async () => {
|
|
85
|
+
const { default: copy } = await import('copy-to-clipboard');
|
|
91
86
|
copy(results || '');
|
|
92
|
-
}, children: "Copy Rscript to clipboard" }), ' ', "or", ' ', _jsx(Button, { variant: "contained", onClick: () => {
|
|
87
|
+
}, children: "Copy Rscript to clipboard" }), ' ', "or", ' ', _jsx(Button, { variant: "contained", onClick: async () => {
|
|
88
|
+
const { saveAs } = await import('file-saver-es');
|
|
93
89
|
saveAs(new Blob([resultsTsv || ''], {
|
|
94
90
|
type: 'text/plain;charset=utf-8',
|
|
95
91
|
}), 'genotypes.tsv');
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { Source } from '../../types';
|
|
1
|
+
import type { Source } from '../../types.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
export interface ReducedModel {
|
|
4
4
|
sourcesWithoutLayout?: Source[];
|
|
5
5
|
minorAlleleFrequencyFilter?: number;
|
|
6
6
|
lengthCutoffFilter: number;
|
|
7
7
|
adapterConfig: AnyConfigurationModel;
|
|
8
|
-
|
|
8
|
+
setClusterTree: (arg?: string) => void;
|
|
9
|
+
setLayout: (arg: Source[], clearTree?: boolean) => void;
|
|
9
10
|
clearLayout: () => void;
|
|
10
11
|
}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { getFillProps } from '@jbrowse/core/util';
|
|
4
4
|
import { useTheme } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
import RectBg from
|
|
7
|
-
const
|
|
6
|
+
import RectBg from "./RectBg.js";
|
|
7
|
+
const LegendItem = function ({ source, idx, rowHeight, }) {
|
|
8
|
+
const { color } = source;
|
|
9
|
+
const colorBoxWidth = 15;
|
|
10
|
+
return color ? (_jsx(RectBg, { y: idx * rowHeight, x: 0, width: colorBoxWidth + 0.5, height: rowHeight + 0.5, color: color })) : null;
|
|
11
|
+
};
|
|
12
|
+
const LegendItemText = function ({ source, idx, rowHeight, textFillProps, }) {
|
|
13
|
+
const { color, name, label } = source;
|
|
14
|
+
const svgFontSize = Math.min(rowHeight, 12);
|
|
15
|
+
const colorBoxWidth = 15;
|
|
16
|
+
return (_jsx("text", { y: idx * rowHeight + svgFontSize, x: color ? colorBoxWidth + 2 : 0, fontSize: svgFontSize, ...textFillProps, children: label || name }));
|
|
17
|
+
};
|
|
18
|
+
const MultiVariantColorLegend = observer(function MultiVariantColorLegend({ model, labelWidth, }) {
|
|
8
19
|
const { canDisplayLabels, rowHeight, sources } = model;
|
|
9
|
-
const svgFontSize = clamp(rowHeight, 8, 12);
|
|
10
20
|
const colorBoxWidth = 15;
|
|
11
|
-
const hasColors = sources === null || sources === void 0 ? void 0 : sources.some(s => s.color);
|
|
12
|
-
const legendWidth = labelWidth + (hasColors ? colorBoxWidth + 5 : 0);
|
|
13
21
|
const theme = useTheme();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
const hasColors = useMemo(() => sources?.some(s => s.color) ?? false, [sources]);
|
|
23
|
+
const legendWidth = labelWidth + (hasColors ? colorBoxWidth + 5 : 0);
|
|
24
|
+
const textFillProps = useMemo(() => getFillProps(theme.palette.text.primary), [theme.palette.text.primary]);
|
|
25
|
+
return sources ? (_jsxs(_Fragment, { children: [canDisplayLabels ? (_jsx(RectBg, { y: 0, x: 0, width: legendWidth, height: (sources.length + 0.25) * rowHeight })) : null, sources.map((source, idx) => (_jsx(LegendItem, { source: source, idx: idx, rowHeight: rowHeight }, `${source.label}-${idx}`))), canDisplayLabels
|
|
26
|
+
? sources.map((source, idx) => (_jsx(LegendItemText, { source: source, idx: idx, rowHeight: rowHeight, textFillProps: textFillProps }, `${source.label}-text-${idx}`)))
|
|
27
|
+
: null] })) : null;
|
|
18
28
|
});
|
|
19
29
|
export default MultiVariantColorLegend;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { MultiVariantBaseModel } from '../MultiVariantBaseModel';
|
|
2
|
-
declare const MultiVariantCrosshairs: ({ mouseX, mouseY, model, }: {
|
|
1
|
+
import type { MultiVariantBaseModel } from '../MultiVariantBaseModel.ts';
|
|
2
|
+
declare const MultiVariantCrosshairs: ({ mouseX, mouseY, model, offsetX, offsetY, }: {
|
|
3
3
|
mouseX: number;
|
|
4
4
|
mouseY: number;
|
|
5
5
|
model: MultiVariantBaseModel;
|
|
6
|
+
offsetX: number;
|
|
7
|
+
offsetY: number;
|
|
6
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default MultiVariantCrosshairs;
|
|
@@ -1,35 +1,43 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
-
import {
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
cursor: {
|
|
6
|
+
import MultiVariantTooltip from "./MultiVariantTooltip.js";
|
|
7
|
+
const useStyles = makeStyles()(theme => ({
|
|
8
|
+
container: {
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: 0,
|
|
11
|
+
left: 0,
|
|
12
12
|
pointerEvents: 'none',
|
|
13
13
|
zIndex: 800,
|
|
14
|
+
},
|
|
15
|
+
horizontalLine: {
|
|
14
16
|
position: 'absolute',
|
|
17
|
+
left: 0,
|
|
18
|
+
height: 1,
|
|
19
|
+
backgroundColor: theme.palette.text.primary,
|
|
20
|
+
pointerEvents: 'none',
|
|
15
21
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
verticalLine: {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
top: 0,
|
|
25
|
+
width: 1,
|
|
26
|
+
backgroundColor: theme.palette.text.primary,
|
|
27
|
+
pointerEvents: 'none',
|
|
19
28
|
},
|
|
20
|
-
});
|
|
21
|
-
const MultiVariantCrosshairs = observer(function ({ mouseX, mouseY, model, }) {
|
|
29
|
+
}));
|
|
30
|
+
const MultiVariantCrosshairs = observer(function MultiVariantCrosshairs({ mouseX, mouseY, model, offsetX, offsetY, }) {
|
|
22
31
|
const { classes } = useStyles();
|
|
23
|
-
const
|
|
24
|
-
const { hoveredGenotype, height, scrollTop, sourceMap } = model;
|
|
32
|
+
const { hoveredGenotype, height, sourceMap } = model;
|
|
25
33
|
const { width } = getContainingView(model);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
const tooltipSource = useMemo(() => {
|
|
35
|
+
if (!hoveredGenotype) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
const source = sourceMap?.[hoveredGenotype.name];
|
|
39
|
+
return source ? { ...source, ...hoveredGenotype } : undefined;
|
|
40
|
+
}, [hoveredGenotype, sourceMap]);
|
|
41
|
+
return (_jsxs("div", { className: classes.container, style: { width, height }, children: [_jsx("div", { className: classes.horizontalLine, style: { transform: `translateY(${mouseY}px)`, width } }), _jsx("div", { className: classes.verticalLine, style: { transform: `translateX(${mouseX}px)`, height } }), tooltipSource ? (_jsx(MultiVariantTooltip, { source: tooltipSource, x: offsetX + mouseX, y: offsetY + mouseY })) : null] }));
|
|
34
42
|
});
|
|
35
43
|
export default MultiVariantCrosshairs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
model:
|
|
1
|
+
import type { LegendBarModel } from './types.ts';
|
|
2
|
+
declare const MultiVariantLegendBar: (props: {
|
|
3
|
+
model: LegendBarModel;
|
|
4
4
|
orientation?: string;
|
|
5
5
|
exportSVG?: boolean;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default
|
|
7
|
+
export default MultiVariantLegendBar;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { measureText } from '@jbrowse/core/util';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
import ColorLegend from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const clipid = `legend-${id}`;
|
|
8
|
-
return exportSVG ? (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipid, children: _jsx("rect", { x: 0, y: 0, width: 1000, height: height }) }) }), _jsx("g", { clipPath: `url(#${clipid})`, children: _jsx("g", { transform: `translate(0,${-scrollTop})`, children: children }) })] })) : (_jsx("svg", { style: {
|
|
9
|
-
position: 'absolute',
|
|
10
|
-
top: 0,
|
|
11
|
-
left: 0,
|
|
12
|
-
zIndex: 100,
|
|
13
|
-
pointerEvents: 'none',
|
|
14
|
-
height: model.totalHeight,
|
|
15
|
-
width: getContainingView(model).width,
|
|
16
|
-
}, children: children }));
|
|
17
|
-
});
|
|
18
|
-
export const LegendBar = observer(function (props) {
|
|
5
|
+
import ColorLegend from "./MultiVariantColorLegend.js";
|
|
6
|
+
import MultiVariantLegendBarWrapper from "./MultiVariantLegendBarWrapper.js";
|
|
7
|
+
const MultiVariantLegendBar = observer(function MultiVariantLegendBar(props) {
|
|
19
8
|
const { model } = props;
|
|
20
9
|
const { canDisplayLabels, rowHeight, sources } = model;
|
|
21
|
-
const svgFontSize =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
const svgFontSize = Math.min(rowHeight, 12);
|
|
11
|
+
const labelWidth = useMemo(() => {
|
|
12
|
+
if (!sources) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
let maxWidth = 0;
|
|
16
|
+
for (const s of sources) {
|
|
17
|
+
const width = canDisplayLabels
|
|
18
|
+
? measureText(s.label, svgFontSize) + 10
|
|
19
|
+
: 20;
|
|
20
|
+
if (width > maxWidth) {
|
|
21
|
+
maxWidth = width;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return maxWidth;
|
|
25
|
+
}, [sources, svgFontSize, canDisplayLabels]);
|
|
26
|
+
return sources ? (_jsx(MultiVariantLegendBarWrapper, { ...props, children: _jsx(ColorLegend, { model: model, labelWidth: labelWidth }) })) : null;
|
|
25
27
|
});
|
|
26
|
-
export default
|
|
28
|
+
export default MultiVariantLegendBar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LegendBarModel } from './types.ts';
|
|
2
|
+
declare const MultiVariantLegendBarWrapper: ({ children, model, exportSVG, }: {
|
|
3
|
+
model: LegendBarModel;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
exportSVG?: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default MultiVariantLegendBarWrapper;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const MultiVariantLegendBarWrapper = observer(function MultiVariantLegendBarWrapper({ children, model, exportSVG, }) {
|
|
5
|
+
const { id, scrollTop, height, hierarchy, treeAreaWidth, showTree } = model;
|
|
6
|
+
const clipid = `legend-${typeof jest === 'undefined' ? id : 'test'}`;
|
|
7
|
+
const leftOffset = hierarchy && showTree ? treeAreaWidth : 0;
|
|
8
|
+
return exportSVG ? (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipid, children: _jsx("rect", { x: 0, y: 0, width: 1000, height: height }) }) }), _jsx("g", { clipPath: `url(#${clipid})`, children: _jsx("g", { transform: `translate(0,${-scrollTop})`, children: children }) })] })) : (_jsx("svg", { style: {
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: 0,
|
|
11
|
+
left: leftOffset,
|
|
12
|
+
zIndex: 100,
|
|
13
|
+
pointerEvents: 'none',
|
|
14
|
+
height: model.totalHeight,
|
|
15
|
+
width: getContainingView(model).width,
|
|
16
|
+
}, children: children }));
|
|
17
|
+
});
|
|
18
|
+
export default MultiVariantLegendBarWrapper;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
declare const MultiVariantTooltip: import("react").NamedExoticComponent<{
|
|
2
2
|
source: {
|
|
3
3
|
color?: string;
|
|
4
|
-
hoveredGenotype?: {
|
|
5
|
-
genotype: string;
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
4
|
[key: string]: unknown;
|
|
9
5
|
};
|
|
10
|
-
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}>;
|
|
9
|
+
export default MultiVariantTooltip;
|