@jbrowse/plugin-alignments 2.16.1 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -13
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/Flags.js +2 -2
- package/dist/AlignmentsFeatureDetail/Formatter.js +0 -3
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +4 -9
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
- package/dist/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/PairLink.js +0 -1
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +1 -5
- package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +2 -6
- package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +3 -3
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.js +1 -8
- package/dist/AlignmentsTrack/index.d.ts +1 -1
- package/dist/AlignmentsTrack/index.js +0 -3
- package/dist/BamAdapter/BamAdapter.d.ts +8 -6
- package/dist/BamAdapter/BamAdapter.js +35 -30
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +6 -20
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +42 -75
- package/dist/BamAdapter/configSchema.d.ts +0 -17
- package/dist/BamAdapter/configSchema.js +1 -22
- package/dist/BamAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/CramAdapter.d.ts +8 -10
- package/dist/CramAdapter/CramAdapter.js +26 -32
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +23 -29
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +59 -75
- package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/dist/CramAdapter/CramTestAdapters.js +4 -5
- package/dist/CramAdapter/configSchema.d.ts +0 -14
- package/dist/CramAdapter/configSchema.js +1 -19
- package/dist/CramAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/index.js +0 -1
- package/dist/CramAdapter/util.d.ts +2 -11
- package/dist/CramAdapter/util.js +1 -24
- package/dist/GuessAlignmentsTypes/index.d.ts +1 -1
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/dist/HtsgetBamAdapter/configSchema.js +1 -14
- package/dist/HtsgetBamAdapter/index.d.ts +1 -1
- package/dist/HtsgetBamAdapter/index.js +1 -1
- package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +2 -5
- package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/dist/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +2 -16
- package/dist/LinearAlignmentsDisplay/{models/configSchema.js → configSchema.js} +3 -20
- package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +2 -3
- package/dist/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +7 -73
- package/dist/LinearAlignmentsDisplay/{models/model.js → model.js} +13 -82
- package/dist/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +34 -181
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +72 -149
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +5 -3
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +111 -56
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +8 -6
- package/dist/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/dist/LinearPileupDisplay/configSchema.js +12 -30
- package/dist/LinearPileupDisplay/index.d.ts +1 -1
- package/dist/LinearPileupDisplay/index.js +2 -2
- package/dist/LinearPileupDisplay/model.d.ts +121 -123
- package/dist/LinearPileupDisplay/model.js +110 -124
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +3 -7
- package/dist/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/dist/LinearReadArcsDisplay/configSchema.js +8 -31
- package/dist/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/dist/LinearReadArcsDisplay/index.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/index.js +1 -2
- package/dist/LinearReadArcsDisplay/model.d.ts +13 -90
- package/dist/LinearReadArcsDisplay/model.js +24 -112
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +3 -7
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/dist/LinearReadCloudDisplay/configSchema.js +3 -28
- package/dist/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/dist/LinearReadCloudDisplay/index.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/index.js +1 -2
- package/dist/LinearReadCloudDisplay/model.d.ts +14 -64
- package/dist/LinearReadCloudDisplay/model.js +24 -76
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +50 -20
- package/dist/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +17 -22
- package/dist/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +16 -32
- package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/index.js +3 -3
- package/{esm/LinearSNPCoverageDisplay/models → dist/LinearSNPCoverageDisplay}/model.d.ts +9 -60
- package/dist/LinearSNPCoverageDisplay/{models/model.js → model.js} +68 -146
- package/dist/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/dist/MismatchParser/cigarToMismatches.js +91 -0
- package/dist/MismatchParser/getNextRefPos.d.ts +4 -0
- package/dist/MismatchParser/getNextRefPos.js +38 -0
- package/dist/MismatchParser/index.d.ts +5 -30
- package/dist/MismatchParser/index.js +10 -335
- package/dist/MismatchParser/mdToMismatches.d.ts +3 -0
- package/dist/MismatchParser/mdToMismatches.js +74 -0
- package/dist/ModificationParser/index.d.ts +19 -0
- package/dist/ModificationParser/index.js +127 -0
- package/dist/PileupRPC/base.d.ts +2 -2
- package/dist/PileupRPC/base.js +0 -1
- package/dist/PileupRPC/index.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +2 -4
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +3 -4
- package/dist/PileupRPC/methods/GetReducedFeatures.js +21 -20
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +4 -4
- package/dist/PileupRPC/methods/GetVisibleModifications.js +10 -7
- package/dist/PileupRPC/util.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +12 -11
- package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
- package/dist/PileupRenderer/PileupRenderer.d.ts +11 -29
- package/dist/PileupRenderer/PileupRenderer.js +17 -20
- package/dist/PileupRenderer/colorBy.d.ts +2 -2
- package/dist/PileupRenderer/colorBy.js +0 -6
- package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/dist/PileupRenderer/components/PileupRendering.js +0 -3
- package/dist/PileupRenderer/configSchema.d.ts +0 -31
- package/dist/PileupRenderer/configSchema.js +1 -35
- package/dist/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -6
- package/dist/PileupRenderer/index.d.ts +1 -1
- package/dist/PileupRenderer/index.js +1 -1
- package/dist/PileupRenderer/layoutFeature.d.ts +2 -2
- package/dist/PileupRenderer/layoutFeature.js +0 -1
- package/dist/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/dist/PileupRenderer/layoutFeatures.js +6 -4
- package/dist/PileupRenderer/makeImageData.d.ts +3 -4
- package/dist/PileupRenderer/makeImageData.js +8 -2
- package/dist/PileupRenderer/renderAlignment.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignment.js +19 -8
- package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignmentShape.js +102 -21
- package/dist/PileupRenderer/renderMethylation.d.ts +6 -5
- package/dist/PileupRenderer/renderMethylation.js +13 -9
- package/dist/PileupRenderer/renderMismatches.d.ts +3 -3
- package/dist/PileupRenderer/renderMismatches.js +17 -28
- package/dist/PileupRenderer/renderModifications.d.ts +6 -5
- package/dist/PileupRenderer/renderModifications.js +30 -35
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +4 -3
- package/dist/PileupRenderer/renderPerBaseLettering.js +1 -4
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +4 -3
- package/dist/PileupRenderer/renderPerBaseQuality.js +3 -5
- package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/dist/PileupRenderer/renderSoftClipping.js +6 -10
- package/dist/PileupRenderer/sortUtil.d.ts +3 -8
- package/dist/PileupRenderer/sortUtil.js +13 -16
- package/dist/PileupRenderer/types.d.ts +26 -0
- package/dist/PileupRenderer/types.js +2 -0
- package/dist/PileupRenderer/util.d.ts +2 -2
- package/dist/PileupRenderer/util.js +1 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +14 -11
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/dist/SNPCoverageAdapter/configSchema.js +1 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +11 -11
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +74 -193
- package/dist/SNPCoverageAdapter/index.d.ts +1 -1
- package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/dist/SNPCoverageAdapter/processDepth.js +38 -0
- package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
- package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/dist/SNPCoverageAdapter/processModifications.js +49 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
- package/dist/SNPCoverageAdapter/util.d.ts +9 -24
- package/dist/SNPCoverageAdapter/util.js +39 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +6 -4
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +165 -72
- package/dist/SNPCoverageRenderer/configSchema.d.ts +0 -15
- package/dist/SNPCoverageRenderer/configSchema.js +1 -19
- package/dist/SNPCoverageRenderer/index.d.ts +1 -1
- package/dist/SNPCoverageRenderer/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/shared/afterAttach.d.ts +1 -1
- package/dist/shared/afterAttach.js +0 -2
- package/dist/shared/color.d.ts +1 -11
- package/dist/shared/color.js +1 -15
- package/{esm/shared → dist/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/dist/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +12 -11
- package/{esm/shared → dist/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/dist/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +7 -3
- package/dist/shared/fetchChains.d.ts +2 -2
- package/dist/shared/fetchChains.js +2 -4
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/dist/shared/getMaximumModificationAtEachPosition.js +41 -0
- package/dist/shared/getUniqueModifications.d.ts +14 -0
- package/dist/shared/getUniqueModifications.js +16 -0
- package/dist/shared/getUniqueTags.d.ts +15 -0
- package/dist/shared/getUniqueTags.js +18 -0
- package/dist/shared/{renderSvg.js → renderSvgUtil.js} +0 -2
- package/dist/shared/types.d.ts +94 -0
- package/dist/shared/types.js +2 -0
- package/dist/shared/util.d.ts +19 -1
- package/dist/shared/util.js +52 -0
- package/dist/util.d.ts +10 -7
- package/dist/util.js +26 -37
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -13
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/Flags.js +2 -2
- package/esm/AlignmentsFeatureDetail/Formatter.js +0 -3
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +5 -10
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
- package/esm/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/PairLink.js +0 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +2 -6
- package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +2 -6
- package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +3 -3
- package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.js +1 -8
- package/esm/AlignmentsTrack/index.d.ts +1 -1
- package/esm/AlignmentsTrack/index.js +0 -3
- package/esm/BamAdapter/BamAdapter.d.ts +8 -6
- package/esm/BamAdapter/BamAdapter.js +36 -31
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +6 -20
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +43 -76
- package/esm/BamAdapter/configSchema.d.ts +0 -17
- package/esm/BamAdapter/configSchema.js +1 -22
- package/esm/BamAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.d.ts +8 -10
- package/esm/CramAdapter/CramAdapter.js +28 -34
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +23 -29
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +59 -75
- package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/esm/CramAdapter/CramTestAdapters.js +4 -5
- package/esm/CramAdapter/configSchema.d.ts +0 -14
- package/esm/CramAdapter/configSchema.js +1 -19
- package/esm/CramAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/index.js +0 -1
- package/esm/CramAdapter/util.d.ts +2 -11
- package/esm/CramAdapter/util.js +1 -24
- package/esm/GuessAlignmentsTypes/index.d.ts +1 -1
- package/esm/GuessAlignmentsTypes/index.js +1 -1
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/esm/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/esm/HtsgetBamAdapter/configSchema.js +1 -14
- package/esm/HtsgetBamAdapter/index.d.ts +1 -1
- package/esm/HtsgetBamAdapter/index.js +1 -1
- package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +2 -5
- package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +1 -31
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/esm/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +2 -16
- package/esm/LinearAlignmentsDisplay/configSchema.js +16 -0
- package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +2 -3
- package/esm/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +7 -73
- package/esm/LinearAlignmentsDisplay/{models/model.js → model.js} +14 -83
- package/esm/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +34 -181
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +74 -151
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +5 -3
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +111 -56
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +8 -6
- package/esm/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/esm/LinearPileupDisplay/configSchema.js +12 -30
- package/esm/LinearPileupDisplay/index.d.ts +1 -1
- package/esm/LinearPileupDisplay/index.js +2 -2
- package/esm/LinearPileupDisplay/model.d.ts +121 -123
- package/esm/LinearPileupDisplay/model.js +111 -125
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +3 -7
- package/esm/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/esm/LinearReadArcsDisplay/configSchema.js +8 -31
- package/esm/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/esm/LinearReadArcsDisplay/index.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/index.js +1 -2
- package/esm/LinearReadArcsDisplay/model.d.ts +13 -90
- package/esm/LinearReadArcsDisplay/model.js +25 -113
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +3 -7
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/esm/LinearReadCloudDisplay/configSchema.js +3 -28
- package/esm/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/esm/LinearReadCloudDisplay/index.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/index.js +1 -2
- package/esm/LinearReadCloudDisplay/model.d.ts +14 -64
- package/esm/LinearReadCloudDisplay/model.js +24 -76
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +50 -20
- package/esm/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +17 -22
- package/esm/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +16 -32
- package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/index.js +3 -3
- package/{dist/LinearSNPCoverageDisplay/models → esm/LinearSNPCoverageDisplay}/model.d.ts +9 -60
- package/esm/LinearSNPCoverageDisplay/{models/model.js → model.js} +69 -147
- package/esm/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/esm/MismatchParser/cigarToMismatches.js +88 -0
- package/esm/MismatchParser/getNextRefPos.d.ts +4 -0
- package/esm/MismatchParser/getNextRefPos.js +35 -0
- package/esm/MismatchParser/index.d.ts +5 -30
- package/esm/MismatchParser/index.js +5 -325
- package/esm/MismatchParser/mdToMismatches.d.ts +3 -0
- package/esm/MismatchParser/mdToMismatches.js +71 -0
- package/esm/ModificationParser/index.d.ts +19 -0
- package/esm/ModificationParser/index.js +121 -0
- package/esm/PileupRPC/base.d.ts +2 -2
- package/esm/PileupRPC/base.js +0 -1
- package/esm/PileupRPC/index.d.ts +1 -1
- package/esm/PileupRPC/index.js +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +2 -4
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +3 -4
- package/esm/PileupRPC/methods/GetReducedFeatures.js +21 -20
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +4 -4
- package/esm/PileupRPC/methods/GetVisibleModifications.js +10 -7
- package/esm/PileupRPC/util.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +12 -11
- package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +11 -29
- package/esm/PileupRenderer/PileupRenderer.js +19 -22
- package/esm/PileupRenderer/colorBy.d.ts +2 -2
- package/esm/PileupRenderer/colorBy.js +1 -7
- package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/esm/PileupRenderer/components/PileupRendering.js +1 -4
- package/esm/PileupRenderer/configSchema.d.ts +0 -31
- package/esm/PileupRenderer/configSchema.js +1 -35
- package/esm/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/esm/PileupRenderer/getAlignmentShapeColor.js +2 -7
- package/esm/PileupRenderer/index.d.ts +1 -1
- package/esm/PileupRenderer/index.js +1 -1
- package/esm/PileupRenderer/layoutFeature.d.ts +2 -2
- package/esm/PileupRenderer/layoutFeature.js +0 -1
- package/esm/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/esm/PileupRenderer/layoutFeatures.js +7 -5
- package/esm/PileupRenderer/makeImageData.d.ts +3 -4
- package/esm/PileupRenderer/makeImageData.js +8 -2
- package/esm/PileupRenderer/renderAlignment.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignment.js +19 -8
- package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignmentShape.js +102 -21
- package/esm/PileupRenderer/renderMethylation.d.ts +6 -5
- package/esm/PileupRenderer/renderMethylation.js +13 -9
- package/esm/PileupRenderer/renderMismatches.d.ts +3 -3
- package/esm/PileupRenderer/renderMismatches.js +17 -28
- package/esm/PileupRenderer/renderModifications.d.ts +6 -5
- package/esm/PileupRenderer/renderModifications.js +29 -34
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +4 -3
- package/esm/PileupRenderer/renderPerBaseLettering.js +1 -4
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +4 -3
- package/esm/PileupRenderer/renderPerBaseQuality.js +3 -5
- package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/esm/PileupRenderer/renderSoftClipping.js +7 -11
- package/esm/PileupRenderer/sortUtil.d.ts +3 -8
- package/esm/PileupRenderer/sortUtil.js +13 -16
- package/esm/PileupRenderer/types.d.ts +26 -0
- package/esm/PileupRenderer/types.js +1 -0
- package/esm/PileupRenderer/util.d.ts +2 -2
- package/esm/PileupRenderer/util.js +1 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +15 -12
- package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/esm/SNPCoverageAdapter/configSchema.js +1 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +11 -11
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +73 -192
- package/esm/SNPCoverageAdapter/index.d.ts +1 -1
- package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/esm/SNPCoverageAdapter/processDepth.js +35 -0
- package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
- package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/esm/SNPCoverageAdapter/processModifications.js +46 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
- package/esm/SNPCoverageAdapter/util.d.ts +9 -24
- package/esm/SNPCoverageAdapter/util.js +35 -1
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +6 -4
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +167 -74
- package/esm/SNPCoverageRenderer/configSchema.d.ts +0 -15
- package/esm/SNPCoverageRenderer/configSchema.js +1 -19
- package/esm/SNPCoverageRenderer/index.d.ts +1 -1
- package/esm/SNPCoverageRenderer/index.js +2 -2
- package/esm/index.d.ts +2 -2
- package/esm/index.js +10 -10
- package/esm/shared/afterAttach.d.ts +1 -1
- package/esm/shared/afterAttach.js +0 -2
- package/esm/shared/color.d.ts +1 -11
- package/esm/shared/color.js +0 -14
- package/{dist/shared → esm/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/esm/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +12 -11
- package/{dist/shared → esm/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/esm/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +7 -3
- package/esm/shared/fetchChains.d.ts +2 -2
- package/esm/shared/fetchChains.js +2 -4
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/esm/shared/getMaximumModificationAtEachPosition.js +38 -0
- package/esm/shared/getUniqueModifications.d.ts +14 -0
- package/esm/shared/getUniqueModifications.js +13 -0
- package/esm/shared/getUniqueTags.d.ts +15 -0
- package/esm/shared/getUniqueTags.js +15 -0
- package/esm/shared/{renderSvg.js → renderSvgUtil.js} +0 -2
- package/esm/shared/types.d.ts +94 -0
- package/esm/shared/types.js +1 -0
- package/esm/shared/util.d.ts +19 -1
- package/esm/shared/util.js +47 -0
- package/esm/util.d.ts +10 -7
- package/esm/util.js +24 -34
- package/package.json +4 -5
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -41
- package/dist/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/dist/LinearPileupDisplay/components/ModificationsTable.js +0 -28
- package/dist/shared/index.d.ts +0 -49
- package/dist/shared/index.js +0 -41
- package/esm/LinearAlignmentsDisplay/models/configSchema.js +0 -33
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -36
- package/esm/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/esm/LinearPileupDisplay/components/ModificationsTable.js +0 -22
- package/esm/shared/index.d.ts +0 -49
- package/esm/shared/index.js +0 -36
- /package/dist/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/dist/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/esm/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
3
4
|
const ui_1 = require("@jbrowse/core/ui");
|
|
4
5
|
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
const
|
|
6
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
6
7
|
const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
|
|
8
|
+
const util_2 = require("../shared/util");
|
|
9
|
+
const INTERBASE_INDICATOR_WIDTH = 7;
|
|
10
|
+
const INTERBASE_INDICATOR_HEIGHT = 4.5;
|
|
11
|
+
const MINIMUM_INTERBASE_INDICATOR_READ_DEPTH = 7;
|
|
12
|
+
const complementBase = {
|
|
13
|
+
C: 'G',
|
|
14
|
+
G: 'C',
|
|
15
|
+
A: 'T',
|
|
16
|
+
T: 'A',
|
|
17
|
+
};
|
|
7
18
|
const fudgeFactor = 0.6;
|
|
8
19
|
class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
|
|
9
|
-
// note: the snps are drawn on linear scale even if the data is drawn in log
|
|
10
|
-
// scape hence the two different scales being used
|
|
11
20
|
async draw(ctx, props) {
|
|
12
|
-
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
+
const { features, regions, bpPerPx, colorBy, displayCrossHatches, visibleModifications = {}, scaleOpts, height: unadjustedHeight, theme: configTheme, config: cfg, ticks, stopToken, } = props;
|
|
13
23
|
const theme = (0, ui_1.createJBrowseTheme)(configTheme);
|
|
14
24
|
const region = regions[0];
|
|
15
25
|
const width = (region.end - region.start) / bpPerPx;
|
|
16
|
-
// the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
|
|
17
|
-
// wiggle display, and makes the height of the actual drawn area add
|
|
18
|
-
// "padding" to the top and bottom of the display
|
|
19
26
|
const offset = plugin_wiggle_1.YSCALEBAR_LABEL_OFFSET;
|
|
20
27
|
const height = unadjustedHeight - offset * 2;
|
|
21
28
|
const opts = { ...scaleOpts, range: [0, height] };
|
|
22
29
|
const viewScale = (0, plugin_wiggle_1.getScale)(opts);
|
|
23
|
-
// clipping and insertion indicators, uses a smaller height/2 scale
|
|
24
30
|
const indicatorViewScale = (0, plugin_wiggle_1.getScale)({
|
|
25
31
|
...opts,
|
|
26
32
|
range: [0, height / 2],
|
|
@@ -32,10 +38,8 @@ class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
|
|
|
32
38
|
const drawInterbaseCounts = (0, configuration_1.readConfObject)(cfg, 'drawInterbaseCounts');
|
|
33
39
|
const drawArcs = (0, configuration_1.readConfObject)(cfg, 'drawArcs');
|
|
34
40
|
const drawIndicators = (0, configuration_1.readConfObject)(cfg, 'drawIndicators');
|
|
35
|
-
// get the y coordinate that we are plotting at, this can be log scale
|
|
36
41
|
const toY = (n) => height - (viewScale(n) || 0) + offset;
|
|
37
42
|
const toHeight = (n) => toY(originY) - toY(n);
|
|
38
|
-
// used specifically for indicator
|
|
39
43
|
const toY2 = (n) => height - (indicatorViewScale(n) || 0) + offset;
|
|
40
44
|
const toHeight2 = (n) => toY2(originLinear) - toY2(n);
|
|
41
45
|
const { bases } = theme.palette;
|
|
@@ -48,62 +52,155 @@ class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
|
|
|
48
52
|
softclip: 'blue',
|
|
49
53
|
hardclip: 'red',
|
|
50
54
|
total: (0, configuration_1.readConfObject)(cfg, 'color'),
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
mod_NONE: 'blue',
|
|
56
|
+
cpg_meth: 'red',
|
|
57
|
+
cpg_unmeth: 'blue',
|
|
53
58
|
};
|
|
54
59
|
const feats = [...features.values()];
|
|
55
|
-
const coverage = feats.filter(f => f.get('type') !== 'skip');
|
|
56
|
-
const skips = feats.filter(f => f.get('type') === 'skip');
|
|
57
|
-
// Use two pass rendering, which helps in visualizing the SNPs at higher
|
|
58
|
-
// bpPerPx First pass: draw the gray background
|
|
59
60
|
ctx.fillStyle = colorForBase.total;
|
|
60
|
-
|
|
61
|
+
let start = performance.now();
|
|
62
|
+
for (const feature of feats) {
|
|
63
|
+
if (feature.get('type') === 'skip') {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
61
66
|
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
62
67
|
const w = rightPx - leftPx + fudgeFactor;
|
|
63
68
|
const score = feature.get('score');
|
|
64
69
|
ctx.fillRect(leftPx, toY(score), w, toHeight(score));
|
|
70
|
+
if (performance.now() - start > 400) {
|
|
71
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
72
|
+
start = performance.now();
|
|
73
|
+
}
|
|
65
74
|
}
|
|
66
|
-
// Keep track of previous total which we will use it to draw the interbase
|
|
67
|
-
// indicator (if there is a sudden clip, there will be no read coverage but
|
|
68
|
-
// there will be "clip" coverage) at that position beyond the read. if the
|
|
69
|
-
// clip is right at a block boundary then prevTotal will not be available,
|
|
70
|
-
// so this is a best attempt to plot interbase indicator at the "cliffs"
|
|
71
75
|
let prevTotal = 0;
|
|
72
|
-
// extraHorizontallyFlippedOffset is used to draw interbase items, which
|
|
73
|
-
// are located to the left when forward and right when reversed
|
|
74
76
|
const extraHorizontallyFlippedOffset = region.reversed ? 1 / bpPerPx : 0;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const drawingModifications = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications';
|
|
78
|
+
const drawingMethylation = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'methylation';
|
|
79
|
+
const isolatedModification = (_a = colorBy === null || colorBy === void 0 ? void 0 : colorBy.modifications) === null || _a === void 0 ? void 0 : _a.isolatedModification;
|
|
80
|
+
start = performance.now();
|
|
81
|
+
for (const feature of feats) {
|
|
82
|
+
const now = performance.now();
|
|
83
|
+
if (now - start > 400) {
|
|
84
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
85
|
+
}
|
|
86
|
+
if (feature.get('type') === 'skip') {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
79
89
|
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
80
|
-
const score = feature.get('score');
|
|
81
90
|
const snpinfo = feature.get('snpinfo');
|
|
82
91
|
const w = Math.max(rightPx - leftPx, 1);
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
const score0 = feature.get('score');
|
|
93
|
+
if (drawingModifications) {
|
|
94
|
+
let curr = 0;
|
|
95
|
+
const refbase = (_b = snpinfo.refbase) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
96
|
+
const { nonmods, mods, snps, ref } = snpinfo;
|
|
97
|
+
for (const m of Object.keys(nonmods).sort().reverse()) {
|
|
98
|
+
const mod = visibleModifications[m.replace('nonmod_', '')] ||
|
|
99
|
+
visibleModifications[m.replace('mod_', '')];
|
|
100
|
+
if (!mod) {
|
|
101
|
+
console.warn(`${m} not known yet`);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (isolatedModification && mod.type !== isolatedModification) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const cmp = complementBase[mod.base];
|
|
108
|
+
const detectable = mod.base === 'N'
|
|
109
|
+
? score0
|
|
110
|
+
: (((_c = snps[mod.base]) === null || _c === void 0 ? void 0 : _c.entryDepth) || 0) +
|
|
111
|
+
(((_d = snps[cmp]) === null || _d === void 0 ? void 0 : _d.entryDepth) || 0) +
|
|
112
|
+
(refbase === mod.base ? ref['1'] : 0) +
|
|
113
|
+
(refbase === cmp ? ref['-1'] : 0);
|
|
114
|
+
const modifiable = mod.base === 'N'
|
|
115
|
+
? score0
|
|
116
|
+
: (((_e = snps[mod.base]) === null || _e === void 0 ? void 0 : _e.entryDepth) || 0) +
|
|
117
|
+
(((_f = snps[cmp]) === null || _f === void 0 ? void 0 : _f.entryDepth) || 0) +
|
|
118
|
+
(refbase === mod.base ? ref.entryDepth : 0) +
|
|
119
|
+
(refbase === cmp ? ref.entryDepth : 0);
|
|
120
|
+
const { entryDepth, avgProbability = 0 } = snpinfo.nonmods[m];
|
|
121
|
+
const modFraction = (modifiable / score0) * (entryDepth / detectable);
|
|
122
|
+
const nonModColor = 'blue';
|
|
123
|
+
const c = (0, util_2.alphaColor)(nonModColor, avgProbability);
|
|
124
|
+
const height = toHeight(score0);
|
|
125
|
+
const bottom = toY(score0) + height;
|
|
126
|
+
ctx.fillStyle = c;
|
|
127
|
+
ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
|
|
128
|
+
curr += modFraction * height;
|
|
129
|
+
}
|
|
130
|
+
for (const m of Object.keys(mods).sort().reverse()) {
|
|
131
|
+
const mod = visibleModifications[m.replace('mod_', '')];
|
|
132
|
+
if (!mod) {
|
|
133
|
+
console.warn(`${m} not known yet`);
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (isolatedModification && mod.type !== isolatedModification) {
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
const cmp = complementBase[mod.base];
|
|
140
|
+
const detectable = mod.base === 'N'
|
|
141
|
+
? score0
|
|
142
|
+
: (((_g = snps[mod.base]) === null || _g === void 0 ? void 0 : _g.entryDepth) || 0) +
|
|
143
|
+
(((_h = snps[cmp]) === null || _h === void 0 ? void 0 : _h.entryDepth) || 0) +
|
|
144
|
+
(refbase === mod.base ? ref['1'] : 0) +
|
|
145
|
+
(refbase === cmp ? ref['-1'] : 0);
|
|
146
|
+
const modifiable = mod.base === 'N'
|
|
147
|
+
? score0
|
|
148
|
+
: (((_j = snps[mod.base]) === null || _j === void 0 ? void 0 : _j.entryDepth) || 0) +
|
|
149
|
+
(((_k = snps[cmp]) === null || _k === void 0 ? void 0 : _k.entryDepth) || 0) +
|
|
150
|
+
(refbase === mod.base ? ref.entryDepth : 0) +
|
|
151
|
+
(refbase === cmp ? ref.entryDepth : 0);
|
|
152
|
+
const { entryDepth, avgProbability = 0 } = mods[m];
|
|
153
|
+
const modFraction = (modifiable / score0) * (entryDepth / detectable);
|
|
154
|
+
const baseColor = mod.color || 'black';
|
|
155
|
+
const c = (0, util_2.alphaColor)(baseColor, avgProbability);
|
|
156
|
+
const height = toHeight(score0);
|
|
157
|
+
const bottom = toY(score0) + height;
|
|
158
|
+
ctx.fillStyle = c;
|
|
159
|
+
ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
|
|
160
|
+
curr += modFraction * height;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (drawingMethylation) {
|
|
164
|
+
const { depth, nonmods, mods } = snpinfo;
|
|
165
|
+
let curr = 0;
|
|
166
|
+
for (const base of Object.keys(mods).sort().reverse()) {
|
|
167
|
+
const { entryDepth } = mods[base];
|
|
168
|
+
const height = toHeight(score0);
|
|
169
|
+
const bottom = toY(score0) + height;
|
|
170
|
+
ctx.fillStyle = colorForBase[base] || 'black';
|
|
171
|
+
ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
|
|
172
|
+
curr += entryDepth;
|
|
173
|
+
}
|
|
174
|
+
for (const base of Object.keys(nonmods).sort().reverse()) {
|
|
175
|
+
const { entryDepth } = nonmods[base];
|
|
176
|
+
const height = toHeight(score0);
|
|
177
|
+
const bottom = toY(score0) + height;
|
|
178
|
+
ctx.fillStyle = colorForBase[base] || 'black';
|
|
179
|
+
ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
|
|
180
|
+
curr += entryDepth;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
const { depth, snps } = snpinfo;
|
|
185
|
+
let curr = 0;
|
|
186
|
+
for (const base of Object.keys(snps).sort().reverse()) {
|
|
187
|
+
const { entryDepth } = snps[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
|
+
}
|
|
96
194
|
}
|
|
97
195
|
const interbaseEvents = Object.keys(snpinfo.noncov);
|
|
98
|
-
const indicatorHeight = 4.5;
|
|
99
196
|
if (drawInterbaseCounts) {
|
|
100
197
|
let curr = 0;
|
|
101
198
|
for (const base of interbaseEvents) {
|
|
102
|
-
const {
|
|
199
|
+
const { entryDepth } = snpinfo.noncov[base];
|
|
103
200
|
const r = 0.6;
|
|
104
201
|
ctx.fillStyle = colorForBase[base];
|
|
105
|
-
ctx.fillRect(leftPx - r + extraHorizontallyFlippedOffset,
|
|
106
|
-
curr +=
|
|
202
|
+
ctx.fillRect(leftPx - r + extraHorizontallyFlippedOffset, INTERBASE_INDICATOR_HEIGHT + toHeight2(curr), r * 2, toHeight2(entryDepth));
|
|
203
|
+
curr += entryDepth;
|
|
107
204
|
}
|
|
108
205
|
}
|
|
109
206
|
if (drawIndicators) {
|
|
@@ -111,48 +208,44 @@ class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
|
|
|
111
208
|
let max = 0;
|
|
112
209
|
let maxBase = '';
|
|
113
210
|
for (const base of interbaseEvents) {
|
|
114
|
-
const {
|
|
115
|
-
accum +=
|
|
116
|
-
if (
|
|
117
|
-
max =
|
|
211
|
+
const { entryDepth } = snpinfo.noncov[base];
|
|
212
|
+
accum += entryDepth;
|
|
213
|
+
if (entryDepth > max) {
|
|
214
|
+
max = entryDepth;
|
|
118
215
|
maxBase = base;
|
|
119
216
|
}
|
|
120
217
|
}
|
|
121
|
-
|
|
122
|
-
// less than 7, uses the prev total in the case of the "cliff"
|
|
123
|
-
const indicatorComparatorScore = Math.max(totalScore, prevTotal);
|
|
218
|
+
const indicatorComparatorScore = Math.max(score0, prevTotal);
|
|
124
219
|
if (accum > indicatorComparatorScore * indicatorThreshold &&
|
|
125
|
-
indicatorComparatorScore >
|
|
220
|
+
indicatorComparatorScore > MINIMUM_INTERBASE_INDICATOR_READ_DEPTH) {
|
|
126
221
|
ctx.fillStyle = colorForBase[maxBase];
|
|
127
222
|
ctx.beginPath();
|
|
128
223
|
const l = leftPx + extraHorizontallyFlippedOffset;
|
|
129
|
-
ctx.moveTo(l -
|
|
130
|
-
ctx.lineTo(l +
|
|
131
|
-
ctx.lineTo(l,
|
|
224
|
+
ctx.moveTo(l - INTERBASE_INDICATOR_WIDTH / 2, 0);
|
|
225
|
+
ctx.lineTo(l + INTERBASE_INDICATOR_WIDTH / 2, 0);
|
|
226
|
+
ctx.lineTo(l, INTERBASE_INDICATOR_HEIGHT);
|
|
132
227
|
ctx.fill();
|
|
133
228
|
}
|
|
134
229
|
}
|
|
135
|
-
prevTotal =
|
|
230
|
+
prevTotal = score0;
|
|
136
231
|
}
|
|
137
232
|
if (drawArcs) {
|
|
138
|
-
for (const f of
|
|
139
|
-
|
|
233
|
+
for (const f of feats) {
|
|
234
|
+
if (f.get('type') !== 'skip') {
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
const s = f.get('start');
|
|
238
|
+
const e = f.get('end');
|
|
239
|
+
const [left, right] = (0, util_1.bpSpanPx)(s, e, region, bpPerPx);
|
|
140
240
|
ctx.beginPath();
|
|
141
|
-
const
|
|
142
|
-
const xs = f.get('xs');
|
|
241
|
+
const effectiveStrand = f.get('effectiveStrand');
|
|
143
242
|
const pos = 'rgba(255,200,200,0.7)';
|
|
144
243
|
const neg = 'rgba(200,200,255,0.7)';
|
|
145
244
|
const neutral = 'rgba(200,200,200,0.7)';
|
|
146
|
-
if (
|
|
147
|
-
ctx.strokeStyle = pos;
|
|
148
|
-
}
|
|
149
|
-
else if (xs === '-') {
|
|
150
|
-
ctx.strokeStyle = neg;
|
|
151
|
-
}
|
|
152
|
-
else if (str === 1) {
|
|
245
|
+
if (effectiveStrand === 1) {
|
|
153
246
|
ctx.strokeStyle = pos;
|
|
154
247
|
}
|
|
155
|
-
else if (
|
|
248
|
+
else if (effectiveStrand === -1) {
|
|
156
249
|
ctx.strokeStyle = neg;
|
|
157
250
|
}
|
|
158
251
|
else {
|
|
@@ -167,12 +260,12 @@ class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
|
|
|
167
260
|
if (displayCrossHatches) {
|
|
168
261
|
ctx.lineWidth = 1;
|
|
169
262
|
ctx.strokeStyle = 'rgba(140,140,140,0.8)';
|
|
170
|
-
ticks.values
|
|
263
|
+
for (const tick of ticks.values) {
|
|
171
264
|
ctx.beginPath();
|
|
172
265
|
ctx.moveTo(0, Math.round(toY(tick)));
|
|
173
266
|
ctx.lineTo(width, Math.round(toY(tick)));
|
|
174
267
|
ctx.stroke();
|
|
175
|
-
}
|
|
268
|
+
}
|
|
176
269
|
}
|
|
177
270
|
return undefined;
|
|
178
271
|
}
|
|
@@ -1,39 +1,24 @@
|
|
|
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
12
|
drawArcs: {
|
|
22
13
|
type: string;
|
|
23
14
|
description: string;
|
|
24
15
|
defaultValue: boolean;
|
|
25
16
|
};
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
17
|
drawInterbaseCounts: {
|
|
30
18
|
type: string;
|
|
31
19
|
description: string;
|
|
32
20
|
defaultValue: boolean;
|
|
33
21
|
};
|
|
34
|
-
/**
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
22
|
drawIndicators: {
|
|
38
23
|
type: string;
|
|
39
24
|
description: string;
|
|
@@ -1,46 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config SNPCoverageRenderer
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const SNPCoverageRenderer = (0, configuration_1.ConfigurationSchema)('SNPCoverageRenderer', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
clipColor: {
|
|
13
7
|
type: 'color',
|
|
14
8
|
description: 'the color of the clipping marker',
|
|
15
9
|
defaultValue: 'red',
|
|
16
10
|
},
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
11
|
indicatorThreshold: {
|
|
21
12
|
type: 'number',
|
|
22
13
|
description: 'the proportion of reads containing a insertion/clip indicator',
|
|
23
14
|
defaultValue: 0.4,
|
|
24
15
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
16
|
drawArcs: {
|
|
29
17
|
type: 'boolean',
|
|
30
18
|
description: 'Draw sashimi-style arcs for intron features',
|
|
31
19
|
defaultValue: true,
|
|
32
20
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
21
|
drawInterbaseCounts: {
|
|
37
22
|
type: 'boolean',
|
|
38
23
|
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',
|
|
39
24
|
defaultValue: true,
|
|
40
25
|
},
|
|
41
|
-
/**
|
|
42
|
-
* #slot
|
|
43
|
-
*/
|
|
44
26
|
drawIndicators: {
|
|
45
27
|
type: 'boolean',
|
|
46
28
|
description: 'draw a triangular indicator where an event has been detected',
|
|
@@ -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;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = register;
|
|
7
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
8
|
-
const SNPCoverageRenderer_1 = __importDefault(require("./SNPCoverageRenderer"));
|
|
9
7
|
const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
|
|
8
|
+
const SNPCoverageRenderer_1 = __importDefault(require("./SNPCoverageRenderer"));
|
|
9
|
+
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
10
|
function register(pluginManager) {
|
|
11
11
|
pluginManager.addRendererType(() => new SNPCoverageRenderer_1.default({
|
|
12
12
|
name: 'SNPCoverageRenderer',
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class AlignmentsPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
|
6
6
|
}
|
|
7
|
-
export {
|
|
7
|
+
export { SharedLinearPileupDisplayMixin, linearPileupDisplayConfigSchemaFactory, linearPileupDisplayStateModelFactory, } from './LinearPileupDisplay';
|
|
8
8
|
export { type LinearPileupDisplayModel } from './LinearPileupDisplay/model';
|
|
9
9
|
export * as MismatchParser from './MismatchParser';
|
package/dist/index.js
CHANGED
|
@@ -26,23 +26,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.MismatchParser = exports.
|
|
29
|
+
exports.MismatchParser = exports.linearPileupDisplayStateModelFactory = exports.linearPileupDisplayConfigSchemaFactory = exports.SharedLinearPileupDisplayMixin = void 0;
|
|
30
30
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
31
|
-
const
|
|
31
|
+
const AlignmentsFeatureDetail_1 = __importDefault(require("./AlignmentsFeatureDetail"));
|
|
32
|
+
const AlignmentsTrack_1 = __importDefault(require("./AlignmentsTrack"));
|
|
32
33
|
const BamAdapter_1 = __importDefault(require("./BamAdapter"));
|
|
34
|
+
const CramAdapter_1 = __importDefault(require("./CramAdapter"));
|
|
35
|
+
const GuessAlignmentsTypes_1 = __importDefault(require("./GuessAlignmentsTypes"));
|
|
33
36
|
const HtsgetBamAdapter_1 = __importDefault(require("./HtsgetBamAdapter"));
|
|
34
|
-
const SNPCoverageAdapter_1 = __importDefault(require("./SNPCoverageAdapter"));
|
|
35
|
-
const SNPCoverageRenderer_1 = __importDefault(require("./SNPCoverageRenderer"));
|
|
36
|
-
const PileupRenderer_1 = __importDefault(require("./PileupRenderer"));
|
|
37
37
|
const LinearAlignmentsDisplay_1 = __importDefault(require("./LinearAlignmentsDisplay"));
|
|
38
|
-
const
|
|
38
|
+
const LinearPileupDisplay_1 = __importDefault(require("./LinearPileupDisplay"));
|
|
39
39
|
const LinearReadArcsDisplay_1 = __importDefault(require("./LinearReadArcsDisplay"));
|
|
40
40
|
const LinearReadCloudDisplay_1 = __importDefault(require("./LinearReadCloudDisplay"));
|
|
41
|
-
const
|
|
42
|
-
const AlignmentsFeatureDetail_1 = __importDefault(require("./AlignmentsFeatureDetail"));
|
|
41
|
+
const LinearSNPCoverageDisplay_1 = __importDefault(require("./LinearSNPCoverageDisplay"));
|
|
43
42
|
const PileupRPC_1 = __importDefault(require("./PileupRPC"));
|
|
44
|
-
const
|
|
45
|
-
const
|
|
43
|
+
const PileupRenderer_1 = __importDefault(require("./PileupRenderer"));
|
|
44
|
+
const SNPCoverageAdapter_1 = __importDefault(require("./SNPCoverageAdapter"));
|
|
45
|
+
const SNPCoverageRenderer_1 = __importDefault(require("./SNPCoverageRenderer"));
|
|
46
46
|
class AlignmentsPlugin extends Plugin_1.default {
|
|
47
47
|
constructor() {
|
|
48
48
|
super(...arguments);
|
|
@@ -73,7 +73,7 @@ class AlignmentsPlugin extends Plugin_1.default {
|
|
|
73
73
|
}
|
|
74
74
|
exports.default = AlignmentsPlugin;
|
|
75
75
|
var LinearPileupDisplay_2 = require("./LinearPileupDisplay");
|
|
76
|
-
Object.defineProperty(exports, "linearPileupDisplayStateModelFactory", { enumerable: true, get: function () { return LinearPileupDisplay_2.linearPileupDisplayStateModelFactory; } });
|
|
77
|
-
Object.defineProperty(exports, "linearPileupDisplayConfigSchemaFactory", { enumerable: true, get: function () { return LinearPileupDisplay_2.linearPileupDisplayConfigSchemaFactory; } });
|
|
78
76
|
Object.defineProperty(exports, "SharedLinearPileupDisplayMixin", { enumerable: true, get: function () { return LinearPileupDisplay_2.SharedLinearPileupDisplayMixin; } });
|
|
77
|
+
Object.defineProperty(exports, "linearPileupDisplayConfigSchemaFactory", { enumerable: true, get: function () { return LinearPileupDisplay_2.linearPileupDisplayConfigSchemaFactory; } });
|
|
78
|
+
Object.defineProperty(exports, "linearPileupDisplayStateModelFactory", { enumerable: true, get: function () { return LinearPileupDisplay_2.linearPileupDisplayStateModelFactory; } });
|
|
79
79
|
exports.MismatchParser = __importStar(require("./MismatchParser"));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
1
|
+
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
2
|
export declare function doAfterAttach<T extends IAnyStateTreeNode>(self: T, cb: (self: T, ctx: CanvasRenderingContext2D, width: number, height: number) => void): void;
|
|
@@ -27,14 +27,12 @@ function doAfterAttach(self, cb) {
|
|
|
27
27
|
self.setLastDrawnOffsetPx(view.offsetPx);
|
|
28
28
|
self.setLastDrawnBpPerPx(view.bpPerPx);
|
|
29
29
|
}
|
|
30
|
-
// first autorun instantly draws if bpPerPx changes
|
|
31
30
|
(0, util_2.createAutorun)(self, async () => {
|
|
32
31
|
const view = (0, util_1.getContainingView)(self);
|
|
33
32
|
if (view.bpPerPx !== self.lastDrawnBpPerPx) {
|
|
34
33
|
draw(view);
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
// second autorun draws after delay 1000 e.g. if offsetPx changes
|
|
38
36
|
(0, util_2.createAutorun)(self, async () => {
|
|
39
37
|
const view = (0, util_1.getContainingView)(self);
|
|
40
38
|
draw(view);
|
package/dist/shared/color.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChainStats } from './fetchChains';
|
|
1
|
+
import type { ChainStats } from './fetchChains';
|
|
3
2
|
export declare const fillColor: {
|
|
4
3
|
color_fwd_strand_not_proper: string;
|
|
5
4
|
color_rev_strand_not_proper: string;
|
|
@@ -57,12 +56,3 @@ export declare function getPairedOrientationColorOrDefault(f: {
|
|
|
57
56
|
export declare function getPairedOrientationColor(f: {
|
|
58
57
|
pair_orientation?: string;
|
|
59
58
|
}): readonly [string, string];
|
|
60
|
-
export interface ExtraColorBy {
|
|
61
|
-
custom?: Record<string, string>;
|
|
62
|
-
}
|
|
63
|
-
export declare const ColorByModel: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
64
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
65
|
-
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
66
|
-
extra: import("mobx-state-tree").IType<any, any, any>;
|
|
67
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
68
|
-
export type IColorByModel = Instance<typeof ColorByModel>;
|
package/dist/shared/color.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.strokeColor = exports.fillColor = void 0;
|
|
4
4
|
exports.getPairedInsertSizeColor = getPairedInsertSizeColor;
|
|
5
5
|
exports.getPairedInsertSizeAndOrientationColor = getPairedInsertSizeAndOrientationColor;
|
|
6
6
|
exports.getPairedOrientationColorOrDefault = getPairedOrientationColorOrDefault;
|
|
7
7
|
exports.getPairedOrientationColor = getPairedOrientationColor;
|
|
8
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
8
|
const util_1 = require("../util");
|
|
10
9
|
exports.fillColor = {
|
|
11
10
|
color_fwd_strand_not_proper: '#ECC8C8',
|
|
@@ -26,12 +25,6 @@ exports.fillColor = {
|
|
|
26
25
|
color_shortinsert: 'pink',
|
|
27
26
|
color_unknown: 'grey',
|
|
28
27
|
};
|
|
29
|
-
// manually calculated by running
|
|
30
|
-
// const color = require('color')
|
|
31
|
-
// Object.fromEntries(Object.entries(fillColor).map(([key,val])=>{
|
|
32
|
-
// return [key, color(val).darken('0.3').hex()]
|
|
33
|
-
// }))
|
|
34
|
-
// this avoids (expensive) use of Color module at runtime
|
|
35
28
|
exports.strokeColor = {
|
|
36
29
|
color_fwd_strand_not_proper: '#CA6767',
|
|
37
30
|
color_rev_strand_not_proper: '#7272AA',
|
|
@@ -68,8 +61,6 @@ function getPairedInsertSizeColor(f1, f2, stats) {
|
|
|
68
61
|
}
|
|
69
62
|
}
|
|
70
63
|
const defaultColor = [exports.fillColor.color_unknown, exports.fillColor.color_unknown];
|
|
71
|
-
// return color scheme with both insert size and orientation coloring,
|
|
72
|
-
// prioritzing orientation coloring
|
|
73
64
|
function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
|
|
74
65
|
return (getPairedOrientationColorOrDefault(f1) ||
|
|
75
66
|
getPairedInsertSizeColor(f1, f2, stats) ||
|
|
@@ -86,8 +77,3 @@ function getPairedOrientationColorOrDefault(f) {
|
|
|
86
77
|
function getPairedOrientationColor(f) {
|
|
87
78
|
return getPairedOrientationColorOrDefault(f) || defaultColor;
|
|
88
79
|
}
|
|
89
|
-
exports.ColorByModel = mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.model({
|
|
90
|
-
type: mobx_state_tree_1.types.string,
|
|
91
|
-
tag: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
92
|
-
extra: mobx_state_tree_1.types.frozen(),
|
|
93
|
-
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { LinearReadArcsDisplayModel } from '../../LinearReadArcsDisplay/model';
|
|
3
|
+
import type { LinearReadCloudDisplayModel } from '../../LinearReadCloudDisplay/model';
|
|
4
4
|
declare const BaseDisplayComponent: ({ model, children, }: {
|
|
5
5
|
model: LinearReadArcsDisplayModel | LinearReadCloudDisplayModel;
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const ui_1 = require("@jbrowse/core/ui");
|
|
8
|
-
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
|
-
const mobx_react_1 = require("mobx-react");
|
|
11
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
12
10
|
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
12
|
+
const mui_1 = require("tss-react/mui");
|
|
13
13
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
14
14
|
loading: {
|
|
15
15
|
backgroundColor: theme.palette.background.default,
|
|
@@ -23,21 +23,22 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
23
23
|
textAlign: 'center',
|
|
24
24
|
},
|
|
25
25
|
}));
|
|
26
|
-
const
|
|
27
|
-
const { error
|
|
28
|
-
return
|
|
26
|
+
const BlockError = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
27
|
+
const { error } = model;
|
|
28
|
+
return (react_1.default.createElement(plugin_linear_genome_view_1.BlockMsg, { message: `${error}`, severity: "error", action: react_1.default.createElement(material_1.Tooltip, { title: "Reload" },
|
|
29
29
|
react_1.default.createElement(material_1.Button, { "data-testid": "reload_button", onClick: () => {
|
|
30
30
|
model.reload();
|
|
31
|
-
} }, "Reload")) }))
|
|
31
|
+
} }, "Reload")) }));
|
|
32
|
+
});
|
|
33
|
+
const BaseDisplayComponent = (0, mobx_react_1.observer)(function ({ model, children, }) {
|
|
34
|
+
const { error, regionTooLarge } = model;
|
|
35
|
+
return error ? (react_1.default.createElement(BlockError, { model: model })) : regionTooLarge ? (model.regionCannotBeRendered()) : (react_1.default.createElement(DataDisplay, { model: model }, children));
|
|
32
36
|
});
|
|
33
37
|
const DataDisplay = (0, mobx_react_1.observer)(function ({ model, children, }) {
|
|
34
38
|
const { drawn, loading } = model;
|
|
35
39
|
const view = (0, util_1.getContainingView)(model);
|
|
36
40
|
const left = (model.lastDrawnOffsetPx || 0) - view.offsetPx;
|
|
37
|
-
return (
|
|
38
|
-
// this data-testid is located here because changing props on the canvas
|
|
39
|
-
// itself is very sensitive to triggering ref invalidation
|
|
40
|
-
react_1.default.createElement("div", { "data-testid": `drawn-${drawn}` },
|
|
41
|
+
return (react_1.default.createElement("div", { "data-testid": `drawn-${drawn}` },
|
|
41
42
|
react_1.default.createElement("div", { style: { position: 'absolute', left } }, children),
|
|
42
43
|
left !== 0 || loading ? react_1.default.createElement(LoadingBar, { model: model }) : null));
|
|
43
44
|
});
|