@jbrowse/plugin-variants 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/ChordVariantDisplay/components/ChordVariantDisplay.d.ts +11 -0
- package/esm/ChordVariantDisplay/components/ChordVariantDisplay.js +16 -0
- package/esm/ChordVariantDisplay/components/DisplayError.d.ts +9 -0
- package/esm/ChordVariantDisplay/components/DisplayError.js +7 -0
- package/esm/ChordVariantDisplay/components/Loading.d.ts +8 -0
- package/esm/ChordVariantDisplay/components/Loading.js +28 -0
- package/esm/ChordVariantDisplay/index.js +4 -4
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +4 -5
- package/esm/ChordVariantDisplay/models/configSchema.js +10 -5
- package/esm/ChordVariantDisplay/models/renderReaction.d.ts +30 -0
- package/esm/ChordVariantDisplay/models/renderReaction.js +48 -0
- package/esm/ChordVariantDisplay/models/renderSvg.d.ts +6 -0
- package/esm/ChordVariantDisplay/models/renderSvg.js +12 -0
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +535 -46
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +146 -8
- package/esm/LinearVariantDisplay/configSchema.d.ts +5 -5
- package/esm/LinearVariantDisplay/configSchema.js +2 -2
- package/esm/LinearVariantDisplay/index.js +6 -4
- package/esm/LinearVariantDisplay/model.d.ts +1086 -103
- package/esm/LinearVariantDisplay/model.js +10 -26
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +8 -18
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +6 -44
- package/esm/MultiLinearVariantDisplay/configSchema.js +2 -2
- package/esm/MultiLinearVariantDisplay/index.js +4 -3
- package/esm/MultiLinearVariantDisplay/model.d.ts +1031 -125
- package/esm/MultiLinearVariantDisplay/model.js +3 -23
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/renderSvg.js +4 -4
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +8 -2
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +26 -23
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +9 -20
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +6 -6
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/index.js +5 -4
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +1110 -131
- package/esm/MultiLinearVariantMatrixDisplay/model.js +22 -48
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +4 -35
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +19 -33
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +12 -1
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +48 -22
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -2
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +155 -135
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -14
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +3 -60
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +9 -18
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +7 -6
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +30 -26
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantRenderer/index.js +4 -4
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +14 -11
- package/esm/MultiLinearVariantRenderer/makeImageData.js +127 -110
- package/esm/MultiLinearVariantRenderer/types.d.ts +3 -20
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +1 -1
- package/esm/SplitVcfTabixAdapter/configSchema.d.ts +2 -2
- package/esm/SplitVcfTabixAdapter/index.d.ts +1 -1
- package/esm/SplitVcfTabixAdapter/index.js +3 -3
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/Chord.js +41 -58
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -3
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/index.js +3 -3
- package/esm/Tooltip.js +2 -2
- package/esm/VariantFeatureWidget/AltFormatter.js +1 -1
- package/esm/VariantFeatureWidget/Formatter.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.d.ts +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.js +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +1 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +8 -23
- package/esm/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -29
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +5 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +68 -59
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +13 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +72 -30
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +2 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +49 -26
- package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +3 -5
- package/esm/VariantFeatureWidget/configSchema.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +39 -39
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -7
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +3 -14
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +4 -2
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +2 -5
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +2 -2
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +34 -19
- package/esm/VariantRPC/MultiVariantGetSources.js +2 -6
- package/esm/VariantRPC/executeClusterGenotypeMatrix.d.ts +22 -0
- package/esm/VariantRPC/executeClusterGenotypeMatrix.js +19 -0
- package/esm/VariantRPC/getGenotypeMatrix.d.ts +18 -3
- package/esm/VariantRPC/getGenotypeMatrix.js +23 -40
- package/esm/VariantRPC/types.d.ts +10 -24
- package/esm/VariantTrack/configSchema.d.ts +16 -11
- package/esm/VariantTrack/index.js +13 -2
- package/esm/VariantTrack/saveTrackFormats/vcf.d.ts +4 -0
- package/esm/VariantTrack/saveTrackFormats/vcf.js +15 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +6 -3
- package/esm/VcfAdapter/VcfAdapter.js +36 -24
- package/esm/VcfAdapter/configSchema.d.ts +2 -2
- package/esm/VcfAdapter/index.js +3 -2
- package/esm/VcfExtensionPoints/index.d.ts +2 -0
- package/esm/{extensionPoints.js → VcfExtensionPoints/index.js} +1 -1
- package/esm/VcfFeature/index.js +20 -8
- package/esm/VcfFeature/util.d.ts +0 -1
- package/esm/VcfFeature/util.js +70 -188
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +2 -0
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +28 -3
- package/esm/VcfTabixAdapter/configSchema.d.ts +5 -5
- package/esm/VcfTabixAdapter/configSchema.js +1 -1
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/VcfTabixAdapter/index.js +4 -3
- package/esm/d3-hierarchy2/accessors.d.ts +2 -0
- package/esm/d3-hierarchy2/accessors.js +8 -0
- package/esm/d3-hierarchy2/array.d.ts +2 -0
- package/esm/d3-hierarchy2/array.js +15 -0
- package/esm/d3-hierarchy2/cluster.d.ts +8 -0
- package/esm/d3-hierarchy2/cluster.js +63 -0
- package/esm/d3-hierarchy2/constant.d.ts +2 -0
- package/esm/d3-hierarchy2/constant.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
- package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
- package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
- package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
- package/esm/d3-hierarchy2/index.d.ts +15 -0
- package/esm/d3-hierarchy2/index.js +15 -0
- package/esm/d3-hierarchy2/lcg.d.ts +1 -0
- package/esm/d3-hierarchy2/lcg.js +7 -0
- package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
- package/esm/d3-hierarchy2/pack/enclose.js +84 -0
- package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
- package/esm/d3-hierarchy2/pack/index.js +68 -0
- package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
- package/esm/d3-hierarchy2/pack/siblings.js +94 -0
- package/esm/d3-hierarchy2/partition.d.ts +6 -0
- package/esm/d3-hierarchy2/partition.js +42 -0
- package/esm/d3-hierarchy2/stratify.d.ts +9 -0
- package/esm/d3-hierarchy2/stratify.js +115 -0
- package/esm/d3-hierarchy2/tree.d.ts +8 -0
- package/esm/d3-hierarchy2/tree.js +153 -0
- package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/binary.js +36 -0
- package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/dice.js +7 -0
- package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
- package/esm/d3-hierarchy2/treemap/index.js +72 -0
- package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
- package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
- package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/round.js +6 -0
- package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/slice.js +7 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
- package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
- package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +19 -22
- package/esm/shared/MultiVariantBaseModel.d.ts +1103 -117
- package/esm/shared/MultiVariantBaseModel.js +231 -65
- package/esm/shared/SharedVariantConfigSchema.d.ts +2 -40
- package/esm/shared/SharedVariantConfigSchema.js +1 -46
- package/esm/shared/components/AddFiltersDialog.d.ts +2 -3
- package/esm/shared/components/AddFiltersDialog.js +20 -28
- package/esm/shared/components/{ui/SetColorDialog.d.ts → BaseSetColorDialog.d.ts} +2 -1
- package/esm/shared/components/BaseSetColorDialog.js +61 -0
- package/esm/shared/components/ClearTreeWarningDialog.d.ts +4 -0
- package/esm/shared/components/ClearTreeWarningDialog.js +9 -0
- package/esm/shared/components/MAFFilterDialog.d.ts +2 -3
- package/esm/shared/components/MAFFilterDialog.js +4 -8
- package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +1 -1
- package/esm/shared/components/MultiVariantBaseDisplayComponent.js +8 -17
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +3 -3
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +9 -14
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +11 -15
- package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +3 -2
- package/esm/shared/components/MultiVariantColorLegend.d.ts +1 -1
- package/esm/shared/components/MultiVariantColorLegend.js +22 -12
- package/esm/shared/components/MultiVariantCrosshairs.d.ts +4 -2
- package/esm/shared/components/MultiVariantCrosshairs.js +31 -23
- package/esm/shared/components/MultiVariantLegendBar.d.ts +4 -4
- package/esm/shared/components/MultiVariantLegendBar.js +24 -22
- package/esm/shared/components/MultiVariantLegendBarWrapper.d.ts +7 -0
- package/esm/shared/components/MultiVariantLegendBarWrapper.js +18 -0
- package/esm/shared/components/MultiVariantTooltip.d.ts +5 -6
- package/esm/shared/components/MultiVariantTooltip.js +35 -17
- package/esm/shared/components/ScrollableVariantContainer.d.ts +8 -0
- package/esm/shared/components/ScrollableVariantContainer.js +23 -0
- package/esm/shared/components/SetColorDialog.d.ts +3 -2
- package/esm/shared/components/SetColorDialog.js +2 -2
- package/esm/shared/components/SetColorDialogBulkEditPanel.d.ts +7 -8
- package/esm/shared/components/SetColorDialogBulkEditPanel.js +24 -54
- package/esm/shared/components/SetColorDialogRowPalettizer.js +13 -23
- package/esm/shared/components/SetRowHeightDialog.d.ts +2 -3
- package/esm/shared/components/SourcesDataGrid.d.ts +1 -1
- package/esm/shared/components/SourcesDataGrid.js +1 -1
- package/esm/shared/components/SourcesGrid.d.ts +1 -1
- package/esm/shared/components/SourcesGrid.js +2 -2
- package/esm/shared/components/SourcesGridHeader.d.ts +1 -1
- package/esm/shared/components/SourcesGridHeader.js +1 -1
- package/esm/shared/components/SvgTree.d.ts +5 -0
- package/esm/shared/components/SvgTree.js +19 -0
- package/esm/shared/components/TreeSidebar.d.ts +5 -0
- package/esm/shared/components/TreeSidebar.js +121 -0
- package/esm/shared/components/types.d.ts +43 -0
- package/esm/shared/components/types.js +1 -0
- package/esm/shared/constants.d.ts +8 -2
- package/esm/shared/constants.js +11 -2
- package/esm/shared/drawAlleleCount.d.ts +2 -1
- package/esm/shared/drawAlleleCount.js +50 -16
- package/esm/shared/drawPhased.js +11 -12
- package/{dist → esm/shared}/getMultiVariantFeaturesAutorun.d.ts +5 -4
- package/esm/{getMultiVariantFeaturesAutorun.js → shared/getMultiVariantFeaturesAutorun.js} +9 -2
- package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts} +4 -3
- package/esm/{getMultiVariantSourcesAutorun.js → shared/getMultiVariantSourcesAutorun.js} +10 -2
- package/esm/shared/getSources.d.ts +1 -1
- package/esm/shared/getSources.js +2 -2
- package/esm/shared/hooks/useMouseTracking.d.ts +6 -0
- package/esm/shared/hooks/useMouseTracking.js +34 -0
- package/esm/shared/makeSidebarSvg.d.ts +9 -0
- package/esm/shared/makeSidebarSvg.js +9 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -5
- package/esm/shared/minorAlleleFrequencyUtils.js +37 -38
- package/esm/shared/setupMultiVariantAutoruns.d.ts +2 -0
- package/esm/shared/setupMultiVariantAutoruns.js +8 -0
- package/esm/shared/treeDrawingAutorun.d.ts +16 -0
- package/esm/shared/treeDrawingAutorun.js +71 -0
- package/esm/shared/types.d.ts +15 -0
- package/package.json +38 -39
- package/dist/ChordVariantDisplay/index.d.ts +0 -2
- package/dist/ChordVariantDisplay/index.js +0 -25
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +0 -12
- package/dist/ChordVariantDisplay/models/configSchema.js +0 -15
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +0 -115
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -35
- package/dist/LinearVariantDisplay/configSchema.d.ts +0 -34
- package/dist/LinearVariantDisplay/configSchema.js +0 -12
- package/dist/LinearVariantDisplay/index.d.ts +0 -2
- package/dist/LinearVariantDisplay/index.js +0 -24
- package/dist/LinearVariantDisplay/model.d.ts +0 -278
- package/dist/LinearVariantDisplay/model.js +0 -37
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +0 -29
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +0 -80
- package/dist/MultiLinearVariantDisplay/configSchema.js +0 -30
- package/dist/MultiLinearVariantDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantDisplay/index.js +0 -57
- package/dist/MultiLinearVariantDisplay/model.d.ts +0 -422
- package/dist/MultiLinearVariantDisplay/model.js +0 -82
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantDisplay/renderSvg.js +0 -15
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +0 -6
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +0 -83
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +0 -31
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +0 -22
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixDisplay/index.js +0 -24
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +0 -431
- package/dist/MultiLinearVariantMatrixDisplay/model.js +0 -125
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +0 -17
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +0 -87
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +0 -8
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +0 -41
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +0 -6
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/index.js +0 -20
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +0 -154
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/types.js +0 -2
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +0 -63
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +0 -79
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +0 -33
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +0 -67
- package/dist/MultiLinearVariantRenderer/components/util.d.ts +0 -1
- package/dist/MultiLinearVariantRenderer/components/util.js +0 -15
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/configSchema.js +0 -8
- package/dist/MultiLinearVariantRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/index.js +0 -19
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantRenderer/makeImageData.js +0 -140
- package/dist/MultiLinearVariantRenderer/types.d.ts +0 -21
- package/dist/MultiLinearVariantRenderer/types.js +0 -2
- package/dist/MultiVariantBaseRenderer.d.ts +0 -46
- package/dist/MultiVariantBaseRenderer.js +0 -39
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -18
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -92
- package/dist/SplitVcfTabixAdapter/configSchema.d.ts +0 -23
- package/dist/SplitVcfTabixAdapter/configSchema.js +0 -29
- package/dist/SplitVcfTabixAdapter/index.d.ts +0 -3
- package/dist/SplitVcfTabixAdapter/index.js +0 -52
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +0 -13
- package/dist/StructuralVariantChordRenderer/Chord.js +0 -82
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +0 -16
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -30
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -21
- package/dist/StructuralVariantChordRenderer/configSchema.js +0 -25
- package/dist/StructuralVariantChordRenderer/index.d.ts +0 -2
- package/dist/StructuralVariantChordRenderer/index.js +0 -18
- package/dist/StructuralVariantChordRenderer/types.d.ts +0 -17
- package/dist/StructuralVariantChordRenderer/types.js +0 -2
- package/dist/Tooltip.d.ts +0 -19
- package/dist/Tooltip.js +0 -32
- package/dist/VariantFeatureWidget/AltFormatter.d.ts +0 -4
- package/dist/VariantFeatureWidget/AltFormatter.js +0 -13
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/dist/VariantFeatureWidget/Checkbox2.js +0 -8
- package/dist/VariantFeatureWidget/Formatter.d.ts +0 -3
- package/dist/VariantFeatureWidget/Formatter.js +0 -23
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +0 -7
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +0 -111
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -60
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +0 -15
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.js +0 -18
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -103
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +0 -4
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +0 -80
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.d.ts +0 -9
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +0 -10
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +0 -54
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +0 -51
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +0 -21
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +0 -2
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +0 -14
- package/dist/VariantFeatureWidget/configSchema.d.ts +0 -1
- package/dist/VariantFeatureWidget/configSchema.js +0 -5
- package/dist/VariantFeatureWidget/index.d.ts +0 -2
- package/dist/VariantFeatureWidget/index.js +0 -52
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +0 -104
- package/dist/VariantFeatureWidget/stateModelFactory.js +0 -12
- package/dist/VariantFeatureWidget/types.d.ts +0 -16
- package/dist/VariantFeatureWidget/types.js +0 -2
- package/dist/VariantFeatureWidget/variantFieldDescriptions.d.ts +0 -9
- package/dist/VariantFeatureWidget/variantFieldDescriptions.js +0 -12
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +0 -30
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +0 -21
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +0 -19
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +0 -58
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantGetSources.js +0 -22
- package/dist/VariantRPC/getGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/getGenotypeMatrix.js +0 -68
- package/dist/VariantRPC/types.d.ts +0 -36
- package/dist/VariantRPC/types.js +0 -2
- package/dist/VariantTrack/configSchema.d.ts +0 -79
- package/dist/VariantTrack/configSchema.js +0 -10
- package/dist/VariantTrack/index.d.ts +0 -2
- package/dist/VariantTrack/index.js +0 -20
- package/dist/VcfAdapter/VcfAdapter.d.ts +0 -35
- package/dist/VcfAdapter/VcfAdapter.js +0 -119
- package/dist/VcfAdapter/configSchema.d.ts +0 -18
- package/dist/VcfAdapter/configSchema.js +0 -35
- package/dist/VcfAdapter/index.d.ts +0 -2
- package/dist/VcfAdapter/index.js +0 -49
- package/dist/VcfAdapter/vcfParser.d.ts +0 -7
- package/dist/VcfAdapter/vcfParser.js +0 -26
- package/dist/VcfFeature/index.d.ts +0 -19
- package/dist/VcfFeature/index.js +0 -80
- package/dist/VcfFeature/util.d.ts +0 -6
- package/dist/VcfFeature/util.js +0 -227
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -25
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -117
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -32
- package/dist/VcfTabixAdapter/configSchema.js +0 -56
- package/dist/VcfTabixAdapter/index.d.ts +0 -3
- package/dist/VcfTabixAdapter/index.js +0 -52
- package/dist/extensionPoints.d.ts +0 -2
- package/dist/extensionPoints.js +0 -39
- package/dist/getMultiVariantFeaturesAutorun.js +0 -48
- package/dist/getMultiVariantSourcesAutorun.d.ts +0 -11
- package/dist/getMultiVariantSourcesAutorun.js +0 -38
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -52
- package/dist/shared/MultiVariantBaseModel.d.ts +0 -413
- package/dist/shared/MultiVariantBaseModel.js +0 -373
- package/dist/shared/SharedVariantConfigSchema.d.ts +0 -66
- package/dist/shared/SharedVariantConfigSchema.js +0 -56
- package/dist/shared/SharedVariantMixin.d.ts +0 -325
- package/dist/shared/SharedVariantMixin.js +0 -58
- package/dist/shared/components/AddFiltersDialog.d.ts +0 -9
- package/dist/shared/components/AddFiltersDialog.js +0 -61
- package/dist/shared/components/MAFFilterDialog.d.ts +0 -8
- package/dist/shared/components/MAFFilterDialog.js +0 -28
- package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +0 -5
- package/dist/shared/components/MultiVariantBaseDisplayComponent.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +0 -6
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +0 -74
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +0 -145
- package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +0 -10
- package/dist/shared/components/MultiVariantClusterDialog/types.js +0 -2
- package/dist/shared/components/MultiVariantColorLegend.d.ts +0 -10
- package/dist/shared/components/MultiVariantColorLegend.js +0 -24
- package/dist/shared/components/MultiVariantCrosshairs.d.ts +0 -7
- package/dist/shared/components/MultiVariantCrosshairs.js +0 -40
- package/dist/shared/components/MultiVariantLegendBar.d.ts +0 -7
- package/dist/shared/components/MultiVariantLegendBar.js +0 -32
- package/dist/shared/components/MultiVariantTooltip.d.ts +0 -10
- package/dist/shared/components/MultiVariantTooltip.js +0 -24
- package/dist/shared/components/RectBg.d.ts +0 -8
- package/dist/shared/components/RectBg.js +0 -10
- package/dist/shared/components/SetColorDialog.d.ts +0 -11
- package/dist/shared/components/SetColorDialog.js +0 -12
- package/dist/shared/components/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/components/SetMinMaxDialog.d.ts +0 -10
- package/dist/shared/components/SetMinMaxDialog.js +0 -26
- package/dist/shared/components/SetRowHeightDialog.d.ts +0 -8
- package/dist/shared/components/SetRowHeightDialog.js +0 -18
- package/dist/shared/components/SourcesDataGrid.d.ts +0 -7
- package/dist/shared/components/SourcesDataGrid.js +0 -68
- package/dist/shared/components/SourcesGrid.d.ts +0 -7
- package/dist/shared/components/SourcesGrid.js +0 -14
- package/dist/shared/components/SourcesGridHeader.d.ts +0 -8
- package/dist/shared/components/SourcesGridHeader.js +0 -41
- package/dist/shared/components/ui/SetColorDialog.d.ts +0 -31
- package/dist/shared/components/ui/SetColorDialog.js +0 -51
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/constants.d.ts +0 -2
- package/dist/shared/constants.js +0 -5
- package/dist/shared/drawAlleleCount.d.ts +0 -2
- package/dist/shared/drawAlleleCount.js +0 -50
- package/dist/shared/drawPhased.d.ts +0 -1
- package/dist/shared/drawPhased.js +0 -25
- package/dist/shared/findSecondLargestNumber.d.ts +0 -0
- package/dist/shared/findSecondLargestNumber.js +0 -1
- package/dist/shared/getSources.d.ts +0 -15
- package/dist/shared/getSources.js +0 -34
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +0 -14
- package/dist/shared/minorAlleleFrequencyUtils.js +0 -72
- package/dist/shared/sourcesGridUtils.d.ts +0 -11
- package/dist/shared/sourcesGridUtils.js +0 -32
- package/dist/shared/types.d.ts +0 -14
- package/dist/shared/types.js +0 -2
- package/dist/shared/util.d.ts +0 -2
- package/dist/shared/util.js +0 -21
- package/dist/util.d.ts +0 -0
- package/dist/util.js +0 -1
- package/esm/MultiVariantBaseRenderer.d.ts +0 -46
- package/esm/MultiVariantBaseRenderer.js +0 -33
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/esm/VariantFeatureWidget/Checkbox2.js +0 -5
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -24
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +0 -11
- package/esm/extensionPoints.d.ts +0 -2
- package/esm/getMultiVariantFeaturesAutorun.d.ts +0 -18
- package/esm/shared/SharedVariantMixin.d.ts +0 -325
- package/esm/shared/SharedVariantMixin.js +0 -55
- package/esm/shared/components/ui/SetColorDialog.js +0 -45
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -81
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.js +0 -4
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.js +0 -38
- package/esm/shared/findSecondLargestNumber.d.ts +0 -0
- package/esm/shared/findSecondLargestNumber.js +0 -1
- package/esm/shared/util.d.ts +0 -2
- package/esm/shared/util.js +0 -17
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
+
import { fromNewick } from '@gmod/hclust';
|
|
2
3
|
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
3
4
|
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
5
|
+
import { set1 } from '@jbrowse/core/ui/colors';
|
|
4
6
|
import { getSession } from '@jbrowse/core/util';
|
|
5
7
|
import { stopStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
|
+
import { cast, isAlive, types } from '@jbrowse/mobx-state-tree';
|
|
6
9
|
import { linearBareDisplayStateModelFactory } from '@jbrowse/plugin-linear-genome-view';
|
|
7
10
|
import CategoryIcon from '@mui/icons-material/Category';
|
|
8
11
|
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
9
12
|
import HeightIcon from '@mui/icons-material/Height';
|
|
10
13
|
import SplitscreenIcon from '@mui/icons-material/Splitscreen';
|
|
11
14
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
15
|
+
import { ascending } from '@mui/x-charts-vendor/d3-array';
|
|
12
16
|
import deepEqual from 'fast-deep-equal';
|
|
13
|
-
import {
|
|
14
|
-
import { getSources } from
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
17
|
+
import { NO_CALL_COLOR, OTHER_ALT_COLOR, REFERENCE_COLOR, UNPHASED_COLOR, getAltColorForDosage, } from "./constants.js";
|
|
18
|
+
import { getSources } from "./getSources.js";
|
|
19
|
+
import { cluster, hierarchy } from "../d3-hierarchy2/index.js";
|
|
20
|
+
const SetColorDialog = lazy(() => import("./components/SetColorDialog.js"));
|
|
21
|
+
const MAFFilterDialog = lazy(() => import("./components/MAFFilterDialog.js"));
|
|
22
|
+
const AddFiltersDialog = lazy(() => import("./components/AddFiltersDialog.js"));
|
|
23
|
+
const ClusterDialog = lazy(() => import("./components/MultiVariantClusterDialog/ClusterDialog.js"));
|
|
24
|
+
const SetRowHeightDialog = lazy(() => import("./components/SetRowHeightDialog.js"));
|
|
20
25
|
export default function MultiVariantBaseModelF(configSchema) {
|
|
21
26
|
return types
|
|
22
27
|
.compose('LinearVariantMatrixDisplay', linearBareDisplayStateModelFactory(configSchema), types.model({
|
|
@@ -24,13 +29,16 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
24
29
|
layout: types.optional(types.frozen(), []),
|
|
25
30
|
configuration: ConfigurationReference(configSchema),
|
|
26
31
|
minorAlleleFrequencyFilter: types.optional(types.number, 0),
|
|
27
|
-
showSidebarLabelsSetting: true,
|
|
32
|
+
showSidebarLabelsSetting: types.optional(types.boolean, true),
|
|
33
|
+
showTree: types.optional(types.boolean, true),
|
|
28
34
|
renderingMode: types.optional(types.string, 'alleleCount'),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
lengthCutoffFilter: Number.MAX_SAFE_INTEGER,
|
|
35
|
+
rowHeightMode: types.optional(types.union(types.literal('auto'), types.number), 'auto'),
|
|
36
|
+
lengthCutoffFilter: types.optional(types.number, Number.MAX_SAFE_INTEGER),
|
|
32
37
|
jexlFilters: types.maybe(types.array(types.string)),
|
|
33
|
-
referenceDrawingMode: 'skip',
|
|
38
|
+
referenceDrawingMode: types.optional(types.string, 'skip'),
|
|
39
|
+
clusterTree: types.maybe(types.string),
|
|
40
|
+
treeAreaWidth: types.optional(types.number, 80),
|
|
41
|
+
lineZoneHeight: types.optional(types.number, 0),
|
|
34
42
|
}))
|
|
35
43
|
.volatile(() => ({
|
|
36
44
|
sourcesLoadingStopToken: undefined,
|
|
@@ -41,37 +49,63 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
41
49
|
hasPhased: false,
|
|
42
50
|
sampleInfo: undefined,
|
|
43
51
|
hoveredGenotype: undefined,
|
|
52
|
+
hoveredTreeNode: undefined,
|
|
53
|
+
treeCanvas: undefined,
|
|
54
|
+
mouseoverCanvas: undefined,
|
|
44
55
|
}))
|
|
45
56
|
.actions(self => ({
|
|
46
57
|
setJexlFilters(f) {
|
|
47
58
|
self.jexlFilters = cast(f);
|
|
48
59
|
},
|
|
49
60
|
setRowHeight(arg) {
|
|
50
|
-
self.
|
|
61
|
+
self.rowHeightMode = arg;
|
|
51
62
|
},
|
|
52
63
|
setHoveredGenotype(arg) {
|
|
53
64
|
self.hoveredGenotype = arg;
|
|
54
65
|
},
|
|
66
|
+
setHoveredTreeNode(node) {
|
|
67
|
+
self.hoveredTreeNode = node;
|
|
68
|
+
},
|
|
69
|
+
setTreeCanvasRef(ref) {
|
|
70
|
+
self.treeCanvas = ref || undefined;
|
|
71
|
+
},
|
|
72
|
+
setMouseoverCanvasRef(ref) {
|
|
73
|
+
self.mouseoverCanvas = ref || undefined;
|
|
74
|
+
},
|
|
75
|
+
setTreeAreaWidth(width) {
|
|
76
|
+
self.treeAreaWidth = width;
|
|
77
|
+
},
|
|
55
78
|
setFeatures(f) {
|
|
56
79
|
self.featuresVolatile = f;
|
|
57
80
|
},
|
|
58
|
-
setLayout(layout) {
|
|
81
|
+
setLayout(layout, clearTree = true) {
|
|
82
|
+
const orderChanged = clearTree &&
|
|
83
|
+
self.clusterTree &&
|
|
84
|
+
self.layout.length === layout.length &&
|
|
85
|
+
self.layout.some((source, idx) => source.name !== layout[idx]?.name);
|
|
59
86
|
self.layout = layout;
|
|
87
|
+
if (orderChanged) {
|
|
88
|
+
self.clusterTree = undefined;
|
|
89
|
+
}
|
|
60
90
|
},
|
|
61
91
|
clearLayout() {
|
|
62
92
|
self.layout = [];
|
|
93
|
+
self.clusterTree = undefined;
|
|
63
94
|
},
|
|
64
|
-
|
|
95
|
+
setClusterTree(tree) {
|
|
96
|
+
self.clusterTree = tree;
|
|
97
|
+
},
|
|
98
|
+
setSourcesLoading(token) {
|
|
65
99
|
if (self.sourcesLoadingStopToken) {
|
|
66
100
|
stopStopToken(self.sourcesLoadingStopToken);
|
|
67
101
|
}
|
|
68
|
-
self.sourcesLoadingStopToken =
|
|
102
|
+
self.sourcesLoadingStopToken = token;
|
|
69
103
|
},
|
|
70
|
-
setSimplifiedFeaturesLoading(
|
|
104
|
+
setSimplifiedFeaturesLoading(token) {
|
|
71
105
|
if (self.simplifiedFeaturesStopToken) {
|
|
72
106
|
stopStopToken(self.simplifiedFeaturesStopToken);
|
|
73
107
|
}
|
|
74
|
-
self.simplifiedFeaturesStopToken =
|
|
108
|
+
self.simplifiedFeaturesStopToken = token;
|
|
75
109
|
},
|
|
76
110
|
setSources(sources) {
|
|
77
111
|
if (!deepEqual(sources, self.sourcesVolatile)) {
|
|
@@ -84,11 +118,14 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
84
118
|
setShowSidebarLabels(arg) {
|
|
85
119
|
self.showSidebarLabelsSetting = arg;
|
|
86
120
|
},
|
|
121
|
+
setShowTree(arg) {
|
|
122
|
+
self.showTree = arg;
|
|
123
|
+
},
|
|
87
124
|
setPhasedMode(arg) {
|
|
88
125
|
self.renderingMode = arg;
|
|
89
126
|
},
|
|
90
|
-
setAutoHeight(
|
|
91
|
-
self.
|
|
127
|
+
setAutoHeight(auto) {
|
|
128
|
+
self.rowHeightMode = auto ? 'auto' : 10;
|
|
92
129
|
},
|
|
93
130
|
setHasPhased(arg) {
|
|
94
131
|
self.hasPhased = arg;
|
|
@@ -103,12 +140,12 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
103
140
|
},
|
|
104
141
|
}))
|
|
105
142
|
.views(self => ({
|
|
106
|
-
get
|
|
107
|
-
|
|
108
|
-
return ((_a = self.jexlFilters) !== null && _a !== void 0 ? _a : getConf(self, 'jexlFilters').map((r) => `jexl:${r}`));
|
|
143
|
+
get autoHeight() {
|
|
144
|
+
return self.rowHeightMode === 'auto';
|
|
109
145
|
},
|
|
110
|
-
get
|
|
111
|
-
return self.
|
|
146
|
+
get activeFilters() {
|
|
147
|
+
return (self.jexlFilters ??
|
|
148
|
+
getConf(self, 'jexlFilters').map((r) => `jexl:${r}`));
|
|
112
149
|
},
|
|
113
150
|
get sourcesWithoutLayout() {
|
|
114
151
|
return self.sourcesVolatile
|
|
@@ -131,39 +168,101 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
131
168
|
})
|
|
132
169
|
: undefined;
|
|
133
170
|
},
|
|
171
|
+
get root() {
|
|
172
|
+
const newick = self.clusterTree;
|
|
173
|
+
if (!newick) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
const tree = fromNewick(newick);
|
|
177
|
+
return hierarchy(tree, (d) => d.children)
|
|
178
|
+
.sum((d) => (d.children ? 0 : 1))
|
|
179
|
+
.sort((a, b) => ascending(a.data.height || 1, b.data.height || 1));
|
|
180
|
+
},
|
|
134
181
|
}))
|
|
135
182
|
.views(self => {
|
|
136
|
-
const {
|
|
183
|
+
const { renderProps: superRenderProps } = self;
|
|
137
184
|
return {
|
|
138
185
|
get sourceMap() {
|
|
139
186
|
return self.sources
|
|
140
187
|
? Object.fromEntries(self.sources.map(source => [source.name, source]))
|
|
141
188
|
: undefined;
|
|
142
189
|
},
|
|
190
|
+
get availableHeight() {
|
|
191
|
+
return self.height - self.lineZoneHeight;
|
|
192
|
+
},
|
|
193
|
+
get nrow() {
|
|
194
|
+
return self.sources?.length || 1;
|
|
195
|
+
},
|
|
143
196
|
get rowHeight() {
|
|
144
|
-
|
|
145
|
-
|
|
197
|
+
return self.rowHeightMode === 'auto'
|
|
198
|
+
? this.availableHeight / this.nrow
|
|
199
|
+
: self.rowHeightMode;
|
|
200
|
+
},
|
|
201
|
+
get hierarchy() {
|
|
202
|
+
const r = self.root;
|
|
203
|
+
if (!r || !self.sources?.length) {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
const clust = cluster();
|
|
207
|
+
clust.size([this.rowHeight * this.nrow, self.treeAreaWidth]);
|
|
208
|
+
clust.separation(() => 1);
|
|
209
|
+
clust(r);
|
|
210
|
+
return r;
|
|
146
211
|
},
|
|
147
212
|
adapterProps() {
|
|
148
|
-
const superProps = superRenderProps();
|
|
149
213
|
return {
|
|
150
|
-
...
|
|
151
|
-
rpcDriverName: self.rpcDriverName,
|
|
152
|
-
displayModel: self,
|
|
214
|
+
...superRenderProps(),
|
|
153
215
|
config: self.rendererConfig,
|
|
154
216
|
};
|
|
155
217
|
},
|
|
218
|
+
};
|
|
219
|
+
})
|
|
220
|
+
.views(self => {
|
|
221
|
+
const { trackMenuItems: superTrackMenuItems } = self;
|
|
222
|
+
return {
|
|
156
223
|
trackMenuItems() {
|
|
157
224
|
return [
|
|
158
225
|
...superTrackMenuItems(),
|
|
159
226
|
{
|
|
160
|
-
label: 'Show
|
|
227
|
+
label: 'Show...',
|
|
161
228
|
icon: VisibilityIcon,
|
|
162
|
-
type: '
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
229
|
+
type: 'subMenu',
|
|
230
|
+
subMenu: [
|
|
231
|
+
{
|
|
232
|
+
label: 'Show sidebar labels',
|
|
233
|
+
type: 'checkbox',
|
|
234
|
+
checked: self.showSidebarLabelsSetting,
|
|
235
|
+
onClick: () => {
|
|
236
|
+
self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: 'Show tree',
|
|
241
|
+
type: 'checkbox',
|
|
242
|
+
checked: self.showTree,
|
|
243
|
+
disabled: !self.clusterTree,
|
|
244
|
+
onClick: () => {
|
|
245
|
+
self.setShowTree(!self.showTree);
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: 'Show reference alleles',
|
|
250
|
+
helpText: 'When this setting is off, the background is colored solid grey and only ALT alleles are colored on top of it. This makes it easier to see potentially overlapping structural variants',
|
|
251
|
+
type: 'checkbox',
|
|
252
|
+
checked: self.referenceDrawingMode !== 'skip',
|
|
253
|
+
onClick: () => {
|
|
254
|
+
self.setReferenceDrawingMode(self.referenceDrawingMode === 'skip' ? 'draw' : 'skip');
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
label: 'Show legend',
|
|
259
|
+
type: 'checkbox',
|
|
260
|
+
checked: self.showLegend,
|
|
261
|
+
onClick: () => {
|
|
262
|
+
self.setShowLegend(!self.showLegend);
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
],
|
|
167
266
|
},
|
|
168
267
|
{
|
|
169
268
|
label: 'Row height',
|
|
@@ -197,7 +296,8 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
197
296
|
icon: SplitscreenIcon,
|
|
198
297
|
subMenu: [
|
|
199
298
|
{
|
|
200
|
-
label: 'Allele count',
|
|
299
|
+
label: 'Allele count (dosage)',
|
|
300
|
+
helpText: 'Draws the color darker the more times this allele exists, so homozygous variants are darker than heterozygous. Works on polyploid also',
|
|
201
301
|
type: 'radio',
|
|
202
302
|
checked: self.renderingMode === 'alleleCount',
|
|
203
303
|
onClick: () => {
|
|
@@ -208,6 +308,7 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
208
308
|
label: `Phased${!self.hasPhased
|
|
209
309
|
? ' (disabled, no phased variants found)'
|
|
210
310
|
: ''}`,
|
|
311
|
+
helpText: 'Phased mode splits each sample into multiple rows representing each haplotype, and the phasing of the variants is used to color the variant in the individual haplotype rows. For example, a diploid sample SAMPLE1 will generate two rows SAMPLE1-HP0 and SAMPLE1 HP1 and a variant 1|0 will draw a box in the top row but not the bottom row',
|
|
211
312
|
disabled: !self.hasPhased,
|
|
212
313
|
checked: self.renderingMode === 'phased',
|
|
213
314
|
type: 'radio',
|
|
@@ -217,28 +318,6 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
217
318
|
},
|
|
218
319
|
],
|
|
219
320
|
},
|
|
220
|
-
{
|
|
221
|
-
label: 'Reference mode',
|
|
222
|
-
type: 'subMenu',
|
|
223
|
-
subMenu: [
|
|
224
|
-
{
|
|
225
|
-
label: 'Fill background grey, skip reference allele mouseovers (helps with large overlapping SVs)',
|
|
226
|
-
type: 'radio',
|
|
227
|
-
checked: self.referenceDrawingMode === 'skip',
|
|
228
|
-
onClick: () => {
|
|
229
|
-
self.setReferenceDrawingMode('skip');
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: "Don't fill background grey, only draw actual reference alleles as grey",
|
|
234
|
-
type: 'radio',
|
|
235
|
-
checked: self.referenceDrawingMode === 'draw',
|
|
236
|
-
onClick: () => {
|
|
237
|
-
self.setReferenceDrawingMode('draw');
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
],
|
|
241
|
-
},
|
|
242
321
|
{
|
|
243
322
|
label: 'Filter by',
|
|
244
323
|
icon: FilterListIcon,
|
|
@@ -300,15 +379,29 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
300
379
|
})
|
|
301
380
|
.views(self => ({
|
|
302
381
|
get canDisplayLabels() {
|
|
303
|
-
return self.rowHeight >=
|
|
382
|
+
return self.rowHeight >= 6 && self.showSidebarLabelsSetting;
|
|
304
383
|
},
|
|
305
384
|
get totalHeight() {
|
|
306
|
-
|
|
307
|
-
return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
|
|
385
|
+
return self.rowHeight * (self.sources?.length || 1);
|
|
308
386
|
},
|
|
309
387
|
get featuresReady() {
|
|
310
388
|
return !!self.featuresVolatile;
|
|
311
389
|
},
|
|
390
|
+
getPortableSettings() {
|
|
391
|
+
return {
|
|
392
|
+
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
393
|
+
showSidebarLabelsSetting: self.showSidebarLabelsSetting,
|
|
394
|
+
showTree: self.showTree,
|
|
395
|
+
renderingMode: self.renderingMode,
|
|
396
|
+
lengthCutoffFilter: self.lengthCutoffFilter,
|
|
397
|
+
jexlFilters: self.jexlFilters,
|
|
398
|
+
referenceDrawingMode: self.referenceDrawingMode,
|
|
399
|
+
clusterTree: self.clusterTree,
|
|
400
|
+
treeAreaWidth: self.treeAreaWidth,
|
|
401
|
+
layout: self.layout,
|
|
402
|
+
height: self.height,
|
|
403
|
+
};
|
|
404
|
+
},
|
|
312
405
|
}))
|
|
313
406
|
.views(self => ({
|
|
314
407
|
renderProps() {
|
|
@@ -330,5 +423,78 @@ export default function MultiVariantBaseModelF(configSchema) {
|
|
|
330
423
|
}),
|
|
331
424
|
};
|
|
332
425
|
},
|
|
333
|
-
|
|
426
|
+
legendItems() {
|
|
427
|
+
if (self.renderingMode === 'phased') {
|
|
428
|
+
let maxAltAlleles = 1;
|
|
429
|
+
const features = self.featuresVolatile;
|
|
430
|
+
if (features) {
|
|
431
|
+
for (const feature of features) {
|
|
432
|
+
const alt = feature.get('ALT');
|
|
433
|
+
if (alt && alt.length > maxAltAlleles) {
|
|
434
|
+
maxAltAlleles = alt.length;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
const items = [
|
|
439
|
+
{ color: REFERENCE_COLOR, label: 'Reference' },
|
|
440
|
+
{ color: set1[0], label: 'Alt allele 1' },
|
|
441
|
+
];
|
|
442
|
+
if (maxAltAlleles >= 2) {
|
|
443
|
+
items.push({ color: set1[1], label: 'Alt allele 2' });
|
|
444
|
+
}
|
|
445
|
+
if (maxAltAlleles >= 3) {
|
|
446
|
+
items.push({ color: set1[2], label: 'Alt allele 3' });
|
|
447
|
+
}
|
|
448
|
+
items.push({ color: UNPHASED_COLOR, label: 'Unphased' });
|
|
449
|
+
return items;
|
|
450
|
+
}
|
|
451
|
+
return [
|
|
452
|
+
{ color: REFERENCE_COLOR, label: 'Homozygous reference' },
|
|
453
|
+
{ color: getAltColorForDosage(0.5), label: 'Heterozygous alt' },
|
|
454
|
+
{ color: getAltColorForDosage(1), label: 'Homozygous alt' },
|
|
455
|
+
{ color: OTHER_ALT_COLOR, label: 'Other alt allele' },
|
|
456
|
+
{ color: NO_CALL_COLOR, label: 'No call' },
|
|
457
|
+
];
|
|
458
|
+
},
|
|
459
|
+
}))
|
|
460
|
+
.actions(self => ({
|
|
461
|
+
afterAttach() {
|
|
462
|
+
;
|
|
463
|
+
(async () => {
|
|
464
|
+
try {
|
|
465
|
+
const { setupMultiVariantAutoruns } = await import("./setupMultiVariantAutoruns.js");
|
|
466
|
+
setupMultiVariantAutoruns(self);
|
|
467
|
+
}
|
|
468
|
+
catch (e) {
|
|
469
|
+
if (isAlive(self)) {
|
|
470
|
+
console.error(e);
|
|
471
|
+
getSession(self).notifyError(`${e}`, e);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
})();
|
|
475
|
+
},
|
|
476
|
+
}))
|
|
477
|
+
.postProcessSnapshot(snap => {
|
|
478
|
+
if (!snap) {
|
|
479
|
+
return snap;
|
|
480
|
+
}
|
|
481
|
+
const { layout, minorAlleleFrequencyFilter, showSidebarLabelsSetting, showTree, renderingMode, rowHeightMode, lengthCutoffFilter, jexlFilters, referenceDrawingMode, clusterTree, treeAreaWidth, lineZoneHeight, ...rest } = snap;
|
|
482
|
+
return {
|
|
483
|
+
...rest,
|
|
484
|
+
...(layout.length ? { layout } : {}),
|
|
485
|
+
...(minorAlleleFrequencyFilter ? { minorAlleleFrequencyFilter } : {}),
|
|
486
|
+
...(!showSidebarLabelsSetting ? { showSidebarLabelsSetting } : {}),
|
|
487
|
+
...(!showTree ? { showTree } : {}),
|
|
488
|
+
...(renderingMode !== 'alleleCount' ? { renderingMode } : {}),
|
|
489
|
+
...(rowHeightMode !== 'auto' ? { rowHeightMode } : {}),
|
|
490
|
+
...(lengthCutoffFilter !== Number.MAX_SAFE_INTEGER
|
|
491
|
+
? { lengthCutoffFilter }
|
|
492
|
+
: {}),
|
|
493
|
+
...(jexlFilters?.length ? { jexlFilters } : {}),
|
|
494
|
+
...(referenceDrawingMode !== 'skip' ? { referenceDrawingMode } : {}),
|
|
495
|
+
...(clusterTree !== undefined ? { clusterTree } : {}),
|
|
496
|
+
...(treeAreaWidth !== 80 ? { treeAreaWidth } : {}),
|
|
497
|
+
...(lineZoneHeight ? { lineZoneHeight } : {}),
|
|
498
|
+
};
|
|
499
|
+
});
|
|
334
500
|
}
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
export default function sharedVariantConfigFactory(): import("
|
|
2
|
-
autoscale: {
|
|
3
|
-
type: string;
|
|
4
|
-
defaultValue: string;
|
|
5
|
-
model: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
minimalTicks: {
|
|
9
|
-
type: string;
|
|
10
|
-
defaultValue: boolean;
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
13
|
-
minScore: {
|
|
14
|
-
type: string;
|
|
15
|
-
defaultValue: number;
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
18
|
-
maxScore: {
|
|
19
|
-
type: string;
|
|
20
|
-
description: string;
|
|
21
|
-
defaultValue: number;
|
|
22
|
-
};
|
|
23
|
-
numStdDev: {
|
|
24
|
-
type: string;
|
|
25
|
-
description: string;
|
|
26
|
-
defaultValue: number;
|
|
27
|
-
};
|
|
28
|
-
scaleType: {
|
|
29
|
-
type: string;
|
|
30
|
-
model: import("mobx-state-tree").ISimpleType<string>;
|
|
31
|
-
description: string;
|
|
32
|
-
defaultValue: string;
|
|
33
|
-
};
|
|
34
|
-
inverted: {
|
|
35
|
-
type: string;
|
|
36
|
-
description: string;
|
|
37
|
-
defaultValue: boolean;
|
|
38
|
-
};
|
|
39
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
1
|
+
export default function sharedVariantConfigFactory(): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
40
2
|
maxFeatureScreenDensity: {
|
|
41
3
|
type: string;
|
|
42
4
|
description: string;
|
|
@@ -63,4 +25,4 @@ export default function sharedVariantConfigFactory(): import("@jbrowse/core/conf
|
|
|
63
25
|
description: string;
|
|
64
26
|
defaultValue: never[];
|
|
65
27
|
};
|
|
66
|
-
}, import("
|
|
28
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -1,52 +1,7 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
import { types } from 'mobx-state-tree';
|
|
4
3
|
export default function sharedVariantConfigFactory() {
|
|
5
|
-
return ConfigurationSchema('SharedVariantDisplay', {
|
|
6
|
-
autoscale: {
|
|
7
|
-
type: 'stringEnum',
|
|
8
|
-
defaultValue: 'local',
|
|
9
|
-
model: types.enumeration('Autoscale type', [
|
|
10
|
-
'global',
|
|
11
|
-
'local',
|
|
12
|
-
'globalsd',
|
|
13
|
-
'localsd',
|
|
14
|
-
'zscore',
|
|
15
|
-
]),
|
|
16
|
-
description: 'global/local using their min/max values or w/ standard deviations (globalsd/localsd)',
|
|
17
|
-
},
|
|
18
|
-
minimalTicks: {
|
|
19
|
-
type: 'boolean',
|
|
20
|
-
defaultValue: false,
|
|
21
|
-
description: 'use the minimal amount of ticks',
|
|
22
|
-
},
|
|
23
|
-
minScore: {
|
|
24
|
-
type: 'number',
|
|
25
|
-
defaultValue: Number.MIN_VALUE,
|
|
26
|
-
description: 'minimum value for the y-scale',
|
|
27
|
-
},
|
|
28
|
-
maxScore: {
|
|
29
|
-
type: 'number',
|
|
30
|
-
description: 'maximum value for the y-scale',
|
|
31
|
-
defaultValue: Number.MAX_VALUE,
|
|
32
|
-
},
|
|
33
|
-
numStdDev: {
|
|
34
|
-
type: 'number',
|
|
35
|
-
description: 'number of standard deviations to use for autoscale types globalsd or localsd',
|
|
36
|
-
defaultValue: 3,
|
|
37
|
-
},
|
|
38
|
-
scaleType: {
|
|
39
|
-
type: 'stringEnum',
|
|
40
|
-
model: types.enumeration('Scale type', ['linear', 'log']),
|
|
41
|
-
description: 'The type of scale to use',
|
|
42
|
-
defaultValue: 'linear',
|
|
43
|
-
},
|
|
44
|
-
inverted: {
|
|
45
|
-
type: 'boolean',
|
|
46
|
-
description: 'draw upside down',
|
|
47
|
-
defaultValue: false,
|
|
48
|
-
},
|
|
49
|
-
}, {
|
|
4
|
+
return ConfigurationSchema('SharedVariantDisplay', {}, {
|
|
50
5
|
baseConfiguration: baseLinearDisplayConfigSchema,
|
|
51
6
|
explicitlyTyped: true,
|
|
52
7
|
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
export default function AddFiltersDialog({ model, handleClose, }: {
|
|
2
2
|
model: {
|
|
3
3
|
jexlFilters?: string[];
|
|
4
4
|
activeFilters: string[];
|
|
5
5
|
setJexlFilters: (arg?: string[]) => void;
|
|
6
6
|
};
|
|
7
7
|
handleClose: () => void;
|
|
8
|
-
})
|
|
9
|
-
export default AddFiltersDialog;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
3
|
import { Dialog } from '@jbrowse/core/ui';
|
|
4
4
|
import { stringToJexlExpression } from '@jbrowse/core/util/jexlStrings';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
6
|
import { Button, DialogActions, DialogContent, TextField } from '@mui/material';
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
7
|
-
import { makeStyles } from 'tss-react/mui';
|
|
8
7
|
const useStyles = makeStyles()({
|
|
9
8
|
dialogContent: {
|
|
10
9
|
width: '80em',
|
|
@@ -17,30 +16,26 @@ const useStyles = makeStyles()({
|
|
|
17
16
|
fontSize: '0.8em',
|
|
18
17
|
},
|
|
19
18
|
});
|
|
20
|
-
function
|
|
21
|
-
|
|
19
|
+
function validateJexl(data) {
|
|
20
|
+
try {
|
|
21
|
+
for (const line of data
|
|
22
|
+
.split('\n')
|
|
23
|
+
.map(l => l.trim())
|
|
24
|
+
.filter(Boolean)) {
|
|
25
|
+
stringToJexlExpression(line);
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
console.error(e);
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
22
33
|
}
|
|
23
|
-
|
|
34
|
+
export default function AddFiltersDialog({ model, handleClose, }) {
|
|
24
35
|
const { classes } = useStyles();
|
|
25
36
|
const { activeFilters } = model;
|
|
26
37
|
const [data, setData] = useState(activeFilters.join('\n'));
|
|
27
|
-
const
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
try {
|
|
30
|
-
data
|
|
31
|
-
.split('\n')
|
|
32
|
-
.map(line => line.trim())
|
|
33
|
-
.filter(line => !!line)
|
|
34
|
-
.map(line => {
|
|
35
|
-
checkJexl(line.trim());
|
|
36
|
-
});
|
|
37
|
-
setError(undefined);
|
|
38
|
-
}
|
|
39
|
-
catch (e) {
|
|
40
|
-
console.error(e);
|
|
41
|
-
setError(e);
|
|
42
|
-
}
|
|
43
|
-
}, [data]);
|
|
38
|
+
const error = useMemo(() => validateJexl(data), [data]);
|
|
44
39
|
return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Add track filters", children: [_jsxs(DialogContent, { children: [_jsxs("div", { children: ["Add filters, in jexl format, one per line, starting with the string jexl:. Examples:", ' ', _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'name')=='BRCA1'" }), " - show only feature where the name attribute is BRCA1"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'type')=='gene'" }), " - show only gene type features in a GFF that has many other feature types"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'score') > 400" }), " - show only features that have a score greater than 400"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'end') - get(feature,'start') < 1000000" }), ' ', "- show only features with length less than 1Mbp"] })] })] }), error ? _jsx("p", { className: classes.error, children: `${error}` }) : null, _jsx(TextField, { variant: "outlined", multiline: true, minRows: 5, maxRows: 10, className: classes.dialogContent, fullWidth: true, value: data, onChange: event => {
|
|
45
40
|
setData(event.target.value);
|
|
46
41
|
}, slotProps: {
|
|
@@ -52,8 +47,5 @@ const AddFiltersDialog = observer(function ({ model, handleClose, }) {
|
|
|
52
47
|
} })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, disabled: !!error, onClick: () => {
|
|
53
48
|
model.setJexlFilters(data.split('\n'));
|
|
54
49
|
handleClose();
|
|
55
|
-
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick:
|
|
56
|
-
|
|
57
|
-
}, children: "Cancel" })] })] }));
|
|
58
|
-
});
|
|
59
|
-
export default AddFiltersDialog;
|
|
50
|
+
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: handleClose, children: "Cancel" })] })] }));
|
|
51
|
+
}
|
|
@@ -4,10 +4,11 @@ interface SetColorDialogProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
[key: string]: unknown;
|
|
6
6
|
}[];
|
|
7
|
+
clusterTree?: string;
|
|
7
8
|
setLayout: (s: {
|
|
8
9
|
name: string;
|
|
9
10
|
[key: string]: unknown;
|
|
10
|
-
}[]) => void;
|
|
11
|
+
}[], clearTree?: boolean) => void;
|
|
11
12
|
clearLayout: () => void;
|
|
12
13
|
};
|
|
13
14
|
handleClose: () => void;
|