@jbrowse/plugin-alignments 2.16.1 → 2.18.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/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -13
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/Flags.js +2 -2
- package/dist/AlignmentsFeatureDetail/Formatter.js +0 -3
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +4 -9
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
- package/dist/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/PairLink.js +0 -1
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +1 -5
- package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +2 -6
- package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +3 -3
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.js +1 -8
- package/dist/AlignmentsTrack/index.d.ts +1 -1
- package/dist/AlignmentsTrack/index.js +0 -3
- package/dist/BamAdapter/BamAdapter.d.ts +8 -6
- package/dist/BamAdapter/BamAdapter.js +35 -30
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +6 -20
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +42 -75
- package/dist/BamAdapter/configSchema.d.ts +0 -17
- package/dist/BamAdapter/configSchema.js +1 -22
- package/dist/BamAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/CramAdapter.d.ts +8 -10
- package/dist/CramAdapter/CramAdapter.js +26 -32
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +23 -29
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +59 -75
- package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/dist/CramAdapter/CramTestAdapters.js +4 -5
- package/dist/CramAdapter/configSchema.d.ts +0 -14
- package/dist/CramAdapter/configSchema.js +1 -19
- package/dist/CramAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/index.js +0 -1
- package/dist/CramAdapter/util.d.ts +2 -11
- package/dist/CramAdapter/util.js +1 -24
- package/dist/GuessAlignmentsTypes/index.d.ts +1 -1
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/dist/HtsgetBamAdapter/configSchema.js +1 -14
- package/dist/HtsgetBamAdapter/index.d.ts +1 -1
- package/dist/HtsgetBamAdapter/index.js +1 -1
- package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +2 -5
- package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/dist/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +2 -16
- package/dist/LinearAlignmentsDisplay/{models/configSchema.js → configSchema.js} +3 -20
- package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +2 -3
- package/dist/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +7 -73
- package/dist/LinearAlignmentsDisplay/{models/model.js → model.js} +13 -82
- package/dist/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +34 -181
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +72 -149
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +5 -3
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +111 -56
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +8 -6
- package/dist/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/dist/LinearPileupDisplay/configSchema.js +12 -30
- package/dist/LinearPileupDisplay/index.d.ts +1 -1
- package/dist/LinearPileupDisplay/index.js +2 -2
- package/dist/LinearPileupDisplay/model.d.ts +121 -123
- package/dist/LinearPileupDisplay/model.js +110 -124
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +3 -7
- package/dist/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/dist/LinearReadArcsDisplay/configSchema.js +8 -31
- package/dist/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/dist/LinearReadArcsDisplay/index.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/index.js +1 -2
- package/dist/LinearReadArcsDisplay/model.d.ts +13 -90
- package/dist/LinearReadArcsDisplay/model.js +24 -112
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +3 -7
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/dist/LinearReadCloudDisplay/configSchema.js +3 -28
- package/dist/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/dist/LinearReadCloudDisplay/index.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/index.js +1 -2
- package/dist/LinearReadCloudDisplay/model.d.ts +14 -64
- package/dist/LinearReadCloudDisplay/model.js +24 -76
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +50 -20
- package/dist/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +17 -22
- package/dist/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +16 -32
- package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/index.js +3 -3
- package/{esm/LinearSNPCoverageDisplay/models → dist/LinearSNPCoverageDisplay}/model.d.ts +9 -60
- package/dist/LinearSNPCoverageDisplay/{models/model.js → model.js} +68 -146
- package/dist/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/dist/MismatchParser/cigarToMismatches.js +91 -0
- package/dist/MismatchParser/getNextRefPos.d.ts +4 -0
- package/dist/MismatchParser/getNextRefPos.js +38 -0
- package/dist/MismatchParser/index.d.ts +5 -30
- package/dist/MismatchParser/index.js +10 -335
- package/dist/MismatchParser/mdToMismatches.d.ts +3 -0
- package/dist/MismatchParser/mdToMismatches.js +74 -0
- package/dist/ModificationParser/index.d.ts +19 -0
- package/dist/ModificationParser/index.js +127 -0
- package/dist/PileupRPC/base.d.ts +2 -2
- package/dist/PileupRPC/base.js +0 -1
- package/dist/PileupRPC/index.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +2 -4
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +3 -4
- package/dist/PileupRPC/methods/GetReducedFeatures.js +21 -20
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +4 -4
- package/dist/PileupRPC/methods/GetVisibleModifications.js +10 -7
- package/dist/PileupRPC/util.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +12 -11
- package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
- package/dist/PileupRenderer/PileupRenderer.d.ts +11 -29
- package/dist/PileupRenderer/PileupRenderer.js +17 -20
- package/dist/PileupRenderer/colorBy.d.ts +2 -2
- package/dist/PileupRenderer/colorBy.js +0 -6
- package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/dist/PileupRenderer/components/PileupRendering.js +0 -3
- package/dist/PileupRenderer/configSchema.d.ts +0 -31
- package/dist/PileupRenderer/configSchema.js +1 -35
- package/dist/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -6
- package/dist/PileupRenderer/index.d.ts +1 -1
- package/dist/PileupRenderer/index.js +1 -1
- package/dist/PileupRenderer/layoutFeature.d.ts +2 -2
- package/dist/PileupRenderer/layoutFeature.js +0 -1
- package/dist/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/dist/PileupRenderer/layoutFeatures.js +6 -4
- package/dist/PileupRenderer/makeImageData.d.ts +3 -4
- package/dist/PileupRenderer/makeImageData.js +8 -2
- package/dist/PileupRenderer/renderAlignment.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignment.js +19 -8
- package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignmentShape.js +102 -21
- package/dist/PileupRenderer/renderMethylation.d.ts +6 -5
- package/dist/PileupRenderer/renderMethylation.js +13 -9
- package/dist/PileupRenderer/renderMismatches.d.ts +3 -3
- package/dist/PileupRenderer/renderMismatches.js +17 -28
- package/dist/PileupRenderer/renderModifications.d.ts +6 -5
- package/dist/PileupRenderer/renderModifications.js +30 -35
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +4 -3
- package/dist/PileupRenderer/renderPerBaseLettering.js +1 -4
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +4 -3
- package/dist/PileupRenderer/renderPerBaseQuality.js +3 -5
- package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/dist/PileupRenderer/renderSoftClipping.js +6 -10
- package/dist/PileupRenderer/sortUtil.d.ts +3 -8
- package/dist/PileupRenderer/sortUtil.js +13 -16
- package/dist/PileupRenderer/types.d.ts +26 -0
- package/dist/PileupRenderer/types.js +2 -0
- package/dist/PileupRenderer/util.d.ts +2 -2
- package/dist/PileupRenderer/util.js +1 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +14 -11
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/dist/SNPCoverageAdapter/configSchema.js +1 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +11 -11
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +74 -193
- package/dist/SNPCoverageAdapter/index.d.ts +1 -1
- package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/dist/SNPCoverageAdapter/processDepth.js +38 -0
- package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
- package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/dist/SNPCoverageAdapter/processModifications.js +49 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
- package/dist/SNPCoverageAdapter/util.d.ts +9 -24
- package/dist/SNPCoverageAdapter/util.js +39 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +6 -4
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +165 -72
- package/dist/SNPCoverageRenderer/configSchema.d.ts +0 -15
- package/dist/SNPCoverageRenderer/configSchema.js +1 -19
- package/dist/SNPCoverageRenderer/index.d.ts +1 -1
- package/dist/SNPCoverageRenderer/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/shared/afterAttach.d.ts +1 -1
- package/dist/shared/afterAttach.js +0 -2
- package/dist/shared/color.d.ts +1 -11
- package/dist/shared/color.js +1 -15
- package/{esm/shared → dist/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/dist/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +12 -11
- package/{esm/shared → dist/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/dist/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +7 -3
- package/dist/shared/fetchChains.d.ts +2 -2
- package/dist/shared/fetchChains.js +2 -4
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/dist/shared/getMaximumModificationAtEachPosition.js +41 -0
- package/dist/shared/getUniqueModifications.d.ts +14 -0
- package/dist/shared/getUniqueModifications.js +16 -0
- package/dist/shared/getUniqueTags.d.ts +15 -0
- package/dist/shared/getUniqueTags.js +18 -0
- package/dist/shared/{renderSvg.js → renderSvgUtil.js} +0 -2
- package/dist/shared/types.d.ts +94 -0
- package/dist/shared/types.js +2 -0
- package/dist/shared/util.d.ts +19 -1
- package/dist/shared/util.js +52 -0
- package/dist/util.d.ts +10 -7
- package/dist/util.js +26 -37
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -13
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/Flags.js +2 -2
- package/esm/AlignmentsFeatureDetail/Formatter.js +0 -3
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +5 -10
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
- package/esm/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/PairLink.js +0 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +2 -6
- package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +2 -6
- package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +3 -3
- package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.js +1 -8
- package/esm/AlignmentsTrack/index.d.ts +1 -1
- package/esm/AlignmentsTrack/index.js +0 -3
- package/esm/BamAdapter/BamAdapter.d.ts +8 -6
- package/esm/BamAdapter/BamAdapter.js +36 -31
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +6 -20
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +43 -76
- package/esm/BamAdapter/configSchema.d.ts +0 -17
- package/esm/BamAdapter/configSchema.js +1 -22
- package/esm/BamAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.d.ts +8 -10
- package/esm/CramAdapter/CramAdapter.js +28 -34
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +23 -29
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +59 -75
- package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/esm/CramAdapter/CramTestAdapters.js +4 -5
- package/esm/CramAdapter/configSchema.d.ts +0 -14
- package/esm/CramAdapter/configSchema.js +1 -19
- package/esm/CramAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/index.js +0 -1
- package/esm/CramAdapter/util.d.ts +2 -11
- package/esm/CramAdapter/util.js +1 -24
- package/esm/GuessAlignmentsTypes/index.d.ts +1 -1
- package/esm/GuessAlignmentsTypes/index.js +1 -1
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/esm/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/esm/HtsgetBamAdapter/configSchema.js +1 -14
- package/esm/HtsgetBamAdapter/index.d.ts +1 -1
- package/esm/HtsgetBamAdapter/index.js +1 -1
- package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +2 -5
- package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +1 -31
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/esm/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +2 -16
- package/esm/LinearAlignmentsDisplay/configSchema.js +16 -0
- package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +2 -3
- package/esm/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +7 -73
- package/esm/LinearAlignmentsDisplay/{models/model.js → model.js} +14 -83
- package/esm/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +34 -181
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +74 -151
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +5 -3
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +111 -56
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +8 -6
- package/esm/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/esm/LinearPileupDisplay/configSchema.js +12 -30
- package/esm/LinearPileupDisplay/index.d.ts +1 -1
- package/esm/LinearPileupDisplay/index.js +2 -2
- package/esm/LinearPileupDisplay/model.d.ts +121 -123
- package/esm/LinearPileupDisplay/model.js +111 -125
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +3 -7
- package/esm/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/esm/LinearReadArcsDisplay/configSchema.js +8 -31
- package/esm/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/esm/LinearReadArcsDisplay/index.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/index.js +1 -2
- package/esm/LinearReadArcsDisplay/model.d.ts +13 -90
- package/esm/LinearReadArcsDisplay/model.js +25 -113
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +3 -7
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/esm/LinearReadCloudDisplay/configSchema.js +3 -28
- package/esm/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/esm/LinearReadCloudDisplay/index.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/index.js +1 -2
- package/esm/LinearReadCloudDisplay/model.d.ts +14 -64
- package/esm/LinearReadCloudDisplay/model.js +24 -76
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +50 -20
- package/esm/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +17 -22
- package/esm/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +16 -32
- package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/index.js +3 -3
- package/{dist/LinearSNPCoverageDisplay/models → esm/LinearSNPCoverageDisplay}/model.d.ts +9 -60
- package/esm/LinearSNPCoverageDisplay/{models/model.js → model.js} +69 -147
- package/esm/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/esm/MismatchParser/cigarToMismatches.js +88 -0
- package/esm/MismatchParser/getNextRefPos.d.ts +4 -0
- package/esm/MismatchParser/getNextRefPos.js +35 -0
- package/esm/MismatchParser/index.d.ts +5 -30
- package/esm/MismatchParser/index.js +5 -325
- package/esm/MismatchParser/mdToMismatches.d.ts +3 -0
- package/esm/MismatchParser/mdToMismatches.js +71 -0
- package/esm/ModificationParser/index.d.ts +19 -0
- package/esm/ModificationParser/index.js +121 -0
- package/esm/PileupRPC/base.d.ts +2 -2
- package/esm/PileupRPC/base.js +0 -1
- package/esm/PileupRPC/index.d.ts +1 -1
- package/esm/PileupRPC/index.js +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +2 -4
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +3 -4
- package/esm/PileupRPC/methods/GetReducedFeatures.js +21 -20
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +4 -4
- package/esm/PileupRPC/methods/GetVisibleModifications.js +10 -7
- package/esm/PileupRPC/util.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +12 -11
- package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +11 -29
- package/esm/PileupRenderer/PileupRenderer.js +19 -22
- package/esm/PileupRenderer/colorBy.d.ts +2 -2
- package/esm/PileupRenderer/colorBy.js +1 -7
- package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/esm/PileupRenderer/components/PileupRendering.js +1 -4
- package/esm/PileupRenderer/configSchema.d.ts +0 -31
- package/esm/PileupRenderer/configSchema.js +1 -35
- package/esm/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/esm/PileupRenderer/getAlignmentShapeColor.js +2 -7
- package/esm/PileupRenderer/index.d.ts +1 -1
- package/esm/PileupRenderer/index.js +1 -1
- package/esm/PileupRenderer/layoutFeature.d.ts +2 -2
- package/esm/PileupRenderer/layoutFeature.js +0 -1
- package/esm/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/esm/PileupRenderer/layoutFeatures.js +7 -5
- package/esm/PileupRenderer/makeImageData.d.ts +3 -4
- package/esm/PileupRenderer/makeImageData.js +8 -2
- package/esm/PileupRenderer/renderAlignment.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignment.js +19 -8
- package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignmentShape.js +102 -21
- package/esm/PileupRenderer/renderMethylation.d.ts +6 -5
- package/esm/PileupRenderer/renderMethylation.js +13 -9
- package/esm/PileupRenderer/renderMismatches.d.ts +3 -3
- package/esm/PileupRenderer/renderMismatches.js +17 -28
- package/esm/PileupRenderer/renderModifications.d.ts +6 -5
- package/esm/PileupRenderer/renderModifications.js +29 -34
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +4 -3
- package/esm/PileupRenderer/renderPerBaseLettering.js +1 -4
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +4 -3
- package/esm/PileupRenderer/renderPerBaseQuality.js +3 -5
- package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/esm/PileupRenderer/renderSoftClipping.js +7 -11
- package/esm/PileupRenderer/sortUtil.d.ts +3 -8
- package/esm/PileupRenderer/sortUtil.js +13 -16
- package/esm/PileupRenderer/types.d.ts +26 -0
- package/esm/PileupRenderer/types.js +1 -0
- package/esm/PileupRenderer/util.d.ts +2 -2
- package/esm/PileupRenderer/util.js +1 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +15 -12
- package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/esm/SNPCoverageAdapter/configSchema.js +1 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +11 -11
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +73 -192
- package/esm/SNPCoverageAdapter/index.d.ts +1 -1
- package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/esm/SNPCoverageAdapter/processDepth.js +35 -0
- package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
- package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/esm/SNPCoverageAdapter/processModifications.js +46 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
- package/esm/SNPCoverageAdapter/util.d.ts +9 -24
- package/esm/SNPCoverageAdapter/util.js +35 -1
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +6 -4
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +167 -74
- package/esm/SNPCoverageRenderer/configSchema.d.ts +0 -15
- package/esm/SNPCoverageRenderer/configSchema.js +1 -19
- package/esm/SNPCoverageRenderer/index.d.ts +1 -1
- package/esm/SNPCoverageRenderer/index.js +2 -2
- package/esm/index.d.ts +2 -2
- package/esm/index.js +10 -10
- package/esm/shared/afterAttach.d.ts +1 -1
- package/esm/shared/afterAttach.js +0 -2
- package/esm/shared/color.d.ts +1 -11
- package/esm/shared/color.js +0 -14
- package/{dist/shared → esm/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/esm/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +12 -11
- package/{dist/shared → esm/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/esm/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +7 -3
- package/esm/shared/fetchChains.d.ts +2 -2
- package/esm/shared/fetchChains.js +2 -4
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/esm/shared/getMaximumModificationAtEachPosition.js +38 -0
- package/esm/shared/getUniqueModifications.d.ts +14 -0
- package/esm/shared/getUniqueModifications.js +13 -0
- package/esm/shared/getUniqueTags.d.ts +15 -0
- package/esm/shared/getUniqueTags.js +15 -0
- package/esm/shared/{renderSvg.js → renderSvgUtil.js} +0 -2
- package/esm/shared/types.d.ts +94 -0
- package/esm/shared/types.js +1 -0
- package/esm/shared/util.d.ts +19 -1
- package/esm/shared/util.js +47 -0
- package/esm/util.d.ts +10 -7
- package/esm/util.js +24 -34
- package/package.json +4 -5
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -41
- package/dist/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/dist/LinearPileupDisplay/components/ModificationsTable.js +0 -28
- package/dist/shared/index.d.ts +0 -49
- package/dist/shared/index.js +0 -41
- package/esm/LinearAlignmentsDisplay/models/configSchema.js +0 -33
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -36
- package/esm/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/esm/LinearPileupDisplay/components/ModificationsTable.js +0 -22
- package/esm/shared/index.d.ts +0 -49
- package/esm/shared/index.js +0 -36
- /package/dist/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/dist/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/esm/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNextRefPos = void 0;
|
|
3
4
|
exports.parseCigar = parseCigar;
|
|
4
|
-
exports.cigarToMismatches = cigarToMismatches;
|
|
5
|
-
exports.mdToMismatches = mdToMismatches;
|
|
6
5
|
exports.getMismatches = getMismatches;
|
|
7
|
-
exports.getNextRefPos = getNextRefPos;
|
|
8
|
-
exports.getModificationProbabilities = getModificationProbabilities;
|
|
9
|
-
exports.getMethBins = getMethBins;
|
|
10
|
-
exports.getModificationPositions = getModificationPositions;
|
|
11
|
-
exports.getModificationTypes = getModificationTypes;
|
|
12
6
|
exports.getOrientedCigar = getOrientedCigar;
|
|
13
7
|
exports.getOrientedMismatches = getOrientedMismatches;
|
|
14
8
|
exports.getLengthOnRef = getLengthOnRef;
|
|
@@ -17,339 +11,25 @@ exports.getLengthSansClipping = getLengthSansClipping;
|
|
|
17
11
|
exports.getClip = getClip;
|
|
18
12
|
exports.getTag = getTag;
|
|
19
13
|
exports.featurizeSA = featurizeSA;
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const mdRegex = new RegExp(/(\d+|\^[a-z]+|[a-z])/gi);
|
|
23
|
-
const modificationRegex = new RegExp(/([A-Z])([-+])([^,.?]+)([.?])?/);
|
|
14
|
+
const cigarToMismatches_1 = require("./cigarToMismatches");
|
|
15
|
+
const mdToMismatches_1 = require("./mdToMismatches");
|
|
24
16
|
const cigarRegex = new RegExp(/([MIDNSHPX=])/);
|
|
25
17
|
const startClip = new RegExp(/(\d+)[SH]$/);
|
|
26
18
|
const endClip = new RegExp(/^(\d+)([SH])/);
|
|
27
19
|
function parseCigar(cigar = '') {
|
|
28
20
|
return cigar.split(cigarRegex).slice(0, -1);
|
|
29
21
|
}
|
|
30
|
-
function cigarToMismatches(ops, seq, ref, qual) {
|
|
31
|
-
let roffset = 0; // reference offset
|
|
32
|
-
let soffset = 0; // seq offset
|
|
33
|
-
const mismatches = [];
|
|
34
|
-
const hasRefAndSeq = ref && seq;
|
|
35
|
-
for (let i = 0; i < ops.length; i += 2) {
|
|
36
|
-
const len = +ops[i];
|
|
37
|
-
const op = ops[i + 1];
|
|
38
|
-
if (op === 'M' || op === '=' || op === 'E') {
|
|
39
|
-
if (hasRefAndSeq) {
|
|
40
|
-
for (let j = 0; j < len; j++) {
|
|
41
|
-
if (
|
|
42
|
-
// @ts-ignore in the full yarn build of the repo, this says that object is possibly undefined for some reason, ignored
|
|
43
|
-
seq[soffset + j].toUpperCase() !== ref[roffset + j].toUpperCase()) {
|
|
44
|
-
mismatches.push({
|
|
45
|
-
start: roffset + j,
|
|
46
|
-
type: 'mismatch',
|
|
47
|
-
base: seq[soffset + j],
|
|
48
|
-
altbase: ref[roffset + j],
|
|
49
|
-
length: 1,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
soffset += len;
|
|
55
|
-
}
|
|
56
|
-
if (op === 'I') {
|
|
57
|
-
mismatches.push({
|
|
58
|
-
start: roffset,
|
|
59
|
-
type: 'insertion',
|
|
60
|
-
base: `${len}`,
|
|
61
|
-
length: 0,
|
|
62
|
-
});
|
|
63
|
-
soffset += len;
|
|
64
|
-
}
|
|
65
|
-
else if (op === 'D') {
|
|
66
|
-
mismatches.push({
|
|
67
|
-
start: roffset,
|
|
68
|
-
type: 'deletion',
|
|
69
|
-
base: '*',
|
|
70
|
-
length: len,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
else if (op === 'N') {
|
|
74
|
-
mismatches.push({
|
|
75
|
-
start: roffset,
|
|
76
|
-
type: 'skip',
|
|
77
|
-
base: 'N',
|
|
78
|
-
length: len,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
else if (op === 'X') {
|
|
82
|
-
const r = (seq === null || seq === void 0 ? void 0 : seq.slice(soffset, soffset + len)) || [];
|
|
83
|
-
const q = (qual === null || qual === void 0 ? void 0 : qual.subarray(soffset, soffset + len)) || [];
|
|
84
|
-
for (let j = 0; j < len; j++) {
|
|
85
|
-
mismatches.push({
|
|
86
|
-
start: roffset + j,
|
|
87
|
-
type: 'mismatch',
|
|
88
|
-
base: r[j],
|
|
89
|
-
qual: q[j],
|
|
90
|
-
length: 1,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
soffset += len;
|
|
94
|
-
}
|
|
95
|
-
else if (op === 'H') {
|
|
96
|
-
mismatches.push({
|
|
97
|
-
start: roffset,
|
|
98
|
-
type: 'hardclip',
|
|
99
|
-
base: `H${len}`,
|
|
100
|
-
cliplen: len,
|
|
101
|
-
length: 1,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
else if (op === 'S') {
|
|
105
|
-
mismatches.push({
|
|
106
|
-
start: roffset,
|
|
107
|
-
type: 'softclip',
|
|
108
|
-
base: `S${len}`,
|
|
109
|
-
cliplen: len,
|
|
110
|
-
length: 1,
|
|
111
|
-
});
|
|
112
|
-
soffset += len;
|
|
113
|
-
}
|
|
114
|
-
if (op !== 'I' && op !== 'S' && op !== 'H') {
|
|
115
|
-
roffset += len;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return mismatches;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* parse a SAM MD tag to find mismatching bases of the template versus the
|
|
122
|
-
* reference @returns array of mismatches and their positions
|
|
123
|
-
*/
|
|
124
|
-
function mdToMismatches(mdstring, ops, cigarMismatches, seq, qual) {
|
|
125
|
-
let curr = { start: 0, base: '', length: 0, type: 'mismatch' };
|
|
126
|
-
let lastCigar = 0;
|
|
127
|
-
let lastTemplateOffset = 0;
|
|
128
|
-
let lastRefOffset = 0;
|
|
129
|
-
let lastSkipPos = 0;
|
|
130
|
-
const mismatchRecords = [];
|
|
131
|
-
const skips = cigarMismatches.filter(cigar => cigar.type === 'skip');
|
|
132
|
-
// convert a position on the reference sequence to a position
|
|
133
|
-
// on the template sequence, taking into account hard and soft
|
|
134
|
-
// clipping of reads
|
|
135
|
-
function nextRecord() {
|
|
136
|
-
mismatchRecords.push(curr);
|
|
137
|
-
// get a new mismatch record ready
|
|
138
|
-
curr = {
|
|
139
|
-
start: curr.start + curr.length,
|
|
140
|
-
length: 0,
|
|
141
|
-
base: '',
|
|
142
|
-
type: 'mismatch',
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function getTemplateCoordLocal(refCoord) {
|
|
146
|
-
let templateOffset = lastTemplateOffset;
|
|
147
|
-
let refOffset = lastRefOffset;
|
|
148
|
-
for (let i = lastCigar; i < ops.length && refOffset <= refCoord; i += 2, lastCigar = i) {
|
|
149
|
-
const len = +ops[i];
|
|
150
|
-
const op = ops[i + 1];
|
|
151
|
-
if (op === 'S' || op === 'I') {
|
|
152
|
-
templateOffset += len;
|
|
153
|
-
}
|
|
154
|
-
else if (op === 'D' || op === 'P' || op === 'N') {
|
|
155
|
-
refOffset += len;
|
|
156
|
-
}
|
|
157
|
-
else if (op !== 'H') {
|
|
158
|
-
templateOffset += len;
|
|
159
|
-
refOffset += len;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
lastTemplateOffset = templateOffset;
|
|
163
|
-
lastRefOffset = refOffset;
|
|
164
|
-
return templateOffset - (refOffset - refCoord);
|
|
165
|
-
}
|
|
166
|
-
// now actually parse the MD string
|
|
167
|
-
const md = mdstring.match(mdRegex) || [];
|
|
168
|
-
for (const token of md) {
|
|
169
|
-
const num = +token;
|
|
170
|
-
if (!Number.isNaN(num)) {
|
|
171
|
-
curr.start += num;
|
|
172
|
-
}
|
|
173
|
-
else if (token.startsWith('^')) {
|
|
174
|
-
curr.start += token.length - 1;
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
// mismatch
|
|
178
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
179
|
-
for (let j = 0; j < token.length; j += 1) {
|
|
180
|
-
curr.length = 1;
|
|
181
|
-
while (lastSkipPos < skips.length) {
|
|
182
|
-
const mismatch = skips[lastSkipPos];
|
|
183
|
-
if (curr.start >= mismatch.start) {
|
|
184
|
-
curr.start += mismatch.length;
|
|
185
|
-
lastSkipPos++;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
const s = getTemplateCoordLocal(curr.start);
|
|
192
|
-
curr.base = seq[s] || 'X';
|
|
193
|
-
curr.qual = qual === null || qual === void 0 ? void 0 : qual[s];
|
|
194
|
-
curr.altbase = token;
|
|
195
|
-
nextRecord();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return mismatchRecords;
|
|
200
|
-
}
|
|
201
22
|
function getMismatches(cigar, md, seq, ref, qual) {
|
|
202
23
|
let mismatches = [];
|
|
203
24
|
const ops = parseCigar(cigar);
|
|
204
|
-
// parse the CIGAR tag if it has one
|
|
205
25
|
if (cigar) {
|
|
206
|
-
mismatches = mismatches.concat(cigarToMismatches(ops, seq, ref, qual));
|
|
26
|
+
mismatches = mismatches.concat((0, cigarToMismatches_1.cigarToMismatches)(ops, seq, ref, qual));
|
|
207
27
|
}
|
|
208
|
-
// now let's look for CRAM or MD mismatches
|
|
209
28
|
if (md && seq) {
|
|
210
|
-
mismatches = mismatches.concat(mdToMismatches(md, ops, mismatches, seq, qual));
|
|
29
|
+
mismatches = mismatches.concat((0, mdToMismatches_1.mdToMismatches)(md, ops, mismatches, seq, qual));
|
|
211
30
|
}
|
|
212
31
|
return mismatches;
|
|
213
32
|
}
|
|
214
|
-
// get relative reference sequence positions for positions given relative to
|
|
215
|
-
// the read sequence
|
|
216
|
-
function* getNextRefPos(cigarOps, positions) {
|
|
217
|
-
let readPos = 0;
|
|
218
|
-
let refPos = 0;
|
|
219
|
-
let currPos = 0;
|
|
220
|
-
for (let i = 0; i < cigarOps.length && currPos < positions.length; i += 2) {
|
|
221
|
-
const len = +cigarOps[i];
|
|
222
|
-
const op = cigarOps[i + 1];
|
|
223
|
-
if (op === 'S' || op === 'I') {
|
|
224
|
-
for (let i = 0; i < len && currPos < positions.length; i++) {
|
|
225
|
-
if (positions[currPos] === readPos + i) {
|
|
226
|
-
currPos++;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
readPos += len;
|
|
230
|
-
}
|
|
231
|
-
else if (op === 'D' || op === 'N') {
|
|
232
|
-
refPos += len;
|
|
233
|
-
}
|
|
234
|
-
else if (op === 'M' || op === 'X' || op === '=') {
|
|
235
|
-
for (let i = 0; i < len && currPos < positions.length; i++) {
|
|
236
|
-
if (positions[currPos] === readPos + i) {
|
|
237
|
-
yield refPos + i;
|
|
238
|
-
currPos++;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
readPos += len;
|
|
242
|
-
refPos += len;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
function getModificationProbabilities(feature) {
|
|
247
|
-
var _a;
|
|
248
|
-
const m = (0, util_2.getTagAlt)(feature, 'ML', 'Ml') || [];
|
|
249
|
-
return m
|
|
250
|
-
? (typeof m === 'string' ? m.split(',').map(e => +e) : m).map(e => e / 255)
|
|
251
|
-
: (_a = (0, util_2.getTagAlt)(feature, 'MP', 'Mp')) === null || _a === void 0 ? void 0 : _a.split('').map(s => s.charCodeAt(0) - 33).map(elt => Math.min(1, elt / 50));
|
|
252
|
-
}
|
|
253
|
-
function getMethBins(feature) {
|
|
254
|
-
const fstart = feature.get('start');
|
|
255
|
-
const fend = feature.get('end');
|
|
256
|
-
const fstrand = feature.get('strand');
|
|
257
|
-
const flen = fend - fstart;
|
|
258
|
-
const mm = (0, util_2.getTagAlt)(feature, 'MM', 'Mm') || '';
|
|
259
|
-
const methBins = new Array(flen);
|
|
260
|
-
const methProbs = new Array(flen);
|
|
261
|
-
const seq = feature.get('seq');
|
|
262
|
-
if (seq) {
|
|
263
|
-
const ops = parseCigar(feature.get('CIGAR'));
|
|
264
|
-
const probabilities = getModificationProbabilities(feature);
|
|
265
|
-
const modifications = getModificationPositions(mm, seq, fstrand);
|
|
266
|
-
let probIndex = 0;
|
|
267
|
-
for (const { type, positions } of modifications) {
|
|
268
|
-
if (type === 'm') {
|
|
269
|
-
for (const ref of getNextRefPos(ops, positions)) {
|
|
270
|
-
const prob = (probabilities === null || probabilities === void 0 ? void 0 : probabilities[probIndex]) || 0;
|
|
271
|
-
probIndex++;
|
|
272
|
-
if (ref >= 0 && ref < flen) {
|
|
273
|
-
methBins[ref] = 1;
|
|
274
|
-
methProbs[ref] = prob;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return { methBins, methProbs };
|
|
281
|
-
}
|
|
282
|
-
function getModificationPositions(mm, fseq, fstrand) {
|
|
283
|
-
const seq = fstrand === -1 ? (0, util_1.revcom)(fseq) : fseq;
|
|
284
|
-
const mods = mm.split(';').filter(mod => !!mod);
|
|
285
|
-
const result = [];
|
|
286
|
-
for (const mod of mods) {
|
|
287
|
-
const [basemod, ...skips] = mod.split(',');
|
|
288
|
-
// regexes based on parse_mm.pl from hts-specs
|
|
289
|
-
const matches = modificationRegex.exec(basemod);
|
|
290
|
-
if (!matches) {
|
|
291
|
-
throw new Error('bad format for MM tag');
|
|
292
|
-
}
|
|
293
|
-
const [, base, strand, typestr] = matches;
|
|
294
|
-
// can be a multi e.g. C+mh for both meth (m) and hydroxymeth (h) so
|
|
295
|
-
// split, and they can also be chemical codes (ChEBI) e.g. C+16061
|
|
296
|
-
const types = typestr.split(/(\d+|.)/).filter(f => !!f);
|
|
297
|
-
if (strand === '-') {
|
|
298
|
-
console.warn('unsupported negative strand modifications');
|
|
299
|
-
// make sure to return a somewhat matching type even in this case
|
|
300
|
-
result.push({ type: 'unsupported', positions: [] });
|
|
301
|
-
}
|
|
302
|
-
// this logic also based on parse_mm.pl from hts-specs is that in the
|
|
303
|
-
// sequence of the read, if we have a modification type e.g. C+m;2 and a
|
|
304
|
-
// sequence ACGTACGTAC we skip the two instances of C and go to the last
|
|
305
|
-
// C
|
|
306
|
-
for (const type of types) {
|
|
307
|
-
let i = 0;
|
|
308
|
-
const positions = [];
|
|
309
|
-
for (const d of skips) {
|
|
310
|
-
let delta = +d;
|
|
311
|
-
do {
|
|
312
|
-
if (base === 'N' || base === seq[i]) {
|
|
313
|
-
delta--;
|
|
314
|
-
}
|
|
315
|
-
i++;
|
|
316
|
-
} while (delta >= 0 && i < seq.length);
|
|
317
|
-
if (fstrand === -1) {
|
|
318
|
-
const pos = seq.length - i;
|
|
319
|
-
if (pos >= 0) {
|
|
320
|
-
// avoid negative-number-positions in array, seen in #4629 cause
|
|
321
|
-
// unknown, could warrant some further investigation
|
|
322
|
-
positions.unshift(pos);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
positions.push(i - 1);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
result.push({
|
|
330
|
-
type,
|
|
331
|
-
positions,
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return result;
|
|
336
|
-
}
|
|
337
|
-
function getModificationTypes(mm) {
|
|
338
|
-
return mm
|
|
339
|
-
.split(';')
|
|
340
|
-
.filter(mod => !!mod)
|
|
341
|
-
.flatMap(mod => {
|
|
342
|
-
const basemod = mod.split(',')[0];
|
|
343
|
-
const matches = modificationRegex.exec(basemod);
|
|
344
|
-
if (!matches) {
|
|
345
|
-
throw new Error(`bad format for MM tag: ${mm}`);
|
|
346
|
-
}
|
|
347
|
-
const typestr = matches[3];
|
|
348
|
-
// can be a multi e.g. C+mh for both meth (m) and hydroxymeth (h) so
|
|
349
|
-
// split, and they can also be chemical codes (ChEBI) e.g. C+16061
|
|
350
|
-
return typestr.split(/(\d+|.)/).filter(f => !!f);
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
33
|
function getOrientedCigar(flip, cigar) {
|
|
354
34
|
if (flip) {
|
|
355
35
|
const ret = [];
|
|
@@ -370,7 +50,7 @@ function getOrientedCigar(flip, cigar) {
|
|
|
370
50
|
}
|
|
371
51
|
function getOrientedMismatches(flip, cigar) {
|
|
372
52
|
const p = parseCigar(cigar);
|
|
373
|
-
return cigarToMismatches(flip ? getOrientedCigar(flip, p) : p);
|
|
53
|
+
return (0, cigarToMismatches_1.cigarToMismatches)(flip ? getOrientedCigar(flip, p) : p);
|
|
374
54
|
}
|
|
375
55
|
function getLengthOnRef(cigar) {
|
|
376
56
|
const cigarOps = parseCigar(cigar);
|
|
@@ -413,16 +93,9 @@ function getClip(cigar, strand) {
|
|
|
413
93
|
? +(startClip.exec(cigar) || [])[1] || 0
|
|
414
94
|
: +(endClip.exec(cigar) || [])[1] || 0;
|
|
415
95
|
}
|
|
416
|
-
function getTag(
|
|
417
|
-
|
|
418
|
-
return tags ? tags[tag] : f.get(tag);
|
|
96
|
+
function getTag(feature, tag) {
|
|
97
|
+
return feature.get('tags')[tag];
|
|
419
98
|
}
|
|
420
|
-
// produces a list of "feature-like" object from parsing supplementary
|
|
421
|
-
// alignments in the SA tag
|
|
422
|
-
//
|
|
423
|
-
// @param normalize - used specifically in the linear-read-vs-ref context, it
|
|
424
|
-
// flips features around relative to the original feature. other contexts of
|
|
425
|
-
// usage can keep this false
|
|
426
99
|
function featurizeSA(SA, id, strand, readName, normalize) {
|
|
427
100
|
return ((SA === null || SA === void 0 ? void 0 : SA.split(';').filter(aln => !!aln).map((aln, index) => {
|
|
428
101
|
const ret = aln.split(',');
|
|
@@ -453,3 +126,5 @@ function featurizeSA(SA, id, strand, readName, normalize) {
|
|
|
453
126
|
};
|
|
454
127
|
})) || []);
|
|
455
128
|
}
|
|
129
|
+
var getNextRefPos_1 = require("./getNextRefPos");
|
|
130
|
+
Object.defineProperty(exports, "getNextRefPos", { enumerable: true, get: function () { return getNextRefPos_1.getNextRefPos; } });
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mdToMismatches = mdToMismatches;
|
|
4
|
+
const mdRegex = new RegExp(/(\d+|\^[a-z]+|[a-z])/gi);
|
|
5
|
+
function mdToMismatches(mdstring, ops, cigarMismatches, seq, qual) {
|
|
6
|
+
let curr = { start: 0, base: '', length: 0, type: 'mismatch' };
|
|
7
|
+
let lastCigar = 0;
|
|
8
|
+
let lastTemplateOffset = 0;
|
|
9
|
+
let lastRefOffset = 0;
|
|
10
|
+
let lastSkipPos = 0;
|
|
11
|
+
const mismatchRecords = [];
|
|
12
|
+
const skips = cigarMismatches.filter(cigar => cigar.type === 'skip');
|
|
13
|
+
function nextRecord() {
|
|
14
|
+
mismatchRecords.push(curr);
|
|
15
|
+
curr = {
|
|
16
|
+
start: curr.start + curr.length,
|
|
17
|
+
length: 0,
|
|
18
|
+
base: '',
|
|
19
|
+
type: 'mismatch',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function getTemplateCoordLocal(refCoord) {
|
|
23
|
+
let templateOffset = lastTemplateOffset;
|
|
24
|
+
let refOffset = lastRefOffset;
|
|
25
|
+
for (let i = lastCigar; i < ops.length && refOffset <= refCoord; i += 2, lastCigar = i) {
|
|
26
|
+
const len = +ops[i];
|
|
27
|
+
const op = ops[i + 1];
|
|
28
|
+
if (op === 'S' || op === 'I') {
|
|
29
|
+
templateOffset += len;
|
|
30
|
+
}
|
|
31
|
+
else if (op === 'D' || op === 'P' || op === 'N') {
|
|
32
|
+
refOffset += len;
|
|
33
|
+
}
|
|
34
|
+
else if (op !== 'H') {
|
|
35
|
+
templateOffset += len;
|
|
36
|
+
refOffset += len;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
lastTemplateOffset = templateOffset;
|
|
40
|
+
lastRefOffset = refOffset;
|
|
41
|
+
return templateOffset - (refOffset - refCoord);
|
|
42
|
+
}
|
|
43
|
+
const md = mdstring.match(mdRegex) || [];
|
|
44
|
+
for (const token of md) {
|
|
45
|
+
const num = +token;
|
|
46
|
+
if (!Number.isNaN(num)) {
|
|
47
|
+
curr.start += num;
|
|
48
|
+
}
|
|
49
|
+
else if (token.startsWith('^')) {
|
|
50
|
+
curr.start += token.length - 1;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
for (let j = 0; j < token.length; j += 1) {
|
|
54
|
+
curr.length = 1;
|
|
55
|
+
while (lastSkipPos < skips.length) {
|
|
56
|
+
const mismatch = skips[lastSkipPos];
|
|
57
|
+
if (curr.start >= mismatch.start) {
|
|
58
|
+
curr.start += mismatch.length;
|
|
59
|
+
lastSkipPos++;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const s = getTemplateCoordLocal(curr.start);
|
|
66
|
+
curr.base = seq[s] || 'X';
|
|
67
|
+
curr.qual = qual === null || qual === void 0 ? void 0 : qual[s];
|
|
68
|
+
curr.altbase = token;
|
|
69
|
+
nextRecord();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return mismatchRecords;
|
|
74
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
+
export declare function getModProbabilities(feature: Feature): number[] | undefined;
|
|
3
|
+
export declare function getModPositions(mm: string, fseq: string, fstrand: number): {
|
|
4
|
+
type: string;
|
|
5
|
+
positions: number[];
|
|
6
|
+
base: string;
|
|
7
|
+
strand: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getModTypes(mm: string): {
|
|
10
|
+
type: string;
|
|
11
|
+
base: string;
|
|
12
|
+
strand: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function getMethBins(feature: Feature, cigarOps: string[]): {
|
|
15
|
+
methBins: number[];
|
|
16
|
+
hydroxyMethBins: number[];
|
|
17
|
+
methProbs: number[];
|
|
18
|
+
hydroxyMethProbs: number[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getModProbabilities = getModProbabilities;
|
|
4
|
+
exports.getModPositions = getModPositions;
|
|
5
|
+
exports.getModTypes = getModTypes;
|
|
6
|
+
exports.getMethBins = getMethBins;
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const MismatchParser_1 = require("../MismatchParser");
|
|
9
|
+
const util_2 = require("../util");
|
|
10
|
+
const modificationRegex = new RegExp(/([A-Z])([-+])([^,.?]+)([.?])?/);
|
|
11
|
+
function getModProbabilities(feature) {
|
|
12
|
+
var _a;
|
|
13
|
+
const m = (0, util_2.getTagAlt)(feature, 'ML', 'Ml') || [];
|
|
14
|
+
return m
|
|
15
|
+
? (typeof m === 'string' ? m.split(',').map(e => +e) : m).map(e => e / 255)
|
|
16
|
+
: (_a = (0, util_2.getTagAlt)(feature, 'MP', 'Mp')) === null || _a === void 0 ? void 0 : _a.split('').map(s => s.charCodeAt(0) - 33).map(elt => Math.min(1, elt / 50));
|
|
17
|
+
}
|
|
18
|
+
function getModPositions(mm, fseq, fstrand) {
|
|
19
|
+
const seq = fstrand === -1 ? (0, util_1.revcom)(fseq) : fseq;
|
|
20
|
+
const mods = mm.split(';').filter(mod => !!mod);
|
|
21
|
+
const result = [];
|
|
22
|
+
for (const mod of mods) {
|
|
23
|
+
const [basemod, ...skips] = mod.split(',');
|
|
24
|
+
const matches = modificationRegex.exec(basemod);
|
|
25
|
+
if (!matches) {
|
|
26
|
+
throw new Error('bad format for MM tag');
|
|
27
|
+
}
|
|
28
|
+
const [, base, strand, typestr] = matches;
|
|
29
|
+
const types = typestr.split(/(\d+|.)/).filter(f => !!f);
|
|
30
|
+
if (strand === '-') {
|
|
31
|
+
console.warn('unsupported negative strand modifications');
|
|
32
|
+
result.push({
|
|
33
|
+
type: 'unsupported',
|
|
34
|
+
positions: [],
|
|
35
|
+
base: base,
|
|
36
|
+
strand: strand,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
for (const type of types) {
|
|
40
|
+
let i = 0;
|
|
41
|
+
const positions = [];
|
|
42
|
+
for (const d of skips) {
|
|
43
|
+
let delta = +d;
|
|
44
|
+
do {
|
|
45
|
+
if (base === 'N' || base === seq[i]) {
|
|
46
|
+
delta--;
|
|
47
|
+
}
|
|
48
|
+
i++;
|
|
49
|
+
} while (delta >= 0 && i < seq.length);
|
|
50
|
+
if (fstrand === -1) {
|
|
51
|
+
const pos = seq.length - i;
|
|
52
|
+
if (pos >= 0) {
|
|
53
|
+
positions.unshift(pos);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
positions.push(i - 1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
result.push({
|
|
61
|
+
type,
|
|
62
|
+
base: base,
|
|
63
|
+
strand: strand,
|
|
64
|
+
positions,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
function getModTypes(mm) {
|
|
71
|
+
return mm
|
|
72
|
+
.split(';')
|
|
73
|
+
.filter(mod => !!mod)
|
|
74
|
+
.flatMap(mod => {
|
|
75
|
+
const basemod = mod.split(',')[0];
|
|
76
|
+
const matches = modificationRegex.exec(basemod);
|
|
77
|
+
if (!matches) {
|
|
78
|
+
throw new Error('bad format for MM tag');
|
|
79
|
+
}
|
|
80
|
+
const [, base, strand, typestr] = matches;
|
|
81
|
+
return typestr
|
|
82
|
+
.split(/(\d+|.)/)
|
|
83
|
+
.filter(f => !!f)
|
|
84
|
+
.map(type => ({
|
|
85
|
+
type,
|
|
86
|
+
base: base,
|
|
87
|
+
strand: strand,
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function getMethBins(feature, cigarOps) {
|
|
92
|
+
const fstart = feature.get('start');
|
|
93
|
+
const fend = feature.get('end');
|
|
94
|
+
const fstrand = feature.get('strand');
|
|
95
|
+
const flen = fend - fstart;
|
|
96
|
+
const mm = (0, util_2.getTagAlt)(feature, 'MM', 'Mm') || '';
|
|
97
|
+
const methBins = [];
|
|
98
|
+
const hydroxyMethBins = [];
|
|
99
|
+
const methProbs = [];
|
|
100
|
+
const hydroxyMethProbs = [];
|
|
101
|
+
const seq = feature.get('seq');
|
|
102
|
+
if (seq) {
|
|
103
|
+
const probabilities = getModProbabilities(feature);
|
|
104
|
+
const modifications = getModPositions(mm, seq, fstrand);
|
|
105
|
+
let probIndex = 0;
|
|
106
|
+
for (const { type, positions } of modifications) {
|
|
107
|
+
for (const { ref, idx } of (0, MismatchParser_1.getNextRefPos)(cigarOps, positions)) {
|
|
108
|
+
const idx2 = probIndex + (fstrand === -1 ? positions.length - 1 - idx : idx);
|
|
109
|
+
const prob = (probabilities === null || probabilities === void 0 ? void 0 : probabilities[idx2]) || 0;
|
|
110
|
+
if (type === 'm') {
|
|
111
|
+
if (ref >= 0 && ref < flen) {
|
|
112
|
+
methBins[ref] = 1;
|
|
113
|
+
methProbs[ref] = prob;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else if (type === 'h') {
|
|
117
|
+
if (ref >= 0 && ref < flen) {
|
|
118
|
+
hydroxyMethBins[ref] = 1;
|
|
119
|
+
hydroxyMethProbs[ref] = prob;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
probIndex += positions.length;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return { methBins, hydroxyMethBins, methProbs, hydroxyMethProbs };
|
|
127
|
+
}
|
package/dist/PileupRPC/base.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import { RenderArgs } from '@jbrowse/core/rpc/coreRpcMethods';
|
|
2
|
+
import type { RenderArgs } from '@jbrowse/core/rpc/coreRpcMethods';
|
|
3
3
|
export default abstract class PileupBaseRPC extends RpcMethodType {
|
|
4
4
|
serializeArguments(args: RenderArgs & {
|
|
5
|
-
|
|
5
|
+
stopToken?: string;
|
|
6
6
|
statusCallback?: (arg: string) => void;
|
|
7
7
|
}, rpcDriver: string): Promise<Record<string, unknown>>;
|
|
8
8
|
}
|
package/dist/PileupRPC/base.js
CHANGED
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const RpcMethodType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodType"));
|
|
7
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
// specialized get features to return limited data about alignments
|
|
9
8
|
class PileupBaseRPC extends RpcMethodType_1.default {
|
|
10
9
|
async serializeArguments(args, rpcDriver) {
|
|
11
10
|
var _a;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function PileupRPCMethodsF(pm: PluginManager): void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Region } from '@jbrowse/core/util';
|
|
2
|
-
import { RemoteAbortSignal } from '@jbrowse/core/rpc/remoteAbortSignals';
|
|
3
1
|
import PileupBaseRPC from '../base';
|
|
2
|
+
import type { Region } from '@jbrowse/core/util';
|
|
4
3
|
export default class PileupGetGlobalValueForTag extends PileupBaseRPC {
|
|
5
4
|
name: string;
|
|
6
5
|
execute(args: {
|
|
7
6
|
adapterConfig: Record<string, unknown>;
|
|
8
|
-
|
|
7
|
+
stopToken?: string;
|
|
9
8
|
headers?: Record<string, string>;
|
|
10
9
|
regions: Region[];
|
|
11
10
|
sessionId: string;
|
|
@@ -4,11 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
7
|
const rxjs_1 = require("rxjs");
|
|
9
|
-
|
|
8
|
+
const operators_1 = require("rxjs/operators");
|
|
10
9
|
const base_1 = __importDefault(require("../base"));
|
|
11
|
-
const util_1 = require("../../util");
|
|
12
10
|
class PileupGetGlobalValueForTag extends base_1.default {
|
|
13
11
|
constructor() {
|
|
14
12
|
super(...arguments);
|
|
@@ -21,7 +19,7 @@ class PileupGetGlobalValueForTag extends base_1.default {
|
|
|
21
19
|
const featuresArray = await (0, rxjs_1.firstValueFrom)(features.pipe((0, operators_1.toArray)()));
|
|
22
20
|
return [
|
|
23
21
|
...new Set(featuresArray
|
|
24
|
-
.map(feature => (
|
|
22
|
+
.map(feature => { var _a; return (_a = feature.get('tags')) === null || _a === void 0 ? void 0 : _a[tag]; })
|
|
25
23
|
.filter(f => f !== undefined)
|
|
26
24
|
.map(f => `${f}`)),
|
|
27
25
|
];
|