@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,115 +1,130 @@
|
|
|
1
|
-
import { featureSpanPx,
|
|
1
|
+
import { featureSpanPx, updateStatus } from '@jbrowse/core/util';
|
|
2
2
|
import Flatbush from '@jbrowse/core/util/flatbush';
|
|
3
|
-
import {
|
|
4
|
-
import { f2 } from
|
|
5
|
-
import { drawColorAlleleCount,
|
|
6
|
-
import { drawPhased } from
|
|
7
|
-
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from
|
|
3
|
+
import { checkStopToken2, createStopTokenChecker, } from '@jbrowse/core/util/stopToken';
|
|
4
|
+
import { f2 } from "../shared/constants.js";
|
|
5
|
+
import { drawColorAlleleCount, getAlleleColor, } from "../shared/drawAlleleCount.js";
|
|
6
|
+
import { drawPhased } from "../shared/drawPhased.js";
|
|
7
|
+
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from "../shared/minorAlleleFrequencyUtils.js";
|
|
8
|
+
function drawPhasedMode(drawCtx, itemData, mafs) {
|
|
9
|
+
const { ctx, sources, region, bpPerPx, startRow, endRow, h, drawH, scrollTop, splitCache, drawRef, genotypesCache, stopToken, } = drawCtx;
|
|
10
|
+
const { items, coords } = itemData;
|
|
11
|
+
const lastCheck = createStopTokenChecker(stopToken);
|
|
12
|
+
for (const { feature } of mafs) {
|
|
13
|
+
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
14
|
+
const featureId = feature.id();
|
|
15
|
+
const bpLen = feature.get('end') - feature.get('start');
|
|
16
|
+
const w = Math.max(Math.round(rightPx - leftPx), 2);
|
|
17
|
+
const x = Math.floor(leftPx);
|
|
18
|
+
let samp = genotypesCache.get(featureId);
|
|
19
|
+
if (!samp) {
|
|
20
|
+
samp = feature.get('genotypes');
|
|
21
|
+
genotypesCache.set(featureId, samp);
|
|
22
|
+
}
|
|
23
|
+
for (let j = startRow; j < endRow; j++) {
|
|
24
|
+
const y = j * h - scrollTop;
|
|
25
|
+
const { name, HP } = sources[j];
|
|
26
|
+
const genotype = samp[name];
|
|
27
|
+
if (genotype) {
|
|
28
|
+
const isPhased = genotype.includes('|');
|
|
29
|
+
if (isPhased) {
|
|
30
|
+
const alleles = splitCache[genotype] ?? (splitCache[genotype] = genotype.split('|'));
|
|
31
|
+
if (drawPhased(alleles, ctx, x, y, w, drawH, HP, undefined, drawRef)) {
|
|
32
|
+
items.push({ name, genotype, featureId, bpLen });
|
|
33
|
+
coords.push(x, y, x + w, y + drawH);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
ctx.fillStyle = 'black';
|
|
38
|
+
ctx.fillRect(x - f2, y - f2, w + f2, drawH + f2);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
checkStopToken2(lastCheck);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function drawAlleleCountMode(drawCtx, itemData, mafs, colorCache) {
|
|
46
|
+
const { ctx, sources, region, bpPerPx, startRow, endRow, h, drawH, scrollTop, splitCache, drawRef, genotypesCache, stopToken, } = drawCtx;
|
|
47
|
+
const { items, coords } = itemData;
|
|
48
|
+
const lastCheck = createStopTokenChecker(stopToken);
|
|
49
|
+
for (const { mostFrequentAlt, feature } of mafs) {
|
|
50
|
+
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
51
|
+
const featureId = feature.id();
|
|
52
|
+
const bpLen = feature.get('end') - feature.get('start');
|
|
53
|
+
const w = Math.max(Math.round(rightPx - leftPx), 2);
|
|
54
|
+
const x = Math.floor(leftPx);
|
|
55
|
+
let samp = genotypesCache.get(featureId);
|
|
56
|
+
if (!samp) {
|
|
57
|
+
samp = feature.get('genotypes');
|
|
58
|
+
genotypesCache.set(featureId, samp);
|
|
59
|
+
}
|
|
60
|
+
const featureType = feature.get('type');
|
|
61
|
+
const featureStrand = feature.get('strand');
|
|
62
|
+
const alpha = bpLen > 5 ? 0.75 : 1;
|
|
63
|
+
for (let j = startRow; j < endRow; j++) {
|
|
64
|
+
const y = j * h - scrollTop;
|
|
65
|
+
const { name } = sources[j];
|
|
66
|
+
const genotype = samp[name];
|
|
67
|
+
if (genotype) {
|
|
68
|
+
const c = getAlleleColor(genotype, mostFrequentAlt, colorCache, splitCache, drawRef);
|
|
69
|
+
if (c) {
|
|
70
|
+
drawColorAlleleCount(c, ctx, x, y, w, drawH, featureType, featureStrand, alpha);
|
|
71
|
+
items.push({ name, genotype, featureId, bpLen });
|
|
72
|
+
coords.push(x, y, x + w, y + drawH);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
checkStopToken2(lastCheck);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
8
79
|
export async function makeImageData(ctx, props) {
|
|
9
|
-
const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, features, regions, bpPerPx, renderingMode, stopToken, lengthCutoffFilter, referenceDrawingMode, } = props;
|
|
80
|
+
const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, height: canvasHeight, features, regions, bpPerPx, renderingMode, stopToken, lengthCutoffFilter, referenceDrawingMode, statusCallback = () => { }, } = props;
|
|
10
81
|
const region = regions[0];
|
|
11
|
-
const
|
|
12
|
-
|
|
82
|
+
const lastCheck = createStopTokenChecker(stopToken);
|
|
83
|
+
const coords = [];
|
|
84
|
+
const items = [];
|
|
85
|
+
const colorCache = {};
|
|
86
|
+
const splitCache = {};
|
|
87
|
+
const genotypesCache = new Map();
|
|
88
|
+
const drawRef = referenceDrawingMode === 'draw';
|
|
89
|
+
const h = rowHeight;
|
|
90
|
+
const drawH = Math.max(rowHeight, 1);
|
|
91
|
+
const startRow = Math.floor(scrollTop / h);
|
|
92
|
+
const endRow = Math.min(sources.length, Math.ceil((scrollTop + canvasHeight) / h));
|
|
13
93
|
const mafs = await updateStatus('Calculating stats', statusCallback, () => getFeaturesThatPassMinorAlleleFrequencyFilter({
|
|
14
|
-
|
|
94
|
+
lastCheck,
|
|
15
95
|
features: features.values(),
|
|
16
96
|
minorAlleleFrequencyFilter,
|
|
17
97
|
lengthCutoffFilter,
|
|
98
|
+
genotypesCache,
|
|
99
|
+
splitCache,
|
|
18
100
|
}));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
101
|
+
const drawCtx = {
|
|
102
|
+
ctx,
|
|
103
|
+
sources,
|
|
104
|
+
region,
|
|
105
|
+
bpPerPx,
|
|
106
|
+
startRow,
|
|
107
|
+
endRow,
|
|
108
|
+
h,
|
|
109
|
+
drawH,
|
|
110
|
+
scrollTop,
|
|
111
|
+
splitCache,
|
|
112
|
+
drawRef,
|
|
113
|
+
genotypesCache,
|
|
114
|
+
stopToken,
|
|
115
|
+
};
|
|
116
|
+
const itemData = { items, coords };
|
|
23
117
|
await updateStatus('Drawing variants', statusCallback, () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let y = -scrollTop;
|
|
31
|
-
const s = sources.length;
|
|
32
|
-
if (renderingMode === 'phased') {
|
|
33
|
-
for (let j = 0; j < s; j++) {
|
|
34
|
-
const { name, HP } = sources[j];
|
|
35
|
-
const genotype = samp[name];
|
|
36
|
-
const x = Math.floor(leftPx);
|
|
37
|
-
const h = Math.max(rowHeight, 1);
|
|
38
|
-
if (genotype) {
|
|
39
|
-
const isPhased = genotype.includes('|');
|
|
40
|
-
if (isPhased) {
|
|
41
|
-
const alleles = genotype.split('|');
|
|
42
|
-
if (drawPhased(alleles, ctx, x, y, w, h, HP, undefined, referenceDrawingMode === 'draw')) {
|
|
43
|
-
items.push({
|
|
44
|
-
name,
|
|
45
|
-
genotype,
|
|
46
|
-
featureId,
|
|
47
|
-
bpLen,
|
|
48
|
-
});
|
|
49
|
-
coords.push(x, y, x + w, y + h);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
ctx.fillStyle = 'black';
|
|
54
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
y += rowHeight;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
for (let j = 0; j < s; j++) {
|
|
62
|
-
const { name } = sources[j];
|
|
63
|
-
const genotype = samp[name];
|
|
64
|
-
const x = Math.floor(leftPx);
|
|
65
|
-
const h = Math.max(rowHeight, 1);
|
|
66
|
-
if (genotype) {
|
|
67
|
-
const cacheKey = `${genotype}:${mostFrequentAlt}`;
|
|
68
|
-
let c = colorCache[cacheKey];
|
|
69
|
-
if (c === undefined) {
|
|
70
|
-
let alt = 0;
|
|
71
|
-
let uncalled = 0;
|
|
72
|
-
let alt2 = 0;
|
|
73
|
-
let ref = 0;
|
|
74
|
-
const alleles = genotype.split(/[/|]/);
|
|
75
|
-
const total = alleles.length;
|
|
76
|
-
for (let i = 0; i < total; i++) {
|
|
77
|
-
const allele = alleles[i];
|
|
78
|
-
if (allele === mostFrequentAlt) {
|
|
79
|
-
alt++;
|
|
80
|
-
}
|
|
81
|
-
else if (allele === '0') {
|
|
82
|
-
ref++;
|
|
83
|
-
}
|
|
84
|
-
else if (allele === '.') {
|
|
85
|
-
uncalled++;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
alt2++;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
c = getColorAlleleCount(ref, alt, alt2, uncalled, total, referenceDrawingMode === 'draw');
|
|
92
|
-
colorCache[cacheKey] = c;
|
|
93
|
-
}
|
|
94
|
-
if (c) {
|
|
95
|
-
drawColorAlleleCount(c, ctx, x, y, w, h, feature.get('type'), feature.get('strand'), bpLen > 5 ? 0.75 : 1);
|
|
96
|
-
items.push({
|
|
97
|
-
name,
|
|
98
|
-
genotype,
|
|
99
|
-
featureId,
|
|
100
|
-
bpLen,
|
|
101
|
-
});
|
|
102
|
-
coords.push(x, y, x + w, y + h);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
y += rowHeight;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
118
|
+
if (renderingMode === 'phased') {
|
|
119
|
+
drawPhasedMode(drawCtx, itemData, mafs);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
drawAlleleCountMode(drawCtx, itemData, mafs, colorCache);
|
|
123
|
+
}
|
|
109
124
|
});
|
|
110
125
|
const flatbush = new Flatbush(Math.max(items.length, 1));
|
|
111
126
|
if (items.length) {
|
|
112
|
-
for (let i = 0
|
|
127
|
+
for (let i = 0, l = coords.length; i < l; i += 4) {
|
|
113
128
|
flatbush.add(coords[i], coords[i + 1], coords[i + 2], coords[i + 3]);
|
|
114
129
|
}
|
|
115
130
|
}
|
|
@@ -117,18 +132,20 @@ export async function makeImageData(ctx, props) {
|
|
|
117
132
|
flatbush.add(0, 0);
|
|
118
133
|
}
|
|
119
134
|
flatbush.finish();
|
|
135
|
+
const featureGenotypeMap = {};
|
|
136
|
+
for (const { feature } of mafs) {
|
|
137
|
+
const id = feature.id();
|
|
138
|
+
featureGenotypeMap[id] = {
|
|
139
|
+
alt: feature.get('ALT'),
|
|
140
|
+
ref: feature.get('REF'),
|
|
141
|
+
name: feature.get('name'),
|
|
142
|
+
description: feature.get('description'),
|
|
143
|
+
length: feature.get('end') - feature.get('start'),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
120
146
|
return {
|
|
121
147
|
flatbush: flatbush.data,
|
|
122
148
|
items,
|
|
123
|
-
featureGenotypeMap
|
|
124
|
-
feature.id(),
|
|
125
|
-
{
|
|
126
|
-
alt: feature.get('ALT'),
|
|
127
|
-
ref: feature.get('REF'),
|
|
128
|
-
name: feature.get('name'),
|
|
129
|
-
description: feature.get('description'),
|
|
130
|
-
length: feature.get('end') - feature.get('start'),
|
|
131
|
-
},
|
|
132
|
-
])),
|
|
149
|
+
featureGenotypeMap,
|
|
133
150
|
};
|
|
134
151
|
}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { ThemeOptions } from '@mui/material';
|
|
5
|
-
export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
|
|
6
|
-
bpPerPx: number;
|
|
7
|
-
height: number;
|
|
8
|
-
highResolutionScaling: number;
|
|
9
|
-
themeOptions: ThemeOptions;
|
|
10
|
-
}
|
|
11
|
-
export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
|
|
12
|
-
features: Map<string, Feature>;
|
|
13
|
-
}
|
|
14
|
-
export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
|
|
15
|
-
sources: Source[];
|
|
16
|
-
rowHeight: number;
|
|
17
|
-
scrollTop: number;
|
|
18
|
-
minorAlleleFrequencyFilter: number;
|
|
19
|
-
lengthCutoffFilter: number;
|
|
20
|
-
statusCallback?: (arg: string) => void;
|
|
1
|
+
import type { MultiVariantRenderArgsBase } from '../shared/types.ts';
|
|
2
|
+
export interface MultiRenderArgsDeserialized extends MultiVariantRenderArgsBase {
|
|
3
|
+
referenceDrawingMode?: string;
|
|
21
4
|
}
|
|
@@ -4,7 +4,7 @@ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
|
4
4
|
import { fetchAndMaybeUnzipText, updateStatus } from '@jbrowse/core/util';
|
|
5
5
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
6
6
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
7
|
-
import VcfFeature from
|
|
7
|
+
import VcfFeature from "../VcfFeature/index.js";
|
|
8
8
|
export default class SplitVcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
9
9
|
async configurePre(refName) {
|
|
10
10
|
const indexType = this.getConf('indexType');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const SplitVcfTabixAdapter: import("
|
|
1
|
+
declare const SplitVcfTabixAdapter: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
2
|
vcfGzLocationMap: {
|
|
3
3
|
type: string;
|
|
4
4
|
defaultValue: {};
|
|
@@ -19,5 +19,5 @@ declare const SplitVcfTabixAdapter: import("@jbrowse/core/configuration/configur
|
|
|
19
19
|
locationType: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
}, import("
|
|
22
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
23
23
|
export default SplitVcfTabixAdapter;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
|
-
import configSchema from
|
|
3
|
-
export { default as configSchema } from
|
|
2
|
+
import configSchema from "./configSchema.js";
|
|
3
|
+
export { default as configSchema } from "./configSchema.js";
|
|
4
4
|
export default function VcfTabixAdapterF(pluginManager) {
|
|
5
5
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
6
6
|
name: 'SplitVcfTabixAdapter',
|
|
7
7
|
displayName: 'VCF tabix adapter (split across multiple files)',
|
|
8
8
|
configSchema,
|
|
9
|
-
getAdapterClass: () => import(
|
|
9
|
+
getAdapterClass: () => import("./SplitVcfTabixAdapter.js").then(r => r.default),
|
|
10
10
|
}));
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyRegion, Block } from './types';
|
|
1
|
+
import type { AnyRegion, Block } from './types.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }: {
|
|
@@ -10,71 +10,54 @@ function bpToRadians(block, pos) {
|
|
|
10
10
|
const bpOffset = block.flipped ? blockEnd - pos : pos - blockStart;
|
|
11
11
|
return bpOffset / block.bpPerRadian + block.startRadians;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const [hovered, setHovered] = useState(false);
|
|
16
|
-
const startBlock = blocksForRefs[feature.get('refName')];
|
|
17
|
-
if (!startBlock) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
let svType;
|
|
21
|
-
if (feature.get('INFO')) {
|
|
22
|
-
;
|
|
23
|
-
[svType] = feature.get('INFO').SVTYPE || [];
|
|
24
|
-
}
|
|
25
|
-
else if (feature.get('mate')) {
|
|
26
|
-
svType = 'mate';
|
|
27
|
-
}
|
|
28
|
-
let endPosition;
|
|
29
|
-
let endBlock;
|
|
30
|
-
const alt = (_a = feature.get('ALT')) === null || _a === void 0 ? void 0 : _a[0];
|
|
13
|
+
function getEndpoint(feature, blocksForRefs, startBlock) {
|
|
14
|
+
const alt = feature.get('ALT')?.[0];
|
|
31
15
|
const bnd = alt && parseBreakend(alt);
|
|
32
|
-
const
|
|
16
|
+
const mate = feature.get('mate');
|
|
33
17
|
if (bnd) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
endBlock = blocksForRefs[matePosition[0]];
|
|
18
|
+
const [chr, pos] = bnd.MatePosition.split(':');
|
|
19
|
+
return { endBlock: blocksForRefs[chr], endPosition: +pos };
|
|
37
20
|
}
|
|
38
21
|
else if (alt === '<TRA>') {
|
|
39
|
-
const chr2 =
|
|
40
|
-
const end =
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
const chr2 = feature.get('INFO')?.CHR2?.[0];
|
|
23
|
+
const end = feature.get('INFO')?.END?.[0];
|
|
24
|
+
return {
|
|
25
|
+
endBlock: blocksForRefs[chr2],
|
|
26
|
+
endPosition: Number.parseInt(end, 10),
|
|
27
|
+
};
|
|
43
28
|
}
|
|
44
|
-
else if (
|
|
45
|
-
|
|
46
|
-
const chr2 = mate.refName;
|
|
47
|
-
endPosition = mate.start;
|
|
48
|
-
endBlock = blocksForRefs[chr2];
|
|
29
|
+
else if (mate) {
|
|
30
|
+
return { endBlock: blocksForRefs[mate.refName], endPosition: mate.start };
|
|
49
31
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
return { endBlock: startBlock, endPosition: feature.get('end') };
|
|
33
|
+
}
|
|
34
|
+
const Chord = observer(function Chord({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }) {
|
|
35
|
+
const [hovered, setHovered] = useState(false);
|
|
36
|
+
const startBlock = blocksForRefs[feature.get('refName')];
|
|
37
|
+
if (!startBlock) {
|
|
38
|
+
return null;
|
|
53
39
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const endXY = polarToCartesian(radius, endRadians);
|
|
59
|
-
const controlXY = polarToCartesian(bezierRadius, (endRadians + startRadians) / 2);
|
|
60
|
-
const strokeColor = selected
|
|
61
|
-
? readConfObject(config, 'strokeColorSelected', { feature })
|
|
62
|
-
: readConfObject(config, 'strokeColor', { feature });
|
|
63
|
-
const hoverStrokeColor = readConfObject(config, 'strokeColorHover', {
|
|
64
|
-
feature,
|
|
65
|
-
});
|
|
66
|
-
return (_jsx("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), ...getStrokeProps(hovered ? hoverStrokeColor : strokeColor), strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
67
|
-
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
68
|
-
}, onMouseOver: () => {
|
|
69
|
-
if (!selected) {
|
|
70
|
-
setHovered(true);
|
|
71
|
-
}
|
|
72
|
-
}, onMouseOut: () => {
|
|
73
|
-
if (!selected) {
|
|
74
|
-
setHovered(false);
|
|
75
|
-
}
|
|
76
|
-
} }));
|
|
40
|
+
const startPos = feature.get('start');
|
|
41
|
+
const { endBlock, endPosition } = getEndpoint(feature, blocksForRefs, startBlock);
|
|
42
|
+
if (!endBlock) {
|
|
43
|
+
return null;
|
|
77
44
|
}
|
|
78
|
-
|
|
45
|
+
const startRadians = bpToRadians(startBlock, startPos);
|
|
46
|
+
const endRadians = bpToRadians(endBlock, endPosition);
|
|
47
|
+
const [x1, y1] = polarToCartesian(radius, startRadians);
|
|
48
|
+
const [x2, y2] = polarToCartesian(radius, endRadians);
|
|
49
|
+
const [cx, cy] = polarToCartesian(bezierRadius, (endRadians + startRadians) / 2);
|
|
50
|
+
const stroke = readConfObject(config, hovered
|
|
51
|
+
? 'strokeColorHover'
|
|
52
|
+
: selected
|
|
53
|
+
? 'strokeColorSelected'
|
|
54
|
+
: 'strokeColor', { feature });
|
|
55
|
+
return (_jsx("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: `M ${x1} ${y1} Q ${cx} ${cy} ${x2} ${y2}`, ...getStrokeProps(stroke), strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
56
|
+
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
57
|
+
}, onMouseOver: () => {
|
|
58
|
+
setHovered(true);
|
|
59
|
+
}, onMouseOut: () => {
|
|
60
|
+
setHovered(false);
|
|
61
|
+
} }));
|
|
79
62
|
});
|
|
80
63
|
export default Chord;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AnyRegion, Block } from './types';
|
|
1
|
+
import type { AnyRegion, Block } from './types.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
declare const
|
|
4
|
+
declare const SVChordsReactComponent: ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }: {
|
|
5
5
|
features: Map<string, Feature>;
|
|
6
6
|
radius: number;
|
|
7
7
|
config: AnyConfigurationModel;
|
|
@@ -13,4 +13,4 @@ declare const StructuralVariantChordsReactComponent: ({ features, config, blockD
|
|
|
13
13
|
bezierRadius: number;
|
|
14
14
|
onChordClick: (feature: Feature, reg: AnyRegion, endBlock: AnyRegion, evt: unknown) => void;
|
|
15
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export default
|
|
16
|
+
export default SVChordsReactComponent;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import Chord from
|
|
5
|
-
const
|
|
4
|
+
import Chord from "./Chord.js";
|
|
5
|
+
const SVChordsReactComponent = observer(function SVChordsReactComponent({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }) {
|
|
6
6
|
const { selectedFeatureId } = displayModel || {};
|
|
7
7
|
const blocksForRefsMemo = useMemo(() => {
|
|
8
8
|
const blocksForRefs = {};
|
|
@@ -22,4 +22,4 @@ const StructuralVariantChordsReactComponent = observer(function ({ features, con
|
|
|
22
22
|
return (_jsx(Chord, { feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }, id));
|
|
23
23
|
}) }));
|
|
24
24
|
});
|
|
25
|
-
export default
|
|
25
|
+
export default SVChordsReactComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const configSchema: import("
|
|
1
|
+
declare const configSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
2
|
strokeColor: {
|
|
3
3
|
type: string;
|
|
4
4
|
description: string;
|
|
@@ -17,5 +17,5 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
|
|
|
17
17
|
defaultValue: string;
|
|
18
18
|
contextVariable: string[];
|
|
19
19
|
};
|
|
20
|
-
}, import("
|
|
20
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
21
21
|
export default configSchema;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import ChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
|
-
import
|
|
3
|
-
import configSchema from './configSchema';
|
|
3
|
+
import configSchema from "./configSchema.js";
|
|
4
4
|
export default function StructuralVariantChordRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new ChordRendererType({
|
|
6
6
|
name: 'StructuralVariantChordRenderer',
|
|
7
7
|
displayName: 'SV chord renderer',
|
|
8
|
-
ReactComponent,
|
|
8
|
+
ReactComponent: lazy(() => import("./ReactComponent.js")),
|
|
9
9
|
configSchema,
|
|
10
10
|
pluginManager,
|
|
11
11
|
}));
|
package/esm/Tooltip.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense } from 'react';
|
|
3
3
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
hoverVertical: {
|
|
8
8
|
background: '#333',
|
|
@@ -18,7 +18,7 @@ const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, off
|
|
|
18
18
|
const { featureUnderMouse } = model;
|
|
19
19
|
const { classes } = useStyles();
|
|
20
20
|
const x = clientMouseCoord[0] + 5;
|
|
21
|
-
const y = useClientY ? clientMouseCoord[1] :
|
|
21
|
+
const y = useClientY ? clientMouseCoord[1] : clientRect?.top || 0;
|
|
22
22
|
return featureUnderMouse ? (_jsxs(_Fragment, { children: [_jsx(Suspense, { fallback: null, children: _jsx(BaseTooltip, { clientPoint: { x, y }, children: _jsx(TooltipContents, { model: model, feature: featureUnderMouse }) }) }), _jsx("div", { className: classes.hoverVertical, style: {
|
|
23
23
|
left: offsetMouseCoord[0],
|
|
24
24
|
height: height,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from 'react';
|
|
3
|
-
import { getMinimalDesc } from
|
|
3
|
+
import { getMinimalDesc } from "../VcfFeature/util.js";
|
|
4
4
|
export default function AltFormatter({ value, refString, }) {
|
|
5
5
|
const [show, setShow] = useState(false);
|
|
6
6
|
const alt = useMemo(() => getMinimalDesc(refString, value), [refString, value]);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import copy from 'copy-to-clipboard';
|
|
4
3
|
export default function Formatter({ value }) {
|
|
5
4
|
const [show, setShow] = useState(false);
|
|
6
5
|
const [copied, setCopied] = useState(false);
|
|
7
6
|
const display = String(value);
|
|
8
|
-
return display.length > 100 ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => {
|
|
7
|
+
return display.length > 100 ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: async () => {
|
|
8
|
+
const { default: copy } = await import('copy-to-clipboard');
|
|
9
9
|
copy(display);
|
|
10
10
|
setCopied(true);
|
|
11
11
|
setTimeout(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreakpointSplitViewChoiceDialog as default } from '@jbrowse/sv-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreakpointSplitViewChoiceDialog as default } from '@jbrowse/sv-core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VariantFeatureWidgetModel } from '../stateModelFactory';
|
|
1
|
+
import type { VariantFeatureWidgetModel } from '../stateModelFactory.ts';
|
|
2
2
|
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
3
|
export default function LaunchBreakendPanel(props: {
|
|
4
4
|
locStrings: string[];
|
|
@@ -2,18 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { lazy } from 'react';
|
|
3
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
4
4
|
import { SimpleFeature, getEnv, getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { getAssemblyName } from '@jbrowse/sv-core';
|
|
5
6
|
import { Link, Typography } from '@mui/material';
|
|
6
|
-
const
|
|
7
|
-
const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
|
|
7
|
+
const BreakpointSplitViewChoiceDialog = lazy(() => import("./BreakpointSplitViewChoiceDialog.js"));
|
|
8
8
|
function LocStringList({ locStrings, model, }) {
|
|
9
9
|
const session = getSession(model);
|
|
10
10
|
return (_jsxs("div", { children: [_jsx(Typography, { children: "Navigate to breakend endpoint in linear view:" }), _jsx("ul", { children: locStrings.map((locString, index) => (_jsxs("li", { children: [locString, ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
11
|
-
var _a;
|
|
12
11
|
event.preventDefault();
|
|
13
12
|
const { view } = model;
|
|
14
13
|
try {
|
|
15
14
|
if (view) {
|
|
16
|
-
|
|
15
|
+
view.navToLocString?.(locString);
|
|
17
16
|
}
|
|
18
17
|
else {
|
|
19
18
|
throw new Error('No view associated with this feature detail panel anymore');
|
|
@@ -26,37 +25,23 @@ function LocStringList({ locStrings, model, }) {
|
|
|
26
25
|
}, children: "(LGV)" })] }, `${locString}-${index}`))) })] }));
|
|
27
26
|
}
|
|
28
27
|
function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, }) {
|
|
29
|
-
var _a, _b;
|
|
30
28
|
const session = getSession(model);
|
|
31
29
|
const simpleFeature = new SimpleFeature(feature);
|
|
32
|
-
const assemblyName = (
|
|
33
|
-
return (_jsxs("div", { children: [_jsx(Typography, { children: "Launch split view" }), _jsx("ul", { children: locStrings.map(locString => (_jsxs("li", { children: [`${feature.refName}:${feature.start} // ${locString}`, ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
30
|
+
const assemblyName = getAssemblyName(model.view);
|
|
31
|
+
return assemblyName ? (_jsxs("div", { children: [_jsx(Typography, { children: "Launch split view" }), _jsx("ul", { children: locStrings.map(locString => (_jsxs("li", { children: [`${feature.refName}:${feature.start} // ${locString}`, ' ', _jsx(Link, { href: "#", onClick: event => {
|
|
34
32
|
event.preventDefault();
|
|
35
33
|
session.queueDialog(handleClose => [
|
|
36
|
-
|
|
34
|
+
BreakpointSplitViewChoiceDialog,
|
|
37
35
|
{
|
|
38
36
|
handleClose,
|
|
39
37
|
session,
|
|
40
38
|
feature: simpleFeature,
|
|
41
|
-
stableViewId: `${model.id}_${assemblyName}
|
|
39
|
+
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview`,
|
|
42
40
|
view: model.view,
|
|
43
41
|
assemblyName,
|
|
44
42
|
},
|
|
45
43
|
]);
|
|
46
|
-
}, children: "(
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
session.queueDialog(handleClose => [
|
|
49
|
-
BreakendSingleLevelOptionDialog,
|
|
50
|
-
{
|
|
51
|
-
handleClose,
|
|
52
|
-
session,
|
|
53
|
-
feature: simpleFeature,
|
|
54
|
-
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_singlelevel`,
|
|
55
|
-
view: model.view,
|
|
56
|
-
assemblyName,
|
|
57
|
-
},
|
|
58
|
-
]);
|
|
59
|
-
}, children: "(single row)" })] }, JSON.stringify(locString)))) })] }));
|
|
44
|
+
}, children: "(breakpoint split view)" })] }, locString))) })] })) : null;
|
|
60
45
|
}
|
|
61
46
|
export default function LaunchBreakendPanel(props) {
|
|
62
47
|
const { model, locStrings, feature } = props;
|