@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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
3
|
-
import VariantConsequenceDataGridWrapper from
|
|
3
|
+
import VariantConsequenceDataGridWrapper from "./VariantConsequenceDataGridWrapper.js";
|
|
4
4
|
export default function VariantConsequenceDataGrid({ data, fields, title, }) {
|
|
5
5
|
return data.length ? (_jsx(BaseCard, { title: title, children: _jsx(VariantConsequenceDataGridWrapper, { rows: data.map((elt, id) => ({
|
|
6
6
|
id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
1
|
+
import type { VariantFeatureWidgetModel } from './stateModelFactory.ts';
|
|
2
2
|
declare const VariantFeatureWidget: (props: {
|
|
3
3
|
model: VariantFeatureWidgetModel;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,35 +4,24 @@ import { parseBreakend } from '@gmod/vcf';
|
|
|
4
4
|
import FeatureDetails from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails';
|
|
5
5
|
import { Paper } from '@mui/material';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
|
-
import AltFormatter from
|
|
8
|
-
import Formatter from
|
|
9
|
-
import VariantSampleGrid from
|
|
10
|
-
import { variantFieldDescriptions } from
|
|
11
|
-
const LaunchBreakendPanel = lazy(() => import(
|
|
12
|
-
const VariantConsequenceDataGrid = lazy(() => import(
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
return (_jsx(VariantConsequenceDataGrid, { fields: annFields, data: ann, title: "Variant ANN field" }));
|
|
19
|
-
}
|
|
20
|
-
function CsqPanel({ descriptions, feature, }) {
|
|
21
|
-
var _a, _b, _c, _d, _e;
|
|
22
|
-
const csqDescription = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.CSQ) === null || _b === void 0 ? void 0 : _b.Description;
|
|
23
|
-
const csqFields = ((_d = (_c = csqDescription === null || csqDescription === void 0 ? void 0 : csqDescription.match(/.*Format: (.*)/)) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.split('|')) || [];
|
|
24
|
-
const csq = ((_e = feature.INFO) === null || _e === void 0 ? void 0 : _e.CSQ) || [];
|
|
25
|
-
return (_jsx(VariantConsequenceDataGrid, { fields: csqFields, data: csq, title: "Variant CSQ field" }));
|
|
7
|
+
import AltFormatter from "./AltFormatter.js";
|
|
8
|
+
import Formatter from "./Formatter.js";
|
|
9
|
+
import VariantSampleGrid from "./VariantSampleGrid/VariantSampleGrid.js";
|
|
10
|
+
import { variantFieldDescriptions } from "./variantFieldDescriptions.js";
|
|
11
|
+
const LaunchBreakendPanel = lazy(() => import("./LaunchBreakendPanel/LaunchBreakendPanel.js"));
|
|
12
|
+
const VariantConsequenceDataGrid = lazy(() => import("./VariantConsequence/VariantConsequenceDataGrid.js"));
|
|
13
|
+
function AnnotationPanel({ descriptions, feature, fieldKey, title, regex, }) {
|
|
14
|
+
const desc = descriptions?.INFO?.[fieldKey]?.Description;
|
|
15
|
+
const fields = desc?.match(regex)?.[1]?.split('|') || [];
|
|
16
|
+
const data = feature.INFO?.[fieldKey] || [];
|
|
17
|
+
return (_jsx(VariantConsequenceDataGrid, { fields: fields, data: data, title: title }));
|
|
26
18
|
}
|
|
19
|
+
const svTypes = ['inversion', 'deletion', 'duplication', 'cnv', 'sv'];
|
|
27
20
|
function LaunchBreakendWidgetArea({ model, }) {
|
|
28
21
|
const { featureData } = model;
|
|
29
22
|
const feat = JSON.parse(JSON.stringify(featureData));
|
|
30
23
|
const { type = '' } = feat;
|
|
31
|
-
return type === 'breakend' ? (_jsx(LaunchBreakendPanel, { feature: feat, locStrings: feat.ALT.map((alt) =>
|
|
32
|
-
type.includes('deletion') ||
|
|
33
|
-
type.includes('duplication') ||
|
|
34
|
-
type.includes('cnv') ||
|
|
35
|
-
type.includes('sv') ? (_jsx(LaunchBreakendPanel, { feature: {
|
|
24
|
+
return type === 'breakend' ? (_jsx(LaunchBreakendPanel, { feature: feat, locStrings: feat.ALT.map((alt) => parseBreakend(alt)?.MatePosition || ''), model: model })) : type === 'translocation' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.INFO.CHR2[0]}:${feat.INFO.END}`] })) : type === 'paired_feature' ? (_jsx(LaunchBreakendPanel, { feature: feat, model: model, locStrings: [`${feat.mate.refName}:${feat.mate.start}`] })) : svTypes.some(t => type.includes(t)) ? (_jsx(LaunchBreakendPanel, { feature: {
|
|
36
25
|
uniqueId: 'random',
|
|
37
26
|
refName: feat.refName,
|
|
38
27
|
start: feat.start,
|
|
@@ -44,7 +33,7 @@ function LaunchBreakendWidgetArea({ model, }) {
|
|
|
44
33
|
},
|
|
45
34
|
}, model: model, locStrings: [`${feat.refName}:${feat.end}`] })) : null;
|
|
46
35
|
}
|
|
47
|
-
const FeatDefined = observer(function (props) {
|
|
36
|
+
const FeatDefined = observer(function FeatDefined(props) {
|
|
48
37
|
const { feat, model } = props;
|
|
49
38
|
const { descriptions } = model;
|
|
50
39
|
const { samples, ...rest } = feat;
|
|
@@ -52,11 +41,9 @@ const FeatDefined = observer(function (props) {
|
|
|
52
41
|
return (_jsxs(Paper, { "data-testid": "variant-side-drawer", children: [_jsx(FeatureDetails, { feature: rest, descriptions: {
|
|
53
42
|
...variantFieldDescriptions,
|
|
54
43
|
...descriptions,
|
|
55
|
-
}, formatter: (value, key) => {
|
|
56
|
-
return key === 'ALT' ? (_jsx(AltFormatter, { value: `${value}`, refString: REF })) : (_jsx(Formatter, { value: value }));
|
|
57
|
-
}, ...props }), _jsxs(Suspense, { fallback: null, children: [_jsx(CsqPanel, { feature: rest, descriptions: descriptions }), _jsx(AnnPanel, { feature: rest, descriptions: descriptions }), _jsx(LaunchBreakendWidgetArea, { model: model })] }), _jsx(VariantSampleGrid, { feature: feat, ...props, descriptions: descriptions })] }));
|
|
44
|
+
}, formatter: (value, key) => key === 'ALT' ? (_jsx(AltFormatter, { value: `${value}`, refString: REF })) : (_jsx(Formatter, { value: value })), ...props }), _jsxs(Suspense, { fallback: null, children: [_jsx(AnnotationPanel, { feature: rest, descriptions: descriptions, fieldKey: "CSQ", title: "Variant CSQ field", regex: /.*Format: (.*)/ }), _jsx(AnnotationPanel, { feature: rest, descriptions: descriptions, fieldKey: "ANN", title: "Variant ANN field", regex: /.*Functional annotations:'(.*)'$/ }), _jsx(LaunchBreakendWidgetArea, { model: model })] }), _jsx(VariantSampleGrid, { feature: feat, ...props, descriptions: descriptions })] }));
|
|
58
45
|
});
|
|
59
|
-
const VariantFeatureWidget = observer(function (props) {
|
|
46
|
+
const VariantFeatureWidget = observer(function VariantFeatureWidget(props) {
|
|
60
47
|
const { model } = props;
|
|
61
48
|
const { featureData } = model;
|
|
62
49
|
const feat = structuredClone(featureData);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type { VariantSampleGridRow } from './types';
|
|
2
|
-
export default function VariantGenotypeFrequencyTable({ rows, }: {
|
|
1
|
+
import type { VariantSampleGridRow } from './types.ts';
|
|
2
|
+
export default function VariantGenotypeFrequencyTable({ rows, selectedGenotypes, setSelectedGenotypes, showToolbar, }: {
|
|
3
3
|
rows: VariantSampleGridRow[];
|
|
4
|
+
selectedGenotypes: Set<string> | null;
|
|
5
|
+
setSelectedGenotypes: (v: Set<string> | null) => void;
|
|
6
|
+
showToolbar?: boolean;
|
|
4
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import DataGridFlexContainer from '@jbrowse/core/ui/DataGridFlexContainer';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
import { measureGridWidth } from '@jbrowse/core/util';
|
|
5
|
-
import { Checkbox
|
|
3
|
+
import { Checkbox } from '@mui/material';
|
|
6
4
|
import { DataGrid } from '@mui/x-data-grid';
|
|
7
5
|
function toP(n) {
|
|
8
6
|
return n.toPrecision(3);
|
|
9
7
|
}
|
|
10
|
-
export default function VariantGenotypeFrequencyTable({ rows, }) {
|
|
11
|
-
const [useCounts, setUseCounts] = useState(false);
|
|
8
|
+
export default function VariantGenotypeFrequencyTable({ rows, selectedGenotypes, setSelectedGenotypes, showToolbar, }) {
|
|
12
9
|
const summary = {};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
summary[gt].count++;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
for (const row of rows) {
|
|
28
|
-
const alleleCounts = {};
|
|
29
|
-
const alleles = row.GT.split(/[/|]/);
|
|
30
|
-
for (const allele of alleles) {
|
|
31
|
-
alleleCounts[allele] = (alleleCounts[allele] || 0) + 1;
|
|
32
|
-
}
|
|
33
|
-
const key = Object.entries(alleleCounts)
|
|
34
|
-
.map(([key, val]) => `${key}:${val}`)
|
|
35
|
-
.join(';');
|
|
36
|
-
if (!summary[key]) {
|
|
37
|
-
summary[key] = {
|
|
38
|
-
count: 0,
|
|
39
|
-
GT: key,
|
|
40
|
-
genotype: row.genotype,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
summary[key].count++;
|
|
10
|
+
for (const row of rows) {
|
|
11
|
+
const gt = row.GT;
|
|
12
|
+
if (!summary[gt]) {
|
|
13
|
+
summary[gt] = {
|
|
14
|
+
count: 0,
|
|
15
|
+
GT: row.GT,
|
|
16
|
+
genotype: row.genotype,
|
|
17
|
+
};
|
|
44
18
|
}
|
|
19
|
+
summary[gt].count++;
|
|
45
20
|
}
|
|
46
21
|
const gridRows = Object.entries(summary).map(([key, val]) => ({
|
|
47
22
|
id: key,
|
|
@@ -49,26 +24,60 @@ export default function VariantGenotypeFrequencyTable({ rows, }) {
|
|
|
49
24
|
count: `${val.count} / ${rows.length}`,
|
|
50
25
|
frequency: `${toP((val.count / rows.length) * 100)}%`,
|
|
51
26
|
}));
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
27
|
+
const allSelected = selectedGenotypes === null ||
|
|
28
|
+
gridRows.every(r => selectedGenotypes.has(r.GT));
|
|
29
|
+
const height = 25 + gridRows.length * 25 + 15 + (showToolbar ? 40 : 0);
|
|
30
|
+
return (_jsx("div", { style: { height }, children: _jsx(DataGrid, { rows: gridRows, hideFooter: true, rowHeight: 25, columnHeaderHeight: 25, columns: [
|
|
31
|
+
{
|
|
32
|
+
field: 'select',
|
|
33
|
+
headerName: '',
|
|
34
|
+
width: 27,
|
|
35
|
+
sortable: false,
|
|
36
|
+
disableColumnMenu: true,
|
|
37
|
+
renderHeader: () => (_jsx(Checkbox, { checked: allSelected, indeterminate: selectedGenotypes !== null &&
|
|
38
|
+
selectedGenotypes.size > 0 &&
|
|
39
|
+
selectedGenotypes.size < gridRows.length, onChange: (_, checked) => {
|
|
40
|
+
if (checked) {
|
|
41
|
+
setSelectedGenotypes(null);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
setSelectedGenotypes(new Set());
|
|
45
|
+
}
|
|
46
|
+
}, size: "small" })),
|
|
47
|
+
renderCell: params => {
|
|
48
|
+
const isChecked = selectedGenotypes === null ||
|
|
49
|
+
selectedGenotypes.has(params.row.GT);
|
|
50
|
+
return (_jsx(Checkbox, { checked: isChecked, onChange: (_, checked) => {
|
|
51
|
+
const newSet = new Set(selectedGenotypes === null
|
|
52
|
+
? gridRows.map(r => r.GT)
|
|
53
|
+
: selectedGenotypes);
|
|
54
|
+
if (checked) {
|
|
55
|
+
newSet.add(params.row.GT);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
newSet.delete(params.row.GT);
|
|
59
|
+
}
|
|
60
|
+
if (newSet.size === gridRows.length) {
|
|
61
|
+
setSelectedGenotypes(null);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
setSelectedGenotypes(newSet);
|
|
65
|
+
}
|
|
66
|
+
}, size: "small" }));
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{ field: 'GT', width: measureGridWidth(gridRows.map(r => r.GT)) },
|
|
70
|
+
{
|
|
71
|
+
field: 'count',
|
|
72
|
+
width: measureGridWidth(gridRows.map(r => r.count)),
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
field: 'frequency',
|
|
76
|
+
width: measureGridWidth(gridRows.map(r => r.frequency)),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
field: 'genotype',
|
|
80
|
+
width: measureGridWidth(gridRows.map(r => r.genotype)),
|
|
81
|
+
},
|
|
82
|
+
], showToolbar: showToolbar }) }));
|
|
74
83
|
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState, useTransition } from 'react';
|
|
2
3
|
import { TextField, Typography } from '@mui/material';
|
|
3
4
|
export default function SampleFilters({ columns, filter, setFilter, }) {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
const [localFilter, setLocalFilter] = useState(filter);
|
|
6
|
+
const [, startTransition] = useTransition();
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
setLocalFilter(filter);
|
|
9
|
+
}, [filter]);
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(Typography, { children: "These filters can use a plain text search or regex style query, e.g. in the genotype field, entering 1 will query for all genotypes that include the first alternate allele e.g. 0|1 or 1|1, entering [1-9]\\d* will find any non-zero allele e.g. 0|2 or 2/33" }), columns.map(({ field }) => (_jsx(TextField, { placeholder: `Filter ${field}`, value: localFilter[field] || '', onChange: event => {
|
|
11
|
+
const value = event.target.value;
|
|
12
|
+
const newFilter = { ...localFilter, [field]: value };
|
|
13
|
+
setLocalFilter(newFilter);
|
|
14
|
+
startTransition(() => {
|
|
15
|
+
setFilter(newFilter);
|
|
16
|
+
});
|
|
6
17
|
} }, `filter-${field}`)))] }));
|
|
7
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VariantFieldDescriptions } from './types';
|
|
1
|
+
import type { VariantFieldDescriptions } from './types.ts';
|
|
2
2
|
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
3
|
export default function VariantSampleGrid(props: {
|
|
4
4
|
feature: SimpleFeatureSerialized;
|
|
@@ -1,48 +1,90 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
4
4
|
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
5
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
5
6
|
import DataGridFlexContainer from '@jbrowse/core/ui/DataGridFlexContainer';
|
|
6
7
|
import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
|
|
7
8
|
import { measureGridWidth } from '@jbrowse/core/util';
|
|
9
|
+
import SettingsIcon from '@mui/icons-material/Settings';
|
|
8
10
|
import { ToggleButton, ToggleButtonGroup, Typography } from '@mui/material';
|
|
9
11
|
import { DataGrid } from '@mui/x-data-grid';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
12
|
+
import VariantGenotypeFrequencyTable from "./VariantGenotypeFrequencyTable.js";
|
|
13
|
+
import SampleFilters from "./VariantSampleFilters.js";
|
|
14
|
+
import { getSampleGridRows } from "./getSampleGridRows.js";
|
|
15
|
+
const gtOnlyFields = new Set(['sample', 'GT']);
|
|
16
|
+
const genotypeFields = new Set(['sample', 'GT', 'genotype']);
|
|
14
17
|
export default function VariantSampleGrid(props) {
|
|
15
18
|
const { feature, descriptions = {} } = props;
|
|
16
19
|
const [filter, setFilter] = useState({});
|
|
17
20
|
const [columnDisplayMode, setColumnDisplayMode] = useState('all');
|
|
18
21
|
const [showFilters, setShowFilters] = useState(false);
|
|
22
|
+
const [showFrequencyTable, setShowFrequencyTable] = useState(true);
|
|
23
|
+
const [showToolbar, setShowToolbar] = useState(false);
|
|
24
|
+
const [useCounts, setUseCounts] = useState(false);
|
|
25
|
+
const [selectedGenotypes, setSelectedGenotypes] = useState(null);
|
|
19
26
|
const samples = (feature.samples || {});
|
|
20
27
|
const ALT = feature.ALT;
|
|
21
28
|
const REF = feature.REF;
|
|
22
|
-
const { rows, error } = getSampleGridRows(samples, REF, ALT, filter);
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
const { rows, error } = getSampleGridRows(samples, REF, ALT, filter, useCounts);
|
|
30
|
+
const filteredRows = useMemo(() => selectedGenotypes === null
|
|
31
|
+
? rows
|
|
32
|
+
: rows.filter(row => selectedGenotypes.has(row.GT)), [rows, selectedGenotypes]);
|
|
33
|
+
const columns = useMemo(() => {
|
|
34
|
+
const keys = [
|
|
35
|
+
'sample',
|
|
36
|
+
...Object.keys(rows[0] || {}).filter(k => k !== 'id' && k !== 'sample'),
|
|
37
|
+
];
|
|
38
|
+
return keys.map(field => ({
|
|
30
39
|
field,
|
|
31
|
-
description:
|
|
32
|
-
width:
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
description: descriptions?.FORMAT?.[field]?.Description,
|
|
41
|
+
width: measureGridWidth(filteredRows.map(r => r[field])),
|
|
42
|
+
}));
|
|
43
|
+
}, [rows, filteredRows, descriptions]);
|
|
44
|
+
return !rows.length ? null : (_jsxs(BaseCard, { ...props, title: "Samples", children: [error ? _jsx(Typography, { color: "error", children: `${error}` }) : null, _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsx(CascadingMenuButton, { menuItems: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Show allele counts ("dosage") instead of exact GT',
|
|
47
|
+
helpText: 'This converts a genotype like 1/1 into 1:2 which says there were two occurrences of the ALT allele 1 in the genotype',
|
|
48
|
+
type: 'checkbox',
|
|
49
|
+
checked: useCounts,
|
|
50
|
+
onClick: () => {
|
|
51
|
+
setUseCounts(!useCounts);
|
|
52
|
+
setSelectedGenotypes(null);
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: 'Show frequency table',
|
|
57
|
+
type: 'checkbox',
|
|
58
|
+
checked: showFrequencyTable,
|
|
59
|
+
onClick: () => {
|
|
60
|
+
setShowFrequencyTable(!showFrequencyTable);
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: 'Show filters',
|
|
65
|
+
type: 'checkbox',
|
|
66
|
+
checked: showFilters,
|
|
67
|
+
onClick: () => {
|
|
68
|
+
setShowFilters(!showFilters);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Show toolbar',
|
|
73
|
+
type: 'checkbox',
|
|
74
|
+
checked: showToolbar,
|
|
75
|
+
onClick: () => {
|
|
76
|
+
setShowToolbar(!showToolbar);
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
], children: _jsx(SettingsIcon, {}) }), _jsxs(ToggleButtonGroup, { value: columnDisplayMode, exclusive: true, size: "small", onChange: (_, newValue) => {
|
|
80
|
+
if (newValue !== null) {
|
|
81
|
+
setColumnDisplayMode(newValue);
|
|
82
|
+
}
|
|
83
|
+
}, children: [_jsx(ToggleButton, { value: "all", children: "All" }), _jsx(ToggleButton, { value: "gtOnly", children: "GT only" }), _jsx(ToggleButton, { value: "genotypeOnly", children: "GT+resolved genotype" })] })] }), showFilters ? (_jsx(SampleFilters, { setFilter: setFilter, columns: columns, filter: filter })) : null, showFrequencyTable ? (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "subtitle2", style: { marginTop: 8 }, children: "Genotype frequencies (click to filter)" }), _jsx(ErrorBoundary, { FallbackComponent: ErrorMessage, children: _jsx(VariantGenotypeFrequencyTable, { rows: rows, selectedGenotypes: selectedGenotypes, setSelectedGenotypes: setSelectedGenotypes, showToolbar: showToolbar }) })] })) : null, _jsxs(Typography, { variant: "subtitle2", style: { marginTop: 16 }, children: ["Samples", ' ', selectedGenotypes !== null
|
|
84
|
+
? `(${filteredRows.length} of ${rows.length})`
|
|
85
|
+
: `(${rows.length})`] }), _jsx(DataGridFlexContainer, { children: _jsx(DataGrid, { rows: filteredRows, hideFooter: filteredRows.length < 100, columns: columnDisplayMode === 'gtOnly'
|
|
86
|
+
? columns.filter(f => gtOnlyFields.has(f.field))
|
|
87
|
+
: columnDisplayMode === 'genotypeOnly'
|
|
88
|
+
? columns.filter(f => genotypeFields.has(f.field))
|
|
89
|
+
: columns, rowHeight: 25, columnHeaderHeight: 25, showToolbar: showToolbar }) })] }));
|
|
48
90
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Filters, InfoFields, VariantSampleGridRow } from './types';
|
|
2
|
-
export declare function getSampleGridRows(samples: Record<string, InfoFields>, REF: string, ALT: string[], filter: Filters): {
|
|
1
|
+
import type { Filters, InfoFields, VariantSampleGridRow } from './types.ts';
|
|
2
|
+
export declare function getSampleGridRows(samples: Record<string, InfoFields>, REF: string, ALT: string[], filter: Filters, useCounts?: boolean): {
|
|
3
3
|
rows: VariantSampleGridRow[];
|
|
4
4
|
error: unknown;
|
|
5
5
|
};
|
|
@@ -1,38 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
2
|
+
import { getMinimalDesc, makeSimpleAltString } from "../../VcfFeature/util.js";
|
|
3
|
+
function gtToAlleleCounts(gt) {
|
|
4
|
+
const alleleCounts = {};
|
|
5
|
+
const alleles = gt.split(/[/|]/);
|
|
6
|
+
for (const allele of alleles) {
|
|
7
|
+
alleleCounts[allele] = (alleleCounts[allele] || 0) + 1;
|
|
8
|
+
}
|
|
9
|
+
return Object.entries(alleleCounts)
|
|
10
|
+
.map(([key, val]) => `${key}:${val}`)
|
|
11
|
+
.join(';');
|
|
12
|
+
}
|
|
13
|
+
function genotypeToAlleleCounts(gt, ref, alt) {
|
|
14
|
+
const alleleCounts = {};
|
|
15
|
+
const alleles = gt.split(/[/|]/);
|
|
16
|
+
for (const allele of alleles) {
|
|
17
|
+
if (allele === '.') {
|
|
18
|
+
alleleCounts['.'] = (alleleCounts['.'] || 0) + 1;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const resolved = +allele === 0
|
|
22
|
+
? `ref(${ref.length < 10 ? ref : getBpDisplayStr(ref.length)})`
|
|
23
|
+
: getMinimalDesc(ref, alt[+allele - 1] || '');
|
|
24
|
+
alleleCounts[resolved] = (alleleCounts[resolved] || 0) + 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return Object.entries(alleleCounts)
|
|
28
|
+
.map(([key, val]) => `${key}:${val}`)
|
|
29
|
+
.join(';');
|
|
30
|
+
}
|
|
31
|
+
export function getSampleGridRows(samples, REF, ALT, filter, useCounts) {
|
|
19
32
|
let error;
|
|
20
33
|
let rows = [];
|
|
21
|
-
const
|
|
34
|
+
const filterKeys = Object.keys(filter);
|
|
22
35
|
try {
|
|
23
|
-
rows =
|
|
36
|
+
rows = Object.entries(samples)
|
|
24
37
|
.map(([key, val]) => {
|
|
38
|
+
const gt = val.GT?.[0];
|
|
39
|
+
const gtStr = gt ? `${gt}` : undefined;
|
|
40
|
+
const displayGT = gtStr
|
|
41
|
+
? useCounts
|
|
42
|
+
? gtToAlleleCounts(gtStr)
|
|
43
|
+
: gtStr
|
|
44
|
+
: undefined;
|
|
45
|
+
const displayGenotype = gtStr
|
|
46
|
+
? useCounts
|
|
47
|
+
? genotypeToAlleleCounts(gtStr, REF, ALT)
|
|
48
|
+
: makeSimpleAltString(gtStr, REF, ALT)
|
|
49
|
+
: undefined;
|
|
25
50
|
return {
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
formatValue,
|
|
29
|
-
])),
|
|
51
|
+
...val,
|
|
52
|
+
...(gtStr ? { GT: displayGT, genotype: displayGenotype } : {}),
|
|
30
53
|
sample: key,
|
|
31
54
|
id: key,
|
|
32
55
|
};
|
|
33
56
|
})
|
|
34
|
-
.filter(row =>
|
|
35
|
-
?
|
|
57
|
+
.filter(row => filterKeys.length
|
|
58
|
+
? filterKeys.every(key => {
|
|
36
59
|
const currFilter = filter[key];
|
|
37
60
|
return currFilter
|
|
38
61
|
? new RegExp(currFilter, 'i').exec(row[key])
|
|
@@ -12,10 +12,8 @@ export interface VariantSampleGridRow {
|
|
|
12
12
|
}
|
|
13
13
|
export type InfoFields = Record<string, unknown[]>;
|
|
14
14
|
export type Filters = Record<string, string>;
|
|
15
|
-
interface FormatRecord {
|
|
16
|
-
Description?: string;
|
|
17
|
-
}
|
|
18
15
|
export interface VariantFieldDescriptions {
|
|
19
|
-
FORMAT?: Record<string,
|
|
16
|
+
FORMAT?: Record<string, {
|
|
17
|
+
Description?: string;
|
|
18
|
+
}>;
|
|
20
19
|
}
|
|
21
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const configSchema: import("
|
|
1
|
+
export declare const configSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType';
|
|
3
|
-
import { configSchema } from
|
|
4
|
-
import { stateModelFactory } from
|
|
3
|
+
import { configSchema } from "./configSchema.js";
|
|
4
|
+
import { stateModelFactory } from "./stateModelFactory.js";
|
|
5
5
|
export default function VariantFeatureWidgetF(pluginManager) {
|
|
6
6
|
pluginManager.addWidgetType(() => new WidgetType({
|
|
7
7
|
name: 'VariantFeatureWidget',
|
|
8
8
|
heading: 'Feature details',
|
|
9
9
|
configSchema: configSchema,
|
|
10
10
|
stateModel: stateModelFactory(pluginManager),
|
|
11
|
-
ReactComponent: lazy(() => import(
|
|
11
|
+
ReactComponent: lazy(() => import("./VariantFeatureWidget.js")),
|
|
12
12
|
}));
|
|
13
13
|
}
|