@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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function StructuralVariantChordRendererF(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
|
-
import configSchema from './configSchema';
|
|
3
2
|
import ReactComponent from './ReactComponent';
|
|
3
|
+
import configSchema from './configSchema';
|
|
4
4
|
export default function StructuralVariantChordRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new ChordRendererType({
|
|
6
6
|
name: 'StructuralVariantChordRenderer',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Region {
|
|
2
|
+
end: number;
|
|
3
|
+
start: number;
|
|
4
|
+
refName: string;
|
|
5
|
+
elided?: false;
|
|
6
|
+
}
|
|
7
|
+
export interface ElidedRegion {
|
|
8
|
+
elided: true;
|
|
9
|
+
regions: Region[];
|
|
10
|
+
}
|
|
11
|
+
export type AnyRegion = Region | ElidedRegion;
|
|
12
|
+
export interface Block {
|
|
13
|
+
flipped: boolean;
|
|
14
|
+
bpPerRadian: number;
|
|
15
|
+
startRadians: number;
|
|
16
|
+
region: AnyRegion;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/Tooltip.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
type Coord = [number, number];
|
|
4
|
+
export type TooltipContentsComponent = React.ForwardRefExoticComponent<{
|
|
5
|
+
feature: Feature;
|
|
6
|
+
model: any;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const Tooltip: ({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }: {
|
|
9
|
+
model: {
|
|
10
|
+
featureUnderMouse?: Feature;
|
|
11
|
+
};
|
|
12
|
+
useClientY?: boolean;
|
|
13
|
+
height: number;
|
|
14
|
+
clientMouseCoord: Coord;
|
|
15
|
+
offsetMouseCoord: Coord;
|
|
16
|
+
clientRect?: DOMRect;
|
|
17
|
+
TooltipContents: TooltipContentsComponent;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export default Tooltip;
|
package/esm/Tooltip.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
const useStyles = makeStyles()({
|
|
7
|
+
hoverVertical: {
|
|
8
|
+
background: '#333',
|
|
9
|
+
border: 'none',
|
|
10
|
+
width: 1,
|
|
11
|
+
height: '100%',
|
|
12
|
+
cursor: 'default',
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
pointerEvents: 'none',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }) {
|
|
18
|
+
const { featureUnderMouse } = model;
|
|
19
|
+
const { classes } = useStyles();
|
|
20
|
+
const x = clientMouseCoord[0] + 5;
|
|
21
|
+
const y = useClientY ? clientMouseCoord[1] : (clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0;
|
|
22
|
+
return featureUnderMouse ? (_jsxs(_Fragment, { children: [_jsx(Suspense, { fallback: null, children: _jsx(BaseTooltip, { clientPoint: { x, y }, children: _jsx(TooltipContents, { model: model, feature: featureUnderMouse }) }) }), _jsx("div", { className: classes.hoverVertical, style: {
|
|
23
|
+
left: offsetMouseCoord[0],
|
|
24
|
+
height: height,
|
|
25
|
+
} })] })) : null;
|
|
26
|
+
});
|
|
27
|
+
export default Tooltip;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export default function Checkbox2({ checked, disabled, label, onChange, }: {
|
|
3
2
|
checked: boolean;
|
|
4
3
|
disabled?: boolean;
|
|
5
4
|
label: string;
|
|
6
5
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
}):
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox, FormControlLabel } from '@mui/material';
|
|
3
3
|
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
const useStyles = makeStyles()({
|
|
@@ -8,5 +8,5 @@ const useStyles = makeStyles()({
|
|
|
8
8
|
});
|
|
9
9
|
export default function Checkbox2({ checked, disabled, label, onChange, }) {
|
|
10
10
|
const { classes } = useStyles();
|
|
11
|
-
return (
|
|
11
|
+
return (_jsx(FormControlLabel, { disabled: disabled, className: classes.block, control: _jsx(Checkbox, { checked: checked, onChange: onChange }), label: label }));
|
|
12
12
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
-
|
|
4
|
-
export default function BreakendPanel(props: {
|
|
1
|
+
import type { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
2
|
+
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
+
export default function LaunchBreakendPanel(props: {
|
|
5
4
|
locStrings: string[];
|
|
6
5
|
model: VariantFeatureWidgetModel;
|
|
7
6
|
feature: SimpleFeatureSerialized;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,89 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { getEnv, getSession, SimpleFeature, } from '@jbrowse/core/util';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
4
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
5
|
-
|
|
4
|
+
import { SimpleFeature, getEnv, getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { Link, Typography } from '@mui/material';
|
|
6
6
|
const BreakendMultiLevelOptionDialog = lazy(() => import('./BreakendMultiLevelOptionDialog'));
|
|
7
7
|
const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
|
|
8
8
|
function LocStringList({ locStrings, model, }) {
|
|
9
9
|
const session = getSession(model);
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
console.error(e);
|
|
31
|
-
session.notify(`${e}`);
|
|
32
|
-
}
|
|
33
|
-
} }, "(LGV)")))))));
|
|
10
|
+
return (_jsxs("div", { children: [_jsx(Typography, { children: "Navigate to breakend endpoint in linear view:" }), _jsx("ul", { children: locStrings.map((locString, index) => (_jsxs("li", { children: [locString, ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
11
|
+
var _a;
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
const { view } = model;
|
|
14
|
+
try {
|
|
15
|
+
if (view) {
|
|
16
|
+
(_a = view.navToLocString) === null || _a === void 0 ? void 0 : _a.call(view, locString);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new Error('No view associated with this feature detail panel anymore');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
console.error(e);
|
|
24
|
+
session.notify(`${e}`);
|
|
25
|
+
}
|
|
26
|
+
}, children: "(LGV)" })] }, `${locString}-${index}`))) })] }));
|
|
34
27
|
}
|
|
35
|
-
function LaunchBreakpointSplitViewPanel({ locStrings, model, feature,
|
|
28
|
+
function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, }) {
|
|
29
|
+
var _a, _b;
|
|
36
30
|
const session = getSession(model);
|
|
37
31
|
const simpleFeature = new SimpleFeature(feature);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
feature: simpleFeature,
|
|
67
|
-
// @ts-expect-error
|
|
68
|
-
viewType,
|
|
69
|
-
view: model.view,
|
|
70
|
-
assemblyName: model.view.displayedRegions[0].assemblyName,
|
|
71
|
-
},
|
|
72
|
-
]);
|
|
73
|
-
} }, "(single row)")))))));
|
|
32
|
+
const assemblyName = (_b = (_a = model.view) === null || _a === void 0 ? void 0 : _a.displayedRegions[0]) === null || _b === void 0 ? void 0 : _b.assemblyName;
|
|
33
|
+
return (_jsxs("div", { children: [_jsx(Typography, { children: "Launch split view" }), _jsx("ul", { children: locStrings.map(locString => (_jsxs("li", { children: [`${feature.refName}:${feature.start} // ${locString}`, ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
session.queueDialog(handleClose => [
|
|
36
|
+
BreakendMultiLevelOptionDialog,
|
|
37
|
+
{
|
|
38
|
+
handleClose,
|
|
39
|
+
session,
|
|
40
|
+
feature: simpleFeature,
|
|
41
|
+
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_multilevel`,
|
|
42
|
+
view: model.view,
|
|
43
|
+
assemblyName,
|
|
44
|
+
},
|
|
45
|
+
]);
|
|
46
|
+
}, children: "(top/bottom)" }), ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
session.queueDialog(handleClose => [
|
|
49
|
+
BreakendSingleLevelOptionDialog,
|
|
50
|
+
{
|
|
51
|
+
handleClose,
|
|
52
|
+
session,
|
|
53
|
+
feature: simpleFeature,
|
|
54
|
+
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_singlelevel`,
|
|
55
|
+
view: model.view,
|
|
56
|
+
assemblyName,
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
59
|
+
}, children: "(single row)" })] }, JSON.stringify(locString)))) })] }));
|
|
74
60
|
}
|
|
75
|
-
export default function
|
|
61
|
+
export default function LaunchBreakendPanel(props) {
|
|
76
62
|
const { model, locStrings, feature } = props;
|
|
77
63
|
const session = getSession(model);
|
|
78
64
|
const { pluginManager } = getEnv(session);
|
|
79
|
-
let
|
|
65
|
+
let hasBreakpointSplitView = false;
|
|
80
66
|
try {
|
|
81
|
-
|
|
67
|
+
hasBreakpointSplitView = !!pluginManager.getViewType('BreakpointSplitView');
|
|
82
68
|
}
|
|
83
69
|
catch (e) {
|
|
84
|
-
// ignore
|
|
85
70
|
}
|
|
86
|
-
return (
|
|
87
|
-
React.createElement(LocStringList, { model: model, locStrings: locStrings }),
|
|
88
|
-
viewType ? (React.createElement(LaunchBreakpointSplitViewPanel, { viewType: viewType, model: model, locStrings: locStrings, feature: feature })) : null));
|
|
71
|
+
return (_jsxs(BaseCard, { ...props, title: "Breakends", children: [_jsx(LocStringList, { model: model, locStrings: locStrings }), hasBreakpointSplitView ? (_jsx(LaunchBreakpointSplitViewPanel, { model: model, locStrings: locStrings, feature: feature })) : null] }));
|
|
89
72
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy } from 'react';
|
|
3
|
+
import { parseBreakend } from '@gmod/vcf';
|
|
4
|
+
const LaunchBreakendPanel = lazy(() => import('./LaunchBreakendPanel'));
|
|
5
|
+
export default function LaunchBreakendWidgetArea({ model, }) {
|
|
6
|
+
const { featureData } = model;
|
|
7
|
+
const feat = JSON.parse(JSON.stringify(featureData));
|
|
8
|
+
const { type = '' } = feat;
|
|
9
|
+
return (_jsx(Suspense, { fallback: null, children: type === 'breakend' ? (_jsx(LaunchBreakendPanel, { feature: feat, locStrings: feat.ALT.map((alt) => { var _a; return ((_a = parseBreakend(alt)) === null || _a === void 0 ? void 0 : _a.MatePosition) || ''; }), model: model })) : type === 'translocation' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.INFO.CHR2[0]}:${feat.INFO.END}`] })) : type === 'paired_feature' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.mate.refName}:${feat.mate.start}`] })) : type.includes('inversion') ||
|
|
10
|
+
type.includes('deletion') ||
|
|
11
|
+
type.includes('duplication') ||
|
|
12
|
+
type.includes('cnv') ||
|
|
13
|
+
type.includes('sv') ? (_jsx(LaunchBreakendPanel, { feature: {
|
|
14
|
+
uniqueId: 'random',
|
|
15
|
+
refName: feat.refName,
|
|
16
|
+
start: feat.start,
|
|
17
|
+
end: feat.start + 1,
|
|
18
|
+
mate: {
|
|
19
|
+
refName: feat.refName,
|
|
20
|
+
start: feat.end,
|
|
21
|
+
end: feat.end + 1,
|
|
22
|
+
},
|
|
23
|
+
}, model: model, locStrings: [`${feat.refName}:${feat.end}`] })) : null }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
3
|
+
import VariantConsequenceDataGridWrapper from './VariantConsequenceDataGridWrapper';
|
|
4
|
+
export default function VariantConsequenceDataGrid({ data, fields, title, }) {
|
|
5
|
+
return data.length ? (_jsx(BaseCard, { title: title, children: _jsx(VariantConsequenceDataGridWrapper, { rows: data.map((elt, id) => ({
|
|
6
|
+
id,
|
|
7
|
+
...Object.fromEntries(elt.split('|').map((e, i) => [fields[i], e])),
|
|
8
|
+
})), columns: fields.map(c => ({ field: c })) }) })) : null;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { measureGridWidth } from '@jbrowse/core/util';
|
|
4
|
+
import { Checkbox, FormControlLabel, Typography } from '@mui/material';
|
|
5
|
+
import { DataGrid, GridToolbar } from '@mui/x-data-grid';
|
|
6
|
+
export default function VariantConsequenceDataGridWrapper({ rows, columns, }) {
|
|
7
|
+
const [checked, setChecked] = useState(false);
|
|
8
|
+
const widths = columns.map(e => measureGridWidth(rows.map(r => r[e.field])));
|
|
9
|
+
return rows.length ? (_jsxs("div", { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: checked, onChange: event => {
|
|
10
|
+
setChecked(event.target.checked);
|
|
11
|
+
} }), label: _jsx(Typography, { variant: "body2", children: "Show options" }) }), _jsx(DataGrid, { rowHeight: 25, rows: rows, columns: columns.map((c, i) => ({
|
|
12
|
+
...c,
|
|
13
|
+
width: widths[i],
|
|
14
|
+
})), slots: {
|
|
15
|
+
toolbar: checked ? GridToolbar : null,
|
|
16
|
+
} })] })) : null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
3
|
+
import VariantConsequenceDataGridWrapper from './VariantConsequenceDataGridWrapper';
|
|
4
|
+
export default function VariantConsequencePanel({ data, fields, title, }) {
|
|
5
|
+
return data.length ? (_jsx(BaseCard, { title: title, children: _jsx(VariantConsequenceDataGridWrapper, { rows: data.map((elt, id) => ({
|
|
6
|
+
id,
|
|
7
|
+
...Object.fromEntries(elt.split('|').map((e, i) => [fields[i], e])),
|
|
8
|
+
})), columns: fields.map(c => ({ field: c })) }) })) : null;
|
|
9
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
1
|
+
import type { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
3
2
|
declare const VariantFeatureWidget: (props: {
|
|
4
3
|
model: VariantFeatureWidgetModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default VariantFeatureWidget;
|
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Paper } from '@mui/material';
|
|
4
|
-
import FeatureDetails from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy } from 'react';
|
|
5
3
|
import { parseBreakend } from '@gmod/vcf';
|
|
6
|
-
|
|
4
|
+
import FeatureDetails from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails';
|
|
5
|
+
import { Paper } from '@mui/material';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
7
7
|
import VariantSampleGrid from './VariantSampleGrid';
|
|
8
|
-
import VariantAnnotationTable from './VariantAnnotationTable';
|
|
9
8
|
import { variantFieldDescriptions } from './variantFieldDescriptions';
|
|
10
|
-
// lazies
|
|
11
9
|
const LaunchBreakendPanel = lazy(() => import('./LaunchBreakendPanel'));
|
|
10
|
+
const VariantConsequenceDataGrid = lazy(() => import('./VariantConsequenceDataGrid'));
|
|
12
11
|
function AnnPanel({ descriptions, feature, }) {
|
|
13
12
|
var _a, _b, _c, _d, _e;
|
|
14
13
|
const annDesc = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.ANN) === null || _b === void 0 ? void 0 : _b.Description;
|
|
15
14
|
const annFields = ((_d = (_c = annDesc === null || annDesc === void 0 ? void 0 : annDesc.match(/.*Functional annotations:'(.*)'$/)) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.split('|')) || [];
|
|
16
15
|
const ann = ((_e = feature.INFO) === null || _e === void 0 ? void 0 : _e.ANN) || [];
|
|
17
|
-
return (
|
|
16
|
+
return (_jsx(VariantConsequenceDataGrid, { fields: annFields, data: ann, title: "Variant ANN field" }));
|
|
18
17
|
}
|
|
19
18
|
function CsqPanel({ descriptions, feature, }) {
|
|
20
19
|
var _a, _b, _c, _d, _e;
|
|
21
20
|
const csqDescription = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.CSQ) === null || _b === void 0 ? void 0 : _b.Description;
|
|
22
21
|
const csqFields = ((_d = (_c = csqDescription === null || csqDescription === void 0 ? void 0 : csqDescription.match(/.*Format: (.*)/)) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.split('|')) || [];
|
|
23
22
|
const csq = ((_e = feature.INFO) === null || _e === void 0 ? void 0 : _e.CSQ) || [];
|
|
24
|
-
return (
|
|
23
|
+
return (_jsx(VariantConsequenceDataGrid, { fields: csqFields, data: csq, title: "Variant CSQ field" }));
|
|
24
|
+
}
|
|
25
|
+
function LaunchBreakendWidgetArea({ model, }) {
|
|
26
|
+
const { featureData } = model;
|
|
27
|
+
const feat = JSON.parse(JSON.stringify(featureData));
|
|
28
|
+
const { type = '' } = feat;
|
|
29
|
+
return type === 'breakend' ? (_jsx(LaunchBreakendPanel, { feature: feat, locStrings: feat.ALT.map((alt) => { var _a; return ((_a = parseBreakend(alt)) === null || _a === void 0 ? void 0 : _a.MatePosition) || ''; }), model: model })) : type === 'translocation' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.INFO.CHR2[0]}:${feat.INFO.END}`] })) : type === 'paired_feature' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.mate.refName}:${feat.mate.start}`] })) : type.includes('inversion') ||
|
|
30
|
+
type.includes('deletion') ||
|
|
31
|
+
type.includes('duplication') ||
|
|
32
|
+
type.includes('cnv') ||
|
|
33
|
+
type.includes('sv') ? (_jsx(LaunchBreakendPanel, { feature: {
|
|
34
|
+
uniqueId: 'random',
|
|
35
|
+
refName: feat.refName,
|
|
36
|
+
start: feat.start,
|
|
37
|
+
end: feat.start + 1,
|
|
38
|
+
mate: {
|
|
39
|
+
refName: feat.refName,
|
|
40
|
+
start: feat.end,
|
|
41
|
+
end: feat.end + 1,
|
|
42
|
+
},
|
|
43
|
+
}, model: model, locStrings: [`${feat.refName}:${feat.end}`] })) : null;
|
|
25
44
|
}
|
|
26
45
|
const VariantFeatureWidget = observer(function (props) {
|
|
27
46
|
const { model } = props;
|
|
28
47
|
const { featureData, descriptions } = model;
|
|
29
48
|
const feat = JSON.parse(JSON.stringify(featureData));
|
|
30
|
-
const { samples, ALT,
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
React.createElement(Suspense, { fallback: null },
|
|
36
|
-
type === 'breakend' ? (React.createElement(LaunchBreakendPanel, { feature: feat, locStrings: feat.ALT.map((alt) => { var _a; return ((_a = parseBreakend(alt)) === null || _a === void 0 ? void 0 : _a.MatePosition) || ''; }), model: model })) : null,
|
|
37
|
-
type === 'translocation' ? (React.createElement(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.INFO.CHR2[0]}:${feat.INFO.END}`] })) : null,
|
|
38
|
-
type === 'paired_feature' ? (React.createElement(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.mate.refName}:${feat.mate.start}`] })) : null,
|
|
39
|
-
type.includes('inversion') ||
|
|
40
|
-
type.includes('deletion') ||
|
|
41
|
-
type.includes('duplication') ||
|
|
42
|
-
type.includes('cnv') ||
|
|
43
|
-
type.includes('sv') ? (React.createElement(LaunchBreakendPanel, { feature: {
|
|
44
|
-
uniqueId: 'random',
|
|
45
|
-
refName: feat.refName,
|
|
46
|
-
start: feat.start,
|
|
47
|
-
end: feat.start + 1,
|
|
48
|
-
mate: {
|
|
49
|
-
refName: feat.refName,
|
|
50
|
-
start: feat.end,
|
|
51
|
-
end: feat.end + 1,
|
|
52
|
-
},
|
|
53
|
-
}, model: model, locStrings: [`${feat.refName}:${feat.end}`] })) : null),
|
|
54
|
-
React.createElement(VariantSampleGrid, { feature: feat, ...props, descriptions: descriptions })));
|
|
49
|
+
const { samples, ALT, ...rest } = feat;
|
|
50
|
+
return (_jsxs(Paper, { "data-testid": "variant-side-drawer", children: [_jsx(FeatureDetails, { feature: rest, descriptions: {
|
|
51
|
+
...variantFieldDescriptions,
|
|
52
|
+
...descriptions,
|
|
53
|
+
}, ...props }), _jsxs(Suspense, { fallback: null, children: [_jsx(CsqPanel, { feature: rest, descriptions: descriptions }), _jsx(AnnPanel, { feature: rest, descriptions: descriptions }), _jsx(LaunchBreakendWidgetArea, { model: model })] }), _jsx(VariantSampleGrid, { feature: feat, ...props, descriptions: descriptions })] }));
|
|
55
54
|
});
|
|
56
55
|
export default VariantFeatureWidget;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Filters = Record<string, string>;
|
|
2
|
+
export default function SampleFilters({ columns, filter, setFilter, }: {
|
|
3
|
+
columns: {
|
|
4
|
+
field: string;
|
|
5
|
+
}[];
|
|
6
|
+
filter: Filters;
|
|
7
|
+
setFilter: (arg: Filters) => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TextField, Typography } from '@mui/material';
|
|
3
|
+
export default function SampleFilters({ columns, filter, setFilter, }) {
|
|
4
|
+
return (_jsxs(_Fragment, { children: [_jsx(Typography, { children: "These filters can use a plain text search or regex style query, e.g. in the genotype field, entering 1 will query for all genotypes that include the first alternate allele e.g. 0|1 or 1|1, entering [1-9]\\d* will find any non-zero allele e.g. 0|2 or 2/33" }), columns.map(({ field }) => (_jsx(TextField, { placeholder: `Filter ${field}`, value: filter[field] || '', onChange: event => {
|
|
5
|
+
setFilter({ ...filter, [field]: event.target.value });
|
|
6
|
+
} }, `filter-${field}`)))] }));
|
|
7
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
2
|
+
interface FormatRecord {
|
|
3
|
+
Description?: string;
|
|
4
|
+
}
|
|
5
|
+
interface Descriptions {
|
|
6
|
+
FORMAT?: Record<string, FormatRecord>;
|
|
7
|
+
}
|
|
3
8
|
export default function VariantSamples(props: {
|
|
4
9
|
feature: SimpleFeatureSerialized;
|
|
5
|
-
descriptions?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}>;
|
|
9
|
-
} | null;
|
|
10
|
-
}): React.JSX.Element | null;
|
|
10
|
+
descriptions?: Descriptions | null;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { DataGrid, GridToolbar } from '@mui/x-data-grid';
|
|
4
|
-
import { measureGridWidth } from '@jbrowse/core/util';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
5
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
setFilter({ ...filter, [field]: event.target.value });
|
|
11
|
-
} })))));
|
|
12
|
-
}
|
|
4
|
+
import { measureGridWidth } from '@jbrowse/core/util';
|
|
5
|
+
import { Checkbox, FormControlLabel, Typography } from '@mui/material';
|
|
6
|
+
import { DataGrid, GridToolbar } from '@mui/x-data-grid';
|
|
7
|
+
import SampleFilters from './VariantSampleFilters';
|
|
13
8
|
export default function VariantSamples(props) {
|
|
14
9
|
var _a;
|
|
15
10
|
const { feature, descriptions = {} } = props;
|
|
@@ -19,9 +14,6 @@ export default function VariantSamples(props) {
|
|
|
19
14
|
let error;
|
|
20
15
|
let rows = [];
|
|
21
16
|
const filters = Object.keys(filter);
|
|
22
|
-
// catch some error thrown from regex
|
|
23
|
-
// note: maps all values into a string, if this is not done rows are not
|
|
24
|
-
// sortable by the data-grid
|
|
25
17
|
try {
|
|
26
18
|
rows = preFilteredRows
|
|
27
19
|
.map(row => {
|
|
@@ -54,19 +46,16 @@ export default function VariantSamples(props) {
|
|
|
54
46
|
width: widths[index],
|
|
55
47
|
});
|
|
56
48
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
} })));
|
|
49
|
+
return !preFilteredRows.length ? null : (_jsxs(BaseCard, { ...props, title: "Samples", children: [error ? _jsx(Typography, { color: "error", children: `${error}` }) : null, _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: checked, onChange: event => {
|
|
50
|
+
setChecked(event.target.checked);
|
|
51
|
+
} }), label: _jsx(Typography, { variant: "body2", children: "Show options" }) }), checked ? (_jsx(SampleFilters, { setFilter: setFilter, columns: columns, filter: filter })) : null, _jsx("div", { style: {
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
}, children: _jsx(DataGrid, { rows: rows, hideFooter: rows.length < 100, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, columnHeaderHeight: 35, disableColumnMenu: true, slots: { toolbar: checked ? GridToolbar : null }, slotProps: {
|
|
55
|
+
toolbar: {
|
|
56
|
+
printOptions: {
|
|
57
|
+
disableToolbarButton: true,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
} }) })] }));
|
|
72
61
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function VariantFeatureWidgetF(pluginManager: PluginManager): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType';
|
|
3
|
-
import { stateModelFactory } from './stateModelFactory';
|
|
4
3
|
import { configSchema } from './configSchema';
|
|
4
|
+
import { stateModelFactory } from './stateModelFactory';
|
|
5
5
|
export default function VariantFeatureWidgetF(pluginManager) {
|
|
6
6
|
pluginManager.addWidgetType(() => new WidgetType({
|
|
7
7
|
name: 'VariantFeatureWidget',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import { Instance } from 'mobx-state-tree';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
3
|
export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
type: import("mobx-state-tree").ISimpleType<"BaseFeatureWidget">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
1
|
import { stateModelFactory as baseModelFactory } from '@jbrowse/core/BaseFeatureWidget';
|
|
2
|
+
import { types } from 'mobx-state-tree';
|
|
3
3
|
export function stateModelFactory(pluginManager) {
|
|
4
4
|
const baseModel = baseModelFactory(pluginManager);
|
|
5
5
|
return types.compose(baseModel, types.model('VariantFeatureWidget', {
|