@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,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SourcesDataGrid;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
10
|
-
const ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
|
|
11
|
-
const util_1 = require("@jbrowse/core/util");
|
|
12
|
-
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
13
|
-
const mui_1 = require("tss-react/mui");
|
|
14
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
-
cell: {
|
|
16
|
-
whiteSpace: 'nowrap',
|
|
17
|
-
overflow: 'hidden',
|
|
18
|
-
textOverflow: 'ellipsis',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
function SourcesDataGrid({ rows, onChange, setSelected, }) {
|
|
22
|
-
const { classes } = useStyles();
|
|
23
|
-
const { id: _id, name: _name, label: _label, color: _color, baseUri: _baseUri, HP: _HP, ...rest } = rows[0];
|
|
24
|
-
const [currSort, setCurrSort] = (0, react_1.useState)({
|
|
25
|
-
idx: 0,
|
|
26
|
-
field: null,
|
|
27
|
-
});
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: { height: 400, width: '100%' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { checkboxSelection: true, disableRowSelectionOnClick: true, onRowSelectionModelChange: arg => {
|
|
29
|
-
setSelected([...arg.ids]);
|
|
30
|
-
}, rows: rows, rowHeight: 25, columnHeaderHeight: 33, columns: [
|
|
31
|
-
{
|
|
32
|
-
field: 'color',
|
|
33
|
-
headerName: 'Color',
|
|
34
|
-
renderCell: params => {
|
|
35
|
-
const { value, id } = params;
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(ColorPicker_1.default, { color: value || 'blue', onChange: c => {
|
|
37
|
-
const elt = rows.find(f => f.name === id);
|
|
38
|
-
if (elt) {
|
|
39
|
-
elt.color = c;
|
|
40
|
-
}
|
|
41
|
-
onChange([...rows]);
|
|
42
|
-
} }));
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
field: 'label',
|
|
47
|
-
headerName: 'Name',
|
|
48
|
-
width: (0, util_1.measureGridWidth)(rows.map(r => r.label)),
|
|
49
|
-
},
|
|
50
|
-
...Object.keys(rest).map(val => ({
|
|
51
|
-
field: val,
|
|
52
|
-
renderCell: ({ value }) => ((0, jsx_runtime_1.jsx)("div", { className: classes.cell, children: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value) }) })),
|
|
53
|
-
width: (0, util_1.measureGridWidth)(rows.map(r => `${r[val]}`)),
|
|
54
|
-
})),
|
|
55
|
-
], sortModel: [], onSortModelChange: args => {
|
|
56
|
-
const sort = args[0];
|
|
57
|
-
const idx = (currSort.idx + 1) % 2;
|
|
58
|
-
const field = sort.field || currSort.field;
|
|
59
|
-
setCurrSort({ idx, field });
|
|
60
|
-
onChange(field
|
|
61
|
-
? [...rows].sort((a, b) => {
|
|
62
|
-
const aa = (0, util_1.getStr)(a[field]);
|
|
63
|
-
const bb = (0, util_1.getStr)(b[field]);
|
|
64
|
-
return idx === 1 ? aa.localeCompare(bb) : bb.localeCompare(aa);
|
|
65
|
-
})
|
|
66
|
-
: rows);
|
|
67
|
-
} }) }));
|
|
68
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const SourcesDataGrid_1 = __importDefault(require("./SourcesDataGrid"));
|
|
9
|
-
const SourcesGridHeader_1 = __importDefault(require("./SourcesGridHeader"));
|
|
10
|
-
function SourcesGrid({ rows, onChange, showTips, }) {
|
|
11
|
-
const [selected, setSelected] = (0, react_1.useState)([]);
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(SourcesGridHeader_1.default, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }), rows.length ? ((0, jsx_runtime_1.jsx)(SourcesDataGrid_1.default, { rows: rows, onChange: onChange, setSelected: setSelected })) : ((0, jsx_runtime_1.jsx)("div", { children: "No rows" }))] }));
|
|
13
|
-
}
|
|
14
|
-
exports.default = SourcesGrid;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Source } from '../types';
|
|
2
|
-
import type { GridRowId } from '@mui/x-data-grid';
|
|
3
|
-
export default function SourcesGridHeader({ selected, onChange, rows, showTips, }: {
|
|
4
|
-
onChange: (arg: Source[]) => void;
|
|
5
|
-
rows: Source[];
|
|
6
|
-
selected: GridRowId[];
|
|
7
|
-
showTips: boolean;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SourcesGridHeader;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const ColorPicker_1 = require("@jbrowse/core/ui/ColorPicker");
|
|
10
|
-
const KeyboardArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
11
|
-
const KeyboardArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardArrowUp"));
|
|
12
|
-
const KeyboardDoubleArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowDown"));
|
|
13
|
-
const KeyboardDoubleArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowUp"));
|
|
14
|
-
const material_1 = require("@mui/material");
|
|
15
|
-
const sourcesGridUtils_1 = require("../sourcesGridUtils");
|
|
16
|
-
function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
|
|
17
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
18
|
-
const [widgetColor, setWidgetColor] = (0, react_1.useState)('blue');
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !selected.length, onClick: event => {
|
|
20
|
-
setAnchorEl(event.currentTarget);
|
|
21
|
-
}, children: "Change color of selected items" }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
22
|
-
onChange((0, sourcesGridUtils_1.moveUp)([...rows], selected));
|
|
23
|
-
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowUp_1.default, {}), showTips ? 'Move selected items up' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
24
|
-
onChange((0, sourcesGridUtils_1.moveDown)([...rows], selected));
|
|
25
|
-
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowDown_1.default, {}), showTips ? 'Move selected items down' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
26
|
-
onChange((0, sourcesGridUtils_1.moveUp)([...rows], selected, rows.length));
|
|
27
|
-
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowUp_1.default, {}), showTips ? 'Move selected items to top' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
28
|
-
onChange((0, sourcesGridUtils_1.moveDown)([...rows], selected, rows.length));
|
|
29
|
-
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowDown_1.default, {}), showTips ? 'Move selected items to bottom' : null] }), (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPopover, { anchorEl: anchorEl, color: widgetColor, onChange: c => {
|
|
30
|
-
setWidgetColor(c);
|
|
31
|
-
for (const id of selected) {
|
|
32
|
-
const elt = rows.find(f => f.name === id);
|
|
33
|
-
if (elt) {
|
|
34
|
-
elt.color = c;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
onChange([...rows]);
|
|
38
|
-
}, onClose: () => {
|
|
39
|
-
setAnchorEl(null);
|
|
40
|
-
} })] }));
|
|
41
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
interface SetColorDialogProps {
|
|
2
|
-
model: {
|
|
3
|
-
sources?: {
|
|
4
|
-
name: string;
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
}[];
|
|
7
|
-
setLayout: (s: {
|
|
8
|
-
name: string;
|
|
9
|
-
[key: string]: unknown;
|
|
10
|
-
}[]) => void;
|
|
11
|
-
clearLayout: () => void;
|
|
12
|
-
};
|
|
13
|
-
handleClose: () => void;
|
|
14
|
-
title?: string;
|
|
15
|
-
enableBulkEdit?: boolean;
|
|
16
|
-
enableRowPalettizer?: boolean;
|
|
17
|
-
showTipsStorageKey?: string;
|
|
18
|
-
SourcesGridComponent: React.ComponentType<{
|
|
19
|
-
rows: {
|
|
20
|
-
name: string;
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
}[];
|
|
23
|
-
onChange: (rows: {
|
|
24
|
-
name: string;
|
|
25
|
-
[key: string]: unknown;
|
|
26
|
-
}[]) => void;
|
|
27
|
-
showTips: boolean;
|
|
28
|
-
}>;
|
|
29
|
-
}
|
|
30
|
-
export default function SetColorDialog({ model, handleClose, title, enableBulkEdit, enableRowPalettizer, showTipsStorageKey, SourcesGridComponent, }: SetColorDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SetColorDialog;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const DraggableDialog_1 = __importDefault(require("@jbrowse/core/ui/DraggableDialog"));
|
|
10
|
-
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
const material_1 = require("@mui/material");
|
|
12
|
-
const mui_1 = require("tss-react/mui");
|
|
13
|
-
const SetColorDialogBulkEditPanel_1 = __importDefault(require("./SetColorDialogBulkEditPanel"));
|
|
14
|
-
const SetColorDialogHelpfulTips_1 = __importDefault(require("./SetColorDialogHelpfulTips"));
|
|
15
|
-
const SetColorDialogRowPalettizer_1 = __importDefault(require("./SetColorDialogRowPalettizer"));
|
|
16
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
17
|
-
content: {
|
|
18
|
-
minWidth: 800,
|
|
19
|
-
},
|
|
20
|
-
fr: {
|
|
21
|
-
float: 'right',
|
|
22
|
-
display: 'flex',
|
|
23
|
-
gap: 8,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
function SetColorDialog({ model, handleClose, title = 'Color/arrangement editor', enableBulkEdit = false, enableRowPalettizer = false, showTipsStorageKey = 'setColorDialog-showTips', SourcesGridComponent, }) {
|
|
27
|
-
const { classes } = useStyles();
|
|
28
|
-
const { sources } = model;
|
|
29
|
-
const [showBulkEditor, setShowBulkEditor] = (0, react_1.useState)(false);
|
|
30
|
-
const [currLayout, setCurrLayout] = (0, react_1.useState)(structuredClone(sources || []));
|
|
31
|
-
const [showTips, setShowTips] = (0, util_1.useLocalStorage)(showTipsStorageKey, false);
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(DraggableDialog_1.default, { open: true, onClose: handleClose, maxWidth: "xl", title: title, children: showBulkEditor && enableBulkEdit ? ((0, jsx_runtime_1.jsx)(SetColorDialogBulkEditPanel_1.default, { currLayout: currLayout, onClose: arg => {
|
|
33
|
-
if (arg) {
|
|
34
|
-
setCurrLayout(arg);
|
|
35
|
-
}
|
|
36
|
-
setShowBulkEditor(false);
|
|
37
|
-
} })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { className: classes.content, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.fr, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
38
|
-
setShowTips(!showTips);
|
|
39
|
-
}, children: showTips ? 'Hide tips' : 'Show tips' }), enableBulkEdit ? ((0, jsx_runtime_1.jsx)(material_1.Button, { color: "secondary", variant: "contained", onClick: () => {
|
|
40
|
-
setShowBulkEditor(!showBulkEditor);
|
|
41
|
-
}, children: "Show Bulk row editor" })) : null] }), showTips ? (0, jsx_runtime_1.jsx)(SetColorDialogHelpfulTips_1.default, {}) : null, enableRowPalettizer ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(SetColorDialogRowPalettizer_1.default, { currLayout: currLayout, setCurrLayout: setCurrLayout })] })) : null, (0, jsx_runtime_1.jsx)(SourcesGridComponent, { rows: currLayout, onChange: setCurrLayout, showTips: showTips })] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", type: "submit", color: "inherit", onClick: () => {
|
|
42
|
-
model.clearLayout();
|
|
43
|
-
setCurrLayout(model.sources || []);
|
|
44
|
-
}, children: "Clear custom settings" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
45
|
-
handleClose();
|
|
46
|
-
setCurrLayout([...(model.sources || [])]);
|
|
47
|
-
}, children: "Cancel" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", type: "submit", onClick: () => {
|
|
48
|
-
model.setLayout(currLayout);
|
|
49
|
-
handleClose();
|
|
50
|
-
}, children: "Submit" })] })] })) }));
|
|
51
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }: {
|
|
2
|
-
currLayout: {
|
|
3
|
-
name: string;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}[];
|
|
6
|
-
onClose: (arg?: {
|
|
7
|
-
name: string;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}[]) => void;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SetColorDialogBulkEditPanel;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const mui_1 = require("tss-react/mui");
|
|
9
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
10
|
-
textAreaFont: {
|
|
11
|
-
fontFamily: 'Courier New',
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
function SetColorDialogBulkEditPanel({ onClose, currLayout, }) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
|
-
const [val, setVal] = (0, react_1.useState)('');
|
|
17
|
-
const [error, setError] = (0, react_1.useState)();
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Paste CSV or TSV. If a header column is present. First line is a header. If a column called \"name\" is present, it uses that to connect to IDs in the table, otherwise it uses the first column no." }), error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", multiline: true, minRows: 5, placeholder: 'name,population\nHG00098,GBR\nHG00101,GBR\nHG00459,CHS\n...', maxRows: 10, fullWidth: true, value: val, onChange: event => {
|
|
19
|
-
setVal(event.target.value);
|
|
20
|
-
}, slotProps: {
|
|
21
|
-
input: {
|
|
22
|
-
classes: {
|
|
23
|
-
input: classes.textAreaFont,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
} })] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
27
|
-
const lines = val
|
|
28
|
-
.split('\n')
|
|
29
|
-
.map(f => f.trim())
|
|
30
|
-
.filter(f => !!f);
|
|
31
|
-
const fields = lines[0].split(/[,\t]/gm);
|
|
32
|
-
if (fields.includes('name')) {
|
|
33
|
-
setError('');
|
|
34
|
-
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
35
|
-
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
36
|
-
const cols = line.split(/[,\t]/gm);
|
|
37
|
-
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
38
|
-
return [
|
|
39
|
-
newRecord.name,
|
|
40
|
-
{
|
|
41
|
-
...newRecord,
|
|
42
|
-
...oldLayout[newRecord.name],
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
}));
|
|
46
|
-
onClose(currLayout.map(record => ({
|
|
47
|
-
...record,
|
|
48
|
-
...newData[record.name],
|
|
49
|
-
})));
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
setError(new Error('No "name" column found on line 1'));
|
|
53
|
-
}
|
|
54
|
-
}, children: "Update rows" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: () => {
|
|
55
|
-
const lines = val
|
|
56
|
-
.split('\n')
|
|
57
|
-
.map(f => f.trim())
|
|
58
|
-
.filter(f => !!f);
|
|
59
|
-
const fields = lines[0].split(/[,\t]/gm);
|
|
60
|
-
if (fields.includes('name')) {
|
|
61
|
-
setError('');
|
|
62
|
-
const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
|
|
63
|
-
const newData = Object.fromEntries(lines.slice(1).map(line => {
|
|
64
|
-
const cols = line.split(/[,\t]/gm);
|
|
65
|
-
const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
|
|
66
|
-
return [
|
|
67
|
-
newRecord.name,
|
|
68
|
-
{
|
|
69
|
-
...newRecord,
|
|
70
|
-
...oldLayout[newRecord.name],
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
}));
|
|
74
|
-
onClose(currLayout.map(record => ({
|
|
75
|
-
...newData[record.name],
|
|
76
|
-
})));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
setError(new Error('No "name" column found on line 1'));
|
|
80
|
-
}
|
|
81
|
-
}, children: "Replace rows" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
82
|
-
onClose();
|
|
83
|
-
}, children: "Cancel" })] })] }));
|
|
84
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function SetColorDialogHelpfulTips(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SetColorDialogHelpfulTips;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
function SetColorDialogHelpfulTips() {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Helpful tips", (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "You can select rows in the table with the checkboxes" }), (0, jsx_runtime_1.jsx)("li", { children: "Multi-select is enabled with shift-click and control-click" }), (0, jsx_runtime_1.jsx)("li", { children: "The \"Move selected items up/down\" can re-arrange subtracks" }), (0, jsx_runtime_1.jsx)("li", { children: "Sorting the data grid itself can also re-arrange subtracks" }), (0, jsx_runtime_1.jsx)("li", { children: "Changes are applied when you hit Submit" }), (0, jsx_runtime_1.jsx)("li", { children: "You can click and drag the dialog box to move it on the screen" }), (0, jsx_runtime_1.jsx)("li", { children: "Columns in the table can be hidden using a vertical '...' menu on the right side of each column" })] })] }));
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function SetColorDialogRowPalettizer({ setCurrLayout, currLayout, }: {
|
|
2
|
-
currLayout: {
|
|
3
|
-
name: string;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}[];
|
|
6
|
-
setCurrLayout: (arg: {
|
|
7
|
-
name: string;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}[]) => void;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SetColorDialogRowPalettizer;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
6
|
-
const color_1 = require("@jbrowse/core/util/color");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
function SetColorDialogRowPalettizer({ setCurrLayout, currLayout, }) {
|
|
9
|
-
if (!currLayout.length || !currLayout[0]) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
const fields = Object.keys(currLayout[0]).filter(f => f !== 'name' &&
|
|
13
|
-
f !== 'color' &&
|
|
14
|
-
f !== 'label' &&
|
|
15
|
-
f !== 'id' &&
|
|
16
|
-
f !== 'HP');
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: ["Create color palette based on...", fields.map(r => ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "inherit", onClick: () => {
|
|
18
|
-
const map = new Map();
|
|
19
|
-
for (const row of currLayout) {
|
|
20
|
-
const val = map.get(row[r]);
|
|
21
|
-
if (!val) {
|
|
22
|
-
map.set(row[r], 1);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
map.set(row[r], val + 1);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const ret = Object.fromEntries([...map.entries()]
|
|
29
|
-
.sort((a, b) => a[1] - b[1])
|
|
30
|
-
.map((r, idx) => [r[0], colors_1.set1[idx] || (0, color_1.randomColor)(r[0])]));
|
|
31
|
-
setCurrLayout(currLayout.map(row => ({
|
|
32
|
-
...row,
|
|
33
|
-
color: ret[row[r]],
|
|
34
|
-
})));
|
|
35
|
-
}, children: r }, r))), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
|
|
36
|
-
setCurrLayout(currLayout.map(row => ({
|
|
37
|
-
...row,
|
|
38
|
-
color: undefined,
|
|
39
|
-
})));
|
|
40
|
-
}, children: "Clear colors" })] }));
|
|
41
|
-
}
|
package/dist/shared/constants.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare function getColorAlleleCount(ref: number, alt: number, alt2: number, uncalled: number, total: number, drawReference?: boolean): any;
|
|
2
|
-
export declare function drawColorAlleleCount(c: string, ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, featureType?: string, featureStrand?: number, alpha?: number): void;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getColorAlleleCount = getColorAlleleCount;
|
|
4
|
-
exports.drawColorAlleleCount = drawColorAlleleCount;
|
|
5
|
-
const colord_1 = require("@jbrowse/core/util/colord");
|
|
6
|
-
const constants_1 = require("./constants");
|
|
7
|
-
function getColorAlleleCount(ref, alt, alt2, uncalled, total, drawReference = true) {
|
|
8
|
-
if (ref === total) {
|
|
9
|
-
return drawReference ? '#ccc' : '';
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
let a1;
|
|
13
|
-
if (alt) {
|
|
14
|
-
a1 = (0, colord_1.colord)(`hsl(200,50%,${80 - (alt / total) * 50}%)`);
|
|
15
|
-
}
|
|
16
|
-
if (alt2) {
|
|
17
|
-
const l = `hsla(0,100%,20%,${alt2 / total})`;
|
|
18
|
-
a1 = a1 ? a1.mix(l) : (0, colord_1.colord)(l);
|
|
19
|
-
}
|
|
20
|
-
if (uncalled) {
|
|
21
|
-
const l = `hsl(50,50%,50%,${uncalled / total})`;
|
|
22
|
-
a1 = a1 ? a1.mix(l) : (0, colord_1.colord)(l);
|
|
23
|
-
}
|
|
24
|
-
return (a1 === null || a1 === void 0 ? void 0 : a1.toHex()) || 'black';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function drawColorAlleleCount(c, ctx, x, y, w, h, featureType = '', featureStrand, alpha = 1) {
|
|
28
|
-
ctx.fillStyle = alpha !== 1 ? (0, colord_1.colord)(c).alpha(alpha).toHex() : c;
|
|
29
|
-
if (featureType === 'inversion') {
|
|
30
|
-
if (featureStrand === 1) {
|
|
31
|
-
ctx.beginPath();
|
|
32
|
-
ctx.moveTo(x - constants_1.f2, y - constants_1.f2);
|
|
33
|
-
ctx.lineTo(x - constants_1.f2, y + h + constants_1.f2);
|
|
34
|
-
ctx.lineTo(x + w + constants_1.f2, y + h / 2);
|
|
35
|
-
ctx.closePath();
|
|
36
|
-
ctx.fill();
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
ctx.beginPath();
|
|
40
|
-
ctx.moveTo(x + w + constants_1.f2, y - constants_1.f2);
|
|
41
|
-
ctx.lineTo(x + w + constants_1.f2, y + h + constants_1.f2);
|
|
42
|
-
ctx.lineTo(x - constants_1.f2, y + h / 2);
|
|
43
|
-
ctx.closePath();
|
|
44
|
-
ctx.fill();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
ctx.fillRect(x - constants_1.f2, y - constants_1.f2, w + constants_1.f2, h + constants_1.f2);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function drawPhased(alleles: string[], ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, HP: number, PS?: string, drawReference?: boolean, alpha?: number): string | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.drawPhased = drawPhased;
|
|
4
|
-
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
5
|
-
const colord_1 = require("@jbrowse/core/util/colord");
|
|
6
|
-
const constants_1 = require("./constants");
|
|
7
|
-
const util_1 = require("./util");
|
|
8
|
-
function getColorPhased(alleles, HP, drawReference = true) {
|
|
9
|
-
const c = +alleles[HP];
|
|
10
|
-
return c ? colors_1.set1[c - 1] || 'black' : drawReference ? '#ccc' : undefined;
|
|
11
|
-
}
|
|
12
|
-
function getColorPhasedWithPhaseSet(alleles, HP, PS, drawReference = true) {
|
|
13
|
-
const c = +alleles[HP];
|
|
14
|
-
return c ? (0, util_1.colorify)(+PS) || 'black' : drawReference ? '#ccc' : undefined;
|
|
15
|
-
}
|
|
16
|
-
function drawPhased(alleles, ctx, x, y, w, h, HP, PS, drawReference = true, alpha = 1) {
|
|
17
|
-
const c = PS !== undefined
|
|
18
|
-
? getColorPhasedWithPhaseSet(alleles, HP, PS, drawReference)
|
|
19
|
-
: getColorPhased(alleles, HP, drawReference);
|
|
20
|
-
if (c) {
|
|
21
|
-
ctx.fillStyle = alpha !== 1 ? (0, colord_1.colord)(c).alpha(alpha).toHex() : c;
|
|
22
|
-
ctx.fillRect(x - constants_1.f2, y - constants_1.f2, w + constants_1.f2, h + constants_1.f2);
|
|
23
|
-
}
|
|
24
|
-
return c;
|
|
25
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from './types';
|
|
2
|
-
export declare function getSources({ sources, layout, renderingMode, sampleInfo, }: {
|
|
3
|
-
sources: Source[];
|
|
4
|
-
layout?: Source[];
|
|
5
|
-
renderingMode: string;
|
|
6
|
-
sampleInfo?: Record<string, SampleInfo>;
|
|
7
|
-
}): {
|
|
8
|
-
label: string;
|
|
9
|
-
id: string;
|
|
10
|
-
baseUri?: string;
|
|
11
|
-
name: string;
|
|
12
|
-
color?: string;
|
|
13
|
-
group?: string;
|
|
14
|
-
HP?: number;
|
|
15
|
-
}[];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSources = getSources;
|
|
4
|
-
function getSources({ sources, layout = sources, renderingMode, sampleInfo, }) {
|
|
5
|
-
const rows = [];
|
|
6
|
-
const sourceMap = Object.fromEntries(sources.map(s => [s.name, s]));
|
|
7
|
-
for (const row of layout) {
|
|
8
|
-
if (renderingMode === 'phased') {
|
|
9
|
-
const info = sampleInfo === null || sampleInfo === void 0 ? void 0 : sampleInfo[row.name];
|
|
10
|
-
if (info === null || info === void 0 ? void 0 : info.isPhased) {
|
|
11
|
-
const ploidy = info.maxPloidy;
|
|
12
|
-
for (let i = 0; i < ploidy; i++) {
|
|
13
|
-
const id = `${row.name} HP${i}`;
|
|
14
|
-
rows.push({
|
|
15
|
-
...sourceMap[row.name],
|
|
16
|
-
...row,
|
|
17
|
-
label: id,
|
|
18
|
-
HP: i,
|
|
19
|
-
id: id,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
rows.push({
|
|
26
|
-
...sourceMap[row.name],
|
|
27
|
-
...row,
|
|
28
|
-
label: row.name,
|
|
29
|
-
id: row.name,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return rows;
|
|
34
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
-
export declare function findSecondLargestNumber(arr: Iterable<number>): number;
|
|
3
|
-
export declare function calculateAlleleCounts(feat: Feature): Record<string, number>;
|
|
4
|
-
export declare function calculateMinorAlleleFrequency(alleleCounts: Record<string, number>): number;
|
|
5
|
-
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, stopToken, }: {
|
|
6
|
-
features: Iterable<Feature>;
|
|
7
|
-
minorAlleleFrequencyFilter: number;
|
|
8
|
-
lengthCutoffFilter: number;
|
|
9
|
-
stopToken?: string;
|
|
10
|
-
}): {
|
|
11
|
-
feature: Feature;
|
|
12
|
-
mostFrequentAlt: string;
|
|
13
|
-
alleleCounts: Record<string, number>;
|
|
14
|
-
}[];
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findSecondLargestNumber = findSecondLargestNumber;
|
|
4
|
-
exports.calculateAlleleCounts = calculateAlleleCounts;
|
|
5
|
-
exports.calculateMinorAlleleFrequency = calculateMinorAlleleFrequency;
|
|
6
|
-
exports.getFeaturesThatPassMinorAlleleFrequencyFilter = getFeaturesThatPassMinorAlleleFrequencyFilter;
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
function findSecondLargestNumber(arr) {
|
|
9
|
-
let firstMax = 0;
|
|
10
|
-
let secondMax = 0;
|
|
11
|
-
for (const num of arr) {
|
|
12
|
-
if (num > firstMax) {
|
|
13
|
-
secondMax = firstMax;
|
|
14
|
-
firstMax = num;
|
|
15
|
-
}
|
|
16
|
-
else if (num > secondMax && num !== firstMax) {
|
|
17
|
-
secondMax = num;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return secondMax;
|
|
21
|
-
}
|
|
22
|
-
function calculateAlleleCounts(feat) {
|
|
23
|
-
var _a;
|
|
24
|
-
const genotypes = feat.get('genotypes');
|
|
25
|
-
const alleleCounts = { 0: 0, 1: 0, '.': 0 };
|
|
26
|
-
const cacheSplit = {};
|
|
27
|
-
const vals = Object.values(genotypes);
|
|
28
|
-
const len = vals.length;
|
|
29
|
-
for (let i = 0; i < len; i++) {
|
|
30
|
-
const genotype = vals[i];
|
|
31
|
-
const alleles = cacheSplit[genotype] || (cacheSplit[genotype] = genotype.split(/[/|]/));
|
|
32
|
-
for (let i = 0, len = alleles.length; i < len; i++) {
|
|
33
|
-
const a = alleles[i];
|
|
34
|
-
alleleCounts[a] = ((_a = alleleCounts[a]) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return alleleCounts;
|
|
38
|
-
}
|
|
39
|
-
function calculateMinorAlleleFrequency(alleleCounts) {
|
|
40
|
-
return (findSecondLargestNumber(Object.values(alleleCounts)) /
|
|
41
|
-
((0, util_1.sum)(Object.values(alleleCounts)) || 1));
|
|
42
|
-
}
|
|
43
|
-
function getMostFrequentAlt(alleleCounts) {
|
|
44
|
-
let mostFrequentAlt;
|
|
45
|
-
let max = 0;
|
|
46
|
-
for (const [alt, altCount] of Object.entries(alleleCounts)) {
|
|
47
|
-
if (alt !== '.' && alt !== '0') {
|
|
48
|
-
if (altCount > max) {
|
|
49
|
-
mostFrequentAlt = alt;
|
|
50
|
-
max = altCount;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return mostFrequentAlt;
|
|
55
|
-
}
|
|
56
|
-
function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, stopToken, }) {
|
|
57
|
-
const results = [];
|
|
58
|
-
(0, util_1.forEachWithStopTokenCheck)(features, stopToken, feature => {
|
|
59
|
-
if (feature.get('end') - feature.get('start') <= lengthCutoffFilter) {
|
|
60
|
-
const alleleCounts = calculateAlleleCounts(feature);
|
|
61
|
-
if (calculateMinorAlleleFrequency(alleleCounts) >=
|
|
62
|
-
minorAlleleFrequencyFilter) {
|
|
63
|
-
results.push({
|
|
64
|
-
feature,
|
|
65
|
-
mostFrequentAlt: getMostFrequentAlt(alleleCounts),
|
|
66
|
-
alleleCounts,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
return results;
|
|
72
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { GridRowId } from '@mui/x-data-grid';
|
|
2
|
-
export declare function moveUp(arr: {
|
|
3
|
-
name: string;
|
|
4
|
-
}[], sel: GridRowId[], by?: number): {
|
|
5
|
-
name: string;
|
|
6
|
-
}[];
|
|
7
|
-
export declare function moveDown(arr: {
|
|
8
|
-
name: string;
|
|
9
|
-
}[], sel: GridRowId[], by?: number): {
|
|
10
|
-
name: string;
|
|
11
|
-
}[];
|