@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PreBaseCoverageBin } from '../shared/types';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { AugmentedRegion } from '@jbrowse/core/util/types';
|
|
4
|
+
export declare function processDepth({ feature, bins, region, }: {
|
|
5
|
+
feature: Feature;
|
|
6
|
+
bins: PreBaseCoverageBin[];
|
|
7
|
+
region: AugmentedRegion;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function processDepth({ feature, bins, region, }) {
|
|
2
|
+
const fstart = feature.get('start');
|
|
3
|
+
const fend = feature.get('end');
|
|
4
|
+
const fstrand = feature.get('strand');
|
|
5
|
+
const regionLength = region.end - region.start;
|
|
6
|
+
for (let j = fstart; j < fend + 1; j++) {
|
|
7
|
+
const i = j - region.start;
|
|
8
|
+
if (i >= 0 && i < regionLength) {
|
|
9
|
+
if (bins[i] === undefined) {
|
|
10
|
+
bins[i] = {
|
|
11
|
+
depth: 0,
|
|
12
|
+
readsCounted: 0,
|
|
13
|
+
ref: {
|
|
14
|
+
probabilities: [],
|
|
15
|
+
entryDepth: 0,
|
|
16
|
+
'-1': 0,
|
|
17
|
+
0: 0,
|
|
18
|
+
1: 0,
|
|
19
|
+
},
|
|
20
|
+
snps: {},
|
|
21
|
+
mods: {},
|
|
22
|
+
nonmods: {},
|
|
23
|
+
delskips: {},
|
|
24
|
+
noncov: {},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (j !== fend) {
|
|
28
|
+
bins[i].depth++;
|
|
29
|
+
bins[i].readsCounted++;
|
|
30
|
+
bins[i].ref.entryDepth++;
|
|
31
|
+
bins[i].ref[fstrand]++;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PreBaseCoverageBin, SkipMap } from '../shared/types';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { AugmentedRegion } from '@jbrowse/core/util/types';
|
|
4
|
+
export declare function processMismatches({ feature, region, bins, skipmap, }: {
|
|
5
|
+
region: AugmentedRegion;
|
|
6
|
+
bins: PreBaseCoverageBin[];
|
|
7
|
+
feature: Feature;
|
|
8
|
+
skipmap: SkipMap;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { inc, isInterbase, mismatchLen } from './util';
|
|
2
|
+
export function processMismatches({ feature, region, bins, skipmap, }) {
|
|
3
|
+
var _a;
|
|
4
|
+
const fstart = feature.get('start');
|
|
5
|
+
const fstrand = feature.get('strand');
|
|
6
|
+
const mismatches = (_a = feature.get('mismatches')) !== null && _a !== void 0 ? _a : [];
|
|
7
|
+
for (const mismatch of mismatches) {
|
|
8
|
+
const mstart = fstart + mismatch.start;
|
|
9
|
+
const mlen = mismatchLen(mismatch);
|
|
10
|
+
const mend = mstart + mlen;
|
|
11
|
+
for (let j = mstart; j < mstart + mlen; j++) {
|
|
12
|
+
const epos = j - region.start;
|
|
13
|
+
if (epos >= 0 && epos < bins.length) {
|
|
14
|
+
const bin = bins[epos];
|
|
15
|
+
const { base, altbase, type } = mismatch;
|
|
16
|
+
const interbase = isInterbase(type);
|
|
17
|
+
if (type === 'deletion' || type === 'skip') {
|
|
18
|
+
inc(bin, fstrand, 'delskips', type);
|
|
19
|
+
bin.depth--;
|
|
20
|
+
}
|
|
21
|
+
else if (!interbase) {
|
|
22
|
+
inc(bin, fstrand, 'snps', base);
|
|
23
|
+
bin.ref.entryDepth--;
|
|
24
|
+
bin.ref[fstrand]--;
|
|
25
|
+
bin.refbase = altbase;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
inc(bin, fstrand, 'noncov', type);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (mismatch.type === 'skip') {
|
|
33
|
+
const tags = feature.get('tags');
|
|
34
|
+
const xs = (tags === null || tags === void 0 ? void 0 : tags.XS) || (tags === null || tags === void 0 ? void 0 : tags.TS);
|
|
35
|
+
const ts = tags === null || tags === void 0 ? void 0 : tags.ts;
|
|
36
|
+
const effectiveStrand = xs === '+'
|
|
37
|
+
? 1
|
|
38
|
+
: xs === '-'
|
|
39
|
+
? -1
|
|
40
|
+
: (ts === '+' ? 1 : xs === '-' ? -1 : 0) * fstrand;
|
|
41
|
+
const hash = `${mstart}_${mend}_${effectiveStrand}`;
|
|
42
|
+
if (skipmap[hash] === undefined) {
|
|
43
|
+
skipmap[hash] = {
|
|
44
|
+
feature: feature,
|
|
45
|
+
start: mstart,
|
|
46
|
+
end: mend,
|
|
47
|
+
strand: fstrand,
|
|
48
|
+
effectiveStrand,
|
|
49
|
+
score: 0,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
skipmap[hash].score++;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ColorBy, PreBaseCoverageBin } from '../shared/types';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { AugmentedRegion as Region } from '@jbrowse/core/util/types';
|
|
4
|
+
export declare function processModifications({ feature, colorBy, region, bins, regionSequence, }: {
|
|
5
|
+
bins: PreBaseCoverageBin[];
|
|
6
|
+
feature: Feature;
|
|
7
|
+
region: Region;
|
|
8
|
+
colorBy?: ColorBy;
|
|
9
|
+
regionSequence: string;
|
|
10
|
+
}): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { max, sum } from '@jbrowse/core/util';
|
|
2
|
+
import { incWithProbabilities } from './util';
|
|
3
|
+
import { getMaxProbModAtEachPosition } from '../shared/getMaximumModificationAtEachPosition';
|
|
4
|
+
export function processModifications({ feature, colorBy, region, bins, regionSequence, }) {
|
|
5
|
+
var _a, _b, _c;
|
|
6
|
+
const fstart = feature.get('start');
|
|
7
|
+
const fstrand = feature.get('strand');
|
|
8
|
+
const fend = feature.get('end');
|
|
9
|
+
const twoColor = (_a = colorBy === null || colorBy === void 0 ? void 0 : colorBy.modifications) === null || _a === void 0 ? void 0 : _a.twoColor;
|
|
10
|
+
const isolatedModification = (_b = colorBy === null || colorBy === void 0 ? void 0 : colorBy.modifications) === null || _b === void 0 ? void 0 : _b.isolatedModification;
|
|
11
|
+
(_c = getMaxProbModAtEachPosition(feature)) === null || _c === void 0 ? void 0 : _c.forEach(({ type, prob, allProbs }, pos) => {
|
|
12
|
+
if (isolatedModification && type !== isolatedModification) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const epos = pos + fstart - region.start;
|
|
16
|
+
if (epos >= 0 && epos < bins.length && pos + fstart < fend) {
|
|
17
|
+
if (bins[epos] === undefined) {
|
|
18
|
+
bins[epos] = {
|
|
19
|
+
depth: 0,
|
|
20
|
+
readsCounted: 0,
|
|
21
|
+
refbase: regionSequence[epos],
|
|
22
|
+
snps: {},
|
|
23
|
+
ref: {
|
|
24
|
+
probabilities: [],
|
|
25
|
+
entryDepth: 0,
|
|
26
|
+
'-1': 0,
|
|
27
|
+
0: 0,
|
|
28
|
+
1: 0,
|
|
29
|
+
},
|
|
30
|
+
mods: {},
|
|
31
|
+
nonmods: {},
|
|
32
|
+
delskips: {},
|
|
33
|
+
noncov: {},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const s = 1 - sum(allProbs);
|
|
37
|
+
const bin = bins[epos];
|
|
38
|
+
if (twoColor && s > max(allProbs)) {
|
|
39
|
+
incWithProbabilities(bin, fstrand, 'nonmods', `nonmod_${type}`, s);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
incWithProbabilities(bin, fstrand, 'mods', `mod_${type}`, prob);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PreBaseCoverageBin } from '../shared/types';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { AugmentedRegion as Region } from '@jbrowse/core/util/types';
|
|
4
|
+
export declare function processReferenceCpGs({ feature, region, bins, regionSequence, }: {
|
|
5
|
+
bins: PreBaseCoverageBin[];
|
|
6
|
+
feature: Feature;
|
|
7
|
+
region: Region;
|
|
8
|
+
regionSequence: string;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { doesIntersect2 } from '@jbrowse/core/util';
|
|
2
|
+
import { parseCigar } from '../MismatchParser';
|
|
3
|
+
import { getMethBins } from '../ModificationParser';
|
|
4
|
+
import { incWithProbabilities } from './util';
|
|
5
|
+
export function processReferenceCpGs({ feature, region, bins, regionSequence, }) {
|
|
6
|
+
var _a;
|
|
7
|
+
const fstart = feature.get('start');
|
|
8
|
+
const fend = feature.get('end');
|
|
9
|
+
const fstrand = feature.get('strand');
|
|
10
|
+
const seq = feature.get('seq');
|
|
11
|
+
const mismatches = (_a = feature.get('mismatches')) !== null && _a !== void 0 ? _a : [];
|
|
12
|
+
const r = regionSequence.toLowerCase();
|
|
13
|
+
if (seq) {
|
|
14
|
+
const cigarOps = parseCigar(feature.get('CIGAR'));
|
|
15
|
+
const { methBins, methProbs } = getMethBins(feature, cigarOps);
|
|
16
|
+
const dels = mismatches.filter(f => f.type === 'deletion');
|
|
17
|
+
for (let i = 0; i < fend - fstart; i++) {
|
|
18
|
+
const j = i + fstart;
|
|
19
|
+
const l1 = r[j - region.start + 1];
|
|
20
|
+
const l2 = r[j - region.start + 2];
|
|
21
|
+
if (l1 === 'c' && l2 === 'g') {
|
|
22
|
+
const bin0 = bins[j - region.start];
|
|
23
|
+
const bin1 = bins[j - region.start + 1];
|
|
24
|
+
const b0 = methBins[i];
|
|
25
|
+
const b1 = methBins[i + 1];
|
|
26
|
+
const p0 = methProbs[i];
|
|
27
|
+
const p1 = methProbs[i + 1];
|
|
28
|
+
if ((b0 && (p0 !== undefined ? p0 > 0.5 : true)) ||
|
|
29
|
+
(b1 && (p1 !== undefined ? p1 > 0.5 : true))) {
|
|
30
|
+
if (bin0) {
|
|
31
|
+
incWithProbabilities(bin0, fstrand, 'mods', 'cpg_meth', p0 || 0);
|
|
32
|
+
bin0.ref.entryDepth--;
|
|
33
|
+
bin0.ref[fstrand]--;
|
|
34
|
+
}
|
|
35
|
+
if (bin1) {
|
|
36
|
+
incWithProbabilities(bin1, fstrand, 'mods', 'cpg_meth', p1 || 0);
|
|
37
|
+
bin1.ref.entryDepth--;
|
|
38
|
+
bin1.ref[fstrand]--;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (bin0) {
|
|
43
|
+
if (!dels.some(d => doesIntersect2(j, j + 1, d.start + fstart, d.start + fstart + d.length))) {
|
|
44
|
+
incWithProbabilities(bin0, fstrand, 'nonmods', 'cpg_unmeth', 1 - (p0 || 0));
|
|
45
|
+
bin0.ref.entryDepth--;
|
|
46
|
+
bin0.ref[fstrand]--;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (bin1) {
|
|
50
|
+
if (!dels.some(d => doesIntersect2(j + 1, j + 2, d.start + fstart, d.start + fstart + d.length))) {
|
|
51
|
+
incWithProbabilities(bin1, fstrand, 'nonmods', 'cpg_unmeth', 1 - (p1 || 0));
|
|
52
|
+
bin1.ref.entryDepth--;
|
|
53
|
+
bin1.ref[fstrand]--;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
strand: number;
|
|
7
|
-
xs: string;
|
|
8
|
-
}>;
|
|
9
|
-
export interface BinType {
|
|
10
|
-
total?: number;
|
|
11
|
-
strands?: Record<string, number>;
|
|
12
|
-
}
|
|
13
|
-
export interface Bin {
|
|
14
|
-
refbase?: string;
|
|
15
|
-
total: number;
|
|
16
|
-
all: number;
|
|
17
|
-
ref: number;
|
|
18
|
-
'-1': number;
|
|
19
|
-
'0': number;
|
|
20
|
-
'1': number;
|
|
21
|
-
lowqual: BinType;
|
|
22
|
-
cov: BinType;
|
|
23
|
-
delskips: BinType;
|
|
24
|
-
noncov: BinType;
|
|
1
|
+
import type { ColorBy, Mismatch, PreBaseCoverageBin, PreBaseCoverageBinSubtypes } from '../shared/types';
|
|
2
|
+
export interface Opts {
|
|
3
|
+
bpPerPx?: number;
|
|
4
|
+
colorBy?: ColorBy;
|
|
5
|
+
stopToken?: string;
|
|
25
6
|
}
|
|
7
|
+
export declare function mismatchLen(mismatch: Mismatch): number;
|
|
8
|
+
export declare function isInterbase(type: string): type is "insertion" | "hardclip" | "softclip";
|
|
9
|
+
export declare function inc(bin: PreBaseCoverageBin, strand: -1 | 0 | 1, type: keyof PreBaseCoverageBinSubtypes, field: string): void;
|
|
10
|
+
export declare function incWithProbabilities(bin: PreBaseCoverageBin, strand: -1 | 0 | 1, type: keyof PreBaseCoverageBinSubtypes, field: string, probability: number): void;
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export function mismatchLen(mismatch) {
|
|
2
|
+
return !isInterbase(mismatch.type) ? mismatch.length : 1;
|
|
3
|
+
}
|
|
4
|
+
export function isInterbase(type) {
|
|
5
|
+
return type === 'softclip' || type === 'hardclip' || type === 'insertion';
|
|
6
|
+
}
|
|
7
|
+
export function inc(bin, strand, type, field) {
|
|
8
|
+
let thisBin = bin[type][field];
|
|
9
|
+
if (thisBin === undefined) {
|
|
10
|
+
thisBin = bin[type][field] = {
|
|
11
|
+
entryDepth: 0,
|
|
12
|
+
probabilities: [],
|
|
13
|
+
'-1': 0,
|
|
14
|
+
'0': 0,
|
|
15
|
+
'1': 0,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
thisBin.entryDepth++;
|
|
19
|
+
thisBin[strand]++;
|
|
20
|
+
}
|
|
21
|
+
export function incWithProbabilities(bin, strand, type, field, probability) {
|
|
22
|
+
let thisBin = bin[type][field];
|
|
23
|
+
if (thisBin === undefined) {
|
|
24
|
+
thisBin = bin[type][field] = {
|
|
25
|
+
entryDepth: 0,
|
|
26
|
+
probabilities: [],
|
|
27
|
+
'-1': 0,
|
|
28
|
+
'0': 0,
|
|
29
|
+
'1': 0,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
thisBin.entryDepth++;
|
|
33
|
+
thisBin.probabilities.push(probability);
|
|
34
|
+
thisBin[strand]++;
|
|
35
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { WiggleBaseRenderer } from '@jbrowse/plugin-wiggle';
|
|
2
|
+
import type { ModificationTypeWithColor } from '../shared/types';
|
|
3
|
+
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
+
import type { ScaleOpts } from '@jbrowse/plugin-wiggle';
|
|
4
6
|
export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
|
|
5
7
|
bpPerPx: number;
|
|
6
8
|
height: number;
|
|
@@ -13,7 +15,7 @@ export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserializ
|
|
|
13
15
|
values: number[];
|
|
14
16
|
};
|
|
15
17
|
displayCrossHatches: boolean;
|
|
16
|
-
|
|
18
|
+
visibleModifications?: Record<string, ModificationTypeWithColor>;
|
|
17
19
|
}
|
|
18
20
|
export default class SNPCoverageRenderer extends WiggleBaseRenderer {
|
|
19
21
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<undefined>;
|