@jbrowse/plugin-alignments 2.17.0 → 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 -12
- 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 +0 -4
- package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- 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 +6 -5
- package/dist/BamAdapter/BamAdapter.js +21 -39
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- 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 +6 -9
- package/dist/CramAdapter/CramAdapter.js +18 -41
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- 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 -2
- 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/alignmentsModel.d.ts +2 -5
- package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/dist/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/dist/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +1 -2
- package/dist/LinearAlignmentsDisplay/model.d.ts +6 -75
- package/dist/LinearAlignmentsDisplay/model.js +5 -78
- package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +34 -133
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +109 -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 +2 -2
- 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 +103 -105
- package/dist/LinearPileupDisplay/model.js +10 -101
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
- 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 +15 -93
- package/dist/LinearReadArcsDisplay/model.js +17 -104
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
- 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 +13 -55
- package/dist/LinearReadCloudDisplay/model.js +17 -68
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/dist/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/index.js +1 -2
- package/dist/LinearSNPCoverageDisplay/model.d.ts +9 -50
- package/dist/LinearSNPCoverageDisplay/model.js +20 -124
- package/dist/MismatchParser/cigarToMismatches.d.ts +1 -1
- package/dist/MismatchParser/cigarToMismatches.js +4 -7
- package/dist/MismatchParser/getNextRefPos.js +0 -2
- package/dist/MismatchParser/index.d.ts +2 -2
- package/dist/MismatchParser/index.js +1 -9
- package/dist/MismatchParser/mdToMismatches.d.ts +2 -2
- package/dist/MismatchParser/mdToMismatches.js +0 -6
- package/dist/ModificationParser/index.d.ts +1 -1
- package/dist/ModificationParser/index.js +1 -18
- 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 +1 -2
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/dist/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/dist/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/dist/PileupRPC/util.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
- package/dist/PileupRenderer/PileupRenderer.d.ts +10 -20
- package/dist/PileupRenderer/PileupRenderer.js +11 -16
- 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 +3 -5
- package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
- package/dist/PileupRenderer/renderMethylation.d.ts +4 -4
- package/dist/PileupRenderer/renderMethylation.js +0 -4
- package/dist/PileupRenderer/renderMismatches.d.ts +3 -3
- package/dist/PileupRenderer/renderMismatches.js +1 -12
- package/dist/PileupRenderer/renderModifications.d.ts +3 -3
- package/dist/PileupRenderer/renderModifications.js +1 -3
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/dist/PileupRenderer/renderSoftClipping.js +0 -4
- package/dist/PileupRenderer/sortUtil.d.ts +2 -2
- package/dist/PileupRenderer/sortUtil.js +1 -4
- 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 +4 -6
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/dist/SNPCoverageAdapter/configSchema.js +1 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +25 -247
- 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 +10 -0
- package/dist/SNPCoverageAdapter/util.js +41 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +14 -38
- 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 -1
- package/dist/shared/color.js +0 -8
- package/dist/shared/components/BaseDisplayComponent.d.ts +2 -2
- package/dist/shared/components/BaseDisplayComponent.js +12 -11
- package/dist/shared/components/FilterByTagDialog.d.ts +1 -1
- package/dist/shared/components/FilterByTagDialog.js +2 -2
- package/dist/shared/fetchChains.d.ts +2 -2
- package/dist/shared/fetchChains.js +1 -2
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/dist/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/dist/shared/getUniqueModifications.d.ts +5 -5
- package/dist/shared/getUniqueTags.d.ts +4 -4
- package/dist/shared/renderSvgUtil.js +0 -2
- package/dist/shared/util.d.ts +11 -1
- package/dist/shared/util.js +27 -1
- package/dist/util.d.ts +4 -4
- package/dist/util.js +3 -9
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -12
- 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 +0 -4
- package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- 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 +6 -5
- package/esm/BamAdapter/BamAdapter.js +19 -37
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- 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 +6 -9
- package/esm/CramAdapter/CramAdapter.js +17 -40
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- 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 -2
- 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/alignmentsModel.d.ts +2 -5
- package/esm/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/esm/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/esm/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +1 -2
- package/esm/LinearAlignmentsDisplay/model.d.ts +6 -75
- package/esm/LinearAlignmentsDisplay/model.js +6 -79
- package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -135
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +109 -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 +2 -2
- 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 +103 -105
- package/esm/LinearPileupDisplay/model.js +11 -102
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
- 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 +15 -93
- package/esm/LinearReadArcsDisplay/model.js +18 -105
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
- 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 +13 -55
- package/esm/LinearReadCloudDisplay/model.js +17 -68
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/esm/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/index.js +1 -2
- package/esm/LinearSNPCoverageDisplay/model.d.ts +9 -50
- package/esm/LinearSNPCoverageDisplay/model.js +21 -125
- package/esm/MismatchParser/cigarToMismatches.d.ts +1 -1
- package/esm/MismatchParser/cigarToMismatches.js +4 -7
- package/esm/MismatchParser/getNextRefPos.js +0 -2
- package/esm/MismatchParser/index.d.ts +2 -2
- package/esm/MismatchParser/index.js +1 -9
- package/esm/MismatchParser/mdToMismatches.d.ts +2 -2
- package/esm/MismatchParser/mdToMismatches.js +0 -6
- package/esm/ModificationParser/index.d.ts +1 -1
- package/esm/ModificationParser/index.js +1 -18
- 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 +1 -2
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/esm/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/esm/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/esm/PileupRPC/util.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +10 -20
- package/esm/PileupRenderer/PileupRenderer.js +12 -17
- 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 +3 -5
- package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
- package/esm/PileupRenderer/renderMethylation.d.ts +4 -4
- package/esm/PileupRenderer/renderMethylation.js +0 -4
- package/esm/PileupRenderer/renderMismatches.d.ts +3 -3
- package/esm/PileupRenderer/renderMismatches.js +1 -12
- package/esm/PileupRenderer/renderModifications.d.ts +3 -3
- package/esm/PileupRenderer/renderModifications.js +1 -3
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/esm/PileupRenderer/renderSoftClipping.js +1 -5
- package/esm/PileupRenderer/sortUtil.d.ts +2 -2
- package/esm/PileupRenderer/sortUtil.js +1 -4
- 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 +5 -7
- package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/esm/SNPCoverageAdapter/configSchema.js +1 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +24 -246
- 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 +10 -0
- package/esm/SNPCoverageAdapter/util.js +35 -0
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +16 -40
- 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 -1
- package/esm/shared/color.js +0 -8
- package/esm/shared/components/BaseDisplayComponent.d.ts +2 -2
- package/esm/shared/components/BaseDisplayComponent.js +12 -11
- package/esm/shared/components/FilterByTagDialog.d.ts +1 -1
- package/esm/shared/components/FilterByTagDialog.js +2 -2
- package/esm/shared/fetchChains.d.ts +2 -2
- package/esm/shared/fetchChains.js +1 -2
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/esm/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/esm/shared/getUniqueModifications.d.ts +5 -5
- package/esm/shared/getUniqueTags.d.ts +4 -4
- package/esm/shared/renderSvgUtil.js +0 -2
- package/esm/shared/util.d.ts +11 -1
- package/esm/shared/util.js +24 -0
- package/esm/util.d.ts +4 -4
- package/esm/util.js +3 -9
- package/package.json +3 -4
|
@@ -1,101 +1,58 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { observable } from 'mobx';
|
|
4
|
-
import { getConf, readConfObject, } from '@jbrowse/core/configuration';
|
|
5
|
-
import { linearWiggleDisplayModelFactory } from '@jbrowse/plugin-wiggle';
|
|
6
|
-
import { getContainingView } from '@jbrowse/core/util';
|
|
2
|
+
import { getConf, readConfObject } from '@jbrowse/core/configuration';
|
|
7
3
|
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
8
|
-
|
|
9
|
-
import {
|
|
4
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
5
|
+
import { linearWiggleDisplayModelFactory } from '@jbrowse/plugin-wiggle';
|
|
6
|
+
import { observable } from 'mobx';
|
|
7
|
+
import { cast, getEnv, isAlive, types } from 'mobx-state-tree';
|
|
10
8
|
import { getUniqueModifications } from '../shared/getUniqueModifications';
|
|
11
|
-
|
|
9
|
+
import { createAutorun, getColorForModification } from '../util';
|
|
12
10
|
const Tooltip = lazy(() => import('./components/Tooltip'));
|
|
13
|
-
// using a map because it preserves order
|
|
14
11
|
const rendererTypes = new Map([['snpcoverage', 'SNPCoverageRenderer']]);
|
|
15
|
-
/**
|
|
16
|
-
* #stateModel LinearSNPCoverageDisplay
|
|
17
|
-
* extends
|
|
18
|
-
* - [LinearWiggleDisplay](../linearwiggledisplay)
|
|
19
|
-
*/
|
|
20
12
|
function stateModelFactory(pluginManager, configSchema) {
|
|
21
13
|
return types
|
|
22
14
|
.compose('LinearSNPCoverageDisplay', linearWiggleDisplayModelFactory(pluginManager, configSchema), types.model({
|
|
23
|
-
/**
|
|
24
|
-
* #property
|
|
25
|
-
*/
|
|
26
15
|
type: types.literal('LinearSNPCoverageDisplay'),
|
|
27
|
-
/**
|
|
28
|
-
* #property
|
|
29
|
-
*/
|
|
30
16
|
drawInterbaseCounts: types.maybe(types.boolean),
|
|
31
|
-
/**
|
|
32
|
-
* #property
|
|
33
|
-
*/
|
|
34
17
|
drawIndicators: types.maybe(types.boolean),
|
|
35
|
-
/**
|
|
36
|
-
* #property
|
|
37
|
-
*/
|
|
38
18
|
drawArcs: types.maybe(types.boolean),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
filterBy: types.optional(types.frozen(), {
|
|
43
|
-
flagInclude: 0,
|
|
44
|
-
flagExclude: 1540,
|
|
45
|
-
}),
|
|
46
|
-
/**
|
|
47
|
-
* #property
|
|
48
|
-
*/
|
|
49
|
-
colorBy: types.frozen(),
|
|
50
|
-
/**
|
|
51
|
-
* #property
|
|
52
|
-
*/
|
|
19
|
+
filterBySetting: types.frozen(),
|
|
20
|
+
colorBySetting: types.frozen(),
|
|
53
21
|
jexlFilters: types.optional(types.array(types.string), []),
|
|
54
22
|
}))
|
|
55
23
|
.volatile(() => ({
|
|
56
|
-
/**
|
|
57
|
-
* #volatile
|
|
58
|
-
*/
|
|
59
24
|
visibleModifications: observable.map({}),
|
|
60
|
-
/**
|
|
61
|
-
* #volatile
|
|
62
|
-
*/
|
|
63
25
|
modificationsReady: false,
|
|
26
|
+
}))
|
|
27
|
+
.views(self => ({
|
|
28
|
+
get colorBy() {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = self.colorBySetting) !== null && _a !== void 0 ? _a : getConf(self, 'colorBy');
|
|
31
|
+
},
|
|
32
|
+
get filterBy() {
|
|
33
|
+
var _a;
|
|
34
|
+
return (_a = self.filterBySetting) !== null && _a !== void 0 ? _a : getConf(self, 'filterBy');
|
|
35
|
+
},
|
|
64
36
|
}))
|
|
65
37
|
.actions(self => ({
|
|
66
|
-
/**
|
|
67
|
-
* #action
|
|
68
|
-
*/
|
|
69
38
|
setConfig(configuration) {
|
|
70
39
|
self.configuration = configuration;
|
|
71
40
|
},
|
|
72
|
-
/**
|
|
73
|
-
* #action
|
|
74
|
-
*/
|
|
75
41
|
setFilterBy(filter) {
|
|
76
|
-
self.
|
|
42
|
+
self.filterBySetting = {
|
|
77
43
|
...filter,
|
|
78
44
|
};
|
|
79
45
|
},
|
|
80
|
-
/**
|
|
81
|
-
* #action
|
|
82
|
-
*/
|
|
83
46
|
setColorScheme(colorBy) {
|
|
84
|
-
self.
|
|
47
|
+
self.colorBySetting = colorBy
|
|
85
48
|
? {
|
|
86
49
|
...colorBy,
|
|
87
50
|
}
|
|
88
51
|
: undefined;
|
|
89
52
|
},
|
|
90
|
-
/**
|
|
91
|
-
* #action
|
|
92
|
-
*/
|
|
93
53
|
setJexlFilters(filters) {
|
|
94
54
|
self.jexlFilters = cast(filters);
|
|
95
55
|
},
|
|
96
|
-
/**
|
|
97
|
-
* #action
|
|
98
|
-
*/
|
|
99
56
|
updateVisibleModifications(uniqueModifications) {
|
|
100
57
|
for (const modification of uniqueModifications) {
|
|
101
58
|
if (!self.visibleModifications.has(modification.type)) {
|
|
@@ -110,9 +67,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
110
67
|
.views(self => {
|
|
111
68
|
const { adapterProps: superAdapterProps } = self;
|
|
112
69
|
return {
|
|
113
|
-
/**
|
|
114
|
-
* #getter
|
|
115
|
-
*/
|
|
116
70
|
get rendererConfig() {
|
|
117
71
|
const configBlob = getConf(self, ['renderers', self.rendererTypeName]) || {};
|
|
118
72
|
const { drawArcs, drawInterbaseCounts, drawIndicators } = self;
|
|
@@ -123,40 +77,24 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
123
77
|
drawArcs: drawArcs !== null && drawArcs !== void 0 ? drawArcs : configBlob.drawArcs,
|
|
124
78
|
}, getEnv(self));
|
|
125
79
|
},
|
|
126
|
-
/**
|
|
127
|
-
* #getter
|
|
128
|
-
*/
|
|
129
80
|
get drawArcsSetting() {
|
|
130
81
|
var _a;
|
|
131
82
|
return ((_a = self.drawArcs) !== null && _a !== void 0 ? _a : readConfObject(this.rendererConfig, 'drawArcs'));
|
|
132
83
|
},
|
|
133
|
-
/**
|
|
134
|
-
* #getter
|
|
135
|
-
*/
|
|
136
84
|
get drawInterbaseCountsSetting() {
|
|
137
85
|
var _a;
|
|
138
86
|
return ((_a = self.drawInterbaseCounts) !== null && _a !== void 0 ? _a : readConfObject(this.rendererConfig, 'drawInterbaseCounts'));
|
|
139
87
|
},
|
|
140
|
-
/**
|
|
141
|
-
* #getter
|
|
142
|
-
*/
|
|
143
88
|
get drawIndicatorsSetting() {
|
|
144
89
|
var _a;
|
|
145
90
|
return ((_a = self.drawIndicators) !== null && _a !== void 0 ? _a : readConfObject(this.rendererConfig, 'drawIndicators'));
|
|
146
91
|
},
|
|
147
|
-
/**
|
|
148
|
-
* #getter
|
|
149
|
-
*/
|
|
150
92
|
get autorunReady() {
|
|
151
93
|
const view = getContainingView(self);
|
|
152
94
|
return (view.initialized &&
|
|
153
|
-
self.
|
|
154
|
-
!self.regionTooLarge &&
|
|
95
|
+
self.statsReadyAndRegionNotTooLarge &&
|
|
155
96
|
!self.error);
|
|
156
97
|
},
|
|
157
|
-
/**
|
|
158
|
-
* #method
|
|
159
|
-
*/
|
|
160
98
|
adapterProps() {
|
|
161
99
|
const superProps = superAdapterProps();
|
|
162
100
|
const { filters, filterBy } = self;
|
|
@@ -169,27 +107,15 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
169
107
|
};
|
|
170
108
|
})
|
|
171
109
|
.actions(self => ({
|
|
172
|
-
/**
|
|
173
|
-
* #action
|
|
174
|
-
*/
|
|
175
110
|
setModificationsReady(flag) {
|
|
176
111
|
self.modificationsReady = flag;
|
|
177
112
|
},
|
|
178
|
-
/**
|
|
179
|
-
* #action
|
|
180
|
-
*/
|
|
181
113
|
toggleDrawIndicators() {
|
|
182
114
|
self.drawIndicators = !self.drawIndicatorsSetting;
|
|
183
115
|
},
|
|
184
|
-
/**
|
|
185
|
-
* #action
|
|
186
|
-
*/
|
|
187
116
|
toggleDrawInterbaseCounts() {
|
|
188
117
|
self.drawInterbaseCounts = !self.drawInterbaseCountsSetting;
|
|
189
118
|
},
|
|
190
|
-
/**
|
|
191
|
-
* #action
|
|
192
|
-
*/
|
|
193
119
|
toggleDrawArcs() {
|
|
194
120
|
self.drawArcs = !self.drawArcsSetting;
|
|
195
121
|
},
|
|
@@ -224,22 +150,13 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
224
150
|
.views(self => {
|
|
225
151
|
const { renderProps: superRenderProps, trackMenuItems: superTrackMenuItems, } = self;
|
|
226
152
|
return {
|
|
227
|
-
/**
|
|
228
|
-
* #getter
|
|
229
|
-
*/
|
|
230
153
|
get renderReady() {
|
|
231
154
|
const superProps = superRenderProps();
|
|
232
155
|
return !superProps.notReady && self.modificationsReady;
|
|
233
156
|
},
|
|
234
|
-
/**
|
|
235
|
-
* #getter
|
|
236
|
-
*/
|
|
237
157
|
get ready() {
|
|
238
158
|
return this.renderReady;
|
|
239
159
|
},
|
|
240
|
-
/**
|
|
241
|
-
* #method
|
|
242
|
-
*/
|
|
243
160
|
renderProps() {
|
|
244
161
|
const { colorBy, visibleModifications } = self;
|
|
245
162
|
return {
|
|
@@ -249,15 +166,9 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
249
166
|
visibleModifications: Object.fromEntries(visibleModifications.toJSON()),
|
|
250
167
|
};
|
|
251
168
|
},
|
|
252
|
-
/**
|
|
253
|
-
* #getter
|
|
254
|
-
*/
|
|
255
169
|
get TooltipComponent() {
|
|
256
170
|
return Tooltip;
|
|
257
171
|
},
|
|
258
|
-
/**
|
|
259
|
-
* #getter
|
|
260
|
-
*/
|
|
261
172
|
get adapterConfig() {
|
|
262
173
|
const subadapter = getConf(self.parentTrack, 'adapter');
|
|
263
174
|
return {
|
|
@@ -265,27 +176,15 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
265
176
|
subadapter,
|
|
266
177
|
};
|
|
267
178
|
},
|
|
268
|
-
/**
|
|
269
|
-
* #getter
|
|
270
|
-
*/
|
|
271
179
|
get rendererTypeName() {
|
|
272
180
|
return rendererTypes.get('snpcoverage');
|
|
273
181
|
},
|
|
274
|
-
/**
|
|
275
|
-
* #getter
|
|
276
|
-
*/
|
|
277
182
|
get needsScalebar() {
|
|
278
183
|
return true;
|
|
279
184
|
},
|
|
280
|
-
/**
|
|
281
|
-
* #method
|
|
282
|
-
*/
|
|
283
185
|
contextMenuItems() {
|
|
284
186
|
return [];
|
|
285
187
|
},
|
|
286
|
-
/**
|
|
287
|
-
* #method
|
|
288
|
-
*/
|
|
289
188
|
trackMenuItems() {
|
|
290
189
|
return [
|
|
291
190
|
...superTrackMenuItems(),
|
|
@@ -315,9 +214,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
315
214
|
},
|
|
316
215
|
];
|
|
317
216
|
},
|
|
318
|
-
/**
|
|
319
|
-
* #getter
|
|
320
|
-
*/
|
|
321
217
|
get filters() {
|
|
322
218
|
return new SerializableFilterChain({ filters: self.jexlFilters });
|
|
323
219
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function cigarToMismatches(ops, seq, ref, qual) {
|
|
2
|
-
let roffset = 0;
|
|
3
|
-
let soffset = 0;
|
|
2
|
+
let roffset = 0;
|
|
3
|
+
let soffset = 0;
|
|
4
4
|
const mismatches = [];
|
|
5
5
|
const hasRefAndSeq = ref && seq;
|
|
6
6
|
for (let i = 0; i < ops.length; i += 2) {
|
|
@@ -9,10 +9,7 @@ export function cigarToMismatches(ops, seq, ref, qual) {
|
|
|
9
9
|
if (op === 'M' || op === '=' || op === 'E') {
|
|
10
10
|
if (hasRefAndSeq) {
|
|
11
11
|
for (let j = 0; j < len; j++) {
|
|
12
|
-
if (
|
|
13
|
-
// @ts-ignore in the full yarn build of the repo, this says that
|
|
14
|
-
// object is possibly undefined for some reason, ignored
|
|
15
|
-
seq[soffset + j].toUpperCase() !== ref[roffset + j].toUpperCase()) {
|
|
12
|
+
if (seq[soffset + j].toUpperCase() !== ref[roffset + j].toUpperCase()) {
|
|
16
13
|
mismatches.push({
|
|
17
14
|
start: roffset + j,
|
|
18
15
|
type: 'mismatch',
|
|
@@ -57,7 +54,7 @@ export function cigarToMismatches(ops, seq, ref, qual) {
|
|
|
57
54
|
mismatches.push({
|
|
58
55
|
start: roffset + j,
|
|
59
56
|
type: 'mismatch',
|
|
60
|
-
base: r[j],
|
|
57
|
+
base: r[j] || 'X',
|
|
61
58
|
qual: q[j],
|
|
62
59
|
length: 1,
|
|
63
60
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Mismatch } from '../shared/types';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
3
|
import type { Buffer } from 'buffer';
|
|
3
|
-
import { Mismatch } from '../shared/types';
|
|
4
4
|
export declare function parseCigar(cigar?: string): string[];
|
|
5
5
|
export declare function getMismatches(cigar?: string, md?: string, seq?: string, ref?: string, qual?: Buffer): Mismatch[];
|
|
6
6
|
export declare function getOrientedCigar(flip: boolean, cigar: string[]): string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mdToMismatches } from './mdToMismatches';
|
|
2
1
|
import { cigarToMismatches } from './cigarToMismatches';
|
|
2
|
+
import { mdToMismatches } from './mdToMismatches';
|
|
3
3
|
const cigarRegex = new RegExp(/([MIDNSHPX=])/);
|
|
4
4
|
const startClip = new RegExp(/(\d+)[SH]$/);
|
|
5
5
|
const endClip = new RegExp(/^(\d+)([SH])/);
|
|
@@ -9,11 +9,9 @@ export function parseCigar(cigar = '') {
|
|
|
9
9
|
export function getMismatches(cigar, md, seq, ref, qual) {
|
|
10
10
|
let mismatches = [];
|
|
11
11
|
const ops = parseCigar(cigar);
|
|
12
|
-
// parse the CIGAR tag if it has one
|
|
13
12
|
if (cigar) {
|
|
14
13
|
mismatches = mismatches.concat(cigarToMismatches(ops, seq, ref, qual));
|
|
15
14
|
}
|
|
16
|
-
// now let's look for CRAM or MD mismatches
|
|
17
15
|
if (md && seq) {
|
|
18
16
|
mismatches = mismatches.concat(mdToMismatches(md, ops, mismatches, seq, qual));
|
|
19
17
|
}
|
|
@@ -85,12 +83,6 @@ export function getClip(cigar, strand) {
|
|
|
85
83
|
export function getTag(feature, tag) {
|
|
86
84
|
return feature.get('tags')[tag];
|
|
87
85
|
}
|
|
88
|
-
// produces a list of "feature-like" object from parsing supplementary
|
|
89
|
-
// alignments in the SA tag
|
|
90
|
-
//
|
|
91
|
-
// @param normalize - used specifically in the linear-read-vs-ref context, it
|
|
92
|
-
// flips features around relative to the original feature. other contexts of
|
|
93
|
-
// usage can keep this false
|
|
94
86
|
export function featurizeSA(SA, id, strand, readName, normalize) {
|
|
95
87
|
return ((SA === null || SA === void 0 ? void 0 : SA.split(';').filter(aln => !!aln).map((aln, index) => {
|
|
96
88
|
const ret = aln.split(',');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Mismatch } from '../shared/types';
|
|
2
|
-
import { Buffer } from 'buffer';
|
|
1
|
+
import type { Mismatch } from '../shared/types';
|
|
2
|
+
import type { Buffer } from 'buffer';
|
|
3
3
|
export declare function mdToMismatches(mdstring: string, ops: string[], cigarMismatches: Mismatch[], seq: string, qual?: Buffer | number[] | null): Mismatch[];
|
|
@@ -7,11 +7,8 @@ export function mdToMismatches(mdstring, ops, cigarMismatches, seq, qual) {
|
|
|
7
7
|
let lastSkipPos = 0;
|
|
8
8
|
const mismatchRecords = [];
|
|
9
9
|
const skips = cigarMismatches.filter(cigar => cigar.type === 'skip');
|
|
10
|
-
// convert a position on the reference sequence to a position on the template
|
|
11
|
-
// sequence, taking into account hard and soft clipping of reads
|
|
12
10
|
function nextRecord() {
|
|
13
11
|
mismatchRecords.push(curr);
|
|
14
|
-
// get a new mismatch record ready
|
|
15
12
|
curr = {
|
|
16
13
|
start: curr.start + curr.length,
|
|
17
14
|
length: 0,
|
|
@@ -40,7 +37,6 @@ export function mdToMismatches(mdstring, ops, cigarMismatches, seq, qual) {
|
|
|
40
37
|
lastRefOffset = refOffset;
|
|
41
38
|
return templateOffset - (refOffset - refCoord);
|
|
42
39
|
}
|
|
43
|
-
// now actually parse the MD string
|
|
44
40
|
const md = mdstring.match(mdRegex) || [];
|
|
45
41
|
for (const token of md) {
|
|
46
42
|
const num = +token;
|
|
@@ -51,8 +47,6 @@ export function mdToMismatches(mdstring, ops, cigarMismatches, seq, qual) {
|
|
|
51
47
|
curr.start += token.length - 1;
|
|
52
48
|
}
|
|
53
49
|
else {
|
|
54
|
-
// mismatch
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
56
50
|
for (let j = 0; j < token.length; j += 1) {
|
|
57
51
|
curr.length = 1;
|
|
58
52
|
while (lastSkipPos < skips.length) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
2
|
export declare function getModProbabilities(feature: Feature): number[] | undefined;
|
|
3
3
|
export declare function getModPositions(mm: string, fseq: string, fstrand: number): {
|
|
4
4
|
type: string;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { revcom } from '@jbrowse/core/util';
|
|
2
|
-
import { getTagAlt } from '../util';
|
|
3
2
|
import { getNextRefPos } from '../MismatchParser';
|
|
3
|
+
import { getTagAlt } from '../util';
|
|
4
4
|
const modificationRegex = new RegExp(/([A-Z])([-+])([^,.?]+)([.?])?/);
|
|
5
|
-
// ML stores probabilities as array of numerics and MP is scaled phred scores
|
|
6
|
-
// https://github.com/samtools/hts-specs/pull/418/files#diff-e765c6479316309f56b636f88189cdde8c40b854c7bdcce9ee7fe87a4e76febcR596
|
|
7
|
-
//
|
|
8
|
-
// if we have ML or Ml, it is an 8bit probability, divide by 255
|
|
9
|
-
//
|
|
10
|
-
// if we have MP or Mp it is phred scaled ASCII, which can go up to 90 but has
|
|
11
|
-
// very high likelihood basecalls at that point, we really only care about low
|
|
12
|
-
// qual calls <20 approx
|
|
13
5
|
export function getModProbabilities(feature) {
|
|
14
6
|
var _a;
|
|
15
7
|
const m = getTagAlt(feature, 'ML', 'Ml') || [];
|
|
@@ -23,15 +15,11 @@ export function getModPositions(mm, fseq, fstrand) {
|
|
|
23
15
|
const result = [];
|
|
24
16
|
for (const mod of mods) {
|
|
25
17
|
const [basemod, ...skips] = mod.split(',');
|
|
26
|
-
// regexes based on parse_mm.pl from hts-specs
|
|
27
|
-
// https://github.com/samtools/hts-specs/blob/master/test/SAMtags/parse_mm.pl
|
|
28
18
|
const matches = modificationRegex.exec(basemod);
|
|
29
19
|
if (!matches) {
|
|
30
20
|
throw new Error('bad format for MM tag');
|
|
31
21
|
}
|
|
32
22
|
const [, base, strand, typestr] = matches;
|
|
33
|
-
// can be a multi e.g. C+mh for both meth (m) and hydroxymeth (h) so split,
|
|
34
|
-
// and they can also be chemical codes (ChEBI) e.g. C+16061
|
|
35
23
|
const types = typestr.split(/(\d+|.)/).filter(f => !!f);
|
|
36
24
|
if (strand === '-') {
|
|
37
25
|
console.warn('unsupported negative strand modifications');
|
|
@@ -42,7 +30,6 @@ export function getModPositions(mm, fseq, fstrand) {
|
|
|
42
30
|
strand: strand,
|
|
43
31
|
});
|
|
44
32
|
}
|
|
45
|
-
// this logic based on parse_mm.pl from hts-specs
|
|
46
33
|
for (const type of types) {
|
|
47
34
|
let i = 0;
|
|
48
35
|
const positions = [];
|
|
@@ -57,8 +44,6 @@ export function getModPositions(mm, fseq, fstrand) {
|
|
|
57
44
|
if (fstrand === -1) {
|
|
58
45
|
const pos = seq.length - i;
|
|
59
46
|
if (pos >= 0) {
|
|
60
|
-
// avoid negative-number-positions in array, seen in #4629 cause
|
|
61
|
-
// unknown, could warrant some further investigation
|
|
62
47
|
positions.unshift(pos);
|
|
63
48
|
}
|
|
64
49
|
}
|
|
@@ -87,8 +72,6 @@ export function getModTypes(mm) {
|
|
|
87
72
|
throw new Error('bad format for MM tag');
|
|
88
73
|
}
|
|
89
74
|
const [, base, strand, typestr] = matches;
|
|
90
|
-
// can be a multi e.g. C+mh for both meth (m) and hydroxymeth (h) so
|
|
91
|
-
// split, and they can also be chemical codes (ChEBI) e.g. C+16061
|
|
92
75
|
return typestr
|
|
93
76
|
.split(/(\d+|.)/)
|
|
94
77
|
.filter(f => !!f)
|
package/esm/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/esm/PileupRPC/base.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
2
|
import { renameRegionsIfNeeded } from '@jbrowse/core/util';
|
|
3
|
-
// specialized get features to return limited data about alignments
|
|
4
3
|
export default class PileupBaseRPC extends RpcMethodType {
|
|
5
4
|
async serializeArguments(args, rpcDriver) {
|
|
6
5
|
var _a;
|
package/esm/PileupRPC/index.d.ts
CHANGED
|
@@ -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;
|
package/esm/PileupRPC/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PileupGetGlobalValueForTag,
|
|
1
|
+
import { PileupGetGlobalValueForTag, PileupGetReducedFeatures, PileupGetVisibleModifications, } from './rpcMethods';
|
|
2
2
|
export default function PileupRPCMethodsF(pm) {
|
|
3
3
|
pm.addRpcMethod(() => new PileupGetGlobalValueForTag(pm));
|
|
4
4
|
pm.addRpcMethod(() => new PileupGetVisibleModifications(pm));
|
|
@@ -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;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
2
|
-
import { toArray } from 'rxjs/operators';
|
|
3
2
|
import { firstValueFrom } from 'rxjs';
|
|
4
|
-
|
|
3
|
+
import { toArray } from 'rxjs/operators';
|
|
5
4
|
import PileupBaseRPC from '../base';
|
|
6
5
|
export default class PileupGetGlobalValueForTag extends PileupBaseRPC {
|
|
7
6
|
constructor() {
|
|
@@ -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 PileupGetReducedFeatures 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;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
2
2
|
import { dedupe, groupBy } from '@jbrowse/core/util';
|
|
3
|
-
import { toArray } from 'rxjs/operators';
|
|
4
3
|
import { firstValueFrom } from 'rxjs';
|
|
5
|
-
|
|
6
|
-
import { filterForPairs, getInsertSizeStats } from '../util';
|
|
7
|
-
import PileupBaseRPC from '../base';
|
|
4
|
+
import { toArray } from 'rxjs/operators';
|
|
8
5
|
import { getClip } from '../../MismatchParser';
|
|
9
|
-
|
|
6
|
+
import PileupBaseRPC from '../base';
|
|
7
|
+
import { filterForPairs, getInsertSizeStats } from '../util';
|
|
10
8
|
export default class PileupGetReducedFeatures extends PileupBaseRPC {
|
|
11
9
|
constructor() {
|
|
12
10
|
super(...arguments);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { RemoteAbortSignal } from '@jbrowse/core/rpc/remoteAbortSignals';
|
|
2
|
-
import { Region } from '@jbrowse/core/util';
|
|
3
|
-
import { ModificationType } from '../../shared/types';
|
|
4
1
|
import PileupBaseRPC from '../base';
|
|
2
|
+
import type { ModificationType } from '../../shared/types';
|
|
3
|
+
import type { Region } from '@jbrowse/core/util';
|
|
5
4
|
export default class PileupGetVisibleModifications extends PileupBaseRPC {
|
|
6
5
|
name: string;
|
|
7
6
|
execute(args: {
|
|
8
7
|
adapterConfig: Record<string, unknown>;
|
|
9
|
-
|
|
8
|
+
stopToken?: string;
|
|
10
9
|
headers?: Record<string, string>;
|
|
11
10
|
regions: Region[];
|
|
12
11
|
sessionId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
2
|
-
import { toArray } from 'rxjs/operators';
|
|
3
2
|
import { firstValueFrom } from 'rxjs';
|
|
3
|
+
import { toArray } from 'rxjs/operators';
|
|
4
4
|
import { getModTypes } from '../../ModificationParser';
|
|
5
5
|
import { getTagAlt } from '../../util';
|
|
6
6
|
import PileupBaseRPC from '../base';
|
package/esm/PileupRPC/util.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import type { FilterBy, SortedBy } from '../shared/types';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
5
|
+
import type GranularRectLayout from '@jbrowse/core/util/layouts/GranularRectLayout';
|
|
6
|
+
import type MultiLayout from '@jbrowse/core/util/layouts/MultiLayout';
|
|
7
7
|
export interface PileupLayoutSessionProps {
|
|
8
8
|
config: AnyConfigurationModel;
|
|
9
9
|
bpPerPx: number;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import deepEqual from 'fast-deep-equal';
|
|
2
|
-
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
3
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// - extra conditions to see if cached layout is valid
|
|
2
|
+
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
3
|
+
import deepEqual from 'fast-deep-equal';
|
|
7
4
|
export class PileupLayoutSession extends LayoutSession {
|
|
8
5
|
constructor(args) {
|
|
9
6
|
super(args);
|