@jbrowse/plugin-alignments 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +25 -24
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/Flags.d.ts +1 -2
- package/dist/AlignmentsFeatureDetail/Flags.js +8 -10
- package/dist/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
- package/dist/AlignmentsFeatureDetail/Formatter.js +11 -39
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +46 -54
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +58 -61
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
- package/dist/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/PairLink.js +3 -7
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +21 -31
- 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/index.js +17 -7
- 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/BamAdapter/index.js +17 -7
- package/dist/CramAdapter/CramAdapter.d.ts +6 -9
- package/dist/CramAdapter/CramAdapter.js +25 -43
- 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 +6 -6
- 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 +17 -8
- 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/GuessAlignmentsTypes/index.js +19 -34
- 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 +18 -8
- package/dist/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
- package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -3
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -18
- 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 +7 -77
- package/dist/LinearAlignmentsDisplay/model.js +10 -85
- package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +71 -145
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +12 -41
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +106 -92
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -7
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -44
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -40
- package/dist/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +17 -46
- 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 +123 -111
- package/dist/LinearPileupDisplay/model.js +29 -109
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +6 -33
- 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 +18 -9
- package/dist/LinearReadArcsDisplay/model.d.ts +16 -94
- package/dist/LinearReadArcsDisplay/model.js +34 -111
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +6 -33
- 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 +18 -9
- package/dist/LinearReadCloudDisplay/model.d.ts +14 -56
- package/dist/LinearReadCloudDisplay/model.js +34 -75
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +16 -55
- 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 +13 -54
- package/dist/LinearSNPCoverageDisplay/model.js +69 -159
- package/dist/MismatchParser/cigarToMismatches.d.ts +2 -3
- package/dist/MismatchParser/cigarToMismatches.js +4 -7
- package/dist/MismatchParser/getNextRefPos.js +0 -2
- package/dist/MismatchParser/index.d.ts +3 -4
- package/dist/MismatchParser/index.js +1 -9
- package/dist/MismatchParser/mdToMismatches.d.ts +2 -3
- 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 +14 -24
- package/dist/PileupRenderer/PileupRenderer.js +28 -23
- package/dist/PileupRenderer/colorBy.d.ts +2 -2
- package/dist/PileupRenderer/colorBy.js +0 -6
- package/dist/PileupRenderer/components/PileupRendering.d.ts +2 -3
- package/dist/PileupRenderer/components/PileupRendering.js +15 -43
- package/dist/PileupRenderer/configSchema.d.ts +5 -31
- package/dist/PileupRenderer/configSchema.js +6 -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 +10 -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 +5 -4
- package/dist/PileupRenderer/renderMismatches.js +19 -25
- 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/index.js +17 -7
- 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 +2 -18
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +35 -288
- package/dist/SNPCoverageRenderer/configSchema.d.ts +3 -18
- package/dist/SNPCoverageRenderer/configSchema.js +4 -22
- package/dist/SNPCoverageRenderer/index.d.ts +1 -1
- package/dist/SNPCoverageRenderer/index.js +2 -2
- package/dist/SNPCoverageRenderer/makeImage.d.ts +2 -0
- package/dist/SNPCoverageRenderer/makeImage.js +270 -0
- package/dist/SNPCoverageRenderer/types.d.ts +19 -0
- package/dist/SNPCoverageRenderer/types.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -19
- 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 +3 -4
- package/dist/shared/components/BaseDisplayComponent.js +13 -19
- package/dist/shared/components/FilterByTagDialog.d.ts +2 -3
- package/dist/shared/components/FilterByTagDialog.js +44 -94
- 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.d.ts +1 -2
- package/dist/shared/renderSvgUtil.js +20 -19
- 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 +2 -3
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +8 -17
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/Flags.d.ts +1 -2
- package/esm/AlignmentsFeatureDetail/Flags.js +8 -10
- package/esm/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
- package/esm/AlignmentsFeatureDetail/Formatter.js +11 -16
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +30 -48
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +41 -54
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
- package/esm/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
- package/esm/AlignmentsFeatureDetail/PairLink.js +3 -4
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +22 -29
- 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 +24 -42
- 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 +6 -6
- 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 +20 -35
- 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 +2 -3
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -15
- 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 +7 -77
- package/esm/LinearAlignmentsDisplay/model.js +11 -86
- package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +56 -140
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +12 -18
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +106 -69
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -4
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -21
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -17
- package/esm/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +17 -23
- 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 +123 -111
- package/esm/LinearPileupDisplay/model.js +13 -103
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +6 -10
- 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 +16 -94
- package/esm/LinearReadArcsDisplay/model.js +18 -105
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +6 -10
- 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 -56
- package/esm/LinearReadCloudDisplay/model.js +17 -68
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +16 -52
- 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 +13 -54
- package/esm/LinearSNPCoverageDisplay/model.js +53 -153
- package/esm/MismatchParser/cigarToMismatches.d.ts +2 -3
- package/esm/MismatchParser/cigarToMismatches.js +4 -7
- package/esm/MismatchParser/getNextRefPos.js +0 -2
- package/esm/MismatchParser/index.d.ts +3 -4
- package/esm/MismatchParser/index.js +1 -9
- package/esm/MismatchParser/mdToMismatches.d.ts +2 -3
- 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 +14 -24
- 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 +2 -3
- package/esm/PileupRenderer/components/PileupRendering.js +15 -20
- package/esm/PileupRenderer/configSchema.d.ts +5 -31
- package/esm/PileupRenderer/configSchema.js +6 -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 +10 -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 +5 -4
- package/esm/PileupRenderer/renderMismatches.js +19 -25
- 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 +2 -18
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +3 -289
- package/esm/SNPCoverageRenderer/configSchema.d.ts +3 -18
- package/esm/SNPCoverageRenderer/configSchema.js +4 -22
- package/esm/SNPCoverageRenderer/index.d.ts +1 -1
- package/esm/SNPCoverageRenderer/index.js +2 -2
- package/esm/SNPCoverageRenderer/makeImage.d.ts +2 -0
- package/esm/SNPCoverageRenderer/makeImage.js +267 -0
- package/esm/SNPCoverageRenderer/types.d.ts +19 -0
- package/esm/SNPCoverageRenderer/types.js +1 -0
- 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 +3 -4
- package/esm/shared/components/BaseDisplayComponent.js +13 -16
- package/esm/shared/components/FilterByTagDialog.d.ts +2 -3
- package/esm/shared/components/FilterByTagDialog.js +44 -71
- 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.d.ts +1 -2
- package/esm/shared/renderSvgUtil.js +3 -9
- 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 +6 -7
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ColorBy, Mismatch, PreBaseCoverageBin, PreBaseCoverageBinSubtypes } from '../shared/types';
|
|
2
|
+
export interface Opts {
|
|
3
|
+
bpPerPx?: number;
|
|
4
|
+
colorBy?: ColorBy;
|
|
5
|
+
stopToken?: string;
|
|
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;
|
|
@@ -0,0 +1,35 @@
|
|
|
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,21 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ScaleOpts, WiggleBaseRenderer } from '@jbrowse/plugin-wiggle';
|
|
4
|
-
import { ModificationTypeWithColor } from '../shared/types';
|
|
5
|
-
export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
|
|
6
|
-
bpPerPx: number;
|
|
7
|
-
height: number;
|
|
8
|
-
highResolutionScaling: number;
|
|
9
|
-
scaleOpts: ScaleOpts;
|
|
10
|
-
}
|
|
11
|
-
export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
|
|
12
|
-
features: Map<string, Feature>;
|
|
13
|
-
ticks: {
|
|
14
|
-
values: number[];
|
|
15
|
-
};
|
|
16
|
-
displayCrossHatches: boolean;
|
|
17
|
-
visibleModifications?: Record<string, ModificationTypeWithColor>;
|
|
18
|
-
}
|
|
1
|
+
import { WiggleBaseRenderer } from '@jbrowse/plugin-wiggle';
|
|
2
|
+
import type { RenderArgsDeserializedWithFeatures } from './types';
|
|
19
3
|
export default class SNPCoverageRenderer extends WiggleBaseRenderer {
|
|
20
4
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<undefined>;
|
|
21
5
|
}
|
|
@@ -1,294 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { featureSpanPx, bpSpanPx } from '@jbrowse/core/util';
|
|
3
|
-
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
|
-
import { getOrigin, getScale, WiggleBaseRenderer, YSCALEBAR_LABEL_OFFSET, } from '@jbrowse/plugin-wiggle';
|
|
5
|
-
import { alphaColor } from '../shared/util';
|
|
6
|
-
// width/height of the triangle above e.g. insertion indicators
|
|
7
|
-
const INTERBASE_INDICATOR_WIDTH = 7;
|
|
8
|
-
const INTERBASE_INDICATOR_HEIGHT = 4.5;
|
|
9
|
-
// minimum read depth to draw the insertion indicators, below this the
|
|
10
|
-
// 'statistical significance' is low
|
|
11
|
-
const MINIMUM_INTERBASE_INDICATOR_READ_DEPTH = 7;
|
|
12
|
-
const complementBase = {
|
|
13
|
-
C: 'G',
|
|
14
|
-
G: 'C',
|
|
15
|
-
A: 'T',
|
|
16
|
-
T: 'A',
|
|
17
|
-
};
|
|
18
|
-
const fudgeFactor = 0.6;
|
|
1
|
+
import { WiggleBaseRenderer } from '@jbrowse/plugin-wiggle';
|
|
19
2
|
export default class SNPCoverageRenderer extends WiggleBaseRenderer {
|
|
20
|
-
// note: the snps are drawn on linear scale even if the data is drawn in log
|
|
21
|
-
// scape hence the two different scales being used
|
|
22
3
|
async draw(ctx, props) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const theme = createJBrowseTheme(configTheme);
|
|
26
|
-
const region = regions[0];
|
|
27
|
-
const width = (region.end - region.start) / bpPerPx;
|
|
28
|
-
// the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
|
|
29
|
-
// wiggle display, and makes the height of the actual drawn area add
|
|
30
|
-
// "padding" to the top and bottom of the display
|
|
31
|
-
const offset = YSCALEBAR_LABEL_OFFSET;
|
|
32
|
-
const height = unadjustedHeight - offset * 2;
|
|
33
|
-
const opts = { ...scaleOpts, range: [0, height] };
|
|
34
|
-
const viewScale = getScale(opts);
|
|
35
|
-
// clipping and insertion indicators, uses a smaller height/2 scale
|
|
36
|
-
const indicatorViewScale = getScale({
|
|
37
|
-
...opts,
|
|
38
|
-
range: [0, height / 2],
|
|
39
|
-
scaleType: 'linear',
|
|
40
|
-
});
|
|
41
|
-
const originY = getOrigin(scaleOpts.scaleType);
|
|
42
|
-
const originLinear = getOrigin('linear');
|
|
43
|
-
const indicatorThreshold = readConfObject(cfg, 'indicatorThreshold');
|
|
44
|
-
const drawInterbaseCounts = readConfObject(cfg, 'drawInterbaseCounts');
|
|
45
|
-
const drawArcs = readConfObject(cfg, 'drawArcs');
|
|
46
|
-
const drawIndicators = readConfObject(cfg, 'drawIndicators');
|
|
47
|
-
// get the y coordinate that we are plotting at, this can be log scale
|
|
48
|
-
const toY = (n) => height - (viewScale(n) || 0) + offset;
|
|
49
|
-
const toHeight = (n) => toY(originY) - toY(n);
|
|
50
|
-
// used specifically for indicator
|
|
51
|
-
const toY2 = (n) => height - (indicatorViewScale(n) || 0) + offset;
|
|
52
|
-
const toHeight2 = (n) => toY2(originLinear) - toY2(n);
|
|
53
|
-
const { bases } = theme.palette;
|
|
54
|
-
const colorForBase = {
|
|
55
|
-
A: bases.A.main,
|
|
56
|
-
C: bases.C.main,
|
|
57
|
-
G: bases.G.main,
|
|
58
|
-
T: bases.T.main,
|
|
59
|
-
insertion: 'purple',
|
|
60
|
-
softclip: 'blue',
|
|
61
|
-
hardclip: 'red',
|
|
62
|
-
total: readConfObject(cfg, 'color'),
|
|
63
|
-
mod_NONE: 'blue',
|
|
64
|
-
cpg_meth: 'red',
|
|
65
|
-
cpg_unmeth: 'blue',
|
|
66
|
-
};
|
|
67
|
-
const feats = [...features.values()];
|
|
68
|
-
// Use two pass rendering, which helps in visualizing the SNPs at higher
|
|
69
|
-
// bpPerPx First pass: draw the gray background
|
|
70
|
-
ctx.fillStyle = colorForBase.total;
|
|
71
|
-
for (const feature of feats) {
|
|
72
|
-
if (feature.get('type') === 'skip') {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
76
|
-
const w = rightPx - leftPx + fudgeFactor;
|
|
77
|
-
const score = feature.get('score');
|
|
78
|
-
ctx.fillRect(leftPx, toY(score), w, toHeight(score));
|
|
79
|
-
}
|
|
80
|
-
// Keep track of previous total which we will use it to draw the interbase
|
|
81
|
-
// indicator (if there is a sudden clip, there will be no read coverage but
|
|
82
|
-
// there will be "clip" coverage) at that position beyond the read.
|
|
83
|
-
//
|
|
84
|
-
// if the clip is right at a block boundary then prevTotal will not be
|
|
85
|
-
// available, so this is a best attempt to plot interbase indicator at the
|
|
86
|
-
// "cliffs"
|
|
87
|
-
let prevTotal = 0;
|
|
88
|
-
// extraHorizontallyFlippedOffset is used to draw interbase items, which
|
|
89
|
-
// are located to the left when forward and right when reversed
|
|
90
|
-
const extraHorizontallyFlippedOffset = region.reversed ? 1 / bpPerPx : 0;
|
|
91
|
-
// @ts-expect-error
|
|
92
|
-
const drawingModifications = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications';
|
|
93
|
-
// @ts-expect-error
|
|
94
|
-
const drawingMethylation = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'methylation';
|
|
95
|
-
const isolatedModification =
|
|
96
|
-
// @ts-expect-error
|
|
97
|
-
(_a = colorBy === null || colorBy === void 0 ? void 0 : colorBy.modifications) === null || _a === void 0 ? void 0 : _a.isolatedModification;
|
|
98
|
-
// Second pass: draw the SNP data, and add a minimum feature width of 1px
|
|
99
|
-
// which can be wider than the actual bpPerPx This reduces overdrawing of
|
|
100
|
-
// the grey background over the SNPs
|
|
101
|
-
for (const feature of feats) {
|
|
102
|
-
if (feature.get('type') === 'skip') {
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
106
|
-
const snpinfo = feature.get('snpinfo');
|
|
107
|
-
const w = Math.max(rightPx - leftPx, 1);
|
|
108
|
-
const score0 = feature.get('score');
|
|
109
|
-
if (drawingModifications) {
|
|
110
|
-
let curr = 0;
|
|
111
|
-
const refbase = (_b = snpinfo.refbase) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
112
|
-
const { nonmods, mods, snps, ref } = snpinfo;
|
|
113
|
-
for (const m of Object.keys(nonmods).sort().reverse()) {
|
|
114
|
-
const mod = visibleModifications[m.replace('nonmod_', '')] ||
|
|
115
|
-
visibleModifications[m.replace('mod_', '')];
|
|
116
|
-
if (!mod) {
|
|
117
|
-
console.warn(`${m} not known yet`);
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
if (isolatedModification && mod.type !== isolatedModification) {
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
const cmp = complementBase[mod.base];
|
|
124
|
-
// this approach is inspired from the 'simplex' approach in igv
|
|
125
|
-
// https://github.com/igvteam/igv/blob/af07c3b1be8806cfd77343ee04982aeff17d2beb/src/main/java/org/broad/igv/sam/mods/BaseModificationCoverageRenderer.java#L51
|
|
126
|
-
const detectable = mod.base === 'N'
|
|
127
|
-
? score0
|
|
128
|
-
: (((_c = snps[mod.base]) === null || _c === void 0 ? void 0 : _c.entryDepth) || 0) +
|
|
129
|
-
(((_d = snps[cmp]) === null || _d === void 0 ? void 0 : _d.entryDepth) || 0) +
|
|
130
|
-
(refbase === mod.base ? ref['1'] : 0) +
|
|
131
|
-
(refbase === cmp ? ref['-1'] : 0);
|
|
132
|
-
const modifiable = mod.base === 'N'
|
|
133
|
-
? score0
|
|
134
|
-
: (((_e = snps[mod.base]) === null || _e === void 0 ? void 0 : _e.entryDepth) || 0) +
|
|
135
|
-
(((_f = snps[cmp]) === null || _f === void 0 ? void 0 : _f.entryDepth) || 0) +
|
|
136
|
-
(refbase === mod.base ? ref.entryDepth : 0) +
|
|
137
|
-
(refbase === cmp ? ref.entryDepth : 0);
|
|
138
|
-
const { entryDepth, avgProbability = 0 } = snpinfo.nonmods[m];
|
|
139
|
-
const modFraction = (modifiable / score0) * (entryDepth / detectable);
|
|
140
|
-
const nonModColor = 'blue';
|
|
141
|
-
const c = alphaColor(nonModColor, avgProbability);
|
|
142
|
-
const height = toHeight(score0);
|
|
143
|
-
const bottom = toY(score0) + height;
|
|
144
|
-
ctx.fillStyle = c;
|
|
145
|
-
ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
|
|
146
|
-
curr += modFraction * height;
|
|
147
|
-
}
|
|
148
|
-
for (const m of Object.keys(mods).sort().reverse()) {
|
|
149
|
-
const mod = visibleModifications[m.replace('mod_', '')];
|
|
150
|
-
if (!mod) {
|
|
151
|
-
console.warn(`${m} not known yet`);
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
if (isolatedModification && mod.type !== isolatedModification) {
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
const cmp = complementBase[mod.base];
|
|
158
|
-
// this approach is inspired from the 'simplex' approach in igv
|
|
159
|
-
// https://github.com/igvteam/igv/blob/af07c3b1be8806cfd77343ee04982aeff17d2beb/src/main/java/org/broad/igv/sam/mods/BaseModificationCoverageRenderer.java#L51
|
|
160
|
-
const detectable = mod.base === 'N'
|
|
161
|
-
? score0
|
|
162
|
-
: (((_g = snps[mod.base]) === null || _g === void 0 ? void 0 : _g.entryDepth) || 0) +
|
|
163
|
-
(((_h = snps[cmp]) === null || _h === void 0 ? void 0 : _h.entryDepth) || 0) +
|
|
164
|
-
(refbase === mod.base ? ref['1'] : 0) +
|
|
165
|
-
(refbase === cmp ? ref['-1'] : 0);
|
|
166
|
-
const modifiable = mod.base === 'N'
|
|
167
|
-
? score0
|
|
168
|
-
: (((_j = snps[mod.base]) === null || _j === void 0 ? void 0 : _j.entryDepth) || 0) +
|
|
169
|
-
(((_k = snps[cmp]) === null || _k === void 0 ? void 0 : _k.entryDepth) || 0) +
|
|
170
|
-
(refbase === mod.base ? ref.entryDepth : 0) +
|
|
171
|
-
(refbase === cmp ? ref.entryDepth : 0);
|
|
172
|
-
const { entryDepth, avgProbability = 0 } = mods[m];
|
|
173
|
-
const modFraction = (modifiable / score0) * (entryDepth / detectable);
|
|
174
|
-
const baseColor = mod.color || 'black';
|
|
175
|
-
const c = alphaColor(baseColor, avgProbability);
|
|
176
|
-
const height = toHeight(score0);
|
|
177
|
-
const bottom = toY(score0) + height;
|
|
178
|
-
ctx.fillStyle = c;
|
|
179
|
-
ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
|
|
180
|
-
curr += modFraction * height;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
else if (drawingMethylation) {
|
|
184
|
-
const { depth, nonmods, mods } = snpinfo;
|
|
185
|
-
let curr = 0;
|
|
186
|
-
for (const base of Object.keys(mods).sort().reverse()) {
|
|
187
|
-
const { entryDepth } = mods[base];
|
|
188
|
-
const height = toHeight(score0);
|
|
189
|
-
const bottom = toY(score0) + height;
|
|
190
|
-
ctx.fillStyle = colorForBase[base] || 'black';
|
|
191
|
-
ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
|
|
192
|
-
curr += entryDepth;
|
|
193
|
-
}
|
|
194
|
-
for (const base of Object.keys(nonmods).sort().reverse()) {
|
|
195
|
-
const { entryDepth } = nonmods[base];
|
|
196
|
-
const height = toHeight(score0);
|
|
197
|
-
const bottom = toY(score0) + height;
|
|
198
|
-
ctx.fillStyle = colorForBase[base] || 'black';
|
|
199
|
-
ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
|
|
200
|
-
curr += entryDepth;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
const { depth, snps } = snpinfo;
|
|
205
|
-
let curr = 0;
|
|
206
|
-
for (const base of Object.keys(snps).sort().reverse()) {
|
|
207
|
-
const { entryDepth } = snps[base];
|
|
208
|
-
const height = toHeight(score0);
|
|
209
|
-
const bottom = toY(score0) + height;
|
|
210
|
-
ctx.fillStyle = colorForBase[base] || 'black';
|
|
211
|
-
ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
|
|
212
|
-
curr += entryDepth;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
const interbaseEvents = Object.keys(snpinfo.noncov);
|
|
216
|
-
if (drawInterbaseCounts) {
|
|
217
|
-
let curr = 0;
|
|
218
|
-
for (const base of interbaseEvents) {
|
|
219
|
-
const { entryDepth } = snpinfo.noncov[base];
|
|
220
|
-
const r = 0.6;
|
|
221
|
-
ctx.fillStyle = colorForBase[base];
|
|
222
|
-
ctx.fillRect(leftPx - r + extraHorizontallyFlippedOffset, INTERBASE_INDICATOR_HEIGHT + toHeight2(curr), r * 2, toHeight2(entryDepth));
|
|
223
|
-
curr += entryDepth;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
if (drawIndicators) {
|
|
227
|
-
let accum = 0;
|
|
228
|
-
let max = 0;
|
|
229
|
-
let maxBase = '';
|
|
230
|
-
for (const base of interbaseEvents) {
|
|
231
|
-
const { entryDepth } = snpinfo.noncov[base];
|
|
232
|
-
accum += entryDepth;
|
|
233
|
-
if (entryDepth > max) {
|
|
234
|
-
max = entryDepth;
|
|
235
|
-
maxBase = base;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
// avoid drawing a bunch of indicators if coverage is very low. note:
|
|
239
|
-
// also uses the prev total in the case of the "cliff"
|
|
240
|
-
const indicatorComparatorScore = Math.max(score0, prevTotal);
|
|
241
|
-
if (accum > indicatorComparatorScore * indicatorThreshold &&
|
|
242
|
-
indicatorComparatorScore > MINIMUM_INTERBASE_INDICATOR_READ_DEPTH) {
|
|
243
|
-
ctx.fillStyle = colorForBase[maxBase];
|
|
244
|
-
ctx.beginPath();
|
|
245
|
-
const l = leftPx + extraHorizontallyFlippedOffset;
|
|
246
|
-
ctx.moveTo(l - INTERBASE_INDICATOR_WIDTH / 2, 0);
|
|
247
|
-
ctx.lineTo(l + INTERBASE_INDICATOR_WIDTH / 2, 0);
|
|
248
|
-
ctx.lineTo(l, INTERBASE_INDICATOR_HEIGHT);
|
|
249
|
-
ctx.fill();
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
prevTotal = score0;
|
|
253
|
-
}
|
|
254
|
-
if (drawArcs) {
|
|
255
|
-
for (const f of feats) {
|
|
256
|
-
if (f.get('type') !== 'skip') {
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
const s = f.get('start');
|
|
260
|
-
const e = f.get('end');
|
|
261
|
-
const [left, right] = bpSpanPx(s, e, region, bpPerPx);
|
|
262
|
-
ctx.beginPath();
|
|
263
|
-
const effectiveStrand = f.get('effectiveStrand');
|
|
264
|
-
const pos = 'rgba(255,200,200,0.7)';
|
|
265
|
-
const neg = 'rgba(200,200,255,0.7)';
|
|
266
|
-
const neutral = 'rgba(200,200,200,0.7)';
|
|
267
|
-
if (effectiveStrand === 1) {
|
|
268
|
-
ctx.strokeStyle = pos;
|
|
269
|
-
}
|
|
270
|
-
else if (effectiveStrand === -1) {
|
|
271
|
-
ctx.strokeStyle = neg;
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
ctx.strokeStyle = neutral;
|
|
275
|
-
}
|
|
276
|
-
ctx.lineWidth = Math.log(f.get('score') + 1);
|
|
277
|
-
ctx.moveTo(left, height - offset * 2);
|
|
278
|
-
ctx.bezierCurveTo(left, 0, right, 0, right, height - offset * 2);
|
|
279
|
-
ctx.stroke();
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
if (displayCrossHatches) {
|
|
283
|
-
ctx.lineWidth = 1;
|
|
284
|
-
ctx.strokeStyle = 'rgba(140,140,140,0.8)';
|
|
285
|
-
for (const tick of ticks.values) {
|
|
286
|
-
ctx.beginPath();
|
|
287
|
-
ctx.moveTo(0, Math.round(toY(tick)));
|
|
288
|
-
ctx.lineTo(width, Math.round(toY(tick)));
|
|
289
|
-
ctx.stroke();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
4
|
+
const { makeImage } = await import('./makeImage');
|
|
5
|
+
await makeImage(ctx, props);
|
|
292
6
|
return undefined;
|
|
293
7
|
}
|
|
294
8
|
}
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
declare const SNPCoverageRenderer: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
clipColor: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
};
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
indicatorThreshold: {
|
|
14
8
|
type: string;
|
|
15
9
|
description: string;
|
|
16
10
|
defaultValue: number;
|
|
17
11
|
};
|
|
18
|
-
|
|
19
|
-
* #slot
|
|
20
|
-
*/
|
|
21
|
-
drawArcs: {
|
|
12
|
+
showArcs: {
|
|
22
13
|
type: string;
|
|
23
14
|
description: string;
|
|
24
15
|
defaultValue: boolean;
|
|
25
16
|
};
|
|
26
|
-
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
|
-
drawInterbaseCounts: {
|
|
17
|
+
showInterbaseCounts: {
|
|
30
18
|
type: string;
|
|
31
19
|
description: string;
|
|
32
20
|
defaultValue: boolean;
|
|
33
21
|
};
|
|
34
|
-
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
|
-
drawIndicators: {
|
|
22
|
+
showInterbaseIndicators: {
|
|
38
23
|
type: string;
|
|
39
24
|
description: string;
|
|
40
25
|
defaultValue: boolean;
|
|
@@ -1,45 +1,27 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config SNPCoverageRenderer
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const SNPCoverageRenderer = ConfigurationSchema('SNPCoverageRenderer', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
clipColor: {
|
|
11
5
|
type: 'color',
|
|
12
6
|
description: 'the color of the clipping marker',
|
|
13
7
|
defaultValue: 'red',
|
|
14
8
|
},
|
|
15
|
-
/**
|
|
16
|
-
* #slot
|
|
17
|
-
*/
|
|
18
9
|
indicatorThreshold: {
|
|
19
10
|
type: 'number',
|
|
20
11
|
description: 'the proportion of reads containing a insertion/clip indicator',
|
|
21
12
|
defaultValue: 0.4,
|
|
22
13
|
},
|
|
23
|
-
|
|
24
|
-
* #slot
|
|
25
|
-
*/
|
|
26
|
-
drawArcs: {
|
|
14
|
+
showArcs: {
|
|
27
15
|
type: 'boolean',
|
|
28
16
|
description: 'Draw sashimi-style arcs for intron features',
|
|
29
17
|
defaultValue: true,
|
|
30
18
|
},
|
|
31
|
-
|
|
32
|
-
* #slot
|
|
33
|
-
*/
|
|
34
|
-
drawInterbaseCounts: {
|
|
19
|
+
showInterbaseCounts: {
|
|
35
20
|
type: 'boolean',
|
|
36
21
|
description: 'draw count "upsidedown histogram" of the interbase events that don\'t contribute to the coverage count so are not drawn in the normal histogram',
|
|
37
22
|
defaultValue: true,
|
|
38
23
|
},
|
|
39
|
-
|
|
40
|
-
* #slot
|
|
41
|
-
*/
|
|
42
|
-
drawIndicators: {
|
|
24
|
+
showInterbaseIndicators: {
|
|
43
25
|
type: 'boolean',
|
|
44
26
|
description: 'draw a triangular indicator where an event has been detected',
|
|
45
27
|
defaultValue: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function register(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import configSchema from './configSchema';
|
|
2
|
-
import SNPCoverageRenderer from './SNPCoverageRenderer';
|
|
3
1
|
import { WiggleRendering } from '@jbrowse/plugin-wiggle';
|
|
2
|
+
import SNPCoverageRenderer from './SNPCoverageRenderer';
|
|
3
|
+
import configSchema from './configSchema';
|
|
4
4
|
export default function register(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new SNPCoverageRenderer({
|
|
6
6
|
name: 'SNPCoverageRenderer',
|