@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,58 +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.MultiVariantGetSimplifiedFeatures = void 0;
|
|
7
|
-
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
8
|
-
const RpcMethodTypeWithFiltersAndRenameRegions_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions"));
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const rxjs_1 = require("rxjs");
|
|
11
|
-
const minorAlleleFrequencyUtils_1 = require("../shared/minorAlleleFrequencyUtils");
|
|
12
|
-
class MultiVariantGetSimplifiedFeatures extends RpcMethodTypeWithFiltersAndRenameRegions_1.default {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.name = 'MultiVariantGetSimplifiedFeatures';
|
|
16
|
-
}
|
|
17
|
-
async execute(args, rpcDriverClassName) {
|
|
18
|
-
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
19
|
-
const { lengthCutoffFilter, minorAlleleFrequencyFilter, regions, adapterConfig, stopToken, sessionId, } = deserializedArgs;
|
|
20
|
-
const { dataAdapter } = await (0, dataAdapterCache_1.getAdapter)(this.pluginManager, sessionId, adapterConfig);
|
|
21
|
-
const features = (0, minorAlleleFrequencyUtils_1.getFeaturesThatPassMinorAlleleFrequencyFilter)({
|
|
22
|
-
minorAlleleFrequencyFilter,
|
|
23
|
-
lengthCutoffFilter,
|
|
24
|
-
stopToken,
|
|
25
|
-
features: await (0, rxjs_1.firstValueFrom)(dataAdapter
|
|
26
|
-
.getFeaturesInMultipleRegions(regions, deserializedArgs)
|
|
27
|
-
.pipe((0, rxjs_1.toArray)())),
|
|
28
|
-
});
|
|
29
|
-
const sampleInfo = {};
|
|
30
|
-
let hasPhased = false;
|
|
31
|
-
(0, util_1.forEachWithStopTokenCheck)(features, stopToken, ({ feature }) => {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
const samp = feature.get('genotypes');
|
|
34
|
-
for (const [key, val] of Object.entries(samp)) {
|
|
35
|
-
const isPhased = val.includes('|');
|
|
36
|
-
hasPhased || (hasPhased = isPhased);
|
|
37
|
-
sampleInfo[key] = {
|
|
38
|
-
maxPloidy: Math.max(((_a = sampleInfo[key]) === null || _a === void 0 ? void 0 : _a.maxPloidy) || 0, val.split('|').length),
|
|
39
|
-
isPhased: ((_b = sampleInfo[key]) === null || _b === void 0 ? void 0 : _b.isPhased) || isPhased,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
hasPhased,
|
|
45
|
-
sampleInfo,
|
|
46
|
-
features: features.map(({ feature }) => ({
|
|
47
|
-
id: feature.id(),
|
|
48
|
-
data: {
|
|
49
|
-
start: feature.get('start'),
|
|
50
|
-
end: feature.get('end'),
|
|
51
|
-
refName: feature.get('refName'),
|
|
52
|
-
name: feature.get('name'),
|
|
53
|
-
},
|
|
54
|
-
})),
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.MultiVariantGetSimplifiedFeatures = MultiVariantGetSimplifiedFeatures;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { Region } from '@jbrowse/core/util';
|
|
4
|
-
export declare class MultiVariantGetSources extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
5
|
-
name: string;
|
|
6
|
-
execute(args: {
|
|
7
|
-
adapterConfig: AnyConfigurationModel;
|
|
8
|
-
stopToken?: string;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
regions: Region[];
|
|
12
|
-
bpPerPx: number;
|
|
13
|
-
}, rpcDriverClassName: string): Promise<any>;
|
|
14
|
-
}
|
|
@@ -1,22 +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.MultiVariantGetSources = void 0;
|
|
7
|
-
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
8
|
-
const RpcMethodTypeWithFiltersAndRenameRegions_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions"));
|
|
9
|
-
class MultiVariantGetSources extends RpcMethodTypeWithFiltersAndRenameRegions_1.default {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.name = 'MultiVariantGetSources';
|
|
13
|
-
}
|
|
14
|
-
async execute(args, rpcDriverClassName) {
|
|
15
|
-
const pm = this.pluginManager;
|
|
16
|
-
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
17
|
-
const { regions, adapterConfig, sessionId } = deserializedArgs;
|
|
18
|
-
const { dataAdapter } = await (0, dataAdapterCache_1.getAdapter)(pm, sessionId, adapterConfig);
|
|
19
|
-
return dataAdapter.getSources(regions, deserializedArgs);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.MultiVariantGetSources = MultiVariantGetSources;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { GetGenotypeMatrixArgs } from './types';
|
|
2
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
-
export declare function getGenotypeMatrix({ pluginManager, args, }: {
|
|
4
|
-
pluginManager: PluginManager;
|
|
5
|
-
args: GetGenotypeMatrixArgs;
|
|
6
|
-
}): Promise<Record<string, number[]>>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGenotypeMatrix = getGenotypeMatrix;
|
|
4
|
-
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
5
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
|
-
const minorAlleleFrequencyUtils_1 = require("../shared/minorAlleleFrequencyUtils");
|
|
8
|
-
async function getGenotypeMatrix({ pluginManager, args, }) {
|
|
9
|
-
const { sources, minorAlleleFrequencyFilter, regions, adapterConfig, sessionId, lengthCutoffFilter, stopToken, } = args;
|
|
10
|
-
const adapter = await (0, dataAdapterCache_1.getAdapter)(pluginManager, sessionId, adapterConfig);
|
|
11
|
-
const dataAdapter = adapter.dataAdapter;
|
|
12
|
-
const genotypeFactor = new Set();
|
|
13
|
-
const mafs = (0, minorAlleleFrequencyUtils_1.getFeaturesThatPassMinorAlleleFrequencyFilter)({
|
|
14
|
-
minorAlleleFrequencyFilter,
|
|
15
|
-
lengthCutoffFilter,
|
|
16
|
-
stopToken,
|
|
17
|
-
features: await (0, rxjs_1.firstValueFrom)(dataAdapter.getFeaturesInMultipleRegions(regions, args).pipe((0, rxjs_1.toArray)())),
|
|
18
|
-
});
|
|
19
|
-
for (const { alleleCounts } of mafs) {
|
|
20
|
-
for (const alt of Object.keys(alleleCounts)) {
|
|
21
|
-
genotypeFactor.add(alt);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const rows = {};
|
|
25
|
-
const cacheSplit = {};
|
|
26
|
-
(0, util_1.forEachWithStopTokenCheck)(mafs, stopToken, ({ feature }) => {
|
|
27
|
-
const genotypes = feature.get('genotypes');
|
|
28
|
-
for (const { name } of sources) {
|
|
29
|
-
if (!rows[name]) {
|
|
30
|
-
rows[name] = [];
|
|
31
|
-
}
|
|
32
|
-
const val = genotypes[name];
|
|
33
|
-
let alleles;
|
|
34
|
-
if (cacheSplit[val]) {
|
|
35
|
-
alleles = cacheSplit[val];
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
alleles = val.split(/[/|]/);
|
|
39
|
-
cacheSplit[val] = alleles;
|
|
40
|
-
}
|
|
41
|
-
let genotypeStatus = 0;
|
|
42
|
-
let nonRefCount = 0;
|
|
43
|
-
let uncalledCount = 0;
|
|
44
|
-
for (const l of alleles) {
|
|
45
|
-
if (l === '.') {
|
|
46
|
-
uncalledCount++;
|
|
47
|
-
}
|
|
48
|
-
else if (l !== '0') {
|
|
49
|
-
nonRefCount++;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (uncalledCount === alleles.length) {
|
|
53
|
-
genotypeStatus = -1;
|
|
54
|
-
}
|
|
55
|
-
else if (nonRefCount === 0) {
|
|
56
|
-
genotypeStatus = 0;
|
|
57
|
-
}
|
|
58
|
-
else if (nonRefCount === alleles.length) {
|
|
59
|
-
genotypeStatus = 2;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
genotypeStatus = 1;
|
|
63
|
-
}
|
|
64
|
-
rows[name].push(genotypeStatus);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return rows;
|
|
68
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Source } from '../shared/types';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { Region } from '@jbrowse/core/util';
|
|
4
|
-
export interface GetGenotypeMatrixArgs {
|
|
5
|
-
sources: Source[];
|
|
6
|
-
minorAlleleFrequencyFilter: number;
|
|
7
|
-
adapterConfig: AnyConfigurationModel;
|
|
8
|
-
stopToken?: string;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
regions: Region[];
|
|
12
|
-
bpPerPx: number;
|
|
13
|
-
lengthCutoffFilter: number;
|
|
14
|
-
}
|
|
15
|
-
export interface GetSimplifiedFeaturesArgs {
|
|
16
|
-
adapterConfig: AnyConfigurationModel;
|
|
17
|
-
stopToken?: string;
|
|
18
|
-
sessionId: string;
|
|
19
|
-
headers?: Record<string, string>;
|
|
20
|
-
regions: Region[];
|
|
21
|
-
bpPerPx: number;
|
|
22
|
-
minorAlleleFrequencyFilter: number;
|
|
23
|
-
lengthCutoffFilter: number;
|
|
24
|
-
}
|
|
25
|
-
export interface ClusterGenotypeMatrixArgs {
|
|
26
|
-
adapterConfig: AnyConfigurationModel;
|
|
27
|
-
stopToken?: string;
|
|
28
|
-
statusCallback: (arg: string) => void;
|
|
29
|
-
sessionId: string;
|
|
30
|
-
headers?: Record<string, string>;
|
|
31
|
-
regions: Region[];
|
|
32
|
-
bpPerPx: number;
|
|
33
|
-
sources: Source[];
|
|
34
|
-
minorAlleleFrequencyFilter: number;
|
|
35
|
-
lengthCutoffFilter: number;
|
|
36
|
-
}
|
package/dist/VariantRPC/types.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export default function VariantTrackF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
name: {
|
|
4
|
-
description: string;
|
|
5
|
-
type: string;
|
|
6
|
-
defaultValue: string;
|
|
7
|
-
};
|
|
8
|
-
assemblyNames: {
|
|
9
|
-
description: string;
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: string[];
|
|
12
|
-
};
|
|
13
|
-
description: {
|
|
14
|
-
description: string;
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: string;
|
|
17
|
-
};
|
|
18
|
-
category: {
|
|
19
|
-
description: string;
|
|
20
|
-
type: string;
|
|
21
|
-
defaultValue: never[];
|
|
22
|
-
};
|
|
23
|
-
metadata: {
|
|
24
|
-
type: string;
|
|
25
|
-
description: string;
|
|
26
|
-
defaultValue: {};
|
|
27
|
-
};
|
|
28
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
29
|
-
textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
30
|
-
indexingAttributes: {
|
|
31
|
-
type: string;
|
|
32
|
-
description: string;
|
|
33
|
-
defaultValue: string[];
|
|
34
|
-
};
|
|
35
|
-
indexingFeatureTypesToExclude: {
|
|
36
|
-
type: string;
|
|
37
|
-
description: string;
|
|
38
|
-
defaultValue: string[];
|
|
39
|
-
};
|
|
40
|
-
textSearchAdapter: import("mobx-state-tree").IAnyModelType;
|
|
41
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
42
|
-
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
43
|
-
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
|
-
feature: {
|
|
45
|
-
type: string;
|
|
46
|
-
description: string;
|
|
47
|
-
defaultValue: {};
|
|
48
|
-
contextVariable: string[];
|
|
49
|
-
};
|
|
50
|
-
subfeatures: {
|
|
51
|
-
type: string;
|
|
52
|
-
description: string;
|
|
53
|
-
defaultValue: {};
|
|
54
|
-
contextVariable: string[];
|
|
55
|
-
};
|
|
56
|
-
depth: {
|
|
57
|
-
type: string;
|
|
58
|
-
defaultValue: number;
|
|
59
|
-
description: string;
|
|
60
|
-
};
|
|
61
|
-
maxDepth: {
|
|
62
|
-
type: string;
|
|
63
|
-
defaultValue: number;
|
|
64
|
-
description: string;
|
|
65
|
-
};
|
|
66
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
67
|
-
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
|
-
config: {
|
|
69
|
-
type: string;
|
|
70
|
-
description: string;
|
|
71
|
-
defaultValue: {};
|
|
72
|
-
contextVariable: string[];
|
|
73
|
-
};
|
|
74
|
-
hideUris: {
|
|
75
|
-
type: string;
|
|
76
|
-
defaultValue: boolean;
|
|
77
|
-
};
|
|
78
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = VariantTrackF;
|
|
4
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
6
|
-
function VariantTrackF(pluginManager) {
|
|
7
|
-
return (0, configuration_1.ConfigurationSchema)('VariantTrack', {}, {
|
|
8
|
-
baseConfiguration: (0, pluggableElementTypes_1.createBaseTrackConfig)(pluginManager),
|
|
9
|
-
});
|
|
10
|
-
}
|
|
@@ -1,20 +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 = VariantTrackF;
|
|
7
|
-
const TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
|
|
8
|
-
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
9
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
|
-
function VariantTrackF(pm) {
|
|
11
|
-
pm.addTrackType(() => {
|
|
12
|
-
const configSchema = (0, configSchema_1.default)(pm);
|
|
13
|
-
return new TrackType_1.default({
|
|
14
|
-
name: 'VariantTrack',
|
|
15
|
-
displayName: 'Variant track',
|
|
16
|
-
configSchema,
|
|
17
|
-
stateModel: (0, models_1.createBaseTrackModel)(pm, 'VariantTrack', configSchema),
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { IntervalTree } from '@flatten-js/interval-tree';
|
|
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, Region } from '@jbrowse/core/util';
|
|
6
|
-
type StatusCallback = (arg: string) => void;
|
|
7
|
-
export default class VcfAdapter extends BaseFeatureDataAdapter {
|
|
8
|
-
calculatedIntervalTreeMap: Record<string, IntervalTree<Feature>>;
|
|
9
|
-
vcfFeatures?: Promise<{
|
|
10
|
-
header: string;
|
|
11
|
-
parser: VcfParser;
|
|
12
|
-
intervalTreeMap: Record<string, (sc?: StatusCallback) => IntervalTree<Feature>>;
|
|
13
|
-
}>;
|
|
14
|
-
static capabilities: string[];
|
|
15
|
-
getHeader(): Promise<string>;
|
|
16
|
-
getMetadata(): Promise<any>;
|
|
17
|
-
setupP(opts?: BaseOptions): Promise<{
|
|
18
|
-
header: string;
|
|
19
|
-
parser: VcfParser;
|
|
20
|
-
intervalTreeMap: {
|
|
21
|
-
[k: string]: (sc?: (arg: string) => void) => IntervalTree<Feature>;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
setup(): Promise<{
|
|
25
|
-
header: string;
|
|
26
|
-
parser: VcfParser;
|
|
27
|
-
intervalTreeMap: Record<string, (sc?: StatusCallback) => IntervalTree<Feature>>;
|
|
28
|
-
}>;
|
|
29
|
-
getRefNames(_?: BaseOptions): Promise<string[]>;
|
|
30
|
-
getFeatures(region: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
31
|
-
getSources(): Promise<{
|
|
32
|
-
name: string;
|
|
33
|
-
}[]>;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,119 +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 interval_tree_1 = require("@flatten-js/interval-tree");
|
|
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
|
-
const vcfParser_1 = require("./vcfParser");
|
|
14
|
-
class VcfAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.calculatedIntervalTreeMap = {};
|
|
18
|
-
}
|
|
19
|
-
async getHeader() {
|
|
20
|
-
const { header } = await this.setup();
|
|
21
|
-
return header;
|
|
22
|
-
}
|
|
23
|
-
async getMetadata() {
|
|
24
|
-
const { parser } = await this.setup();
|
|
25
|
-
return parser.getMetadata();
|
|
26
|
-
}
|
|
27
|
-
async setupP(opts) {
|
|
28
|
-
const { statusCallback = () => { } } = opts || {};
|
|
29
|
-
const loc = (0, io_1.openLocation)(this.getConf('vcfLocation'), this.pluginManager);
|
|
30
|
-
const buffer = await (0, util_1.fetchAndMaybeUnzip)(loc, opts);
|
|
31
|
-
const { header, featureMap } = (0, vcfParser_1.parseVcfBuffer)(buffer, statusCallback);
|
|
32
|
-
const parser = new vcf_1.default({ header });
|
|
33
|
-
const intervalTreeMap = Object.fromEntries(Object.entries(featureMap).map(([refName, lines]) => [
|
|
34
|
-
refName,
|
|
35
|
-
(sc) => {
|
|
36
|
-
if (!this.calculatedIntervalTreeMap[refName]) {
|
|
37
|
-
sc === null || sc === void 0 ? void 0 : sc('Parsing VCF data');
|
|
38
|
-
let idx = 0;
|
|
39
|
-
const intervalTree = new interval_tree_1.IntervalTree();
|
|
40
|
-
for (const line of lines) {
|
|
41
|
-
const f = new VcfFeature_1.default({
|
|
42
|
-
variant: parser.parseLine(line),
|
|
43
|
-
parser,
|
|
44
|
-
id: `${this.id}-${refName}-${idx++}`,
|
|
45
|
-
});
|
|
46
|
-
intervalTree.insert([f.get('start'), f.get('end')], f);
|
|
47
|
-
}
|
|
48
|
-
this.calculatedIntervalTreeMap[refName] = intervalTree;
|
|
49
|
-
}
|
|
50
|
-
return this.calculatedIntervalTreeMap[refName];
|
|
51
|
-
},
|
|
52
|
-
]));
|
|
53
|
-
return {
|
|
54
|
-
header,
|
|
55
|
-
parser,
|
|
56
|
-
intervalTreeMap,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
async setup() {
|
|
60
|
-
if (!this.vcfFeatures) {
|
|
61
|
-
this.vcfFeatures = this.setupP().catch((e) => {
|
|
62
|
-
this.vcfFeatures = undefined;
|
|
63
|
-
throw e;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return this.vcfFeatures;
|
|
67
|
-
}
|
|
68
|
-
async getRefNames(_ = {}) {
|
|
69
|
-
const { intervalTreeMap } = await this.setup();
|
|
70
|
-
return Object.keys(intervalTreeMap);
|
|
71
|
-
}
|
|
72
|
-
getFeatures(region, opts = {}) {
|
|
73
|
-
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
74
|
-
var _a;
|
|
75
|
-
try {
|
|
76
|
-
const { start, end, refName } = region;
|
|
77
|
-
const { intervalTreeMap } = await this.setup();
|
|
78
|
-
for (const f of ((_a = intervalTreeMap[refName]) === null || _a === void 0 ? void 0 : _a.call(intervalTreeMap, opts.statusCallback).search([
|
|
79
|
-
start,
|
|
80
|
-
end,
|
|
81
|
-
])) || []) {
|
|
82
|
-
observer.next(f);
|
|
83
|
-
}
|
|
84
|
-
observer.complete();
|
|
85
|
-
}
|
|
86
|
-
catch (e) {
|
|
87
|
-
observer.error(e);
|
|
88
|
-
}
|
|
89
|
-
}, opts.stopToken);
|
|
90
|
-
}
|
|
91
|
-
async getSources() {
|
|
92
|
-
const conf = this.getConf('samplesTsvLocation');
|
|
93
|
-
if (conf.uri === '' || conf.uri === '/path/to/samples.tsv') {
|
|
94
|
-
const { parser } = await this.setup();
|
|
95
|
-
return parser.samples.map(name => ({
|
|
96
|
-
name,
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
const txt = await (0, io_1.openLocation)(conf).readFile('utf8');
|
|
101
|
-
const lines = txt.split(/\n|\r\n|\r/);
|
|
102
|
-
const header = lines[0].split('\t');
|
|
103
|
-
const { parser } = await this.setup();
|
|
104
|
-
const s = new Set(parser.samples);
|
|
105
|
-
return lines
|
|
106
|
-
.slice(1)
|
|
107
|
-
.map(line => {
|
|
108
|
-
const cols = line.split('\t');
|
|
109
|
-
return {
|
|
110
|
-
name: cols[0],
|
|
111
|
-
...Object.fromEntries(cols.slice(1).map((c, idx) => [header[idx + 1], c])),
|
|
112
|
-
};
|
|
113
|
-
})
|
|
114
|
-
.filter(f => s.has(f.name));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
VcfAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
119
|
-
exports.default = VcfAdapter;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const VcfAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
vcfLocation: {
|
|
3
|
-
type: string;
|
|
4
|
-
defaultValue: {
|
|
5
|
-
uri: string;
|
|
6
|
-
locationType: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
samplesTsvLocation: {
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: {
|
|
12
|
-
uri: string;
|
|
13
|
-
description: string;
|
|
14
|
-
locationType: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
18
|
-
export default VcfAdapter;
|
|
@@ -1,35 +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 VcfAdapter = (0, configuration_1.ConfigurationSchema)('VcfAdapter', {
|
|
6
|
-
vcfLocation: {
|
|
7
|
-
type: 'fileLocation',
|
|
8
|
-
defaultValue: {
|
|
9
|
-
uri: '/path/to/my.vcf',
|
|
10
|
-
locationType: 'UriLocation',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
samplesTsvLocation: {
|
|
14
|
-
type: 'fileLocation',
|
|
15
|
-
defaultValue: {
|
|
16
|
-
uri: '/path/to/samples.tsv',
|
|
17
|
-
description: 'tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names',
|
|
18
|
-
locationType: 'UriLocation',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}, {
|
|
22
|
-
explicitlyTyped: true,
|
|
23
|
-
preProcessSnapshot: snap => {
|
|
24
|
-
return snap.uri
|
|
25
|
-
? {
|
|
26
|
-
...snap,
|
|
27
|
-
vcfLocation: {
|
|
28
|
-
uri: snap.uri,
|
|
29
|
-
baseUri: snap.baseUri,
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
: snap;
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
exports.default = VcfAdapter;
|
package/dist/VcfAdapter/index.js
DELETED
|
@@ -1,49 +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.default = VcfAdapterF;
|
|
40
|
-
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
41
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
42
|
-
function VcfAdapterF(pluginManager) {
|
|
43
|
-
pluginManager.addAdapterType(() => new AdapterType_1.default({
|
|
44
|
-
name: 'VcfAdapter',
|
|
45
|
-
displayName: 'VCF adapter',
|
|
46
|
-
configSchema: configSchema_1.default,
|
|
47
|
-
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./VcfAdapter'))).then(r => r.default),
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { StatusCallback } from '@jbrowse/core/util/parseLineByLine';
|
|
2
|
-
interface VcfParseResult {
|
|
3
|
-
header: string;
|
|
4
|
-
featureMap: Record<string, string[]>;
|
|
5
|
-
}
|
|
6
|
-
export declare function parseVcfBuffer(buffer: Uint8Array, statusCallback?: StatusCallback): VcfParseResult;
|
|
7
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseVcfBuffer = parseVcfBuffer;
|
|
4
|
-
const parseLineByLine_1 = require("@jbrowse/core/util/parseLineByLine");
|
|
5
|
-
function parseVcfBuffer(buffer, statusCallback = () => { }) {
|
|
6
|
-
const headerLines = [];
|
|
7
|
-
const featureMap = {};
|
|
8
|
-
(0, parseLineByLine_1.parseLineByLine)(buffer, line => {
|
|
9
|
-
if (line.startsWith('#')) {
|
|
10
|
-
headerLines.push(line);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
const ret = line.indexOf('\t');
|
|
14
|
-
const refName = line.slice(0, ret);
|
|
15
|
-
if (!featureMap[refName]) {
|
|
16
|
-
featureMap[refName] = [];
|
|
17
|
-
}
|
|
18
|
-
featureMap[refName].push(line);
|
|
19
|
-
}
|
|
20
|
-
return true;
|
|
21
|
-
}, statusCallback);
|
|
22
|
-
return {
|
|
23
|
-
header: headerLines.join('\n'),
|
|
24
|
-
featureMap,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type Feature } from '@jbrowse/core/util';
|
|
2
|
-
import type VCFParser from '@gmod/vcf';
|
|
3
|
-
import type { Variant } from '@gmod/vcf';
|
|
4
|
-
export default class VCFFeature implements Feature {
|
|
5
|
-
private variant;
|
|
6
|
-
private parser;
|
|
7
|
-
private data;
|
|
8
|
-
private _id;
|
|
9
|
-
constructor(args: {
|
|
10
|
-
variant: Variant;
|
|
11
|
-
parser: VCFParser;
|
|
12
|
-
id: string;
|
|
13
|
-
});
|
|
14
|
-
get(field: string): any;
|
|
15
|
-
parent(): undefined;
|
|
16
|
-
children(): undefined;
|
|
17
|
-
id(): string;
|
|
18
|
-
toJSON(): any;
|
|
19
|
-
}
|