@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
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ExtensionPointsF(pluginManager: PluginManager): void;
|
package/dist/extensionPoints.js
CHANGED
|
@@ -1,51 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = ExtensionPointsF;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
4
5
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
5
6
|
function ExtensionPointsF(pluginManager) {
|
|
6
7
|
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
7
8
|
return (file, index, adapterHint) => {
|
|
8
|
-
const regexGuess = /\.vcf\.b?gz$/i;
|
|
9
|
-
const adapterName = 'VcfTabixAdapter';
|
|
10
9
|
const fileName = (0, tracks_1.getFileName)(file);
|
|
11
10
|
const indexName = index && (0, tracks_1.getFileName)(index);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
if ((0, util_1.testAdapter)(fileName, /\.vcf\.b?gz$/i, adapterHint, 'VcfTabixAdapter')) {
|
|
12
|
+
return {
|
|
13
|
+
type: 'VcfTabixAdapter',
|
|
14
|
+
vcfGzLocation: file,
|
|
15
|
+
index: {
|
|
16
|
+
location: index || (0, tracks_1.makeIndex)(file, '.tbi'),
|
|
17
|
+
indexType: (0, tracks_1.makeIndexType)(indexName, 'CSI', 'TBI'),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else if ((0, util_1.testAdapter)(fileName, /\.vcf(\.gz)?$/i, adapterHint, 'VcfAdapter')) {
|
|
22
|
+
return {
|
|
23
|
+
type: 'VcfAdapter',
|
|
24
|
+
vcfLocation: file,
|
|
25
|
+
};
|
|
22
26
|
}
|
|
23
|
-
|
|
24
|
-
return
|
|
27
|
+
else {
|
|
28
|
+
return adapterGuesser(file, index, adapterHint);
|
|
25
29
|
}
|
|
26
|
-
return adapterGuesser(file, index, adapterHint);
|
|
27
30
|
};
|
|
28
31
|
});
|
|
29
32
|
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', (trackTypeGuesser) => {
|
|
30
33
|
return (adapterName) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return trackTypeGuesser(adapterName);
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
38
|
-
return (file, index, adapterHint) => {
|
|
39
|
-
const regexGuess = /\.vcf$/i;
|
|
40
|
-
const adapterName = 'VcfAdapter';
|
|
41
|
-
const fileName = (0, tracks_1.getFileName)(file);
|
|
42
|
-
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
43
|
-
return {
|
|
44
|
-
type: adapterName,
|
|
45
|
-
vcfLocation: file,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return adapterGuesser(file, index, adapterHint);
|
|
34
|
+
return ['VcfTabixAdapter', 'VcfAdapter'].includes(adapterName)
|
|
35
|
+
? 'VariantTrack'
|
|
36
|
+
: trackTypeGuesser(adapterName);
|
|
49
37
|
};
|
|
50
38
|
});
|
|
51
39
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SampleInfo, Source } from './types';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
export declare function getMultiVariantFeaturesAutorun(self: {
|
|
5
|
+
configuration: AnyConfigurationModel;
|
|
6
|
+
adapterConfig: AnyConfigurationModel;
|
|
7
|
+
sources?: Source[];
|
|
8
|
+
minorAlleleFrequencyFilter: number;
|
|
9
|
+
statsReadyAndRegionNotTooLarge: boolean;
|
|
10
|
+
adapterProps: () => Record<string, unknown>;
|
|
11
|
+
setError: (error: unknown) => void;
|
|
12
|
+
setFeatures: (f: Feature[]) => void;
|
|
13
|
+
setMessage: (str: string) => void;
|
|
14
|
+
setHasPhased: (arg: boolean) => void;
|
|
15
|
+
setSampleInfo: (arg: Record<string, SampleInfo>) => void;
|
|
16
|
+
}): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMultiVariantFeaturesAutorun = getMultiVariantFeaturesAutorun;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const aborting_1 = require("@jbrowse/core/util/aborting");
|
|
6
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
7
|
+
const mobx_1 = require("mobx");
|
|
8
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
|
+
function getMultiVariantFeaturesAutorun(self) {
|
|
10
|
+
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(async () => {
|
|
11
|
+
try {
|
|
12
|
+
const view = (0, util_1.getContainingView)(self);
|
|
13
|
+
if (!view.initialized || !self.statsReadyAndRegionNotTooLarge) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const { rpcManager } = (0, util_1.getSession)(self);
|
|
17
|
+
const { sources, minorAlleleFrequencyFilter, adapterConfig } = self;
|
|
18
|
+
if (sources) {
|
|
19
|
+
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
20
|
+
const { sampleInfo, hasPhased, features } = (await rpcManager.call(sessionId, 'MultiVariantGetSimplifiedFeatures', {
|
|
21
|
+
regions: view.dynamicBlocks.contentBlocks,
|
|
22
|
+
sources,
|
|
23
|
+
minorAlleleFrequencyFilter,
|
|
24
|
+
sessionId,
|
|
25
|
+
adapterConfig,
|
|
26
|
+
}));
|
|
27
|
+
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
28
|
+
self.setHasPhased(hasPhased);
|
|
29
|
+
self.setSampleInfo(sampleInfo);
|
|
30
|
+
self.setFeatures(features.map(f => new util_1.SimpleFeature(f)));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
console.error(e);
|
|
36
|
+
if (!(0, aborting_1.isAbortException)(e) && (0, mobx_state_tree_1.isAlive)(self)) {
|
|
37
|
+
(0, util_1.getSession)(self).notifyError(`${e}`, e);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, { delay: 1000 }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Source } from './types';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
export declare function getMultiVariantSourcesAutorun(self: {
|
|
4
|
+
configuration: AnyConfigurationModel;
|
|
5
|
+
adapterConfig: AnyConfigurationModel;
|
|
6
|
+
adapterProps: () => Record<string, unknown>;
|
|
7
|
+
setSourcesLoading: (aborter: string) => void;
|
|
8
|
+
setError: (error: unknown) => void;
|
|
9
|
+
setMessage: (str: string) => void;
|
|
10
|
+
setSources: (sources: Source[]) => void;
|
|
11
|
+
}): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMultiVariantSourcesAutorun = getMultiVariantSourcesAutorun;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const aborting_1 = require("@jbrowse/core/util/aborting");
|
|
6
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
7
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
8
|
+
const mobx_1 = require("mobx");
|
|
9
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
|
+
function getMultiVariantSourcesAutorun(self) {
|
|
11
|
+
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(async () => {
|
|
12
|
+
try {
|
|
13
|
+
const view = (0, util_1.getContainingView)(self);
|
|
14
|
+
if (!view.initialized) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const { rpcManager } = (0, util_1.getSession)(self);
|
|
18
|
+
const { adapterConfig } = self;
|
|
19
|
+
const token = (0, stopToken_1.createStopToken)();
|
|
20
|
+
self.setSourcesLoading(token);
|
|
21
|
+
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
22
|
+
const sources = (await rpcManager.call(sessionId, 'MultiVariantGetSources', {
|
|
23
|
+
sessionId,
|
|
24
|
+
adapterConfig,
|
|
25
|
+
}));
|
|
26
|
+
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
27
|
+
self.setSources(sources);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
if (!(0, aborting_1.isAbortException)(e) && (0, mobx_state_tree_1.isAlive)(self)) {
|
|
32
|
+
console.error(e);
|
|
33
|
+
(0, util_1.getSession)(self).notifyError(`${e}`, e);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}, { delay: 1000 }));
|
|
37
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class VariantsPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
package/dist/index.js
CHANGED
|
@@ -4,15 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.VcfFeature = void 0;
|
|
7
|
-
const VcfAdapter_1 = __importDefault(require("./VcfAdapter"));
|
|
8
|
-
const VcfTabixAdapter_1 = __importDefault(require("./VcfTabixAdapter"));
|
|
9
|
-
const extensionPoints_1 = __importDefault(require("./extensionPoints"));
|
|
10
|
-
const VariantTrack_1 = __importDefault(require("./VariantTrack"));
|
|
11
7
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
12
8
|
const ChordVariantDisplay_1 = __importDefault(require("./ChordVariantDisplay"));
|
|
13
9
|
const LinearVariantDisplay_1 = __importDefault(require("./LinearVariantDisplay"));
|
|
10
|
+
const MultiLinearVariantDisplay_1 = __importDefault(require("./MultiLinearVariantDisplay"));
|
|
11
|
+
const MultiLinearVariantMatrixDisplay_1 = __importDefault(require("./MultiLinearVariantMatrixDisplay"));
|
|
12
|
+
const MultiLinearVariantMatrixRenderer_1 = __importDefault(require("./MultiLinearVariantMatrixRenderer"));
|
|
13
|
+
const MultiLinearVariantRenderer_1 = __importDefault(require("./MultiLinearVariantRenderer"));
|
|
14
14
|
const StructuralVariantChordRenderer_1 = __importDefault(require("./StructuralVariantChordRenderer"));
|
|
15
15
|
const VariantFeatureWidget_1 = __importDefault(require("./VariantFeatureWidget"));
|
|
16
|
+
const MultiVariantGetGenotypeMatrix_1 = require("./VariantRPC/MultiVariantGetGenotypeMatrix");
|
|
17
|
+
const MultiVariantGetSimplifiedFeatures_1 = require("./VariantRPC/MultiVariantGetSimplifiedFeatures");
|
|
18
|
+
const MultiVariantGetSources_1 = require("./VariantRPC/MultiVariantGetSources");
|
|
19
|
+
const VariantTrack_1 = __importDefault(require("./VariantTrack"));
|
|
20
|
+
const VcfAdapter_1 = __importDefault(require("./VcfAdapter"));
|
|
21
|
+
const VcfTabixAdapter_1 = __importDefault(require("./VcfTabixAdapter"));
|
|
22
|
+
const extensionPoints_1 = __importDefault(require("./extensionPoints"));
|
|
16
23
|
class VariantsPlugin extends Plugin_1.default {
|
|
17
24
|
constructor() {
|
|
18
25
|
super(...arguments);
|
|
@@ -25,8 +32,15 @@ class VariantsPlugin extends Plugin_1.default {
|
|
|
25
32
|
(0, VariantTrack_1.default)(pluginManager);
|
|
26
33
|
(0, extensionPoints_1.default)(pluginManager);
|
|
27
34
|
(0, LinearVariantDisplay_1.default)(pluginManager);
|
|
35
|
+
(0, MultiLinearVariantMatrixDisplay_1.default)(pluginManager);
|
|
36
|
+
(0, MultiLinearVariantDisplay_1.default)(pluginManager);
|
|
37
|
+
(0, MultiLinearVariantRenderer_1.default)(pluginManager);
|
|
38
|
+
(0, MultiLinearVariantMatrixRenderer_1.default)(pluginManager);
|
|
28
39
|
(0, StructuralVariantChordRenderer_1.default)(pluginManager);
|
|
29
40
|
(0, ChordVariantDisplay_1.default)(pluginManager);
|
|
41
|
+
pluginManager.addRpcMethod(() => new MultiVariantGetSources_1.MultiVariantGetSources(pluginManager));
|
|
42
|
+
pluginManager.addRpcMethod(() => new MultiVariantGetGenotypeMatrix_1.MultiVariantGetGenotypeMatrix(pluginManager));
|
|
43
|
+
pluginManager.addRpcMethod(() => new MultiVariantGetSimplifiedFeatures_1.MultiVariantGetSimplifiedFeatures(pluginManager));
|
|
30
44
|
}
|
|
31
45
|
}
|
|
32
46
|
exports.default = VariantsPlugin;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = BulkEditPanel;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const mui_1 = require("tss-react/mui");
|
|
9
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
10
|
+
textAreaFont: {
|
|
11
|
+
fontFamily: 'Courier New',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
function BulkEditPanel({ onClose, currLayout, }) {
|
|
15
|
+
const { classes } = useStyles();
|
|
16
|
+
const [val, setVal] = (0, react_1.useState)('');
|
|
17
|
+
const [error, setError] = (0, react_1.useState)();
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Paste CSV or TSV. If a header column is present. First line is a header. If a column called \"name\" is present, it uses that to connect to IDs in the table, otherwise it uses the first column no." }), error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", multiline: true, minRows: 5, placeholder: 'name,population\nHG00098,GBR\nHG00101,GBR\nHG00459,CHS\n...', maxRows: 10, fullWidth: true, value: val, onChange: event => {
|
|
19
|
+
setVal(event.target.value);
|
|
20
|
+
}, slotProps: {
|
|
21
|
+
input: {
|
|
22
|
+
classes: {
|
|
23
|
+
input: classes.textAreaFont,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
} })] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
27
|
+
const lines = val
|
|
28
|
+
.split('\n')
|
|
29
|
+
.map(f => f.trim())
|
|
30
|
+
.filter(f => !!f);
|
|
31
|
+
const fields = lines[0].split(/[,\t]/gm);
|
|
32
|
+
if (fields.includes('name')) {
|
|
33
|
+
setError('');
|
|
34
|
+
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
35
|
+
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
36
|
+
const cols = line.split(/[,\t]/gm);
|
|
37
|
+
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
38
|
+
return [
|
|
39
|
+
newRecord.name,
|
|
40
|
+
{
|
|
41
|
+
...newRecord,
|
|
42
|
+
...oldLayout[newRecord.name],
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
}));
|
|
46
|
+
onClose(currLayout.map(record => ({
|
|
47
|
+
...record,
|
|
48
|
+
...newData[record.name],
|
|
49
|
+
})));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
setError(new Error('No "name" column found on line 1'));
|
|
53
|
+
}
|
|
54
|
+
}, children: "Update rows" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: () => {
|
|
55
|
+
const lines = val
|
|
56
|
+
.split('\n')
|
|
57
|
+
.map(f => f.trim())
|
|
58
|
+
.filter(f => !!f);
|
|
59
|
+
const fields = lines[0].split(/[,\t]/gm);
|
|
60
|
+
if (fields.includes('name')) {
|
|
61
|
+
setError('');
|
|
62
|
+
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
63
|
+
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
64
|
+
const cols = line.split(/[,\t]/gm);
|
|
65
|
+
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
66
|
+
return [
|
|
67
|
+
newRecord.name,
|
|
68
|
+
{
|
|
69
|
+
...newRecord,
|
|
70
|
+
...oldLayout[newRecord.name],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
}));
|
|
74
|
+
onClose(currLayout.map(record => ({
|
|
75
|
+
...newData[record.name],
|
|
76
|
+
})));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
setError(new Error('No "name" column found on line 1'));
|
|
80
|
+
}
|
|
81
|
+
}, children: "Replace rows" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
82
|
+
onClose();
|
|
83
|
+
}, children: "Cancel" })] })] }));
|
|
84
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Source } from '../types';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
export default function ClusterDialog({ model, handleClose, }: {
|
|
4
|
+
model: {
|
|
5
|
+
sources?: Source[];
|
|
6
|
+
minorAlleleFrequencyFilter?: number;
|
|
7
|
+
adapterConfig: AnyConfigurationModel;
|
|
8
|
+
setLayout: (arg: Source[]) => void;
|
|
9
|
+
};
|
|
10
|
+
handleClose: () => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = ClusterDialog;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
10
|
+
const util_1 = require("@jbrowse/core/util");
|
|
11
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
14
|
+
const file_saver_1 = require("file-saver");
|
|
15
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
16
|
+
const mui_1 = require("tss-react/mui");
|
|
17
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
18
|
+
textAreaFont: {
|
|
19
|
+
fontFamily: 'Courier New',
|
|
20
|
+
},
|
|
21
|
+
mgap: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'column',
|
|
24
|
+
gap: theme.spacing(4),
|
|
25
|
+
},
|
|
26
|
+
}));
|
|
27
|
+
function ClusterDialog({ model, handleClose, }) {
|
|
28
|
+
const { classes } = useStyles();
|
|
29
|
+
const [results, setResults] = (0, react_1.useState)();
|
|
30
|
+
const [error, setError] = (0, react_1.useState)();
|
|
31
|
+
const [paste, setPaste] = (0, react_1.useState)('');
|
|
32
|
+
(0, react_1.useEffect)(() => {
|
|
33
|
+
;
|
|
34
|
+
(async () => {
|
|
35
|
+
try {
|
|
36
|
+
setError(undefined);
|
|
37
|
+
const view = (0, util_1.getContainingView)(model);
|
|
38
|
+
if (!view.initialized) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const { rpcManager } = (0, util_1.getSession)(model);
|
|
42
|
+
const { sources, minorAlleleFrequencyFilter, adapterConfig } = model;
|
|
43
|
+
const sessionId = (0, tracks_1.getRpcSessionId)(model);
|
|
44
|
+
const ret = (await rpcManager.call(sessionId, 'MultiVariantGetGenotypeMatrix', {
|
|
45
|
+
regions: view.dynamicBlocks.contentBlocks,
|
|
46
|
+
sources,
|
|
47
|
+
minorAlleleFrequencyFilter,
|
|
48
|
+
sessionId,
|
|
49
|
+
adapterConfig,
|
|
50
|
+
}));
|
|
51
|
+
const entries = Object.values(ret);
|
|
52
|
+
const keys = Object.keys(ret);
|
|
53
|
+
const text = `try(library(fastcluster), silent=TRUE)
|
|
54
|
+
inputMatrix<-matrix(c(${entries.map(val => val.genotypes.join(',')).join(',\n')}
|
|
55
|
+
),nrow=${entries.length},byrow=TRUE)
|
|
56
|
+
rownames(inputMatrix)<-c(${keys.map(key => `'${key}'`).join(',')})
|
|
57
|
+
resultClusters<-hclust(dist(inputMatrix), method='single')
|
|
58
|
+
cat(resultClusters$order,sep='\\n')`;
|
|
59
|
+
setResults(text);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
if (!(0, util_1.isAbortException)(e) && (0, mobx_state_tree_1.isAlive)(model)) {
|
|
63
|
+
console.error(e);
|
|
64
|
+
setError(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
})();
|
|
68
|
+
}, [model]);
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { open: true, title: "Cluster by genotype", onClose: handleClose, children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: classes.mgap, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "This page will produce an R script that will perform hierarchical clustering on the visible genotype data using `hclust`." }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "You can then paste the results in this form to specify the row ordering." }), results ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { children: ["Step 1:", ' ', (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
70
|
+
(0, file_saver_1.saveAs)(new Blob([results || ''], {
|
|
71
|
+
type: 'text/plain;charset=utf-8',
|
|
72
|
+
}), 'cluster.R');
|
|
73
|
+
}, children: "Download Rscript" }), ' ', "or", ' ', (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
74
|
+
(0, copy_to_clipboard_1.default)(results || '');
|
|
75
|
+
}, children: "Copy Rscript to clipboard" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, fullWidth: true, variant: "outlined", placeholder: "Step 2. Paste results from Rscript here (sequence of numbers, one per line, specifying the new ordering)", rows: 10, value: paste, onChange: event => {
|
|
76
|
+
setPaste(event.target.value);
|
|
77
|
+
}, slotProps: {
|
|
78
|
+
input: {
|
|
79
|
+
classes: {
|
|
80
|
+
input: classes.textAreaFont,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
} }) })] }) })) : ((0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { variant: "h6", title: "Generating genotype matrix" })), error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null] }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !results, variant: "contained", onClick: () => {
|
|
84
|
+
const { sources } = model;
|
|
85
|
+
if (sources) {
|
|
86
|
+
try {
|
|
87
|
+
model.setLayout(paste
|
|
88
|
+
.split('\n')
|
|
89
|
+
.map(t => t.trim())
|
|
90
|
+
.filter(f => !!f)
|
|
91
|
+
.map(r => +r)
|
|
92
|
+
.map(idx => {
|
|
93
|
+
const ret = sources[idx - 1];
|
|
94
|
+
if (!ret) {
|
|
95
|
+
throw new Error(`out of bounds at ${idx}`);
|
|
96
|
+
}
|
|
97
|
+
return ret;
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
console.error(e);
|
|
102
|
+
setError(e);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
handleClose();
|
|
106
|
+
}, children: "Apply clustering" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
107
|
+
handleClose();
|
|
108
|
+
}, children: "Cancel" })] })] }));
|
|
109
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Source } from '../types';
|
|
2
|
+
declare const ColorLegend: ({ model, labelWidth, }: {
|
|
3
|
+
model: {
|
|
4
|
+
canDisplayLabels: boolean;
|
|
5
|
+
rowHeight: number;
|
|
6
|
+
sources?: Source[];
|
|
7
|
+
};
|
|
8
|
+
labelWidth: number;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default ColorLegend;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
|
+
const RectBg_1 = __importDefault(require("./RectBg"));
|
|
11
|
+
const ColorLegend = (0, mobx_react_1.observer)(function ({ model, labelWidth, }) {
|
|
12
|
+
const { canDisplayLabels, rowHeight, sources } = model;
|
|
13
|
+
const svgFontSize = (0, util_1.clamp)(rowHeight, 8, 12);
|
|
14
|
+
const colorBoxWidth = 15;
|
|
15
|
+
const hasColors = sources === null || sources === void 0 ? void 0 : sources.some(s => s.color);
|
|
16
|
+
const legendWidth = labelWidth + (hasColors ? colorBoxWidth + 5 : 0);
|
|
17
|
+
return sources ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [canDisplayLabels ? ((0, jsx_runtime_1.jsx)(RectBg_1.default, { y: 0, x: 0, width: legendWidth, height: (sources.length + 0.25) * rowHeight })) : null, sources.map((source, idx) => {
|
|
18
|
+
const { color, name, label } = source;
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [color ? ((0, jsx_runtime_1.jsx)(RectBg_1.default, { y: idx * rowHeight, x: 0, width: colorBoxWidth + 0.5, height: rowHeight + 0.5, color: color })) : null, canDisplayLabels ? ((0, jsx_runtime_1.jsx)("text", { y: idx * rowHeight + svgFontSize, x: color ? colorBoxWidth + 2 : 0, fontSize: svgFontSize, children: label || name })) : null] }, `${label}-${idx}`));
|
|
20
|
+
})] })) : null;
|
|
21
|
+
});
|
|
22
|
+
exports.default = ColorLegend;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HelpfulTips(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = HelpfulTips;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function HelpfulTips() {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Helpful tips", (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "You can select rows in the table with the checkboxes" }), (0, jsx_runtime_1.jsx)("li", { children: "Multi-select is enabled with shift-click and control-click" }), (0, jsx_runtime_1.jsx)("li", { children: "The \"Move selected items up/down\" can re-arrange subtracks" }), (0, jsx_runtime_1.jsx)("li", { children: "Sorting the data grid itself can also re-arrange subtracks" }), (0, jsx_runtime_1.jsx)("li", { children: "Changes are applied when you hit Submit" }), (0, jsx_runtime_1.jsx)("li", { children: "You can click and drag the dialog box to move it on the screen" }), (0, jsx_runtime_1.jsx)("li", { children: "Columns in the table can be hidden using a vertical '...' menu on the right side of each column" })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Source } from '../types';
|
|
2
|
+
interface ReducedModel {
|
|
3
|
+
scrollTop: number;
|
|
4
|
+
totalHeight: number;
|
|
5
|
+
rowHeight: number;
|
|
6
|
+
lineZoneHeight?: number;
|
|
7
|
+
sources?: Source[];
|
|
8
|
+
canDisplayLabels: boolean;
|
|
9
|
+
height: number;
|
|
10
|
+
samplePloidy?: Record<string, number>;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const LegendBar: (props: {
|
|
14
|
+
model: ReducedModel;
|
|
15
|
+
orientation?: string;
|
|
16
|
+
exportSVG?: boolean;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
export default LegendBar;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendBar = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
|
+
const ColorLegend_1 = __importDefault(require("./ColorLegend"));
|
|
11
|
+
const Wrapper = (0, mobx_react_1.observer)(function ({ children, model, exportSVG, }) {
|
|
12
|
+
const { id, scrollTop, height } = model;
|
|
13
|
+
const clipid = `legend-${id}`;
|
|
14
|
+
return exportSVG ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: clipid, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: 1000, height: height }) }) }), (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${clipid})`, children: (0, jsx_runtime_1.jsx)("g", { transform: `translate(0,${-scrollTop})`, children: children }) })] })) : ((0, jsx_runtime_1.jsx)("svg", { style: {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
zIndex: 100,
|
|
19
|
+
pointerEvents: 'none',
|
|
20
|
+
height: model.totalHeight,
|
|
21
|
+
width: (0, util_1.getContainingView)(model).width,
|
|
22
|
+
}, children: children }));
|
|
23
|
+
});
|
|
24
|
+
exports.LegendBar = (0, mobx_react_1.observer)(function (props) {
|
|
25
|
+
const { model } = props;
|
|
26
|
+
const { canDisplayLabels, rowHeight, sources } = model;
|
|
27
|
+
const svgFontSize = (0, util_1.clamp)(rowHeight, 8, 12);
|
|
28
|
+
return sources ? ((0, jsx_runtime_1.jsx)(Wrapper, { ...props, children: (0, jsx_runtime_1.jsx)(ColorLegend_1.default, { model: model, labelWidth: (0, util_1.max)(sources
|
|
29
|
+
.map(s => (0, util_1.measureText)(s.label, svgFontSize) + 10)
|
|
30
|
+
.map(width => (canDisplayLabels ? width : 20)), 0) }) })) : null;
|
|
31
|
+
});
|
|
32
|
+
exports.default = exports.LegendBar;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const mobx_react_1 = require("mobx-react");
|
|
7
|
+
const mui_1 = require("tss-react/mui");
|
|
8
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
9
|
+
root: {
|
|
10
|
+
width: 500,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const MAFFilterDialog = (0, mobx_react_1.observer)(function ({ model, handleClose, }) {
|
|
14
|
+
const { minorAlleleFrequencyFilter = '' } = model;
|
|
15
|
+
const { classes } = useStyles();
|
|
16
|
+
const [maf, setMaf] = (0, react_1.useState)(`${minorAlleleFrequencyFilter}`);
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Dialog, { open: true, onClose: handleClose, title: "Set minor allele frequency (MAF)", children: (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { className: classes.root, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Set minor allele frequency cutoff track. This will filter out rare variants that might not contribute to meaningful large scale patterns" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { value: maf, autoFocus: true, placeholder: "Enter MAF", onChange: event => {
|
|
18
|
+
setMaf(event.target.value);
|
|
19
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, onClick: () => {
|
|
20
|
+
if (!Number.isNaN(+maf)) {
|
|
21
|
+
model.setMafFilter(+maf);
|
|
22
|
+
}
|
|
23
|
+
handleClose();
|
|
24
|
+
}, children: "Submit" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
25
|
+
handleClose();
|
|
26
|
+
}, children: "Cancel" })] })] }) }));
|
|
27
|
+
});
|
|
28
|
+
exports.default = MAFFilterDialog;
|