@jbrowse/plugin-variants 2.17.0 → 3.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/dist/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +10 -28
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +13 -43
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantDisplay/components/Crosshair.js +35 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +29 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +57 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +351 -0
- package/dist/MultiLinearVariantDisplay/model.js +83 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +3 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +15 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +28 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +39 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +31 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +356 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +113 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +3 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +17 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +34 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +87 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +38 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +100 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.js +2 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +31 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +73 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +22 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +52 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.js +67 -0
- package/dist/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/dist/MultiLinearVariantRenderer/types.js +2 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +4 -21
- package/dist/StructuralVariantChordRenderer/Chord.js +8 -34
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +4 -5
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +7 -30
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/dist/StructuralVariantChordRenderer/types.js +2 -0
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +32 -0
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/dist/VariantFeatureWidget/Checkbox2.js +2 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +4 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +73 -80
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.js +60 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.js +15 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +20 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.js +15 -0
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +2 -3
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +50 -41
- package/dist/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/dist/VariantFeatureWidget/VariantSampleFilters.js +10 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +10 -8
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +17 -51
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +18 -8
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantFeatureWidget/types.d.ts +16 -0
- package/dist/VariantFeatureWidget/types.js +2 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +50 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +26 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +53 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +10 -2
- package/dist/VcfAdapter/VcfAdapter.js +32 -8
- package/dist/VcfAdapter/configSchema.d.ts +8 -3
- package/dist/VcfAdapter/configSchema.js +13 -8
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfAdapter/index.js +17 -7
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +36 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +3 -16
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +44 -13
- package/dist/VcfTabixAdapter/configSchema.d.ts +8 -9
- package/dist/VcfTabixAdapter/configSchema.js +10 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/VcfTabixAdapter/index.js +17 -7
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/extensionPoints.js +21 -33
- package/dist/getMultiVariantFeaturesAutorun.d.ts +16 -0
- package/dist/getMultiVariantFeaturesAutorun.js +41 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +11 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +5 -0
- package/dist/shared/BulkEditPanel.js +84 -0
- package/dist/shared/ClusterDialog.d.ts +11 -0
- package/dist/shared/ClusterDialog.js +109 -0
- package/dist/shared/ColorLegend.d.ts +10 -0
- package/dist/shared/ColorLegend.js +22 -0
- package/dist/shared/HelpfulTips.d.ts +1 -0
- package/dist/shared/HelpfulTips.js +7 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +32 -0
- package/dist/shared/MAFFilterDialog.d.ts +8 -0
- package/dist/shared/MAFFilterDialog.js +28 -0
- package/dist/shared/MultiVariantBaseModel.d.ts +341 -0
- package/dist/shared/MultiVariantBaseModel.js +316 -0
- package/dist/shared/MultiVariantTooltip.d.ts +6 -0
- package/dist/shared/MultiVariantTooltip.js +23 -0
- package/dist/shared/RectBg.d.ts +8 -0
- package/dist/shared/RectBg.js +8 -0
- package/dist/shared/RowPalettizer.d.ts +5 -0
- package/dist/shared/RowPalettizer.js +40 -0
- package/dist/shared/SetColorDialog.d.ts +11 -0
- package/dist/shared/SetColorDialog.js +55 -0
- package/dist/shared/SetMinMaxDialog.d.ts +10 -0
- package/dist/shared/SetMinMaxDialog.js +26 -0
- package/dist/shared/SetRowHeightDialog.d.ts +8 -0
- package/dist/shared/SetRowHeightDialog.js +18 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesDataGrid.d.ts +6 -0
- package/dist/shared/SourcesDataGrid.js +68 -0
- package/dist/shared/SourcesGrid.d.ts +7 -0
- package/dist/shared/SourcesGrid.js +14 -0
- package/dist/shared/SourcesGridHeader.d.ts +7 -0
- package/dist/shared/SourcesGridHeader.js +41 -0
- package/dist/shared/multiVariantColor.d.ts +3 -0
- package/dist/shared/multiVariantColor.js +50 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -0
- package/dist/util.d.ts +8 -0
- package/dist/util.js +86 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +10 -28
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +13 -43
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +30 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +24 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +351 -0
- package/esm/MultiLinearVariantDisplay/model.js +44 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +3 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +9 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +23 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +26 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +356 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +74 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +3 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +11 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +34 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +48 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +36 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +97 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.js +1 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +31 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +34 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +22 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +47 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +6 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.js +61 -0
- package/esm/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/esm/MultiLinearVariantRenderer/types.js +1 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +4 -21
- package/esm/StructuralVariantChordRenderer/Chord.js +8 -11
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +4 -5
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +7 -7
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/esm/StructuralVariantChordRenderer/types.js +1 -0
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +27 -0
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/esm/VariantFeatureWidget/Checkbox2.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +4 -5
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +55 -72
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.js +24 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.js +9 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +17 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.js +9 -0
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +2 -3
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +33 -34
- package/esm/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/esm/VariantFeatureWidget/VariantSampleFilters.js +7 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +10 -8
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +18 -29
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantFeatureWidget/types.d.ts +16 -0
- package/esm/VariantFeatureWidget/types.js +1 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +43 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +26 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +46 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +10 -2
- package/esm/VcfAdapter/VcfAdapter.js +34 -10
- package/esm/VcfAdapter/configSchema.d.ts +8 -3
- package/esm/VcfAdapter/configSchema.js +13 -8
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +36 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +3 -16
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +45 -14
- package/esm/VcfTabixAdapter/configSchema.d.ts +8 -9
- package/esm/VcfTabixAdapter/configSchema.js +10 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +22 -34
- package/esm/getMultiVariantFeaturesAutorun.d.ts +16 -0
- package/esm/getMultiVariantFeaturesAutorun.js +38 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +11 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +5 -0
- package/esm/shared/BulkEditPanel.js +81 -0
- package/esm/shared/ClusterDialog.d.ts +11 -0
- package/esm/shared/ClusterDialog.js +103 -0
- package/esm/shared/ColorLegend.d.ts +10 -0
- package/esm/shared/ColorLegend.js +17 -0
- package/esm/shared/HelpfulTips.d.ts +1 -0
- package/esm/shared/HelpfulTips.js +4 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +26 -0
- package/esm/shared/MAFFilterDialog.d.ts +8 -0
- package/esm/shared/MAFFilterDialog.js +26 -0
- package/esm/shared/MultiVariantBaseModel.d.ts +341 -0
- package/esm/shared/MultiVariantBaseModel.js +277 -0
- package/esm/shared/MultiVariantTooltip.d.ts +6 -0
- package/esm/shared/MultiVariantTooltip.js +17 -0
- package/esm/shared/RectBg.d.ts +8 -0
- package/esm/shared/RectBg.js +6 -0
- package/esm/shared/RowPalettizer.d.ts +5 -0
- package/esm/shared/RowPalettizer.js +37 -0
- package/esm/shared/SetColorDialog.d.ts +11 -0
- package/esm/shared/SetColorDialog.js +49 -0
- package/esm/shared/SetMinMaxDialog.d.ts +10 -0
- package/esm/shared/SetMinMaxDialog.js +23 -0
- package/esm/shared/SetRowHeightDialog.d.ts +8 -0
- package/esm/shared/SetRowHeightDialog.js +15 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesDataGrid.d.ts +6 -0
- package/esm/shared/SourcesDataGrid.js +62 -0
- package/esm/shared/SourcesGrid.d.ts +7 -0
- package/esm/shared/SourcesGrid.js +9 -0
- package/esm/shared/SourcesGridHeader.d.ts +7 -0
- package/esm/shared/SourcesGridHeader.js +35 -0
- package/esm/shared/multiVariantColor.d.ts +3 -0
- package/esm/shared/multiVariantColor.js +45 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/types.d.ts +14 -0
- package/esm/types.js +1 -0
- package/esm/util.d.ts +8 -0
- package/esm/util.js +77 -0
- package/package.json +7 -8
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/AnnotGrid.js +0 -39
- package/dist/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +0 -16
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/esm/VariantFeatureWidget/AnnotGrid.js +0 -13
- package/esm/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +0 -10
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
2
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
3
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
|
+
import { stopStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
|
+
import { linearBareDisplayStateModelFactory } from '@jbrowse/plugin-linear-genome-view';
|
|
6
|
+
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
7
|
+
import HeightIcon from '@mui/icons-material/Height';
|
|
8
|
+
import SplitscreenIcon from '@mui/icons-material/Splitscreen';
|
|
9
|
+
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
10
|
+
import deepEqual from 'fast-deep-equal';
|
|
11
|
+
import { types } from 'mobx-state-tree';
|
|
12
|
+
const SetColorDialog = lazy(() => import('../shared/SetColorDialog'));
|
|
13
|
+
const MAFFilterDialog = lazy(() => import('../shared/MAFFilterDialog'));
|
|
14
|
+
const ClusterDialog = lazy(() => import('../shared/ClusterDialog'));
|
|
15
|
+
const SetRowHeightDialog = lazy(() => import('../shared/SetRowHeightDialog'));
|
|
16
|
+
export default function MultiVariantBaseModelF(configSchema) {
|
|
17
|
+
return types
|
|
18
|
+
.compose('LinearVariantMatrixDisplay', linearBareDisplayStateModelFactory(configSchema), types.model({
|
|
19
|
+
type: types.literal('LinearVariantMatrixDisplay'),
|
|
20
|
+
layout: types.optional(types.frozen(), []),
|
|
21
|
+
configuration: ConfigurationReference(configSchema),
|
|
22
|
+
minorAlleleFrequencyFilter: types.optional(types.number, 0.1),
|
|
23
|
+
showSidebarLabelsSetting: true,
|
|
24
|
+
renderingMode: types.optional(types.string, 'alleleCount'),
|
|
25
|
+
rowHeightSetting: types.optional(types.number, 8),
|
|
26
|
+
autoHeight: true,
|
|
27
|
+
}))
|
|
28
|
+
.volatile(() => ({
|
|
29
|
+
sourcesLoadingStopToken: undefined,
|
|
30
|
+
featureUnderMouseVolatile: undefined,
|
|
31
|
+
sourcesVolatile: undefined,
|
|
32
|
+
featuresVolatile: undefined,
|
|
33
|
+
hasPhased: false,
|
|
34
|
+
sampleInfo: undefined,
|
|
35
|
+
hoveredGenotype: undefined,
|
|
36
|
+
}))
|
|
37
|
+
.actions(self => ({
|
|
38
|
+
setRowHeight(arg) {
|
|
39
|
+
self.rowHeightSetting = arg;
|
|
40
|
+
},
|
|
41
|
+
setHoveredGenotype(arg) {
|
|
42
|
+
self.hoveredGenotype = arg;
|
|
43
|
+
},
|
|
44
|
+
setFeatures(f) {
|
|
45
|
+
self.featuresVolatile = f;
|
|
46
|
+
},
|
|
47
|
+
setLayout(layout) {
|
|
48
|
+
self.layout = layout;
|
|
49
|
+
},
|
|
50
|
+
clearLayout() {
|
|
51
|
+
self.layout = [];
|
|
52
|
+
},
|
|
53
|
+
setSourcesLoading(str) {
|
|
54
|
+
if (self.sourcesLoadingStopToken) {
|
|
55
|
+
stopStopToken(self.sourcesLoadingStopToken);
|
|
56
|
+
}
|
|
57
|
+
self.sourcesLoadingStopToken = str;
|
|
58
|
+
},
|
|
59
|
+
setSources(sources) {
|
|
60
|
+
if (!deepEqual(sources, self.sourcesVolatile)) {
|
|
61
|
+
self.sourcesVolatile = sources;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
setMafFilter(arg) {
|
|
65
|
+
self.minorAlleleFrequencyFilter = arg;
|
|
66
|
+
},
|
|
67
|
+
setShowSidebarLabels(arg) {
|
|
68
|
+
self.showSidebarLabelsSetting = arg;
|
|
69
|
+
},
|
|
70
|
+
setPhasedMode(arg) {
|
|
71
|
+
self.renderingMode = arg;
|
|
72
|
+
},
|
|
73
|
+
setAutoHeight(arg) {
|
|
74
|
+
self.autoHeight = arg;
|
|
75
|
+
},
|
|
76
|
+
setHasPhased(arg) {
|
|
77
|
+
self.hasPhased = arg;
|
|
78
|
+
},
|
|
79
|
+
setSampleInfo(arg) {
|
|
80
|
+
if (!deepEqual(arg, self.sampleInfo)) {
|
|
81
|
+
self.sampleInfo = arg;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
}))
|
|
85
|
+
.views(self => ({
|
|
86
|
+
get preSources() {
|
|
87
|
+
return self.layout.length ? self.layout : self.sourcesVolatile;
|
|
88
|
+
},
|
|
89
|
+
get sources() {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
if (this.preSources) {
|
|
92
|
+
const rows = [];
|
|
93
|
+
const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
|
|
94
|
+
for (const row of this.preSources) {
|
|
95
|
+
if (self.renderingMode === 'phased') {
|
|
96
|
+
const info = (_b = self.sampleInfo) === null || _b === void 0 ? void 0 : _b[row.name];
|
|
97
|
+
if (info === null || info === void 0 ? void 0 : info.isPhased) {
|
|
98
|
+
const ploidy = info.maxPloidy;
|
|
99
|
+
for (let i = 0; i < ploidy; i++) {
|
|
100
|
+
const id = `${row.name} HP${i}`;
|
|
101
|
+
rows.push({
|
|
102
|
+
...sources[row.name],
|
|
103
|
+
...row,
|
|
104
|
+
label: id,
|
|
105
|
+
HP: i,
|
|
106
|
+
id: id,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
rows.push({
|
|
113
|
+
...sources[row.name],
|
|
114
|
+
...row,
|
|
115
|
+
label: row.name,
|
|
116
|
+
id: row.name,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return rows;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
},
|
|
124
|
+
}))
|
|
125
|
+
.views(self => {
|
|
126
|
+
const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
|
|
127
|
+
return {
|
|
128
|
+
get rowHeight() {
|
|
129
|
+
const { sources, autoHeight, rowHeightSetting, height } = self;
|
|
130
|
+
return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
|
|
131
|
+
},
|
|
132
|
+
adapterProps() {
|
|
133
|
+
const superProps = superRenderProps();
|
|
134
|
+
return {
|
|
135
|
+
...superProps,
|
|
136
|
+
rpcDriverName: self.rpcDriverName,
|
|
137
|
+
displayModel: self,
|
|
138
|
+
config: self.rendererConfig,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
trackMenuItems() {
|
|
142
|
+
return [
|
|
143
|
+
...superTrackMenuItems(),
|
|
144
|
+
{
|
|
145
|
+
label: 'Show sidebar labels',
|
|
146
|
+
icon: VisibilityIcon,
|
|
147
|
+
type: 'checkbox',
|
|
148
|
+
checked: self.showSidebarLabelsSetting,
|
|
149
|
+
onClick: () => {
|
|
150
|
+
self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: 'Row height',
|
|
155
|
+
icon: HeightIcon,
|
|
156
|
+
subMenu: [
|
|
157
|
+
{
|
|
158
|
+
label: 'Manually set row height',
|
|
159
|
+
disabled: self.autoHeight,
|
|
160
|
+
onClick: () => {
|
|
161
|
+
getSession(self).queueDialog(handleClose => [
|
|
162
|
+
SetRowHeightDialog,
|
|
163
|
+
{
|
|
164
|
+
model: self,
|
|
165
|
+
handleClose,
|
|
166
|
+
},
|
|
167
|
+
]);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: 'Auto-adjust to display height',
|
|
172
|
+
type: 'checkbox',
|
|
173
|
+
checked: self.autoHeight,
|
|
174
|
+
onClick: () => {
|
|
175
|
+
self.setAutoHeight(!self.autoHeight);
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: 'Rendering mode',
|
|
182
|
+
icon: SplitscreenIcon,
|
|
183
|
+
subMenu: [
|
|
184
|
+
{
|
|
185
|
+
label: 'Allele count',
|
|
186
|
+
type: 'radio',
|
|
187
|
+
checked: self.renderingMode === 'alleleCount',
|
|
188
|
+
onClick: () => {
|
|
189
|
+
self.setPhasedMode('alleleCount');
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: 'Phased' +
|
|
194
|
+
(!self.hasPhased
|
|
195
|
+
? ' (disabled, no phased variants found)'
|
|
196
|
+
: ''),
|
|
197
|
+
disabled: !self.hasPhased,
|
|
198
|
+
checked: self.renderingMode === 'phased',
|
|
199
|
+
type: 'radio',
|
|
200
|
+
onClick: () => {
|
|
201
|
+
self.setPhasedMode('phased');
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'Filter by',
|
|
208
|
+
icon: FilterListIcon,
|
|
209
|
+
subMenu: [
|
|
210
|
+
{
|
|
211
|
+
label: 'Minor allele frequency',
|
|
212
|
+
onClick: () => {
|
|
213
|
+
getSession(self).queueDialog(handleClose => [
|
|
214
|
+
MAFFilterDialog,
|
|
215
|
+
{
|
|
216
|
+
model: self,
|
|
217
|
+
handleClose,
|
|
218
|
+
},
|
|
219
|
+
]);
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: 'Cluster by genotype',
|
|
226
|
+
onClick: () => {
|
|
227
|
+
getSession(self).queueDialog(handleClose => [
|
|
228
|
+
ClusterDialog,
|
|
229
|
+
{
|
|
230
|
+
model: self,
|
|
231
|
+
handleClose,
|
|
232
|
+
},
|
|
233
|
+
]);
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: 'Edit group colors/arrangement...',
|
|
238
|
+
onClick: () => {
|
|
239
|
+
getSession(self).queueDialog(handleClose => [
|
|
240
|
+
SetColorDialog,
|
|
241
|
+
{
|
|
242
|
+
model: self,
|
|
243
|
+
handleClose,
|
|
244
|
+
},
|
|
245
|
+
]);
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
})
|
|
252
|
+
.views(self => ({
|
|
253
|
+
get canDisplayLabels() {
|
|
254
|
+
return self.rowHeight > 8 && self.showSidebarLabelsSetting;
|
|
255
|
+
},
|
|
256
|
+
get totalHeight() {
|
|
257
|
+
var _a;
|
|
258
|
+
return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
|
|
259
|
+
},
|
|
260
|
+
}))
|
|
261
|
+
.views(self => ({
|
|
262
|
+
renderProps() {
|
|
263
|
+
const superProps = self.adapterProps();
|
|
264
|
+
return {
|
|
265
|
+
...superProps,
|
|
266
|
+
notReady: superProps.notReady || !self.sources || !self.featuresVolatile,
|
|
267
|
+
height: self.height,
|
|
268
|
+
totalHeight: self.totalHeight,
|
|
269
|
+
renderingMode: self.renderingMode,
|
|
270
|
+
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
271
|
+
rowHeight: self.rowHeight,
|
|
272
|
+
sources: self.sources,
|
|
273
|
+
scrollTop: self.scrollTop,
|
|
274
|
+
};
|
|
275
|
+
},
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
3
|
+
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
4
|
+
export default function MultiVariantTooltip({ source, }) {
|
|
5
|
+
return (_jsxs(BaseTooltip, { children: [source.color ? (_jsx("div", { style: {
|
|
6
|
+
width: 10,
|
|
7
|
+
height: 10,
|
|
8
|
+
backgroundColor: source.color,
|
|
9
|
+
} })) : null, _jsx(SanitizedHTML, { html: Object.entries(source)
|
|
10
|
+
.filter(([key, val]) => key !== 'color' &&
|
|
11
|
+
key !== 'name' &&
|
|
12
|
+
key !== 'HP' &&
|
|
13
|
+
key !== 'id' &&
|
|
14
|
+
val !== undefined)
|
|
15
|
+
.map(([key, value]) => `${key}:${value}`)
|
|
16
|
+
.join('<br/>') })] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getFillProps } from '@jbrowse/core/util';
|
|
3
|
+
const RectBg = ({ x, y, width, height, color = 'rgba(255,255,255,0.5)', }) => {
|
|
4
|
+
return (_jsx("rect", { pointerEvents: "auto", x: x, y: y, width: width, height: height, ...getFillProps(color) }));
|
|
5
|
+
};
|
|
6
|
+
export default RectBg;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { set1 } from '@jbrowse/core/ui/colors';
|
|
3
|
+
import { Button } from '@mui/material';
|
|
4
|
+
import { randomColor } from '../util';
|
|
5
|
+
export default function RowPalettizer({ setCurrLayout, currLayout, }) {
|
|
6
|
+
var _a;
|
|
7
|
+
return (_jsxs("div", { children: ["Create color palette based on...", Object.keys((_a = currLayout[0]) !== null && _a !== void 0 ? _a : [])
|
|
8
|
+
.filter(f => f !== 'name' &&
|
|
9
|
+
f !== 'color' &&
|
|
10
|
+
f !== 'label' &&
|
|
11
|
+
f !== 'id' &&
|
|
12
|
+
f !== 'HP')
|
|
13
|
+
.map(r => (_jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
14
|
+
const map = new Map();
|
|
15
|
+
for (const row of currLayout) {
|
|
16
|
+
const val = map.get(row[r]);
|
|
17
|
+
if (!val) {
|
|
18
|
+
map.set(row[r], 1);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
map.set(row[r], val + 1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const ret = Object.fromEntries([...map.entries()]
|
|
25
|
+
.sort((a, b) => a[1] - b[1])
|
|
26
|
+
.map((r, idx) => [r[0], set1[idx] || randomColor(r[0])]));
|
|
27
|
+
setCurrLayout(currLayout.map(row => ({
|
|
28
|
+
...row,
|
|
29
|
+
color: ret[row[r]],
|
|
30
|
+
})));
|
|
31
|
+
}, children: r }, r))), _jsx(Button, { onClick: () => {
|
|
32
|
+
setCurrLayout(currLayout.map(row => ({
|
|
33
|
+
...row,
|
|
34
|
+
color: undefined,
|
|
35
|
+
})));
|
|
36
|
+
}, children: "Clear colors" })] }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Source } from '../types';
|
|
2
|
+
interface ReducedModel {
|
|
3
|
+
sources?: Source[];
|
|
4
|
+
setLayout: (s: Source[]) => void;
|
|
5
|
+
clearLayout: () => void;
|
|
6
|
+
}
|
|
7
|
+
export default function SetColorDialog({ model, handleClose, }: {
|
|
8
|
+
model: ReducedModel;
|
|
9
|
+
handleClose: () => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { Button, DialogActions, DialogContent } from '@mui/material';
|
|
6
|
+
import { makeStyles } from 'tss-react/mui';
|
|
7
|
+
import BulkEditPanel from './BulkEditPanel';
|
|
8
|
+
import HelpfulTips from './HelpfulTips';
|
|
9
|
+
import RowPalettizer from './RowPalettizer';
|
|
10
|
+
import SourcesGrid from './SourcesGrid';
|
|
11
|
+
const useStyles = makeStyles()({
|
|
12
|
+
content: {
|
|
13
|
+
minWidth: 800,
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
float: 'right',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
gap: 8,
|
|
19
|
+
},
|
|
20
|
+
textAreaFont: {
|
|
21
|
+
fontFamily: 'Courier New',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export default function SetColorDialog({ model, handleClose, }) {
|
|
25
|
+
const { classes } = useStyles();
|
|
26
|
+
const { sources } = model;
|
|
27
|
+
const [showBulkEditor, setShowBulkEditor] = useState(false);
|
|
28
|
+
const [currLayout, setCurrLayout] = useState(sources || []);
|
|
29
|
+
const [showTips, setShowTips] = useLocalStorage('multivariant-showTips', false);
|
|
30
|
+
return (_jsx(DraggableDialog, { open: true, onClose: handleClose, maxWidth: "xl", title: "Multi-variant color/arrangement editor", children: showBulkEditor ? (_jsx(BulkEditPanel, { currLayout: currLayout, onClose: arg => {
|
|
31
|
+
if (arg) {
|
|
32
|
+
setCurrLayout(arg);
|
|
33
|
+
}
|
|
34
|
+
setShowBulkEditor(false);
|
|
35
|
+
} })) : (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { className: classes.content, children: [_jsxs("div", { className: classes.fr, children: [_jsx(Button, { variant: "contained", onClick: () => {
|
|
36
|
+
setShowTips(!showTips);
|
|
37
|
+
}, children: showTips ? 'Hide tips' : 'Show tips' }), _jsx(Button, { color: "secondary", variant: "contained", onClick: () => {
|
|
38
|
+
setShowBulkEditor(!showBulkEditor);
|
|
39
|
+
}, children: "Show Bulk row editor" })] }), showTips ? _jsx(HelpfulTips, {}) : null, _jsx("br", {}), _jsx(RowPalettizer, { currLayout: currLayout, setCurrLayout: setCurrLayout }), _jsx(SourcesGrid, { rows: currLayout, onChange: setCurrLayout, showTips: showTips })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", type: "submit", color: "inherit", onClick: () => {
|
|
40
|
+
model.clearLayout();
|
|
41
|
+
setCurrLayout(model.sources || []);
|
|
42
|
+
}, children: "Clear custom settings" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
43
|
+
handleClose();
|
|
44
|
+
setCurrLayout([...(model.sources || [])]);
|
|
45
|
+
}, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", type: "submit", onClick: () => {
|
|
46
|
+
model.setLayout(currLayout);
|
|
47
|
+
handleClose();
|
|
48
|
+
}, children: "Submit" })] })] })) }));
|
|
49
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function SetMinMaxDialog(props: {
|
|
2
|
+
model: {
|
|
3
|
+
minScore: number;
|
|
4
|
+
maxScore: number;
|
|
5
|
+
scaleType: string;
|
|
6
|
+
setMinScore: (arg?: number) => void;
|
|
7
|
+
setMaxScore: (arg?: number) => void;
|
|
8
|
+
};
|
|
9
|
+
handleClose: () => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
+
import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
5
|
+
export default function SetMinMaxDialog(props) {
|
|
6
|
+
const { model, handleClose } = props;
|
|
7
|
+
const { minScore, maxScore, scaleType } = model;
|
|
8
|
+
const [min, setMin] = useState(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
9
|
+
const [max, setMax] = useState(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
10
|
+
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
11
|
+
? +max > +min
|
|
12
|
+
: true;
|
|
13
|
+
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
14
|
+
return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Set min/max score for track", children: [_jsxs(DialogContent, { children: [_jsx(Typography, { children: "Enter min/max score: " }), !ok ? (_jsx(Typography, { color: "error", children: "Max is greater than or equal to min" })) : null, !logOk ? (_jsx(Typography, { color: "error", children: "Min score should be greater than 0 for log scale" })) : null, _jsx(TextField, { value: min, onChange: event => {
|
|
15
|
+
setMin(event.target.value);
|
|
16
|
+
}, placeholder: "Enter min score" }), _jsx(TextField, { value: max, onChange: event => {
|
|
17
|
+
setMax(event.target.value);
|
|
18
|
+
}, placeholder: "Enter max score" })] }), _jsx(DialogActions, { children: _jsx(Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
19
|
+
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
20
|
+
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
21
|
+
handleClose();
|
|
22
|
+
}, children: "Submit" }) })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
+
import { Button, DialogActions, DialogContent, TextField } from '@mui/material';
|
|
5
|
+
export default function SetRowHeight({ model, handleClose, }) {
|
|
6
|
+
const [value, setValue] = useState(`${model.rowHeight}`);
|
|
7
|
+
return (_jsxs(Dialog, { open: true, title: "Set row height", onClose: handleClose, children: [_jsx(DialogContent, { children: _jsx(TextField, { value: value, onChange: event => {
|
|
8
|
+
setValue(event.target.value);
|
|
9
|
+
} }) }), _jsxs(DialogActions, { children: [_jsx(Button, { disabled: Number.isNaN(+value), variant: "contained", onClick: () => {
|
|
10
|
+
model.setRowHeight(+value);
|
|
11
|
+
handleClose();
|
|
12
|
+
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
13
|
+
handleClose();
|
|
14
|
+
}, children: "Cancel" })] })] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default function sharedVariantConfigFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
autoscale: {
|
|
3
|
+
type: string;
|
|
4
|
+
defaultValue: string;
|
|
5
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
minimalTicks: {
|
|
9
|
+
type: string;
|
|
10
|
+
defaultValue: boolean;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
minScore: {
|
|
14
|
+
type: string;
|
|
15
|
+
defaultValue: number;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
maxScore: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
defaultValue: number;
|
|
22
|
+
};
|
|
23
|
+
numStdDev: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: number;
|
|
27
|
+
};
|
|
28
|
+
scaleType: {
|
|
29
|
+
type: string;
|
|
30
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
31
|
+
description: string;
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
};
|
|
34
|
+
inverted: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
defaultValue: boolean;
|
|
38
|
+
};
|
|
39
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
40
|
+
maxFeatureScreenDensity: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
defaultValue: number;
|
|
44
|
+
};
|
|
45
|
+
fetchSizeLimit: {
|
|
46
|
+
type: string;
|
|
47
|
+
defaultValue: number;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
height: {
|
|
51
|
+
type: string;
|
|
52
|
+
defaultValue: number;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
mouseover: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
defaultValue: string;
|
|
59
|
+
contextVariable: string[];
|
|
60
|
+
};
|
|
61
|
+
jexlFilters: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
defaultValue: never[];
|
|
65
|
+
};
|
|
66
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
+
import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
4
|
+
export default function sharedVariantConfigFactory() {
|
|
5
|
+
return ConfigurationSchema('SharedVariantDisplay', {
|
|
6
|
+
autoscale: {
|
|
7
|
+
type: 'stringEnum',
|
|
8
|
+
defaultValue: 'local',
|
|
9
|
+
model: types.enumeration('Autoscale type', [
|
|
10
|
+
'global',
|
|
11
|
+
'local',
|
|
12
|
+
'globalsd',
|
|
13
|
+
'localsd',
|
|
14
|
+
'zscore',
|
|
15
|
+
]),
|
|
16
|
+
description: 'global/local using their min/max values or w/ standard deviations (globalsd/localsd)',
|
|
17
|
+
},
|
|
18
|
+
minimalTicks: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
defaultValue: false,
|
|
21
|
+
description: 'use the minimal amount of ticks',
|
|
22
|
+
},
|
|
23
|
+
minScore: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
defaultValue: Number.MIN_VALUE,
|
|
26
|
+
description: 'minimum value for the y-scale',
|
|
27
|
+
},
|
|
28
|
+
maxScore: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'maximum value for the y-scale',
|
|
31
|
+
defaultValue: Number.MAX_VALUE,
|
|
32
|
+
},
|
|
33
|
+
numStdDev: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
description: 'number of standard deviations to use for autoscale types globalsd or localsd',
|
|
36
|
+
defaultValue: 3,
|
|
37
|
+
},
|
|
38
|
+
scaleType: {
|
|
39
|
+
type: 'stringEnum',
|
|
40
|
+
model: types.enumeration('Scale type', ['linear', 'log']),
|
|
41
|
+
description: 'The type of scale to use',
|
|
42
|
+
defaultValue: 'linear',
|
|
43
|
+
},
|
|
44
|
+
inverted: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'draw upside down',
|
|
47
|
+
defaultValue: false,
|
|
48
|
+
},
|
|
49
|
+
}, {
|
|
50
|
+
baseConfiguration: baseLinearDisplayConfigSchema,
|
|
51
|
+
explicitlyTyped: true,
|
|
52
|
+
});
|
|
53
|
+
}
|