@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
package/dist/VcfFeature/index.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const util_1 = require("@jbrowse/core/util");
|
|
4
|
-
const util_2 = require("./util");
|
|
5
|
-
function dataFromVariant(variant, parser) {
|
|
6
|
-
const { REF = '', ALT, POS, CHROM, ID } = variant;
|
|
7
|
-
const start = POS - 1;
|
|
8
|
-
const [type, description] = (0, util_2.getSOTermAndDescription)(REF, ALT, parser);
|
|
9
|
-
return {
|
|
10
|
-
refName: CHROM,
|
|
11
|
-
start,
|
|
12
|
-
end: getEnd(variant),
|
|
13
|
-
description,
|
|
14
|
-
type,
|
|
15
|
-
name: ID === null || ID === void 0 ? void 0 : ID.join(','),
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
function getEnd(variant) {
|
|
19
|
-
var _a;
|
|
20
|
-
const { POS, REF = '', ALT = [] } = variant;
|
|
21
|
-
const isTRA = ALT.includes('<TRA>');
|
|
22
|
-
const start = POS - 1;
|
|
23
|
-
const isSymbolic = ALT.some(f => f.includes('<'));
|
|
24
|
-
if (isSymbolic) {
|
|
25
|
-
const info = variant.INFO;
|
|
26
|
-
if (info.END && !isTRA) {
|
|
27
|
-
return +info.END[0];
|
|
28
|
-
}
|
|
29
|
-
const lens = [];
|
|
30
|
-
if (info.SVLEN && !isTRA) {
|
|
31
|
-
const svlens = info.SVLEN;
|
|
32
|
-
for (let i = 0; i < svlens.length; i++) {
|
|
33
|
-
const svlen = svlens[i];
|
|
34
|
-
if ((_a = ALT[i]) === null || _a === void 0 ? void 0 : _a.startsWith('<INS')) {
|
|
35
|
-
lens.push(1);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
lens.push(Math.abs(+svlen));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return start + (0, util_1.max)(lens);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return start + REF.length;
|
|
45
|
-
}
|
|
46
|
-
class VCFFeature {
|
|
47
|
-
constructor(args) {
|
|
48
|
-
this.variant = args.variant;
|
|
49
|
-
this.parser = args.parser;
|
|
50
|
-
this.data = dataFromVariant(this.variant, this.parser);
|
|
51
|
-
this._id = args.id;
|
|
52
|
-
}
|
|
53
|
-
get(field) {
|
|
54
|
-
var _a;
|
|
55
|
-
return field === 'samples'
|
|
56
|
-
? this.variant.SAMPLES()
|
|
57
|
-
: field === 'genotypes'
|
|
58
|
-
? this.variant.GENOTYPES()
|
|
59
|
-
: ((_a = this.data[field]) !== null && _a !== void 0 ? _a : this.variant[field]);
|
|
60
|
-
}
|
|
61
|
-
parent() {
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
children() {
|
|
65
|
-
return undefined;
|
|
66
|
-
}
|
|
67
|
-
id() {
|
|
68
|
-
return this._id;
|
|
69
|
-
}
|
|
70
|
-
toJSON() {
|
|
71
|
-
const { SAMPLES, GENOTYPES, ...rest } = this.variant;
|
|
72
|
-
return {
|
|
73
|
-
uniqueId: this._id,
|
|
74
|
-
...rest,
|
|
75
|
-
...this.data,
|
|
76
|
-
samples: this.variant.SAMPLES(),
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.default = VCFFeature;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type VCF from '@gmod/vcf';
|
|
2
|
-
export declare function getSOTermAndDescription(ref: string, alt: string[] | undefined, parser: VCF): string[];
|
|
3
|
-
export declare function getSOAndDescFromAltDefs(alt: string, parser: VCF): string[];
|
|
4
|
-
export declare function getSOAndDescByExamination(ref: string, alt: string): string[];
|
|
5
|
-
export declare function getMinimalDesc(ref: string, alt: string): string;
|
|
6
|
-
export declare function makeSimpleAltString(genotype: string, ref: string, alt: string[]): string;
|
package/dist/VcfFeature/util.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSOTermAndDescription = getSOTermAndDescription;
|
|
4
|
-
exports.getSOAndDescFromAltDefs = getSOAndDescFromAltDefs;
|
|
5
|
-
exports.getSOAndDescByExamination = getSOAndDescByExamination;
|
|
6
|
-
exports.getMinimalDesc = getMinimalDesc;
|
|
7
|
-
exports.makeSimpleAltString = makeSimpleAltString;
|
|
8
|
-
const vcf_1 = require("@gmod/vcf");
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const altTypeToSO = {
|
|
11
|
-
DEL: 'deletion',
|
|
12
|
-
INS: 'insertion',
|
|
13
|
-
DUP: 'duplication',
|
|
14
|
-
INV: 'inversion',
|
|
15
|
-
INVDUP: 'inverted_duplication',
|
|
16
|
-
CNV: 'copy_number_variation',
|
|
17
|
-
TRA: 'translocation',
|
|
18
|
-
'DUP:TANDEM': 'tandem_duplication',
|
|
19
|
-
NON_REF: 'sequence_variant',
|
|
20
|
-
'*': 'sequence_variant',
|
|
21
|
-
};
|
|
22
|
-
function getSOTermAndDescription(ref, alt, parser) {
|
|
23
|
-
if (!alt || alt.length === 0) {
|
|
24
|
-
return ['remark', 'no alternative alleles'];
|
|
25
|
-
}
|
|
26
|
-
const soTerms = new Set();
|
|
27
|
-
let descriptions = new Set();
|
|
28
|
-
for (const a of alt) {
|
|
29
|
-
let [soTerm, description] = getSOAndDescFromAltDefs(a, parser);
|
|
30
|
-
if (!soTerm) {
|
|
31
|
-
;
|
|
32
|
-
[soTerm, description] = getSOAndDescByExamination(ref, a);
|
|
33
|
-
}
|
|
34
|
-
if (soTerm && description) {
|
|
35
|
-
soTerms.add(soTerm);
|
|
36
|
-
descriptions.add(description);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (descriptions.size > 1) {
|
|
40
|
-
const descs = [...descriptions];
|
|
41
|
-
const prefixes = new Set(descs
|
|
42
|
-
.map(desc => {
|
|
43
|
-
const prefix = desc.split('->');
|
|
44
|
-
return prefix[1] ? prefix[0] : desc;
|
|
45
|
-
})
|
|
46
|
-
.filter((f) => !!f));
|
|
47
|
-
descriptions = new Set([...prefixes]
|
|
48
|
-
.map(r => r.trim())
|
|
49
|
-
.map(prefix => {
|
|
50
|
-
const suffixes = descs
|
|
51
|
-
.map(desc => desc.split('->').map(r => r.trim()))
|
|
52
|
-
.map(pref => (pref[1] && pref[0] === prefix ? pref[1] : ''))
|
|
53
|
-
.filter(f => !!f);
|
|
54
|
-
return suffixes.length ? `${prefix} -> ${suffixes.join(',')}` : prefix;
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
57
|
-
return soTerms.size
|
|
58
|
-
? [[...soTerms].join(','), [...descriptions].join(',')]
|
|
59
|
-
: [];
|
|
60
|
-
}
|
|
61
|
-
function getSOAndDescFromAltDefs(alt, parser) {
|
|
62
|
-
if (typeof alt === 'string' && !alt.startsWith('<')) {
|
|
63
|
-
return [];
|
|
64
|
-
}
|
|
65
|
-
let soTerm = altTypeToSO[alt];
|
|
66
|
-
if (!soTerm && parser.getMetadata('ALT', alt)) {
|
|
67
|
-
soTerm = 'sequence_variant';
|
|
68
|
-
}
|
|
69
|
-
if (soTerm) {
|
|
70
|
-
return [soTerm, alt];
|
|
71
|
-
}
|
|
72
|
-
const modAlt = alt.split(':');
|
|
73
|
-
return modAlt.length > 1
|
|
74
|
-
? getSOAndDescFromAltDefs(`<${modAlt.slice(0, -1).join(':')}>`, parser)
|
|
75
|
-
: [];
|
|
76
|
-
}
|
|
77
|
-
function getSOAndDescByExamination(ref, alt) {
|
|
78
|
-
const bnd = (0, vcf_1.parseBreakend)(alt);
|
|
79
|
-
if (bnd) {
|
|
80
|
-
return ['breakend', alt];
|
|
81
|
-
}
|
|
82
|
-
else if (ref.length === 1 && alt.length === 1) {
|
|
83
|
-
return ['SNV', makeDescriptionString('SNV', ref, alt)];
|
|
84
|
-
}
|
|
85
|
-
else if (alt === '<INS>') {
|
|
86
|
-
return ['insertion', alt];
|
|
87
|
-
}
|
|
88
|
-
else if (alt === '<DEL>') {
|
|
89
|
-
return ['deletion', alt];
|
|
90
|
-
}
|
|
91
|
-
else if (alt === '<DUP>') {
|
|
92
|
-
return ['duplication', alt];
|
|
93
|
-
}
|
|
94
|
-
else if (alt === '<CNV>') {
|
|
95
|
-
return ['cnv', alt];
|
|
96
|
-
}
|
|
97
|
-
else if (alt === '<INV>') {
|
|
98
|
-
return ['inversion', alt];
|
|
99
|
-
}
|
|
100
|
-
else if (alt === '<TRA>') {
|
|
101
|
-
return ['translocation', alt];
|
|
102
|
-
}
|
|
103
|
-
else if (alt.includes('<')) {
|
|
104
|
-
return ['sv', alt];
|
|
105
|
-
}
|
|
106
|
-
else if (ref.length === alt.length) {
|
|
107
|
-
const lenRef = ref.length;
|
|
108
|
-
const lenAlt = alt.length;
|
|
109
|
-
if (lenRef > 5 || lenAlt > 5) {
|
|
110
|
-
const lena = (0, util_1.getBpDisplayStr)(lenRef);
|
|
111
|
-
const lenb = (0, util_1.getBpDisplayStr)(lenAlt);
|
|
112
|
-
return ref.split('').reverse().join('') === alt
|
|
113
|
-
? ['inverson', makeDescriptionString('inv', lena, lenb)]
|
|
114
|
-
: ['substitution', makeDescriptionString('substitution', lena, lenb)];
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return ref.split('').reverse().join('') === alt
|
|
118
|
-
? ['inversion', makeDescriptionString('inv', ref, alt)]
|
|
119
|
-
: ['substitution', makeDescriptionString('substitution', ref, alt)];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else if (ref.length <= alt.length) {
|
|
123
|
-
const len = alt.length - ref.length;
|
|
124
|
-
const lenAlt = alt.length;
|
|
125
|
-
const lenRef = ref.length;
|
|
126
|
-
const lena = (0, util_1.getBpDisplayStr)(len);
|
|
127
|
-
return [
|
|
128
|
-
'insertion',
|
|
129
|
-
lenRef > 5 || lenAlt > 5
|
|
130
|
-
? `${lena} INS`
|
|
131
|
-
: makeDescriptionString('insertion', len > 5 ? lena : ref, alt),
|
|
132
|
-
];
|
|
133
|
-
}
|
|
134
|
-
else if (ref.length > alt.length) {
|
|
135
|
-
const lenRef = ref.length;
|
|
136
|
-
const lenAlt = alt.length;
|
|
137
|
-
const lena = (0, util_1.getBpDisplayStr)(lenRef - lenAlt);
|
|
138
|
-
return [
|
|
139
|
-
'deletion',
|
|
140
|
-
lenRef > 5 || lenAlt > 5
|
|
141
|
-
? `${lena} DEL`
|
|
142
|
-
: makeDescriptionString('deletion', ref, alt),
|
|
143
|
-
];
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
return ['indel', makeDescriptionString('indel', ref, alt)];
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function getMinimalDesc(ref, alt) {
|
|
150
|
-
const bnd = (0, vcf_1.parseBreakend)(alt);
|
|
151
|
-
if (bnd) {
|
|
152
|
-
return alt;
|
|
153
|
-
}
|
|
154
|
-
else if (ref.length === 1 && alt.length === 1) {
|
|
155
|
-
return alt;
|
|
156
|
-
}
|
|
157
|
-
else if (alt === '<INS>') {
|
|
158
|
-
return alt;
|
|
159
|
-
}
|
|
160
|
-
else if (alt === '<DEL>') {
|
|
161
|
-
return alt;
|
|
162
|
-
}
|
|
163
|
-
else if (alt === '<DUP>') {
|
|
164
|
-
return alt;
|
|
165
|
-
}
|
|
166
|
-
else if (alt === '<CNV>') {
|
|
167
|
-
return alt;
|
|
168
|
-
}
|
|
169
|
-
else if (alt === '<INV>') {
|
|
170
|
-
return alt;
|
|
171
|
-
}
|
|
172
|
-
else if (alt === '<TRA>') {
|
|
173
|
-
return alt;
|
|
174
|
-
}
|
|
175
|
-
else if (alt.includes('<')) {
|
|
176
|
-
return alt;
|
|
177
|
-
}
|
|
178
|
-
else if (ref.length === alt.length) {
|
|
179
|
-
const lenRef = ref.length;
|
|
180
|
-
const lenAlt = alt.length;
|
|
181
|
-
if (lenRef > 5 || lenAlt > 5) {
|
|
182
|
-
const lena = (0, util_1.getBpDisplayStr)(lenRef);
|
|
183
|
-
const lenb = (0, util_1.getBpDisplayStr)(lenAlt);
|
|
184
|
-
return ref.split('').reverse().join('') === alt
|
|
185
|
-
? makeDescriptionString('inv', lena, lenb)
|
|
186
|
-
: makeDescriptionString('substitution', lena, lenb);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
return ref.split('').reverse().join('') === alt
|
|
190
|
-
? makeDescriptionString('inv', ref, alt)
|
|
191
|
-
: makeDescriptionString('substitution', ref, alt);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
else if (ref.length <= alt.length) {
|
|
195
|
-
const len = alt.length - ref.length;
|
|
196
|
-
const lenAlt = alt.length;
|
|
197
|
-
const lenRef = ref.length;
|
|
198
|
-
const lena = (0, util_1.getBpDisplayStr)(len);
|
|
199
|
-
return lenRef > 5 || lenAlt > 5
|
|
200
|
-
? `${lena} INS`
|
|
201
|
-
: makeDescriptionString('insertion', len > 5 ? lena : ref, alt);
|
|
202
|
-
}
|
|
203
|
-
else if (ref.length > alt.length) {
|
|
204
|
-
const lenRef = ref.length;
|
|
205
|
-
const lenAlt = alt.length;
|
|
206
|
-
const lena = (0, util_1.getBpDisplayStr)(lenRef - lenAlt);
|
|
207
|
-
return lenRef > 5 || lenAlt > 5
|
|
208
|
-
? `${lena} DEL`
|
|
209
|
-
: makeDescriptionString('deletion', ref, alt);
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
return makeDescriptionString('indel', ref, alt);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
function makeDescriptionString(soTerm, ref, alt) {
|
|
216
|
-
return `${soTerm} ${[ref, alt].join(' -> ')}`;
|
|
217
|
-
}
|
|
218
|
-
function makeSimpleAltString(genotype, ref, alt) {
|
|
219
|
-
return genotype
|
|
220
|
-
.split(/[/|]/)
|
|
221
|
-
.map(r => r === '.'
|
|
222
|
-
? '.'
|
|
223
|
-
: +r === 0
|
|
224
|
-
? `ref(${ref.length < 10 ? ref : (0, util_1.getBpDisplayStr)(ref.length)})`
|
|
225
|
-
: getMinimalDesc(ref, alt[+r - 1] || ''))
|
|
226
|
-
.join(genotype.includes('|') ? '|' : '/');
|
|
227
|
-
}
|
|
@@ -1,25 +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 VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
8
|
-
private configured?;
|
|
9
|
-
private configurePre;
|
|
10
|
-
protected configurePre2(): Promise<{
|
|
11
|
-
vcf: TabixIndexedFile;
|
|
12
|
-
parser: VcfParser;
|
|
13
|
-
}>;
|
|
14
|
-
configure(opts?: BaseOptions): Promise<{
|
|
15
|
-
vcf: TabixIndexedFile;
|
|
16
|
-
parser: VcfParser;
|
|
17
|
-
}>;
|
|
18
|
-
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
19
|
-
getHeader(opts?: BaseOptions): Promise<string>;
|
|
20
|
-
getMetadata(opts?: BaseOptions): Promise<any>;
|
|
21
|
-
getFeatures(query: NoAssemblyRegion, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
22
|
-
getSources(): Promise<{
|
|
23
|
-
name: string;
|
|
24
|
-
}[]>;
|
|
25
|
-
}
|
|
@@ -1,117 +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 VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
|
-
async configurePre(_opts) {
|
|
15
|
-
const vcfGzLocation = this.getConf('vcfGzLocation');
|
|
16
|
-
const location = this.getConf(['index', 'location']);
|
|
17
|
-
const indexType = this.getConf(['index', 'indexType']);
|
|
18
|
-
const filehandle = (0, io_1.openLocation)(vcfGzLocation, this.pluginManager);
|
|
19
|
-
const isCSI = indexType === 'CSI';
|
|
20
|
-
const vcf = new tabix_1.TabixIndexedFile({
|
|
21
|
-
filehandle,
|
|
22
|
-
csiFilehandle: isCSI
|
|
23
|
-
? (0, io_1.openLocation)(location, this.pluginManager)
|
|
24
|
-
: undefined,
|
|
25
|
-
tbiFilehandle: !isCSI
|
|
26
|
-
? (0, io_1.openLocation)(location, this.pluginManager)
|
|
27
|
-
: undefined,
|
|
28
|
-
chunkCacheSize: 50 * 2 ** 20,
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
vcf,
|
|
32
|
-
parser: new vcf_1.default({
|
|
33
|
-
header: await vcf.getHeader(),
|
|
34
|
-
}),
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
async configurePre2() {
|
|
38
|
-
if (!this.configured) {
|
|
39
|
-
this.configured = this.configurePre().catch((e) => {
|
|
40
|
-
this.configured = undefined;
|
|
41
|
-
throw e;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return this.configured;
|
|
45
|
-
}
|
|
46
|
-
async configure(opts) {
|
|
47
|
-
const { statusCallback = () => { } } = opts || {};
|
|
48
|
-
return (0, util_1.updateStatus)('Downloading index', statusCallback, () => this.configurePre2());
|
|
49
|
-
}
|
|
50
|
-
async getRefNames(opts = {}) {
|
|
51
|
-
const { vcf } = await this.configure(opts);
|
|
52
|
-
return vcf.getReferenceSequenceNames(opts);
|
|
53
|
-
}
|
|
54
|
-
async getHeader(opts) {
|
|
55
|
-
const { vcf } = await this.configure(opts);
|
|
56
|
-
return vcf.getHeader();
|
|
57
|
-
}
|
|
58
|
-
async getMetadata(opts) {
|
|
59
|
-
const { parser } = await this.configure(opts);
|
|
60
|
-
return parser.getMetadata();
|
|
61
|
-
}
|
|
62
|
-
getFeatures(query, opts = {}) {
|
|
63
|
-
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
64
|
-
const { refName, start, end } = query;
|
|
65
|
-
const { statusCallback = () => { } } = opts;
|
|
66
|
-
const { vcf, parser } = await this.configure(opts);
|
|
67
|
-
await (0, util_1.updateStatus)('Downloading variants', statusCallback, () => vcf.getLines(refName, start, end, {
|
|
68
|
-
lineCallback: (line, fileOffset) => {
|
|
69
|
-
observer.next(new VcfFeature_1.default({
|
|
70
|
-
variant: parser.parseLine(line),
|
|
71
|
-
parser,
|
|
72
|
-
id: `${this.id}-vcf-${fileOffset}`,
|
|
73
|
-
}));
|
|
74
|
-
},
|
|
75
|
-
...opts,
|
|
76
|
-
}));
|
|
77
|
-
observer.complete();
|
|
78
|
-
}, opts.stopToken);
|
|
79
|
-
}
|
|
80
|
-
async getSources() {
|
|
81
|
-
const conf = this.getConf('samplesTsvLocation');
|
|
82
|
-
if (conf.uri === '' || conf.uri === '/path/to/samples.tsv') {
|
|
83
|
-
const { parser } = await this.configure();
|
|
84
|
-
return parser.samples.map(name => ({
|
|
85
|
-
name,
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
const txt = await (0, util_1.fetchAndMaybeUnzipText)((0, io_1.openLocation)(conf, this.pluginManager));
|
|
90
|
-
const lines = txt.split(/\n|\r\n|\r/);
|
|
91
|
-
const header = lines[0].split('\t');
|
|
92
|
-
const { parser } = await this.configure();
|
|
93
|
-
const metadataLines = lines
|
|
94
|
-
.slice(1)
|
|
95
|
-
.filter(f => !!f)
|
|
96
|
-
.map(line => {
|
|
97
|
-
const [name, ...rest] = line.split('\t');
|
|
98
|
-
return {
|
|
99
|
-
...Object.fromEntries(header.slice(1).map((c, idx) => [c, rest[idx] || ''])),
|
|
100
|
-
name: name,
|
|
101
|
-
};
|
|
102
|
-
});
|
|
103
|
-
const vcfSampleSet = new Set(parser.samples);
|
|
104
|
-
const metadataSet = new Set(metadataLines.map(r => r.name));
|
|
105
|
-
const metadataNotInVcfSamples = [...metadataSet].filter(f => !vcfSampleSet.has(f));
|
|
106
|
-
const vcfSamplesNotInMetadata = [...vcfSampleSet].filter(f => !metadataSet.has(f));
|
|
107
|
-
if (metadataNotInVcfSamples.length) {
|
|
108
|
-
console.warn(`There are ${metadataNotInVcfSamples.length} samples in metadata file (${metadataLines.length} lines) not in VCF (${parser.samples.length} samples):`, (0, util_1.shorten2)(metadataNotInVcfSamples.join(',')));
|
|
109
|
-
}
|
|
110
|
-
if (vcfSamplesNotInMetadata.length) {
|
|
111
|
-
console.warn(`There are ${vcfSamplesNotInMetadata.length} samples in VCF file (${parser.samples.length} samples) not in metadata file (${metadataLines.length} lines):`, (0, util_1.shorten2)(vcfSamplesNotInMetadata.map(m => m).join(',')));
|
|
112
|
-
}
|
|
113
|
-
return metadataLines.filter(f => vcfSampleSet.has(f.name));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.default = VcfTabixAdapter;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare const VcfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
vcfGzLocation: {
|
|
3
|
-
type: string;
|
|
4
|
-
defaultValue: {
|
|
5
|
-
uri: string;
|
|
6
|
-
locationType: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
10
|
-
indexType: {
|
|
11
|
-
model: import("mobx-state-tree").ISimpleType<string>;
|
|
12
|
-
type: string;
|
|
13
|
-
defaultValue: string;
|
|
14
|
-
};
|
|
15
|
-
location: {
|
|
16
|
-
type: string;
|
|
17
|
-
defaultValue: {
|
|
18
|
-
uri: string;
|
|
19
|
-
locationType: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
23
|
-
samplesTsvLocation: {
|
|
24
|
-
type: string;
|
|
25
|
-
defaultValue: {
|
|
26
|
-
uri: string;
|
|
27
|
-
description: string;
|
|
28
|
-
locationType: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
32
|
-
export default VcfTabixAdapter;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
function x() { }
|
|
6
|
-
const VcfTabixAdapter = (0, configuration_1.ConfigurationSchema)('VcfTabixAdapter', {
|
|
7
|
-
vcfGzLocation: {
|
|
8
|
-
type: 'fileLocation',
|
|
9
|
-
defaultValue: {
|
|
10
|
-
uri: '/path/to/my.vcf.gz',
|
|
11
|
-
locationType: 'UriLocation',
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
index: (0, configuration_1.ConfigurationSchema)('VcfIndex', {
|
|
15
|
-
indexType: {
|
|
16
|
-
model: mobx_state_tree_1.types.enumeration('IndexType', ['TBI', 'CSI']),
|
|
17
|
-
type: 'stringEnum',
|
|
18
|
-
defaultValue: 'TBI',
|
|
19
|
-
},
|
|
20
|
-
location: {
|
|
21
|
-
type: 'fileLocation',
|
|
22
|
-
defaultValue: {
|
|
23
|
-
uri: '/path/to/my.vcf.gz.tbi',
|
|
24
|
-
locationType: 'UriLocation',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
}),
|
|
28
|
-
samplesTsvLocation: {
|
|
29
|
-
type: 'fileLocation',
|
|
30
|
-
defaultValue: {
|
|
31
|
-
uri: '/path/to/samples.tsv',
|
|
32
|
-
description: 'tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names',
|
|
33
|
-
locationType: 'UriLocation',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
}, {
|
|
37
|
-
explicitlyTyped: true,
|
|
38
|
-
preProcessSnapshot: snap => {
|
|
39
|
-
return snap.uri
|
|
40
|
-
? {
|
|
41
|
-
...snap,
|
|
42
|
-
vcfGzLocation: {
|
|
43
|
-
uri: snap.uri,
|
|
44
|
-
baseUri: snap.baseUri,
|
|
45
|
-
},
|
|
46
|
-
index: {
|
|
47
|
-
location: {
|
|
48
|
-
uri: `${snap.uri}.tbi`,
|
|
49
|
-
baseUri: snap.baseUri,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
: snap;
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
exports.default = VcfTabixAdapter;
|
|
@@ -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: 'VcfTabixAdapter',
|
|
48
|
-
displayName: 'VCF tabix adapter',
|
|
49
|
-
configSchema: configSchema_1.default,
|
|
50
|
-
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./VcfTabixAdapter'))).then(r => r.default),
|
|
51
|
-
}));
|
|
52
|
-
}
|
package/dist/extensionPoints.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = ExtensionPointsF;
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
6
|
-
function ExtensionPointsF(pluginManager) {
|
|
7
|
-
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
8
|
-
return (file, index, adapterHint) => {
|
|
9
|
-
const fileName = (0, tracks_1.getFileName)(file);
|
|
10
|
-
const indexName = index && (0, tracks_1.getFileName)(index);
|
|
11
|
-
if ((0, util_1.testAdapter)(fileName, /\.vcf\.b?gz$/i, adapterHint, 'VcfTabixAdapter')) {
|
|
12
|
-
return {
|
|
13
|
-
type: 'VcfTabixAdapter',
|
|
14
|
-
vcfGzLocation: file,
|
|
15
|
-
index: {
|
|
16
|
-
location: index || (0, tracks_1.makeIndex)(file, '.tbi'),
|
|
17
|
-
indexType: (0, tracks_1.makeIndexType)(indexName, 'CSI', 'TBI'),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else if ((0, util_1.testAdapter)(fileName, /\.vcf(\.gz)?$/i, adapterHint, 'VcfAdapter')) {
|
|
22
|
-
return {
|
|
23
|
-
type: 'VcfAdapter',
|
|
24
|
-
vcfLocation: file,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return adapterGuesser(file, index, adapterHint);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', (trackTypeGuesser) => {
|
|
33
|
-
return (adapterName) => {
|
|
34
|
-
return ['VcfTabixAdapter', 'VcfAdapter'].includes(adapterName)
|
|
35
|
-
? 'VariantTrack'
|
|
36
|
-
: trackTypeGuesser(adapterName);
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}
|