@jbrowse/plugin-variants 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +10 -28
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +13 -43
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantDisplay/components/Crosshair.js +35 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +29 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +57 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +351 -0
- package/dist/MultiLinearVariantDisplay/model.js +83 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +3 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +15 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +28 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +39 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +31 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +356 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +113 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +3 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +17 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +34 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +87 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +38 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +100 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.js +2 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +31 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +73 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +22 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +52 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.js +67 -0
- package/dist/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/dist/MultiLinearVariantRenderer/types.js +2 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +4 -21
- package/dist/StructuralVariantChordRenderer/Chord.js +8 -34
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +4 -5
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +7 -30
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/dist/StructuralVariantChordRenderer/types.js +2 -0
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +32 -0
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/dist/VariantFeatureWidget/Checkbox2.js +2 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +4 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +73 -80
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.js +60 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.js +15 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +20 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.js +15 -0
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +2 -3
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +50 -41
- package/dist/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/dist/VariantFeatureWidget/VariantSampleFilters.js +10 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +10 -8
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +17 -51
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +18 -8
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantFeatureWidget/types.d.ts +16 -0
- package/dist/VariantFeatureWidget/types.js +2 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +50 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +26 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +53 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +10 -2
- package/dist/VcfAdapter/VcfAdapter.js +32 -8
- package/dist/VcfAdapter/configSchema.d.ts +8 -3
- package/dist/VcfAdapter/configSchema.js +13 -8
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfAdapter/index.js +17 -7
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +36 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +3 -16
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +44 -13
- package/dist/VcfTabixAdapter/configSchema.d.ts +8 -9
- package/dist/VcfTabixAdapter/configSchema.js +10 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/VcfTabixAdapter/index.js +17 -7
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/extensionPoints.js +21 -33
- package/dist/getMultiVariantFeaturesAutorun.d.ts +16 -0
- package/dist/getMultiVariantFeaturesAutorun.js +41 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +11 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +5 -0
- package/dist/shared/BulkEditPanel.js +84 -0
- package/dist/shared/ClusterDialog.d.ts +11 -0
- package/dist/shared/ClusterDialog.js +109 -0
- package/dist/shared/ColorLegend.d.ts +10 -0
- package/dist/shared/ColorLegend.js +22 -0
- package/dist/shared/HelpfulTips.d.ts +1 -0
- package/dist/shared/HelpfulTips.js +7 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +32 -0
- package/dist/shared/MAFFilterDialog.d.ts +8 -0
- package/dist/shared/MAFFilterDialog.js +28 -0
- package/dist/shared/MultiVariantBaseModel.d.ts +341 -0
- package/dist/shared/MultiVariantBaseModel.js +316 -0
- package/dist/shared/MultiVariantTooltip.d.ts +6 -0
- package/dist/shared/MultiVariantTooltip.js +23 -0
- package/dist/shared/RectBg.d.ts +8 -0
- package/dist/shared/RectBg.js +8 -0
- package/dist/shared/RowPalettizer.d.ts +5 -0
- package/dist/shared/RowPalettizer.js +40 -0
- package/dist/shared/SetColorDialog.d.ts +11 -0
- package/dist/shared/SetColorDialog.js +55 -0
- package/dist/shared/SetMinMaxDialog.d.ts +10 -0
- package/dist/shared/SetMinMaxDialog.js +26 -0
- package/dist/shared/SetRowHeightDialog.d.ts +8 -0
- package/dist/shared/SetRowHeightDialog.js +18 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesDataGrid.d.ts +6 -0
- package/dist/shared/SourcesDataGrid.js +68 -0
- package/dist/shared/SourcesGrid.d.ts +7 -0
- package/dist/shared/SourcesGrid.js +14 -0
- package/dist/shared/SourcesGridHeader.d.ts +7 -0
- package/dist/shared/SourcesGridHeader.js +41 -0
- package/dist/shared/multiVariantColor.d.ts +3 -0
- package/dist/shared/multiVariantColor.js +50 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -0
- package/dist/util.d.ts +8 -0
- package/dist/util.js +86 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +10 -28
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +13 -43
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +30 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +24 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +351 -0
- package/esm/MultiLinearVariantDisplay/model.js +44 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +3 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +9 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +23 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +5 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +26 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +356 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +74 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +3 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +11 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +34 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +48 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +36 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +97 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.js +1 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +31 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +34 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +22 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +47 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +6 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.js +61 -0
- package/esm/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/esm/MultiLinearVariantRenderer/types.js +1 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +4 -21
- package/esm/StructuralVariantChordRenderer/Chord.js +8 -11
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +4 -5
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +7 -7
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/esm/StructuralVariantChordRenderer/types.js +1 -0
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +27 -0
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/esm/VariantFeatureWidget/Checkbox2.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +4 -5
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +55 -72
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.js +24 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.js +9 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +17 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.js +9 -0
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +2 -3
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +33 -34
- package/esm/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/esm/VariantFeatureWidget/VariantSampleFilters.js +7 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +10 -8
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +18 -29
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantFeatureWidget/types.d.ts +16 -0
- package/esm/VariantFeatureWidget/types.js +1 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +43 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +26 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +46 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +10 -2
- package/esm/VcfAdapter/VcfAdapter.js +34 -10
- package/esm/VcfAdapter/configSchema.d.ts +8 -3
- package/esm/VcfAdapter/configSchema.js +13 -8
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +36 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +3 -16
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +45 -14
- package/esm/VcfTabixAdapter/configSchema.d.ts +8 -9
- package/esm/VcfTabixAdapter/configSchema.js +10 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +22 -34
- package/esm/getMultiVariantFeaturesAutorun.d.ts +16 -0
- package/esm/getMultiVariantFeaturesAutorun.js +38 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +11 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +5 -0
- package/esm/shared/BulkEditPanel.js +81 -0
- package/esm/shared/ClusterDialog.d.ts +11 -0
- package/esm/shared/ClusterDialog.js +103 -0
- package/esm/shared/ColorLegend.d.ts +10 -0
- package/esm/shared/ColorLegend.js +17 -0
- package/esm/shared/HelpfulTips.d.ts +1 -0
- package/esm/shared/HelpfulTips.js +4 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +26 -0
- package/esm/shared/MAFFilterDialog.d.ts +8 -0
- package/esm/shared/MAFFilterDialog.js +26 -0
- package/esm/shared/MultiVariantBaseModel.d.ts +341 -0
- package/esm/shared/MultiVariantBaseModel.js +277 -0
- package/esm/shared/MultiVariantTooltip.d.ts +6 -0
- package/esm/shared/MultiVariantTooltip.js +17 -0
- package/esm/shared/RectBg.d.ts +8 -0
- package/esm/shared/RectBg.js +6 -0
- package/esm/shared/RowPalettizer.d.ts +5 -0
- package/esm/shared/RowPalettizer.js +37 -0
- package/esm/shared/SetColorDialog.d.ts +11 -0
- package/esm/shared/SetColorDialog.js +49 -0
- package/esm/shared/SetMinMaxDialog.d.ts +10 -0
- package/esm/shared/SetMinMaxDialog.js +23 -0
- package/esm/shared/SetRowHeightDialog.d.ts +8 -0
- package/esm/shared/SetRowHeightDialog.js +15 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesDataGrid.d.ts +6 -0
- package/esm/shared/SourcesDataGrid.js +62 -0
- package/esm/shared/SourcesGrid.d.ts +7 -0
- package/esm/shared/SourcesGrid.js +9 -0
- package/esm/shared/SourcesGridHeader.d.ts +7 -0
- package/esm/shared/SourcesGridHeader.js +35 -0
- package/esm/shared/multiVariantColor.d.ts +3 -0
- package/esm/shared/multiVariantColor.js +45 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/types.d.ts +14 -0
- package/esm/types.js +1 -0
- package/esm/util.d.ts +8 -0
- package/esm/util.js +77 -0
- package/package.json +7 -8
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/AnnotGrid.js +0 -39
- package/dist/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +0 -16
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/esm/VariantFeatureWidget/AnnotGrid.js +0 -13
- package/esm/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +0 -10
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = SharedVariantMixin;
|
|
4
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
+
const util_1 = require("@jbrowse/core/util");
|
|
6
|
+
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
+
function SharedVariantMixin(configSchema) {
|
|
9
|
+
return mobx_state_tree_1.types
|
|
10
|
+
.compose(plugin_linear_genome_view_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
11
|
+
selectedRendering: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, ''),
|
|
12
|
+
summaryScoreMode: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
13
|
+
rendererTypeNameState: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
14
|
+
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
15
|
+
}))
|
|
16
|
+
.volatile(() => ({
|
|
17
|
+
message: undefined,
|
|
18
|
+
}))
|
|
19
|
+
.actions(self => ({
|
|
20
|
+
selectFeature(feature) {
|
|
21
|
+
const session = (0, util_1.getSession)(self);
|
|
22
|
+
if ((0, util_1.isSelectionContainer)(session)) {
|
|
23
|
+
session.setSelection(feature);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setRendererType(val) {
|
|
27
|
+
self.rendererTypeNameState = val;
|
|
28
|
+
},
|
|
29
|
+
}))
|
|
30
|
+
.views(self => ({
|
|
31
|
+
get adapterTypeName() {
|
|
32
|
+
return self.adapterConfig.type;
|
|
33
|
+
},
|
|
34
|
+
get rendererTypeNameSimple() {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = self.rendererTypeNameState) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, 'defaultRendering');
|
|
37
|
+
},
|
|
38
|
+
get filters() {
|
|
39
|
+
return undefined;
|
|
40
|
+
},
|
|
41
|
+
}))
|
|
42
|
+
.views(self => ({
|
|
43
|
+
get adapterCapabilities() {
|
|
44
|
+
const type = self.adapterTypeName;
|
|
45
|
+
const { pluginManager } = (0, util_1.getEnv)(self);
|
|
46
|
+
return pluginManager.getAdapterType(type).adapterCapabilities;
|
|
47
|
+
},
|
|
48
|
+
}))
|
|
49
|
+
.actions(self => {
|
|
50
|
+
const { reload: superReload } = self;
|
|
51
|
+
return {
|
|
52
|
+
async reload() {
|
|
53
|
+
self.setError();
|
|
54
|
+
superReload();
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 = SourcesDataGrid;
|
|
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 ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
|
|
11
|
+
const util_1 = require("@jbrowse/core/util");
|
|
12
|
+
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
13
|
+
const mui_1 = require("tss-react/mui");
|
|
14
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
+
cell: {
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
textOverflow: 'ellipsis',
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
function SourcesDataGrid({ rows, onChange, setSelected, }) {
|
|
22
|
+
const { classes } = useStyles();
|
|
23
|
+
const { id: _id, name: _name, label: _label, color: _color, baseUri: _baseUri, HP: _HP, ...rest } = rows[0];
|
|
24
|
+
const [currSort, setCurrSort] = (0, react_1.useState)({
|
|
25
|
+
idx: 0,
|
|
26
|
+
field: null,
|
|
27
|
+
});
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { height: 400, width: '100%' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { checkboxSelection: true, disableRowSelectionOnClick: true, onRowSelectionModelChange: arg => {
|
|
29
|
+
setSelected(arg);
|
|
30
|
+
}, rows: rows, rowHeight: 25, columnHeaderHeight: 33, columns: [
|
|
31
|
+
{
|
|
32
|
+
field: 'color',
|
|
33
|
+
headerName: 'Color',
|
|
34
|
+
renderCell: params => {
|
|
35
|
+
const { value, id } = params;
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(ColorPicker_1.default, { color: value || 'blue', onChange: c => {
|
|
37
|
+
const elt = rows.find(f => f.name === id);
|
|
38
|
+
if (elt) {
|
|
39
|
+
elt.color = c;
|
|
40
|
+
}
|
|
41
|
+
onChange([...rows]);
|
|
42
|
+
} }));
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
field: 'label',
|
|
47
|
+
headerName: 'Name',
|
|
48
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => r.label)),
|
|
49
|
+
},
|
|
50
|
+
...Object.keys(rest).map(val => ({
|
|
51
|
+
field: val,
|
|
52
|
+
renderCell: ({ value }) => ((0, jsx_runtime_1.jsx)("div", { className: classes.cell, children: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value) }) })),
|
|
53
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => `${r[val]}`)),
|
|
54
|
+
})),
|
|
55
|
+
], sortModel: [], onSortModelChange: args => {
|
|
56
|
+
const sort = args[0];
|
|
57
|
+
const idx = (currSort.idx + 1) % 2;
|
|
58
|
+
const field = sort.field || currSort.field;
|
|
59
|
+
setCurrSort({ idx, field });
|
|
60
|
+
onChange(field
|
|
61
|
+
? [...rows].sort((a, b) => {
|
|
62
|
+
const aa = (0, util_1.getStr)(a[field]);
|
|
63
|
+
const bb = (0, util_1.getStr)(b[field]);
|
|
64
|
+
return idx === 1 ? aa.localeCompare(bb) : bb.localeCompare(aa);
|
|
65
|
+
})
|
|
66
|
+
: rows);
|
|
67
|
+
} }) }));
|
|
68
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 SourcesDataGrid_1 = __importDefault(require("./SourcesDataGrid"));
|
|
9
|
+
const SourcesGridHeader_1 = __importDefault(require("./SourcesGridHeader"));
|
|
10
|
+
function SourcesGrid({ rows, onChange, showTips, }) {
|
|
11
|
+
const [selected, setSelected] = (0, react_1.useState)([]);
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(SourcesGridHeader_1.default, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }), (0, jsx_runtime_1.jsx)(SourcesDataGrid_1.default, { rows: rows, onChange: onChange, setSelected: setSelected })] }));
|
|
13
|
+
}
|
|
14
|
+
exports.default = SourcesGrid;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Source } from '../types';
|
|
2
|
+
export default function SourcesGridHeader({ selected, onChange, rows, showTips, }: {
|
|
3
|
+
onChange: (arg: Source[]) => void;
|
|
4
|
+
rows: Source[];
|
|
5
|
+
selected: string[];
|
|
6
|
+
showTips: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 = SourcesGridHeader;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const ColorPicker_1 = require("@jbrowse/core/ui/ColorPicker");
|
|
10
|
+
const KeyboardArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
11
|
+
const KeyboardArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardArrowUp"));
|
|
12
|
+
const KeyboardDoubleArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowDown"));
|
|
13
|
+
const KeyboardDoubleArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowUp"));
|
|
14
|
+
const material_1 = require("@mui/material");
|
|
15
|
+
const util_1 = require("./util");
|
|
16
|
+
function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
|
|
17
|
+
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
18
|
+
const [widgetColor, setWidgetColor] = (0, react_1.useState)('blue');
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !selected.length, onClick: event => {
|
|
20
|
+
setAnchorEl(event.currentTarget);
|
|
21
|
+
}, children: "Change color of selected items" }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
22
|
+
onChange((0, util_1.moveUp)([...rows], selected));
|
|
23
|
+
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowUp_1.default, {}), showTips ? 'Move selected items up' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
24
|
+
onChange((0, util_1.moveDown)([...rows], selected));
|
|
25
|
+
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowDown_1.default, {}), showTips ? 'Move selected items down' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
26
|
+
onChange((0, util_1.moveUp)([...rows], selected, rows.length));
|
|
27
|
+
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowUp_1.default, {}), showTips ? 'Move selected items to top' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
28
|
+
onChange((0, util_1.moveDown)([...rows], selected, rows.length));
|
|
29
|
+
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowDown_1.default, {}), showTips ? 'Move selected items to bottom' : null] }), (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPopover, { anchorEl: anchorEl, color: widgetColor, onChange: c => {
|
|
30
|
+
setWidgetColor(c);
|
|
31
|
+
selected.forEach(id => {
|
|
32
|
+
const elt = rows.find(f => f.name === id);
|
|
33
|
+
if (elt) {
|
|
34
|
+
elt.color = c;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
onChange([...rows]);
|
|
38
|
+
}, onClose: () => {
|
|
39
|
+
setAnchorEl(null);
|
|
40
|
+
} })] }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getColorAlleleCount = getColorAlleleCount;
|
|
4
|
+
exports.getColorPhased = getColorPhased;
|
|
5
|
+
exports.getColorPhasedWithPhaseSet = getColorPhasedWithPhaseSet;
|
|
6
|
+
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
7
|
+
const colord_1 = require("@jbrowse/core/util/colord");
|
|
8
|
+
const util_1 = require("../util");
|
|
9
|
+
function getColorAlleleCount(alleles) {
|
|
10
|
+
const total = alleles.length;
|
|
11
|
+
let alt = 0;
|
|
12
|
+
let uncalled = 0;
|
|
13
|
+
let alt2 = 0;
|
|
14
|
+
let ref = 0;
|
|
15
|
+
for (const allele of alleles) {
|
|
16
|
+
if (allele === '1') {
|
|
17
|
+
alt++;
|
|
18
|
+
}
|
|
19
|
+
else if (allele === '0') {
|
|
20
|
+
ref++;
|
|
21
|
+
}
|
|
22
|
+
else if (allele === '.') {
|
|
23
|
+
uncalled++;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
alt2++;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (ref === total) {
|
|
30
|
+
return `#ccc`;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
let a1 = (0, colord_1.colord)(`hsl(200,50%,${80 - (alt / total) * 50}%)`);
|
|
34
|
+
if (alt2) {
|
|
35
|
+
a1 = a1.mix(`hsla(0,100%,20%,${alt2 / total})`);
|
|
36
|
+
}
|
|
37
|
+
if (uncalled) {
|
|
38
|
+
a1 = a1.mix(`hsla(50,50%,50%,${uncalled / total / 2})`);
|
|
39
|
+
}
|
|
40
|
+
return a1.toHex();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function getColorPhased(alleles, HP) {
|
|
44
|
+
const c = +alleles[HP];
|
|
45
|
+
return c ? colors_1.set1[c - 1] || 'black' : '#ccc';
|
|
46
|
+
}
|
|
47
|
+
function getColorPhasedWithPhaseSet(alleles, HP, PS) {
|
|
48
|
+
const c = +alleles[HP];
|
|
49
|
+
return c ? (0, util_1.colorify)(+PS) || 'black' : '#ccc';
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moveUp = moveUp;
|
|
4
|
+
exports.moveDown = moveDown;
|
|
5
|
+
function moveUp(arr, sel, by = 1) {
|
|
6
|
+
const idxs = sel
|
|
7
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
8
|
+
.sort((a, b) => a - b);
|
|
9
|
+
let lastIdx = 0;
|
|
10
|
+
for (const old of idxs) {
|
|
11
|
+
const idx = Math.max(lastIdx, old - by);
|
|
12
|
+
if (idx >= lastIdx) {
|
|
13
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
14
|
+
}
|
|
15
|
+
lastIdx = lastIdx + 1;
|
|
16
|
+
}
|
|
17
|
+
return arr;
|
|
18
|
+
}
|
|
19
|
+
function moveDown(arr, sel, by = 1) {
|
|
20
|
+
const idxs = sel
|
|
21
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
22
|
+
.sort((a, b) => b - a);
|
|
23
|
+
let lastIdx = arr.length - 1;
|
|
24
|
+
for (const old of idxs) {
|
|
25
|
+
const idx = Math.min(lastIdx, old + by);
|
|
26
|
+
if (idx <= lastIdx) {
|
|
27
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
28
|
+
}
|
|
29
|
+
lastIdx = lastIdx - 1;
|
|
30
|
+
}
|
|
31
|
+
return arr;
|
|
32
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Source {
|
|
2
|
+
baseUri?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
HP?: number;
|
|
8
|
+
id?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface SampleInfo {
|
|
12
|
+
isPhased: boolean;
|
|
13
|
+
maxPloidy: number;
|
|
14
|
+
}
|
package/dist/types.js
ADDED
package/dist/util.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
+
export declare function fillRectCtx(x: number, y: number, width: number, height: number, ctx: CanvasRenderingContext2D, color?: string): void;
|
|
3
|
+
export declare function getCol(gt: string): "blue" | "teal" | "#ccc" | "#CBC3E3";
|
|
4
|
+
export declare function randomColor(str: string): string;
|
|
5
|
+
export declare function colorify(n: number): string;
|
|
6
|
+
export declare function findSecondLargest(arr: Iterable<number>): number;
|
|
7
|
+
export declare function calculateMinorAlleleFrequency(feat: Feature): number;
|
|
8
|
+
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter(feats: Iterable<Feature>, minorAlleleFrequencyFilter: number): Feature[];
|
package/dist/util.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fillRectCtx = fillRectCtx;
|
|
4
|
+
exports.getCol = getCol;
|
|
5
|
+
exports.randomColor = randomColor;
|
|
6
|
+
exports.colorify = colorify;
|
|
7
|
+
exports.findSecondLargest = findSecondLargest;
|
|
8
|
+
exports.calculateMinorAlleleFrequency = calculateMinorAlleleFrequency;
|
|
9
|
+
exports.getFeaturesThatPassMinorAlleleFrequencyFilter = getFeaturesThatPassMinorAlleleFrequencyFilter;
|
|
10
|
+
const util_1 = require("@jbrowse/core/util");
|
|
11
|
+
function fillRectCtx(x, y, width, height, ctx, color) {
|
|
12
|
+
if (width < 0) {
|
|
13
|
+
x += width;
|
|
14
|
+
width = -width;
|
|
15
|
+
}
|
|
16
|
+
if (height < 0) {
|
|
17
|
+
y += height;
|
|
18
|
+
height = -height;
|
|
19
|
+
}
|
|
20
|
+
if (color) {
|
|
21
|
+
ctx.fillStyle = color;
|
|
22
|
+
}
|
|
23
|
+
ctx.fillRect(x, y, width, height);
|
|
24
|
+
}
|
|
25
|
+
function getCol(gt) {
|
|
26
|
+
if (gt === '0|0' || gt === '0/0') {
|
|
27
|
+
return '#ccc';
|
|
28
|
+
}
|
|
29
|
+
else if (gt === '1|0' || gt === '0|1' || gt === '0/1' || gt === '1/0') {
|
|
30
|
+
return 'teal';
|
|
31
|
+
}
|
|
32
|
+
else if (gt === '1|1' || gt === '1/1') {
|
|
33
|
+
return 'blue';
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return '#CBC3E3';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function randomColor(str) {
|
|
40
|
+
let sum = 0;
|
|
41
|
+
for (let i = 0; i < str.length; i++) {
|
|
42
|
+
sum += str.charCodeAt(i);
|
|
43
|
+
}
|
|
44
|
+
return `hsl(${colorify(sum * 10)}, 50%, 50%)`;
|
|
45
|
+
}
|
|
46
|
+
function colorify(n) {
|
|
47
|
+
return `hsl(${n % 255}, 50%, 50%)`;
|
|
48
|
+
}
|
|
49
|
+
function findSecondLargest(arr) {
|
|
50
|
+
let firstMax = 0;
|
|
51
|
+
let secondMax = 0;
|
|
52
|
+
for (const num of arr) {
|
|
53
|
+
if (num > firstMax) {
|
|
54
|
+
secondMax = firstMax;
|
|
55
|
+
firstMax = num;
|
|
56
|
+
}
|
|
57
|
+
else if (num > secondMax && num !== firstMax) {
|
|
58
|
+
secondMax = num;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return secondMax;
|
|
62
|
+
}
|
|
63
|
+
function calculateMinorAlleleFrequency(feat) {
|
|
64
|
+
if (feat.get('end') - feat.get('start') <= 10) {
|
|
65
|
+
const samp = feat.get('genotypes');
|
|
66
|
+
const alleleCounts = new Map();
|
|
67
|
+
for (const val of Object.values(samp)) {
|
|
68
|
+
const alleles = val.split(/[/|]/);
|
|
69
|
+
for (const allele of alleles) {
|
|
70
|
+
alleleCounts.set(allele, (alleleCounts.get(allele) || 0) + 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return (findSecondLargest(alleleCounts.values()) /
|
|
74
|
+
((0, util_1.sum)(alleleCounts.values()) || 1));
|
|
75
|
+
}
|
|
76
|
+
return -1;
|
|
77
|
+
}
|
|
78
|
+
function getFeaturesThatPassMinorAlleleFrequencyFilter(feats, minorAlleleFrequencyFilter) {
|
|
79
|
+
const mafs = [];
|
|
80
|
+
for (const feat of feats) {
|
|
81
|
+
if (calculateMinorAlleleFrequency(feat) >= minorAlleleFrequencyFilter) {
|
|
82
|
+
mafs.push(feat);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return mafs;
|
|
86
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ChordVariantDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BaseChordDisplayComponent } from '@jbrowse/plugin-circular-view';
|
|
2
1
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
3
|
-
|
|
2
|
+
import { BaseChordDisplayComponent } from '@jbrowse/plugin-circular-view';
|
|
4
3
|
import configSchemaF from './models/configSchema';
|
|
5
4
|
import stateModelF from './models/stateModelFactory';
|
|
6
5
|
export default function ChordVariantDisplayF(pluginManager) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
/**
|
|
4
|
-
* #slot
|
|
5
|
-
*/
|
|
6
3
|
renderer: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IAnyModelType, [undefined]>;
|
|
7
4
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
5
|
onChordClick: {
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { baseChordDisplayConfig } from '@jbrowse/plugin-circular-view';
|
|
3
3
|
import { types } from 'mobx-state-tree';
|
|
4
|
-
|
|
5
|
-
* #config ChordVariantDisplay
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
function stateModelFactory(pluginManager) {
|
|
9
6
|
return ConfigurationSchema('ChordVariantDisplay', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
renderer: types.optional(pluginManager.pluggableConfigSchemaType('renderer'), { type: 'StructuralVariantChordRenderer' }),
|
|
14
8
|
}, {
|
|
15
|
-
/**
|
|
16
|
-
* #baseConfiguration
|
|
17
|
-
*/
|
|
18
9
|
baseConfiguration: baseChordDisplayConfig,
|
|
19
10
|
explicitlyTyped: true,
|
|
20
11
|
});
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
import { Feature } from '@jbrowse/core/util';
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel ChordVariantDisplay
|
|
5
|
-
* extends
|
|
6
|
-
* - [BaseChordDisplay](../basechorddisplay)
|
|
7
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
8
3
|
declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => import("mobx-state-tree").IModelType<{
|
|
9
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
10
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -21,13 +16,7 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
|
|
|
21
16
|
};
|
|
22
17
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
23
18
|
} & {
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
19
|
type: import("mobx-state-tree").ISimpleType<"ChordVariantDisplay">;
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
20
|
configuration: AnyConfigurationSchemaType;
|
|
32
21
|
}, {
|
|
33
22
|
rendererTypeName: string;
|
|
@@ -98,36 +87,29 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
|
|
|
98
87
|
} & {
|
|
99
88
|
onChordClick(feature: Feature): void;
|
|
100
89
|
} & {
|
|
101
|
-
readonly blockDefinitions: import("@jbrowse/plugin-circular-view/src/CircularView/
|
|
90
|
+
readonly blockDefinitions: import("@jbrowse/plugin-circular-view/src/CircularView/slices").Slice[];
|
|
102
91
|
renderProps(): any;
|
|
103
92
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType | undefined;
|
|
104
|
-
isCompatibleWithRenderer(renderer: import("@jbrowse/core/pluggableElementTypes").RendererType): renderer is import("@jbrowse/core/pluggableElementTypes").CircularChordRendererType;
|
|
105
93
|
readonly selectedFeatureId: string | undefined;
|
|
106
94
|
} & {
|
|
107
95
|
renderStarted(): void;
|
|
108
96
|
renderSuccess({ message, data, reactElement, html, renderingComponent, }: {
|
|
109
|
-
message
|
|
110
|
-
data
|
|
111
|
-
html
|
|
112
|
-
reactElement
|
|
113
|
-
renderingComponent
|
|
97
|
+
message?: string;
|
|
98
|
+
data?: any;
|
|
99
|
+
html?: string;
|
|
100
|
+
reactElement?: React.ReactElement;
|
|
101
|
+
renderingComponent?: import("@jbrowse/core/util").AnyReactComponentType;
|
|
114
102
|
}): void;
|
|
115
103
|
renderError(error: unknown): void;
|
|
116
104
|
setRefNameMap(refNameMap: Record<string, string>): void;
|
|
117
105
|
} & {
|
|
118
106
|
afterAttach(): void;
|
|
119
107
|
} & {
|
|
120
|
-
renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/
|
|
108
|
+
renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/model").ExportSvgOptions & {
|
|
121
109
|
theme?: import("@mui/material").ThemeOptions;
|
|
122
|
-
}): Promise<import("react").JSX.Element>;
|
|
110
|
+
}): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
123
111
|
} & {
|
|
124
|
-
/**
|
|
125
|
-
* #getter
|
|
126
|
-
*/
|
|
127
112
|
readonly rendererTypeName: any;
|
|
128
|
-
/**
|
|
129
|
-
* #method
|
|
130
|
-
*/
|
|
131
113
|
renderProps(): Record<string, unknown>;
|
|
132
114
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
133
115
|
export default stateModelFactory;
|
|
@@ -1,35 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigurationReference, } from '@jbrowse/core/configuration';
|
|
3
|
-
import { types } from 'mobx-state-tree';
|
|
1
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
4
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
5
3
|
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* extends
|
|
9
|
-
* - [BaseChordDisplay](../basechorddisplay)
|
|
10
|
-
*/
|
|
4
|
+
import { BaseChordDisplayModel } from '@jbrowse/plugin-circular-view';
|
|
5
|
+
import { types } from 'mobx-state-tree';
|
|
11
6
|
const stateModelFactory = (configSchema) => {
|
|
12
7
|
return types
|
|
13
8
|
.compose('ChordVariantDisplay', BaseChordDisplayModel, types.model({
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
9
|
type: types.literal('ChordVariantDisplay'),
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
10
|
configuration: ConfigurationReference(configSchema),
|
|
22
11
|
}))
|
|
23
12
|
.views(self => ({
|
|
24
|
-
/**
|
|
25
|
-
* #getter
|
|
26
|
-
*/
|
|
27
13
|
get rendererTypeName() {
|
|
28
14
|
return self.configuration.renderer.type;
|
|
29
15
|
},
|
|
30
|
-
/**
|
|
31
|
-
* #method
|
|
32
|
-
*/
|
|
33
16
|
renderProps() {
|
|
34
17
|
const view = getContainingView(self);
|
|
35
18
|
return {
|
|
@@ -47,8 +30,4 @@ const stateModelFactory = (configSchema) => {
|
|
|
47
30
|
},
|
|
48
31
|
}));
|
|
49
32
|
};
|
|
50
|
-
// http://localhost:3000/test_data/hs37d5.HG002-SequelII-CCS.sv.vcf.gz.tbi
|
|
51
|
-
// render request is for 1.5x the current viewing window
|
|
52
|
-
// tracks all have a height
|
|
53
|
-
//
|
|
54
33
|
export default stateModelFactory;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
3
|
export default function configSchemaF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
4
4
|
renderer: import("mobx-state-tree").IAnyModelType;
|
|
5
5
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { linearBasicDisplayConfigSchemaFactory } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
|
|
4
|
-
* #config LinearVariantDisplay
|
|
5
|
-
* mostly empty, this display type is very much
|
|
6
|
-
* like a `FeatureTrack` with a `LinearBasicDisplay` except it has a custom
|
|
7
|
-
* feature details widget
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
10
4
|
export default function configSchemaF(pluginManager) {
|
|
11
5
|
return ConfigurationSchema('LinearVariantDisplay', {}, {
|
|
12
|
-
/**
|
|
13
|
-
* #baseConfiguration
|
|
14
|
-
*/
|
|
15
6
|
baseConfiguration: linearBasicDisplayConfigSchemaFactory(pluginManager),
|
|
16
7
|
explicitlyTyped: true,
|
|
17
8
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearVariantDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
2
1
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
3
|
-
import
|
|
2
|
+
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
4
3
|
import configSchemaF from './configSchema';
|
|
4
|
+
import stateModelFactory from './model';
|
|
5
5
|
export default function LinearVariantDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaF(pluginManager);
|