@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,24 +1,58 @@
|
|
|
1
1
|
import { colord } from '@jbrowse/core/util/colord';
|
|
2
|
-
import { f2 } from
|
|
2
|
+
import { ALT_COLOR_HUE, ALT_COLOR_SATURATION, NO_CALL_COLOR, REFERENCE_COLOR, f2, } from "./constants.js";
|
|
3
|
+
export function getAlleleColor(genotype, mostFrequentAlt, colorCache, splitCache, drawRef) {
|
|
4
|
+
const cacheKey = `${genotype}:${mostFrequentAlt}`;
|
|
5
|
+
let c = colorCache[cacheKey];
|
|
6
|
+
if (c === undefined) {
|
|
7
|
+
let alt = 0;
|
|
8
|
+
let uncalled = 0;
|
|
9
|
+
let alt2 = 0;
|
|
10
|
+
let ref = 0;
|
|
11
|
+
const alleles = splitCache[genotype] ?? (splitCache[genotype] = genotype.split(/[/|]/));
|
|
12
|
+
const total = alleles.length;
|
|
13
|
+
for (let i = 0; i < total; i++) {
|
|
14
|
+
const allele = alleles[i];
|
|
15
|
+
if (allele === mostFrequentAlt) {
|
|
16
|
+
alt++;
|
|
17
|
+
}
|
|
18
|
+
else if (allele === '0') {
|
|
19
|
+
ref++;
|
|
20
|
+
}
|
|
21
|
+
else if (allele === '.') {
|
|
22
|
+
uncalled++;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
alt2++;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
c = getColorAlleleCount(ref, alt, alt2, uncalled, total, drawRef);
|
|
29
|
+
colorCache[cacheKey] = c;
|
|
30
|
+
}
|
|
31
|
+
return c;
|
|
32
|
+
}
|
|
3
33
|
export function getColorAlleleCount(ref, alt, alt2, uncalled, total, drawReference = true) {
|
|
4
34
|
if (ref === total) {
|
|
5
|
-
return drawReference ?
|
|
35
|
+
return drawReference ? REFERENCE_COLOR : '';
|
|
6
36
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
if (!(alt || alt2 || uncalled)) {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
let a1;
|
|
41
|
+
if (alt) {
|
|
42
|
+
const lightness = 80 - (alt / total) * 50;
|
|
43
|
+
a1 = colord(`hsl(${ALT_COLOR_HUE},${ALT_COLOR_SATURATION}%,${lightness}%)`);
|
|
44
|
+
}
|
|
45
|
+
if (alt2) {
|
|
46
|
+
const alpha = alt2 / total;
|
|
47
|
+
const l = `hsla(0,100%,20%,${alpha})`;
|
|
48
|
+
a1 = a1 ? a1.mix(l) : colord(l);
|
|
49
|
+
}
|
|
50
|
+
if (uncalled) {
|
|
51
|
+
const alpha = uncalled / total;
|
|
52
|
+
const l = NO_CALL_COLOR.replace(')', `,${alpha})`).replace('hsl', 'hsla');
|
|
53
|
+
a1 = a1 ? a1.mix(l) : colord(l);
|
|
21
54
|
}
|
|
55
|
+
return a1?.toHex() || 'black';
|
|
22
56
|
}
|
|
23
57
|
export function drawColorAlleleCount(c, ctx, x, y, w, h, featureType = '', featureStrand, alpha = 1) {
|
|
24
58
|
ctx.fillStyle = alpha !== 1 ? colord(c).alpha(alpha).toHex() : c;
|
package/esm/shared/drawPhased.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { set1 } from '@jbrowse/core/ui/colors';
|
|
2
2
|
import { colord } from '@jbrowse/core/util/colord';
|
|
3
|
-
import { f2 } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const c = +alleles[HP];
|
|
7
|
-
return c ? set1[c - 1] || 'black' : drawReference ? '#ccc' : undefined;
|
|
8
|
-
}
|
|
9
|
-
function getColorPhasedWithPhaseSet(alleles, HP, PS, drawReference = true) {
|
|
10
|
-
const c = +alleles[HP];
|
|
11
|
-
return c ? colorify(+PS) || 'black' : drawReference ? '#ccc' : undefined;
|
|
3
|
+
import { REFERENCE_COLOR, UNPHASED_COLOR, f2 } from "./constants.js";
|
|
4
|
+
function colorify(n) {
|
|
5
|
+
return `hsl(${n % 255}, 50%, 50%)`;
|
|
12
6
|
}
|
|
13
7
|
export function drawPhased(alleles, ctx, x, y, w, h, HP, PS, drawReference = true, alpha = 1) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const allele = +alleles[HP];
|
|
9
|
+
const c = allele
|
|
10
|
+
? PS !== undefined
|
|
11
|
+
? colorify(+PS) || UNPHASED_COLOR
|
|
12
|
+
: set1[allele - 1] || UNPHASED_COLOR
|
|
13
|
+
: drawReference
|
|
14
|
+
? REFERENCE_COLOR
|
|
15
|
+
: undefined;
|
|
17
16
|
if (c) {
|
|
18
17
|
ctx.fillStyle = alpha !== 1 ? colord(c).alpha(alpha).toHex() : c;
|
|
19
18
|
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from './
|
|
1
|
+
import type { SampleInfo, Source } from './types.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
import type { StopToken } from '@jbrowse/core/util/stopToken';
|
|
4
5
|
export declare function getMultiVariantFeaturesAutorun(self: {
|
|
5
6
|
configuration: AnyConfigurationModel;
|
|
6
7
|
adapterConfig: AnyConfigurationModel;
|
|
7
8
|
sources?: Source[];
|
|
8
9
|
minorAlleleFrequencyFilter: number;
|
|
9
10
|
lengthCutoffFilter: number;
|
|
10
|
-
|
|
11
|
+
featureDensityStatsReadyAndRegionNotTooLarge: boolean;
|
|
11
12
|
adapterProps: () => Record<string, unknown>;
|
|
12
13
|
setError: (error: unknown) => void;
|
|
13
14
|
setFeatures: (f: Feature[]) => void;
|
|
14
|
-
|
|
15
|
+
setStatusMessage: (str: string) => void;
|
|
15
16
|
setHasPhased: (arg: boolean) => void;
|
|
16
17
|
setSampleInfo: (arg: Record<string, SampleInfo>) => void;
|
|
17
|
-
setSimplifiedFeaturesLoading: (arg:
|
|
18
|
+
setSimplifiedFeaturesLoading: (arg: StopToken) => void;
|
|
18
19
|
}): void;
|
|
@@ -2,13 +2,14 @@ import { SimpleFeature, getContainingView, getSession, } from '@jbrowse/core/uti
|
|
|
2
2
|
import { isAbortException } from '@jbrowse/core/util/aborting';
|
|
3
3
|
import { createStopToken } from '@jbrowse/core/util/stopToken';
|
|
4
4
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
5
|
+
import { addDisposer, isAlive } from '@jbrowse/mobx-state-tree';
|
|
5
6
|
import { autorun } from 'mobx';
|
|
6
|
-
import { addDisposer, isAlive } from 'mobx-state-tree';
|
|
7
7
|
export function getMultiVariantFeaturesAutorun(self) {
|
|
8
8
|
addDisposer(self, autorun(async () => {
|
|
9
9
|
try {
|
|
10
10
|
const view = getContainingView(self);
|
|
11
|
-
if (!view.initialized ||
|
|
11
|
+
if (!view.initialized ||
|
|
12
|
+
!self.featureDensityStatsReadyAndRegionNotTooLarge) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
const stopToken = createStopToken();
|
|
@@ -25,6 +26,11 @@ export function getMultiVariantFeaturesAutorun(self) {
|
|
|
25
26
|
sessionId,
|
|
26
27
|
adapterConfig,
|
|
27
28
|
stopToken,
|
|
29
|
+
statusCallback: (arg) => {
|
|
30
|
+
if (isAlive(self)) {
|
|
31
|
+
self.setStatusMessage(arg);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
28
34
|
}));
|
|
29
35
|
if (isAlive(self)) {
|
|
30
36
|
self.setHasPhased(hasPhased);
|
|
@@ -41,5 +47,6 @@ export function getMultiVariantFeaturesAutorun(self) {
|
|
|
41
47
|
}
|
|
42
48
|
}, {
|
|
43
49
|
delay: 1000,
|
|
50
|
+
name: 'MultiVariantFeatures',
|
|
44
51
|
}));
|
|
45
52
|
}
|
package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts}
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { Source } from './
|
|
1
|
+
import type { Source } from './types.ts';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { StopToken } from '@jbrowse/core/util/stopToken';
|
|
3
4
|
export declare function getMultiVariantSourcesAutorun(self: {
|
|
4
5
|
configuration: AnyConfigurationModel;
|
|
5
6
|
adapterConfig: AnyConfigurationModel;
|
|
6
7
|
adapterProps: () => Record<string, unknown>;
|
|
7
|
-
setSourcesLoading: (aborter:
|
|
8
|
+
setSourcesLoading: (aborter: StopToken) => void;
|
|
8
9
|
setError: (error: unknown) => void;
|
|
9
|
-
|
|
10
|
+
setStatusMessage: (str: string) => void;
|
|
10
11
|
setSources: (sources: Source[]) => void;
|
|
11
12
|
}): void;
|
|
@@ -2,8 +2,8 @@ import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
|
2
2
|
import { isAbortException } from '@jbrowse/core/util/aborting';
|
|
3
3
|
import { createStopToken } from '@jbrowse/core/util/stopToken';
|
|
4
4
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
5
|
+
import { addDisposer, isAlive } from '@jbrowse/mobx-state-tree';
|
|
5
6
|
import { autorun } from 'mobx';
|
|
6
|
-
import { addDisposer, isAlive } from 'mobx-state-tree';
|
|
7
7
|
export function getMultiVariantSourcesAutorun(self) {
|
|
8
8
|
addDisposer(self, autorun(async () => {
|
|
9
9
|
try {
|
|
@@ -20,6 +20,11 @@ export function getMultiVariantSourcesAutorun(self) {
|
|
|
20
20
|
sessionId,
|
|
21
21
|
adapterConfig,
|
|
22
22
|
stopToken,
|
|
23
|
+
statusCallback: (arg) => {
|
|
24
|
+
if (isAlive(self)) {
|
|
25
|
+
self.setStatusMessage(arg);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
23
28
|
}));
|
|
24
29
|
if (isAlive(self)) {
|
|
25
30
|
self.setSources(sources);
|
|
@@ -31,5 +36,8 @@ export function getMultiVariantSourcesAutorun(self) {
|
|
|
31
36
|
getSession(self).notifyError(`${e}`, e);
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
|
-
}, {
|
|
39
|
+
}, {
|
|
40
|
+
delay: 1000,
|
|
41
|
+
name: 'GetMultiVariantSources',
|
|
42
|
+
}));
|
|
35
43
|
}
|
package/esm/shared/getSources.js
CHANGED
|
@@ -3,8 +3,8 @@ export function getSources({ sources, layout = sources, renderingMode, sampleInf
|
|
|
3
3
|
const sourceMap = Object.fromEntries(sources.map(s => [s.name, s]));
|
|
4
4
|
for (const row of layout) {
|
|
5
5
|
if (renderingMode === 'phased') {
|
|
6
|
-
const info = sampleInfo
|
|
7
|
-
if (info
|
|
6
|
+
const info = sampleInfo?.[row.name];
|
|
7
|
+
if (info?.isPhased) {
|
|
8
8
|
const ploidy = info.maxPloidy;
|
|
9
9
|
for (let i = 0; i < ploidy; i++) {
|
|
10
10
|
const id = `${row.name} HP${i}`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MouseState } from '../components/types.ts';
|
|
2
|
+
export declare function useMouseTracking(ref: React.RefObject<HTMLDivElement | null>): {
|
|
3
|
+
mouseState: MouseState | undefined;
|
|
4
|
+
handleMouseMove: (event: React.MouseEvent) => void;
|
|
5
|
+
handleMouseLeave: () => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
export function useMouseTracking(ref) {
|
|
3
|
+
const rafRef = useRef(undefined);
|
|
4
|
+
const [mouseState, setMouseState] = useState();
|
|
5
|
+
const handleMouseMove = useCallback((event) => {
|
|
6
|
+
if (rafRef.current) {
|
|
7
|
+
cancelAnimationFrame(rafRef.current);
|
|
8
|
+
}
|
|
9
|
+
const clientX = event.clientX;
|
|
10
|
+
const clientY = event.clientY;
|
|
11
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
12
|
+
const rect = ref.current?.getBoundingClientRect();
|
|
13
|
+
if (rect) {
|
|
14
|
+
setMouseState({
|
|
15
|
+
x: clientX - rect.left,
|
|
16
|
+
y: clientY - rect.top,
|
|
17
|
+
offsetX: rect.left,
|
|
18
|
+
offsetY: rect.top,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}, [ref]);
|
|
23
|
+
const handleMouseLeave = useCallback(() => {
|
|
24
|
+
if (rafRef.current) {
|
|
25
|
+
cancelAnimationFrame(rafRef.current);
|
|
26
|
+
}
|
|
27
|
+
setMouseState(undefined);
|
|
28
|
+
}, []);
|
|
29
|
+
return {
|
|
30
|
+
mouseState,
|
|
31
|
+
handleMouseMove,
|
|
32
|
+
handleMouseLeave,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LegendBarModel } from './components/types.ts';
|
|
2
|
+
interface Model extends LegendBarModel {
|
|
3
|
+
hierarchy: any;
|
|
4
|
+
availableHeight: number;
|
|
5
|
+
totalHeight: number;
|
|
6
|
+
treeAreaWidth: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function makeSidebarSvg(self: Model): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import SvgTree from "./components/SvgTree.js";
|
|
4
|
+
import LegendBar from "../shared/components/MultiVariantLegendBar.js";
|
|
5
|
+
export async function makeSidebarSvg(self) {
|
|
6
|
+
const { offsetPx } = getContainingView(self);
|
|
7
|
+
const { hierarchy, showTree, treeAreaWidth, availableHeight } = self;
|
|
8
|
+
return (_jsxs("g", { id: "tree-layer", "data-testid": "tree-layer", transform: `translate(${Math.max(-offsetPx, 0)})`, clipPath: "url(#sidebarClip)", children: [_jsx("clipPath", { id: "sidebarClip", children: _jsx("rect", { x: "0", y: "0", width: "100%", height: availableHeight }) }), _jsx("g", { id: "legend-layer", transform: `translate(${showTree && hierarchy ? treeAreaWidth : 0})`, children: _jsx(LegendBar, { model: self, orientation: "left", exportSVG: true }) }), showTree ? _jsx(SvgTree, { model: self }) : null] }));
|
|
9
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function calculateAlleleCounts(feat: Feature): Record<string, number>;
|
|
1
|
+
import type { Feature, LastStopTokenCheck } from '@jbrowse/core/util';
|
|
2
|
+
export declare function calculateAlleleCounts(genotypes: Record<string, string>, cacheSplit: Record<string, string[]>): Record<string, number>;
|
|
4
3
|
export declare function calculateMinorAlleleFrequency(alleleCounts: Record<string, number>): number;
|
|
5
|
-
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter,
|
|
4
|
+
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, lastCheck, genotypesCache, splitCache, }: {
|
|
6
5
|
features: Iterable<Feature>;
|
|
7
6
|
minorAlleleFrequencyFilter: number;
|
|
8
7
|
lengthCutoffFilter: number;
|
|
9
|
-
|
|
8
|
+
lastCheck?: LastStopTokenCheck;
|
|
9
|
+
genotypesCache?: Map<string, Record<string, string>>;
|
|
10
|
+
splitCache?: Record<string, string[]>;
|
|
10
11
|
}): {
|
|
11
12
|
feature: Feature;
|
|
12
13
|
mostFrequentAlt: string;
|
|
@@ -1,57 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export function
|
|
3
|
-
|
|
4
|
-
let secondMax = 0;
|
|
5
|
-
for (const num of arr) {
|
|
6
|
-
if (num > firstMax) {
|
|
7
|
-
secondMax = firstMax;
|
|
8
|
-
firstMax = num;
|
|
9
|
-
}
|
|
10
|
-
else if (num > secondMax && num !== firstMax) {
|
|
11
|
-
secondMax = num;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return secondMax;
|
|
15
|
-
}
|
|
16
|
-
export function calculateAlleleCounts(feat) {
|
|
17
|
-
var _a;
|
|
18
|
-
const genotypes = feat.get('genotypes');
|
|
19
|
-
const alleleCounts = { 0: 0, 1: 0, '.': 0 };
|
|
20
|
-
const cacheSplit = {};
|
|
1
|
+
import { checkStopToken2 } from '@jbrowse/core/util/stopToken';
|
|
2
|
+
export function calculateAlleleCounts(genotypes, cacheSplit) {
|
|
3
|
+
const alleleCounts = {};
|
|
21
4
|
const vals = Object.values(genotypes);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const genotype =
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
alleleCounts[a] = ((_a = alleleCounts[a]) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
5
|
+
for (const val of vals) {
|
|
6
|
+
const genotype = val;
|
|
7
|
+
const alleles = cacheSplit[genotype] ?? (cacheSplit[genotype] = genotype.split(/[/|]/));
|
|
8
|
+
for (const allele of alleles) {
|
|
9
|
+
const a = allele;
|
|
10
|
+
alleleCounts[a] = (alleleCounts[a] || 0) + 1;
|
|
29
11
|
}
|
|
30
12
|
}
|
|
31
13
|
return alleleCounts;
|
|
32
14
|
}
|
|
33
15
|
export function calculateMinorAlleleFrequency(alleleCounts) {
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
let firstMax = 0;
|
|
17
|
+
let secondMax = 0;
|
|
18
|
+
let total = 0;
|
|
19
|
+
for (const count of Object.values(alleleCounts)) {
|
|
20
|
+
total += count;
|
|
21
|
+
if (count > firstMax) {
|
|
22
|
+
secondMax = firstMax;
|
|
23
|
+
firstMax = count;
|
|
24
|
+
}
|
|
25
|
+
else if (count > secondMax && count !== firstMax) {
|
|
26
|
+
secondMax = count;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return secondMax / (total || 1);
|
|
36
30
|
}
|
|
37
31
|
function getMostFrequentAlt(alleleCounts) {
|
|
38
32
|
let mostFrequentAlt;
|
|
39
33
|
let max = 0;
|
|
40
34
|
for (const [alt, altCount] of Object.entries(alleleCounts)) {
|
|
41
|
-
if (alt !== '.' && alt !== '0') {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
max = altCount;
|
|
45
|
-
}
|
|
35
|
+
if (alt !== '.' && alt !== '0' && altCount > max) {
|
|
36
|
+
mostFrequentAlt = alt;
|
|
37
|
+
max = altCount;
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
return mostFrequentAlt;
|
|
49
41
|
}
|
|
50
|
-
export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter,
|
|
42
|
+
export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, lastCheck, genotypesCache, splitCache = {}, }) {
|
|
51
43
|
const results = [];
|
|
52
|
-
|
|
44
|
+
for (const feature of features) {
|
|
53
45
|
if (feature.get('end') - feature.get('start') <= lengthCutoffFilter) {
|
|
54
|
-
const
|
|
46
|
+
const featureId = feature.id();
|
|
47
|
+
let genotypes = genotypesCache?.get(featureId);
|
|
48
|
+
if (!genotypes) {
|
|
49
|
+
genotypes = feature.get('genotypes');
|
|
50
|
+
genotypesCache?.set(featureId, genotypes);
|
|
51
|
+
}
|
|
52
|
+
const alleleCounts = calculateAlleleCounts(genotypes, splitCache);
|
|
55
53
|
if (calculateMinorAlleleFrequency(alleleCounts) >=
|
|
56
54
|
minorAlleleFrequencyFilter) {
|
|
57
55
|
results.push({
|
|
@@ -61,6 +59,7 @@ export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorA
|
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
|
-
|
|
62
|
+
checkStopToken2(lastCheck);
|
|
63
|
+
}
|
|
65
64
|
return results;
|
|
66
65
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getMultiVariantFeaturesAutorun } from "./getMultiVariantFeaturesAutorun.js";
|
|
2
|
+
import { getMultiVariantSourcesAutorun } from "./getMultiVariantSourcesAutorun.js";
|
|
3
|
+
import { setupTreeDrawingAutorun } from "./treeDrawingAutorun.js";
|
|
4
|
+
export function setupMultiVariantAutoruns(self) {
|
|
5
|
+
getMultiVariantSourcesAutorun(self);
|
|
6
|
+
getMultiVariantFeaturesAutorun(self);
|
|
7
|
+
setupTreeDrawingAutorun(self);
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ClusterHierarchyNode, HoveredTreeNode } from './components/types.ts';
|
|
2
|
+
import type { Source } from './types.ts';
|
|
3
|
+
interface TreeDrawingModel {
|
|
4
|
+
treeCanvas?: HTMLCanvasElement;
|
|
5
|
+
mouseoverCanvas?: HTMLCanvasElement;
|
|
6
|
+
hierarchy?: ClusterHierarchyNode;
|
|
7
|
+
treeAreaWidth: number;
|
|
8
|
+
height: number;
|
|
9
|
+
scrollTop: number;
|
|
10
|
+
rowHeight: number;
|
|
11
|
+
totalHeight: number;
|
|
12
|
+
hoveredTreeNode?: HoveredTreeNode;
|
|
13
|
+
sources?: Source[];
|
|
14
|
+
}
|
|
15
|
+
export declare function setupTreeDrawingAutorun(self: TreeDrawingModel): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
2
|
+
import { addDisposer } from '@jbrowse/mobx-state-tree';
|
|
3
|
+
import { autorun } from 'mobx';
|
|
4
|
+
export function setupTreeDrawingAutorun(self) {
|
|
5
|
+
addDisposer(self, autorun(function treeDrawAutorun() {
|
|
6
|
+
const { treeCanvas, hierarchy, treeAreaWidth, height, scrollTop, totalHeight: _totalHeight, } = self;
|
|
7
|
+
if (!treeCanvas || !hierarchy) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const ctx = treeCanvas.getContext('2d');
|
|
11
|
+
if (!ctx) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
ctx.resetTransform();
|
|
15
|
+
ctx.scale(2, 2);
|
|
16
|
+
ctx.clearRect(0, 0, treeAreaWidth, height);
|
|
17
|
+
ctx.translate(0, -scrollTop);
|
|
18
|
+
ctx.strokeStyle = '#0008';
|
|
19
|
+
ctx.lineWidth = 1;
|
|
20
|
+
ctx.beginPath();
|
|
21
|
+
for (const link of hierarchy.links()) {
|
|
22
|
+
const { source, target } = link;
|
|
23
|
+
const sy = source.x;
|
|
24
|
+
const ty = target.x;
|
|
25
|
+
const tx = target.y;
|
|
26
|
+
const sx = source.y;
|
|
27
|
+
ctx.moveTo(sx, sy);
|
|
28
|
+
ctx.lineTo(sx, ty);
|
|
29
|
+
ctx.moveTo(sx, ty);
|
|
30
|
+
ctx.lineTo(tx, ty);
|
|
31
|
+
}
|
|
32
|
+
ctx.stroke();
|
|
33
|
+
}, {
|
|
34
|
+
name: 'TreeDraw',
|
|
35
|
+
}));
|
|
36
|
+
addDisposer(self, autorun(function treeHoverAutorun() {
|
|
37
|
+
const { mouseoverCanvas, hierarchy, rowHeight, hoveredTreeNode, height, scrollTop, sources, totalHeight, } = self;
|
|
38
|
+
if (!mouseoverCanvas) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const ctx = mouseoverCanvas.getContext('2d');
|
|
42
|
+
if (!ctx) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const view = getContainingView(self);
|
|
46
|
+
const viewWidth = view.width;
|
|
47
|
+
ctx.clearRect(0, 0, viewWidth, height);
|
|
48
|
+
if (hierarchy && hoveredTreeNode && sources) {
|
|
49
|
+
ctx.save();
|
|
50
|
+
ctx.translate(0, -scrollTop);
|
|
51
|
+
ctx.fillStyle = 'rgba(255,165,0,0.2)';
|
|
52
|
+
const descendantSet = new Set(hoveredTreeNode.descendantNames);
|
|
53
|
+
for (let i = 0, l = sources.length; i < l; i++) {
|
|
54
|
+
const source = sources[i];
|
|
55
|
+
if (descendantSet.has(source.name)) {
|
|
56
|
+
const y = (i + 0.5) * rowHeight;
|
|
57
|
+
ctx.fillRect(0, y - rowHeight / 2, viewWidth, rowHeight);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const { node } = hoveredTreeNode;
|
|
61
|
+
ctx.fillStyle = 'rgba(255,165,0,0.8)';
|
|
62
|
+
ctx.beginPath();
|
|
63
|
+
ctx.arc(node.y, node.x, 4, 0, 2 * Math.PI);
|
|
64
|
+
ctx.fill();
|
|
65
|
+
ctx.strokeStyle = 'rgba(255,140,0,1)';
|
|
66
|
+
ctx.lineWidth = 1;
|
|
67
|
+
ctx.stroke();
|
|
68
|
+
ctx.restore();
|
|
69
|
+
}
|
|
70
|
+
}, { name: 'TreeHover' }));
|
|
71
|
+
}
|
package/esm/shared/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
1
3
|
export interface Source {
|
|
2
4
|
baseUri?: string;
|
|
3
5
|
name: string;
|
|
@@ -12,3 +14,16 @@ export interface SampleInfo {
|
|
|
12
14
|
isPhased: boolean;
|
|
13
15
|
maxPloidy: number;
|
|
14
16
|
}
|
|
17
|
+
export interface MultiVariantRenderArgsBase extends FeatureRenderArgsDeserialized {
|
|
18
|
+
sources: Source[];
|
|
19
|
+
bpPerPx: number;
|
|
20
|
+
minorAlleleFrequencyFilter: number;
|
|
21
|
+
lengthCutoffFilter: number;
|
|
22
|
+
height: number;
|
|
23
|
+
rowHeight: number;
|
|
24
|
+
scrollTop: number;
|
|
25
|
+
features: Map<string, Feature>;
|
|
26
|
+
renderingMode: string;
|
|
27
|
+
statusCallback?: (arg: string) => void;
|
|
28
|
+
highResolutionScaling: number;
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -15,44 +15,32 @@
|
|
|
15
15
|
"directory": "plugins/variants"
|
|
16
16
|
},
|
|
17
17
|
"author": "JBrowse Team",
|
|
18
|
-
"
|
|
19
|
-
"srcMain": "src/index.ts",
|
|
20
|
-
"main": "dist/index.js",
|
|
18
|
+
"main": "esm/index.js",
|
|
21
19
|
"files": [
|
|
22
|
-
"dist",
|
|
23
20
|
"esm"
|
|
24
21
|
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "npm-run-all build:*",
|
|
27
|
-
"test": "cd ../..; jest --passWithNoTests plugins/variants",
|
|
28
|
-
"prepublishOnly": "yarn test",
|
|
29
|
-
"prepack": "yarn build && yarn useDist",
|
|
30
|
-
"postpack": "yarn useSrc",
|
|
31
|
-
"useDist": "node ../../scripts/useDist.js",
|
|
32
|
-
"useSrc": "node ../../scripts/useSrc.js",
|
|
33
|
-
"prebuild": "npm run clean",
|
|
34
|
-
"build:esm": "tsc --build tsconfig.build.esm.json",
|
|
35
|
-
"build:commonjs": "tsc --build tsconfig.build.commonjs.json",
|
|
36
|
-
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
|
-
},
|
|
38
22
|
"dependencies": {
|
|
39
|
-
"@flatten-js/interval-tree": "^2.0.
|
|
40
|
-
"@gmod/
|
|
41
|
-
"@gmod/tabix": "^3.
|
|
42
|
-
"@gmod/vcf": "^6.0
|
|
43
|
-
"@jbrowse/
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@mui/
|
|
48
|
-
"
|
|
49
|
-
"@mui/x-data-grid": "^8.0.0",
|
|
23
|
+
"@flatten-js/interval-tree": "^2.0.3",
|
|
24
|
+
"@gmod/hclust": "^1.0.7",
|
|
25
|
+
"@gmod/tabix": "^3.2.2",
|
|
26
|
+
"@gmod/vcf": "^6.1.0",
|
|
27
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
28
|
+
"@mui/icons-material": "^7.3.6",
|
|
29
|
+
"@mui/material": "^7.3.6",
|
|
30
|
+
"@mui/x-charts-vendor": "^8.23.0",
|
|
31
|
+
"@mui/x-data-grid": "^8.23.0",
|
|
32
|
+
"copy-to-clipboard": "^3.3.3",
|
|
50
33
|
"escape-html": "^1.0.3",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
34
|
+
"fast-deep-equal": "^3.1.3",
|
|
35
|
+
"@types/file-saver-es": "^2.0.3",
|
|
36
|
+
"file-saver-es": "^2.0.5",
|
|
37
|
+
"mobx": "^6.15.0",
|
|
38
|
+
"mobx-react": "^9.2.1",
|
|
39
|
+
"rxjs": "^7.8.2",
|
|
40
|
+
"@jbrowse/plugin-circular-view": "^4.0.0",
|
|
41
|
+
"@jbrowse/core": "^4.0.0",
|
|
42
|
+
"@jbrowse/plugin-linear-genome-view": "^4.0.0",
|
|
43
|
+
"@jbrowse/sv-core": "^4.0.0"
|
|
56
44
|
},
|
|
57
45
|
"peerDependencies": {
|
|
58
46
|
"react": ">=18.0.0"
|
|
@@ -60,8 +48,19 @@
|
|
|
60
48
|
"publishConfig": {
|
|
61
49
|
"access": "public"
|
|
62
50
|
},
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
"sideEffects": false,
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "pnpm run /^build:/",
|
|
54
|
+
"test": "cd ../..; jest --passWithNoTests plugins/variants",
|
|
55
|
+
"prebuild": "pnpm clean",
|
|
56
|
+
"build:esm": "tsc -p tsconfig.build.esm.json",
|
|
57
|
+
"clean": "rimraf esm *.tsbuildinfo"
|
|
58
|
+
},
|
|
59
|
+
"types": "esm/index.d.ts",
|
|
60
|
+
"exports": {
|
|
61
|
+
".": {
|
|
62
|
+
"types": "./esm/index.d.ts",
|
|
63
|
+
"import": "./esm/index.js"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|