@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,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = MultiVariantRendererF;
|
|
7
|
-
const MultiVariantRenderer_1 = __importDefault(require("./MultiVariantRenderer"));
|
|
8
|
-
const MultiLinearVariantRendering_1 = __importDefault(require("./components/MultiLinearVariantRendering"));
|
|
9
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
|
-
function MultiVariantRendererF(pluginManager) {
|
|
11
|
-
pluginManager.addRendererType(() => {
|
|
12
|
-
return new MultiVariantRenderer_1.default({
|
|
13
|
-
name: 'MultiVariantRenderer',
|
|
14
|
-
ReactComponent: MultiLinearVariantRendering_1.default,
|
|
15
|
-
configSchema: configSchema_1.default,
|
|
16
|
-
pluginManager,
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MultiRenderArgsDeserialized } from './types';
|
|
2
|
-
export declare function makeImageData(ctx: CanvasRenderingContext2D, props: MultiRenderArgsDeserialized): Promise<{
|
|
3
|
-
flatbush: ArrayBufferLike;
|
|
4
|
-
items: any[];
|
|
5
|
-
featureGenotypeMap: {
|
|
6
|
-
[k: string]: {
|
|
7
|
-
alt: any;
|
|
8
|
-
ref: any;
|
|
9
|
-
name: any;
|
|
10
|
-
description: any;
|
|
11
|
-
length: number;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}>;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.makeImageData = makeImageData;
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const flatbush_1 = __importDefault(require("@jbrowse/core/util/flatbush"));
|
|
9
|
-
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
10
|
-
const constants_1 = require("../shared/constants");
|
|
11
|
-
const drawAlleleCount_1 = require("../shared/drawAlleleCount");
|
|
12
|
-
const drawPhased_1 = require("../shared/drawPhased");
|
|
13
|
-
const minorAlleleFrequencyUtils_1 = require("../shared/minorAlleleFrequencyUtils");
|
|
14
|
-
async function makeImageData(ctx, props) {
|
|
15
|
-
const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, features, regions, bpPerPx, renderingMode, stopToken, lengthCutoffFilter, referenceDrawingMode, } = props;
|
|
16
|
-
const region = regions[0];
|
|
17
|
-
const { statusCallback = () => { } } = props;
|
|
18
|
-
(0, stopToken_1.checkStopToken)(stopToken);
|
|
19
|
-
const mafs = await (0, util_1.updateStatus)('Calculating stats', statusCallback, () => (0, minorAlleleFrequencyUtils_1.getFeaturesThatPassMinorAlleleFrequencyFilter)({
|
|
20
|
-
stopToken,
|
|
21
|
-
features: features.values(),
|
|
22
|
-
minorAlleleFrequencyFilter,
|
|
23
|
-
lengthCutoffFilter,
|
|
24
|
-
}));
|
|
25
|
-
(0, stopToken_1.checkStopToken)(stopToken);
|
|
26
|
-
const coords = [];
|
|
27
|
-
const items = [];
|
|
28
|
-
const colorCache = {};
|
|
29
|
-
await (0, util_1.updateStatus)('Drawing variants', statusCallback, () => {
|
|
30
|
-
(0, util_1.forEachWithStopTokenCheck)(mafs, stopToken, ({ mostFrequentAlt, feature }) => {
|
|
31
|
-
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
32
|
-
const featureId = feature.id();
|
|
33
|
-
const bpLen = feature.get('end') - feature.get('start');
|
|
34
|
-
const w = Math.max(Math.round(rightPx - leftPx), 2);
|
|
35
|
-
const samp = feature.get('genotypes');
|
|
36
|
-
let y = -scrollTop;
|
|
37
|
-
const s = sources.length;
|
|
38
|
-
if (renderingMode === 'phased') {
|
|
39
|
-
for (let j = 0; j < s; j++) {
|
|
40
|
-
const { name, HP } = sources[j];
|
|
41
|
-
const genotype = samp[name];
|
|
42
|
-
const x = Math.floor(leftPx);
|
|
43
|
-
const h = Math.max(rowHeight, 1);
|
|
44
|
-
if (genotype) {
|
|
45
|
-
const isPhased = genotype.includes('|');
|
|
46
|
-
if (isPhased) {
|
|
47
|
-
const alleles = genotype.split('|');
|
|
48
|
-
if ((0, drawPhased_1.drawPhased)(alleles, ctx, x, y, w, h, HP, undefined, referenceDrawingMode === 'draw')) {
|
|
49
|
-
items.push({
|
|
50
|
-
name,
|
|
51
|
-
genotype,
|
|
52
|
-
featureId,
|
|
53
|
-
bpLen,
|
|
54
|
-
});
|
|
55
|
-
coords.push(x, y, x + w, y + h);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
ctx.fillStyle = 'black';
|
|
60
|
-
ctx.fillRect(x - constants_1.f2, y - constants_1.f2, w + constants_1.f2, h + constants_1.f2);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
y += rowHeight;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
for (let j = 0; j < s; j++) {
|
|
68
|
-
const { name } = sources[j];
|
|
69
|
-
const genotype = samp[name];
|
|
70
|
-
const x = Math.floor(leftPx);
|
|
71
|
-
const h = Math.max(rowHeight, 1);
|
|
72
|
-
if (genotype) {
|
|
73
|
-
const cacheKey = `${genotype}:${mostFrequentAlt}`;
|
|
74
|
-
let c = colorCache[cacheKey];
|
|
75
|
-
if (c === undefined) {
|
|
76
|
-
let alt = 0;
|
|
77
|
-
let uncalled = 0;
|
|
78
|
-
let alt2 = 0;
|
|
79
|
-
let ref = 0;
|
|
80
|
-
const alleles = genotype.split(/[/|]/);
|
|
81
|
-
const total = alleles.length;
|
|
82
|
-
for (let i = 0; i < total; i++) {
|
|
83
|
-
const allele = alleles[i];
|
|
84
|
-
if (allele === mostFrequentAlt) {
|
|
85
|
-
alt++;
|
|
86
|
-
}
|
|
87
|
-
else if (allele === '0') {
|
|
88
|
-
ref++;
|
|
89
|
-
}
|
|
90
|
-
else if (allele === '.') {
|
|
91
|
-
uncalled++;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
alt2++;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
c = (0, drawAlleleCount_1.getColorAlleleCount)(ref, alt, alt2, uncalled, total, referenceDrawingMode === 'draw');
|
|
98
|
-
colorCache[cacheKey] = c;
|
|
99
|
-
}
|
|
100
|
-
if (c) {
|
|
101
|
-
(0, drawAlleleCount_1.drawColorAlleleCount)(c, ctx, x, y, w, h, feature.get('type'), feature.get('strand'), bpLen > 5 ? 0.75 : 1);
|
|
102
|
-
items.push({
|
|
103
|
-
name,
|
|
104
|
-
genotype,
|
|
105
|
-
featureId,
|
|
106
|
-
bpLen,
|
|
107
|
-
});
|
|
108
|
-
coords.push(x, y, x + w, y + h);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
y += rowHeight;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
const flatbush = new flatbush_1.default(Math.max(items.length, 1));
|
|
117
|
-
if (items.length) {
|
|
118
|
-
for (let i = 0; i < coords.length; i += 4) {
|
|
119
|
-
flatbush.add(coords[i], coords[i + 1], coords[i + 2], coords[i + 3]);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
flatbush.add(0, 0);
|
|
124
|
-
}
|
|
125
|
-
flatbush.finish();
|
|
126
|
-
return {
|
|
127
|
-
flatbush: flatbush.data,
|
|
128
|
-
items,
|
|
129
|
-
featureGenotypeMap: Object.fromEntries(mafs.map(({ feature }) => [
|
|
130
|
-
feature.id(),
|
|
131
|
-
{
|
|
132
|
-
alt: feature.get('ALT'),
|
|
133
|
-
ref: feature.get('REF'),
|
|
134
|
-
name: feature.get('name'),
|
|
135
|
-
description: feature.get('description'),
|
|
136
|
-
length: feature.get('end') - feature.get('start'),
|
|
137
|
-
},
|
|
138
|
-
])),
|
|
139
|
-
};
|
|
140
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Source } from '../shared/types';
|
|
2
|
-
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
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;
|
|
21
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
-
import type { Source } from './shared/types';
|
|
3
|
-
import type { RenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
4
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
-
import type { ThemeOptions } from '@mui/material';
|
|
6
|
-
export interface RenderArgs extends RenderArgsDeserialized {
|
|
7
|
-
bpPerPx: number;
|
|
8
|
-
height: number;
|
|
9
|
-
highResolutionScaling: number;
|
|
10
|
-
themeOptions: ThemeOptions;
|
|
11
|
-
}
|
|
12
|
-
export interface RenderArgsDeserializedWithFeatures extends RenderArgs {
|
|
13
|
-
features: Map<string, Feature>;
|
|
14
|
-
}
|
|
15
|
-
export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
|
|
16
|
-
sources: Source[];
|
|
17
|
-
}
|
|
18
|
-
export default abstract class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
19
|
-
supportsSVG: boolean;
|
|
20
|
-
render(renderProps: RenderArgs): Promise<{
|
|
21
|
-
features: Map<string, Feature>;
|
|
22
|
-
height: number;
|
|
23
|
-
width: number;
|
|
24
|
-
containsNoTransferables: boolean;
|
|
25
|
-
canvasRecordedData: Record<string, unknown>;
|
|
26
|
-
reactElement?: React.ReactElement;
|
|
27
|
-
html?: string;
|
|
28
|
-
} | {
|
|
29
|
-
features: Map<string, Feature>;
|
|
30
|
-
height: number;
|
|
31
|
-
width: number;
|
|
32
|
-
containsNoTransferables: boolean;
|
|
33
|
-
imageData: any;
|
|
34
|
-
reactElement?: React.ReactElement;
|
|
35
|
-
html?: string;
|
|
36
|
-
} | {
|
|
37
|
-
features: Map<string, Feature>;
|
|
38
|
-
height: number;
|
|
39
|
-
width: number;
|
|
40
|
-
containsNoTransferables: boolean;
|
|
41
|
-
reactElement: React.ReactElement;
|
|
42
|
-
html?: string;
|
|
43
|
-
}>;
|
|
44
|
-
abstract draw<T extends RenderArgsDeserializedWithFeatures>(ctx: CanvasRenderingContext2D, props: T): Promise<Record<string, unknown> | undefined>;
|
|
45
|
-
}
|
|
46
|
-
export type { RenderArgsSerialized, RenderResults, ResultsDeserialized, ResultsSerialized, } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const FeatureRendererType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType"));
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
class MultiVariantBaseRenderer extends FeatureRendererType_1.default {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.supportsSVG = true;
|
|
12
|
-
}
|
|
13
|
-
async render(renderProps) {
|
|
14
|
-
const features = await this.getFeatures(renderProps);
|
|
15
|
-
const { height, regions, bpPerPx } = renderProps;
|
|
16
|
-
const region = regions[0];
|
|
17
|
-
const width = (region.end - region.start) / bpPerPx;
|
|
18
|
-
const rest = await (0, util_1.renderToAbstractCanvas)(width, height, renderProps, ctx => this.draw(ctx, {
|
|
19
|
-
...renderProps,
|
|
20
|
-
features,
|
|
21
|
-
}));
|
|
22
|
-
const results = await super.render({
|
|
23
|
-
...renderProps,
|
|
24
|
-
...rest,
|
|
25
|
-
features,
|
|
26
|
-
height,
|
|
27
|
-
width,
|
|
28
|
-
});
|
|
29
|
-
return {
|
|
30
|
-
...results,
|
|
31
|
-
...rest,
|
|
32
|
-
features: new Map(),
|
|
33
|
-
height,
|
|
34
|
-
width,
|
|
35
|
-
containsNoTransferables: true,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.default = MultiVariantBaseRenderer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TabixIndexedFile } from '@gmod/tabix';
|
|
2
|
-
import VcfParser from '@gmod/vcf';
|
|
3
|
-
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
|
-
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
5
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
6
|
-
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
7
|
-
export default class SplitVcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
8
|
-
private configurePre;
|
|
9
|
-
configure(refName: string, opts?: BaseOptions): Promise<{
|
|
10
|
-
vcf: TabixIndexedFile;
|
|
11
|
-
parser: VcfParser;
|
|
12
|
-
}>;
|
|
13
|
-
getRefNames(): Promise<string[]>;
|
|
14
|
-
getFeatures(query: NoAssemblyRegion, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
15
|
-
getSources(): Promise<{
|
|
16
|
-
name: string;
|
|
17
|
-
}[]>;
|
|
18
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const tabix_1 = require("@gmod/tabix");
|
|
7
|
-
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
8
|
-
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const io_1 = require("@jbrowse/core/util/io");
|
|
11
|
-
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
12
|
-
const VcfFeature_1 = __importDefault(require("../VcfFeature"));
|
|
13
|
-
class SplitVcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
|
-
async configurePre(refName) {
|
|
15
|
-
const indexType = this.getConf('indexType');
|
|
16
|
-
const vcfGzLocation = this.getConf('vcfGzLocationMap')[refName];
|
|
17
|
-
const indexLocation = this.getConf('indexLocationMap')[refName] || {
|
|
18
|
-
uri: `${vcfGzLocation.uri}.${indexType.toLowerCase()}`,
|
|
19
|
-
};
|
|
20
|
-
const filehandle = (0, io_1.openLocation)(vcfGzLocation, this.pluginManager);
|
|
21
|
-
const isCSI = indexType === 'CSI';
|
|
22
|
-
const vcf = new tabix_1.TabixIndexedFile({
|
|
23
|
-
filehandle,
|
|
24
|
-
csiFilehandle: isCSI
|
|
25
|
-
? (0, io_1.openLocation)(indexLocation, this.pluginManager)
|
|
26
|
-
: undefined,
|
|
27
|
-
tbiFilehandle: !isCSI
|
|
28
|
-
? (0, io_1.openLocation)(indexLocation, this.pluginManager)
|
|
29
|
-
: undefined,
|
|
30
|
-
chunkCacheSize: 50 * 2 ** 20,
|
|
31
|
-
});
|
|
32
|
-
return {
|
|
33
|
-
vcf,
|
|
34
|
-
parser: new vcf_1.default({
|
|
35
|
-
header: await vcf.getHeader(),
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
async configure(refName, opts) {
|
|
40
|
-
const { statusCallback = () => { } } = opts || {};
|
|
41
|
-
return (0, util_1.updateStatus)('Downloading index', statusCallback, () => this.configurePre(refName));
|
|
42
|
-
}
|
|
43
|
-
async getRefNames() {
|
|
44
|
-
return Object.keys(this.getConf('vcfGzLocationMap'));
|
|
45
|
-
}
|
|
46
|
-
getFeatures(query, opts = {}) {
|
|
47
|
-
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
48
|
-
const { refName, start, end } = query;
|
|
49
|
-
const { statusCallback = () => { } } = opts;
|
|
50
|
-
const { vcf, parser } = await this.configure(query.refName, opts);
|
|
51
|
-
await (0, util_1.updateStatus)('Downloading variants', statusCallback, () => vcf.getLines(refName, start, end, {
|
|
52
|
-
lineCallback: (line, fileOffset) => {
|
|
53
|
-
observer.next(new VcfFeature_1.default({
|
|
54
|
-
variant: parser.parseLine(line),
|
|
55
|
-
parser,
|
|
56
|
-
id: `${this.id}-vcf-${fileOffset}`,
|
|
57
|
-
}));
|
|
58
|
-
},
|
|
59
|
-
...opts,
|
|
60
|
-
}));
|
|
61
|
-
observer.complete();
|
|
62
|
-
}, opts.stopToken);
|
|
63
|
-
}
|
|
64
|
-
async getSources() {
|
|
65
|
-
const conf = this.getConf('samplesTsvLocation');
|
|
66
|
-
const r = Object.keys(this.getConf('vcfGzLocationMap'))[0];
|
|
67
|
-
if (conf.uri === '' || conf.uri === '/path/to/samples.tsv') {
|
|
68
|
-
const { parser } = await this.configure(r);
|
|
69
|
-
return parser.samples.map(name => ({
|
|
70
|
-
name,
|
|
71
|
-
}));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
const txt = await (0, util_1.fetchAndMaybeUnzipText)((0, io_1.openLocation)(conf, this.pluginManager));
|
|
75
|
-
const lines = txt.split(/\n|\r\n|\r/);
|
|
76
|
-
const header = lines[0].split('\t');
|
|
77
|
-
const { parser } = await this.configure(r);
|
|
78
|
-
const s = new Set(parser.samples);
|
|
79
|
-
return lines
|
|
80
|
-
.slice(1)
|
|
81
|
-
.map(line => {
|
|
82
|
-
const cols = line.split('\t');
|
|
83
|
-
return {
|
|
84
|
-
name: cols[0],
|
|
85
|
-
...Object.fromEntries(cols.slice(1).map((c, idx) => [header[idx + 1], c])),
|
|
86
|
-
};
|
|
87
|
-
})
|
|
88
|
-
.filter(f => s.has(f.name));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.default = SplitVcfTabixAdapter;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const SplitVcfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
vcfGzLocationMap: {
|
|
3
|
-
type: string;
|
|
4
|
-
defaultValue: {};
|
|
5
|
-
};
|
|
6
|
-
indexLocationMap: {
|
|
7
|
-
type: string;
|
|
8
|
-
defaultValue: {};
|
|
9
|
-
};
|
|
10
|
-
indexType: {
|
|
11
|
-
type: string;
|
|
12
|
-
defaultValue: string;
|
|
13
|
-
};
|
|
14
|
-
samplesTsvLocation: {
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: {
|
|
17
|
-
uri: string;
|
|
18
|
-
description: string;
|
|
19
|
-
locationType: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
23
|
-
export default SplitVcfTabixAdapter;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
function x() { }
|
|
5
|
-
const SplitVcfTabixAdapter = (0, configuration_1.ConfigurationSchema)('SplitVcfTabixAdapter', {
|
|
6
|
-
vcfGzLocationMap: {
|
|
7
|
-
type: 'frozen',
|
|
8
|
-
defaultValue: {},
|
|
9
|
-
},
|
|
10
|
-
indexLocationMap: {
|
|
11
|
-
type: 'frozen',
|
|
12
|
-
defaultValue: {},
|
|
13
|
-
},
|
|
14
|
-
indexType: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
defaultValue: 'TBI',
|
|
17
|
-
},
|
|
18
|
-
samplesTsvLocation: {
|
|
19
|
-
type: 'fileLocation',
|
|
20
|
-
defaultValue: {
|
|
21
|
-
uri: '/path/to/samples.tsv',
|
|
22
|
-
description: 'tsv with header like "name\tpopulation\tetc" where the first column is required, and corresponds to the sample names in the VCF files',
|
|
23
|
-
locationType: 'UriLocation',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}, {
|
|
27
|
-
explicitlyTyped: true,
|
|
28
|
-
});
|
|
29
|
-
exports.default = SplitVcfTabixAdapter;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.configSchema = void 0;
|
|
40
|
-
exports.default = VcfTabixAdapterF;
|
|
41
|
-
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
42
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
43
|
-
var configSchema_2 = require("./configSchema");
|
|
44
|
-
Object.defineProperty(exports, "configSchema", { enumerable: true, get: function () { return __importDefault(configSchema_2).default; } });
|
|
45
|
-
function VcfTabixAdapterF(pluginManager) {
|
|
46
|
-
pluginManager.addAdapterType(() => new AdapterType_1.default({
|
|
47
|
-
name: 'SplitVcfTabixAdapter',
|
|
48
|
-
displayName: 'VCF tabix adapter (split across multiple files)',
|
|
49
|
-
configSchema: configSchema_1.default,
|
|
50
|
-
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./SplitVcfTabixAdapter'))).then(r => r.default),
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AnyRegion, Block } from './types';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }: {
|
|
5
|
-
feature: Feature;
|
|
6
|
-
blocksForRefs: Record<string, Block>;
|
|
7
|
-
radius: number;
|
|
8
|
-
config: AnyConfigurationModel;
|
|
9
|
-
bezierRadius: number;
|
|
10
|
-
selected: boolean;
|
|
11
|
-
onClick: (feat: Feature, reg: AnyRegion, end: AnyRegion, evt: unknown) => void;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export default Chord;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const vcf_1 = require("@gmod/vcf");
|
|
6
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
function bpToRadians(block, pos) {
|
|
10
|
-
const blockStart = block.region.elided ? 0 : block.region.start;
|
|
11
|
-
const blockEnd = block.region.elided ? 0 : block.region.end;
|
|
12
|
-
const bpOffset = block.flipped ? blockEnd - pos : pos - blockStart;
|
|
13
|
-
return bpOffset / block.bpPerRadian + block.startRadians;
|
|
14
|
-
}
|
|
15
|
-
const Chord = (0, mobx_react_1.observer)(function Chord({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }) {
|
|
16
|
-
var _a, _b, _c, _d, _e;
|
|
17
|
-
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
18
|
-
const startBlock = blocksForRefs[feature.get('refName')];
|
|
19
|
-
if (!startBlock) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
let svType;
|
|
23
|
-
if (feature.get('INFO')) {
|
|
24
|
-
;
|
|
25
|
-
[svType] = feature.get('INFO').SVTYPE || [];
|
|
26
|
-
}
|
|
27
|
-
else if (feature.get('mate')) {
|
|
28
|
-
svType = 'mate';
|
|
29
|
-
}
|
|
30
|
-
let endPosition;
|
|
31
|
-
let endBlock;
|
|
32
|
-
const alt = (_a = feature.get('ALT')) === null || _a === void 0 ? void 0 : _a[0];
|
|
33
|
-
const bnd = alt && (0, vcf_1.parseBreakend)(alt);
|
|
34
|
-
const startPos = feature.get('start');
|
|
35
|
-
if (bnd) {
|
|
36
|
-
const matePosition = bnd.MatePosition.split(':');
|
|
37
|
-
endPosition = +matePosition[1];
|
|
38
|
-
endBlock = blocksForRefs[matePosition[0]];
|
|
39
|
-
}
|
|
40
|
-
else if (alt === '<TRA>') {
|
|
41
|
-
const chr2 = (_c = (_b = feature.get('INFO')) === null || _b === void 0 ? void 0 : _b.CHR2) === null || _c === void 0 ? void 0 : _c[0];
|
|
42
|
-
const end = (_e = (_d = feature.get('INFO')) === null || _d === void 0 ? void 0 : _d.END) === null || _e === void 0 ? void 0 : _e[0];
|
|
43
|
-
endPosition = Number.parseInt(end, 10);
|
|
44
|
-
endBlock = blocksForRefs[chr2];
|
|
45
|
-
}
|
|
46
|
-
else if (svType === 'mate') {
|
|
47
|
-
const mate = feature.get('mate');
|
|
48
|
-
const chr2 = mate.refName;
|
|
49
|
-
endPosition = mate.start;
|
|
50
|
-
endBlock = blocksForRefs[chr2];
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
endBlock = startBlock;
|
|
54
|
-
endPosition = feature.get('end');
|
|
55
|
-
}
|
|
56
|
-
if (endBlock) {
|
|
57
|
-
const startRadians = bpToRadians(startBlock, startPos);
|
|
58
|
-
const endRadians = bpToRadians(endBlock, endPosition);
|
|
59
|
-
const startXY = (0, util_1.polarToCartesian)(radius, startRadians);
|
|
60
|
-
const endXY = (0, util_1.polarToCartesian)(radius, endRadians);
|
|
61
|
-
const controlXY = (0, util_1.polarToCartesian)(bezierRadius, (endRadians + startRadians) / 2);
|
|
62
|
-
const strokeColor = selected
|
|
63
|
-
? (0, configuration_1.readConfObject)(config, 'strokeColorSelected', { feature })
|
|
64
|
-
: (0, configuration_1.readConfObject)(config, 'strokeColor', { feature });
|
|
65
|
-
const hoverStrokeColor = (0, configuration_1.readConfObject)(config, 'strokeColorHover', {
|
|
66
|
-
feature,
|
|
67
|
-
});
|
|
68
|
-
return ((0, jsx_runtime_1.jsx)("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), ...(0, util_1.getStrokeProps)(hovered ? hoverStrokeColor : strokeColor), strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
69
|
-
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
70
|
-
}, onMouseOver: () => {
|
|
71
|
-
if (!selected) {
|
|
72
|
-
setHovered(true);
|
|
73
|
-
}
|
|
74
|
-
}, onMouseOut: () => {
|
|
75
|
-
if (!selected) {
|
|
76
|
-
setHovered(false);
|
|
77
|
-
}
|
|
78
|
-
} }));
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
});
|
|
82
|
-
exports.default = Chord;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AnyRegion, Block } from './types';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
-
declare const StructuralVariantChordsReactComponent: ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }: {
|
|
5
|
-
features: Map<string, Feature>;
|
|
6
|
-
radius: number;
|
|
7
|
-
config: AnyConfigurationModel;
|
|
8
|
-
displayModel?: {
|
|
9
|
-
id: string;
|
|
10
|
-
selectedFeatureId: string;
|
|
11
|
-
};
|
|
12
|
-
blockDefinitions: Block[];
|
|
13
|
-
bezierRadius: number;
|
|
14
|
-
onChordClick: (feature: Feature, reg: AnyRegion, endBlock: AnyRegion, evt: unknown) => void;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export default StructuralVariantChordsReactComponent;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
const Chord_1 = __importDefault(require("./Chord"));
|
|
10
|
-
const StructuralVariantChordsReactComponent = (0, mobx_react_1.observer)(function ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }) {
|
|
11
|
-
const { selectedFeatureId } = displayModel || {};
|
|
12
|
-
const blocksForRefsMemo = (0, react_1.useMemo)(() => {
|
|
13
|
-
const blocksForRefs = {};
|
|
14
|
-
for (const block of blockDefinitions) {
|
|
15
|
-
const regions = block.region.elided
|
|
16
|
-
? block.region.regions
|
|
17
|
-
: [block.region];
|
|
18
|
-
for (const region of regions) {
|
|
19
|
-
blocksForRefs[region.refName] = block;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return blocksForRefs;
|
|
23
|
-
}, [blockDefinitions]);
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)("g", { "data-testid": "structuralVariantChordRenderer", children: [...features.values()].map(feature => {
|
|
25
|
-
const id = feature.id();
|
|
26
|
-
const selected = selectedFeatureId === id;
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(Chord_1.default, { feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }, id));
|
|
28
|
-
}) }));
|
|
29
|
-
});
|
|
30
|
-
exports.default = StructuralVariantChordsReactComponent;
|