@jbrowse/plugin-alignments 3.7.0 → 4.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/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +9 -9
- package/esm/AlignmentsFeatureDetail/BreakpointSplitViewChoiceDialog.d.ts +1 -0
- package/esm/AlignmentsFeatureDetail/BreakpointSplitViewChoiceDialog.js +1 -0
- package/esm/AlignmentsFeatureDetail/Flags.js +1 -1
- package/esm/AlignmentsFeatureDetail/Formatter.js +2 -2
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +7 -18
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +19 -37
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +1 -1
- package/esm/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/PairLink.js +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +2 -2
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +5 -4
- package/esm/AlignmentsFeatureDetail/configSchema.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +18 -17
- package/esm/AlignmentsFeatureDetail/index.js +3 -3
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +6 -7
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.js +3 -6
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +37 -37
- package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/util.js +1 -2
- package/esm/AlignmentsTrack/configSchemaF.d.ts +16 -11
- package/esm/AlignmentsTrack/index.js +14 -2
- package/esm/BamAdapter/BamAdapter.d.ts +15 -26
- package/esm/BamAdapter/BamAdapter.js +84 -124
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +17 -10
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +162 -45
- package/esm/BamAdapter/configSchema.d.ts +5 -10
- package/esm/BamAdapter/configSchema.js +2 -7
- package/esm/BamAdapter/forEachMismatchNumeric.d.ts +2 -0
- package/esm/BamAdapter/forEachMismatchNumeric.js +207 -0
- package/esm/BamAdapter/index.js +2 -2
- package/esm/CramAdapter/CramAdapter.d.ts +10 -32
- package/esm/CramAdapter/CramAdapter.js +92 -143
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +6 -2
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +140 -19
- package/esm/CramAdapter/CramTestAdapters.d.ts +3 -2
- package/esm/CramAdapter/CramTestAdapters.js +8 -3
- package/esm/CramAdapter/configSchema.d.ts +2 -7
- package/esm/CramAdapter/configSchema.js +1 -6
- package/esm/CramAdapter/const.d.ts +12 -0
- package/esm/CramAdapter/const.js +12 -0
- package/esm/CramAdapter/index.js +2 -2
- package/esm/CramAdapter/readFeaturesToNumericCIGAR.d.ts +4 -0
- package/esm/CramAdapter/readFeaturesToNumericCIGAR.js +112 -0
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +5 -9
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.js +13 -15
- package/esm/HtsgetBamAdapter/configSchema.d.ts +2 -7
- package/esm/HtsgetBamAdapter/configSchema.js +0 -5
- package/esm/HtsgetBamAdapter/index.js +2 -2
- package/esm/LinearAlignmentsDisplay/alignmentsModel.d.ts +9 -9
- package/esm/LinearAlignmentsDisplay/alignmentsModel.js +2 -2
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +13 -7
- package/esm/LinearAlignmentsDisplay/configSchema.d.ts +3 -3
- package/esm/LinearAlignmentsDisplay/index.js +4 -4
- package/esm/LinearAlignmentsDisplay/model.d.ts +173 -48
- package/esm/LinearAlignmentsDisplay/model.js +60 -62
- package/esm/LinearAlignmentsDisplay/renderSvg.d.ts +14 -0
- package/esm/LinearAlignmentsDisplay/renderSvg.js +12 -0
- package/esm/LinearAlignmentsDisplay/util.js +2 -2
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +1247 -137
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +120 -89
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +1 -1
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +1 -1
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +4 -4
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +1 -1
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +2 -3
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +1 -1
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +1 -1
- package/esm/LinearPileupDisplay/configSchema.d.ts +8 -8
- package/esm/LinearPileupDisplay/configSchema.js +2 -2
- package/esm/LinearPileupDisplay/doAfterAttach.d.ts +4 -3
- package/esm/LinearPileupDisplay/doAfterAttach.js +17 -26
- package/esm/LinearPileupDisplay/index.d.ts +3 -3
- package/esm/LinearPileupDisplay/index.js +6 -5
- package/esm/LinearPileupDisplay/model.d.ts +1289 -169
- package/esm/LinearPileupDisplay/model.js +71 -154
- package/esm/LinearPileupDisplay/sharedDoAfterAttach.d.ts +10 -0
- package/esm/LinearPileupDisplay/sharedDoAfterAttach.js +28 -0
- package/esm/LinearReadArcsDisplay/afterAttachRPC.d.ts +2 -0
- package/esm/LinearReadArcsDisplay/afterAttachRPC.js +21 -0
- package/{dist/shared → esm/LinearReadArcsDisplay}/chainToSimpleFeature.d.ts +1 -1
- package/esm/{shared → LinearReadArcsDisplay}/chainToSimpleFeature.js +2 -2
- package/esm/LinearReadArcsDisplay/components/{ReactComponent.d.ts → LinearReadArcsReactComponent.d.ts} +1 -1
- package/esm/LinearReadArcsDisplay/components/{ReactComponent.js → LinearReadArcsReactComponent.js} +4 -4
- package/esm/LinearReadArcsDisplay/configSchema.d.ts +5 -5
- package/esm/LinearReadArcsDisplay/configSchema.js +1 -1
- package/esm/LinearReadArcsDisplay/index.js +4 -3
- package/esm/LinearReadArcsDisplay/model.d.ts +221 -58
- package/esm/LinearReadArcsDisplay/model.js +73 -56
- package/esm/LinearReadArcsDisplay/renderSvg.d.ts +3 -0
- package/esm/LinearReadArcsDisplay/renderSvg.js +39 -0
- package/esm/LinearReadCloudDisplay/afterAttachRPC.d.ts +2 -0
- package/esm/LinearReadCloudDisplay/afterAttachRPC.js +56 -0
- package/esm/LinearReadCloudDisplay/components/CloudYScaleBar.d.ts +8 -0
- package/esm/LinearReadCloudDisplay/components/CloudYScaleBar.js +27 -0
- package/{dist/LinearReadCloudDisplay/components/ReactComponent.d.ts → esm/LinearReadCloudDisplay/components/LinearReadCloudReactComponent.d.ts} +1 -1
- package/esm/LinearReadCloudDisplay/components/LinearReadCloudReactComponent.js +252 -0
- package/esm/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +1 -1
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +21 -5
- package/esm/LinearReadCloudDisplay/configSchema.js +17 -1
- package/esm/LinearReadCloudDisplay/index.js +8 -4
- package/esm/LinearReadCloudDisplay/model.d.ts +320 -58
- package/esm/LinearReadCloudDisplay/model.js +205 -62
- package/esm/LinearReadCloudDisplay/renderSvg.d.ts +3 -0
- package/esm/LinearReadCloudDisplay/renderSvg.js +47 -0
- package/esm/LinearSNPCoverageDisplay/components/ArcTooltipContents.d.ts +4 -0
- package/esm/LinearSNPCoverageDisplay/components/ArcTooltipContents.js +6 -0
- package/esm/LinearSNPCoverageDisplay/components/FilterArcsByScoreDialog.d.ts +7 -0
- package/esm/LinearSNPCoverageDisplay/components/FilterArcsByScoreDialog.js +16 -0
- package/esm/LinearSNPCoverageDisplay/components/SNPCoverageDisplayComponent.d.ts +5 -0
- package/esm/LinearSNPCoverageDisplay/components/SNPCoverageDisplayComponent.js +9 -0
- package/esm/LinearSNPCoverageDisplay/components/SashimiArcs.d.ts +10 -0
- package/esm/LinearSNPCoverageDisplay/components/SashimiArcs.js +169 -0
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +9 -3
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +31 -7
- package/esm/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +13 -9
- package/esm/LinearSNPCoverageDisplay/components/TooltipContents.js +86 -59
- package/esm/LinearSNPCoverageDisplay/components/arcUtils.d.ts +18 -0
- package/esm/LinearSNPCoverageDisplay/components/arcUtils.js +42 -0
- package/esm/LinearSNPCoverageDisplay/components/renderSvg.d.ts +10 -0
- package/esm/LinearSNPCoverageDisplay/components/renderSvg.js +32 -0
- package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +7 -7
- package/esm/LinearSNPCoverageDisplay/configSchema.js +2 -2
- package/esm/LinearSNPCoverageDisplay/index.js +5 -4
- package/esm/LinearSNPCoverageDisplay/model.d.ts +302 -59
- package/esm/LinearSNPCoverageDisplay/model.js +154 -69
- package/esm/MismatchParser/cigarToMismatches.d.ts +1 -1
- package/esm/MismatchParser/cigarToMismatches.js +6 -9
- package/esm/MismatchParser/cigarToMismatches2.d.ts +2 -0
- package/{dist/MismatchParser/cigarToMismatches.js → esm/MismatchParser/cigarToMismatches2.js} +23 -28
- package/esm/MismatchParser/getNextRefPos.d.ts +1 -1
- package/esm/MismatchParser/getNextRefPos.js +13 -11
- package/esm/MismatchParser/index.d.ts +6 -3
- package/esm/MismatchParser/index.js +49 -11
- package/esm/MismatchParser/mdToMismatches.d.ts +1 -1
- package/esm/MismatchParser/mdToMismatches.js +87 -53
- package/esm/MismatchParser/mdToMismatches2.d.ts +2 -0
- package/esm/MismatchParser/mdToMismatches2.js +96 -0
- package/esm/ModificationParser/detectSimplexModifications.d.ts +1 -1
- package/esm/ModificationParser/getMethBins.d.ts +1 -1
- package/esm/ModificationParser/getMethBins.js +5 -5
- package/esm/ModificationParser/getModPositions.js +1 -1
- package/esm/ModificationParser/getModProbabilities.js +1 -1
- package/esm/ModificationParser/getModTypes.js +1 -1
- package/esm/PileupRPC/base.js +1 -2
- package/esm/PileupRPC/index.js +1 -2
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +3 -6
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +2 -2
- package/esm/PileupRPC/methods/GetVisibleModifications.js +5 -8
- package/esm/PileupRPC/rpcMethods.d.ts +2 -3
- package/esm/PileupRPC/rpcMethods.js +2 -3
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +9 -9
- package/esm/PileupRenderer/PileupLayoutSession.js +18 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +5 -47
- package/esm/PileupRenderer/PileupRenderer.js +25 -67
- package/esm/PileupRenderer/colorBy.js +2 -2
- package/esm/PileupRenderer/components/PileupRendering.d.ts +5 -5
- package/esm/PileupRenderer/components/PileupRendering.js +150 -116
- package/esm/PileupRenderer/components/PileupTooltip.d.ts +10 -0
- package/esm/PileupRenderer/components/PileupTooltip.js +12 -0
- package/esm/PileupRenderer/components/util.d.ts +7 -0
- package/esm/PileupRenderer/components/util.js +17 -0
- package/esm/PileupRenderer/configSchema.d.ts +14 -4
- package/esm/PileupRenderer/configSchema.js +11 -1
- package/esm/PileupRenderer/index.js +4 -4
- package/esm/PileupRenderer/layoutFeature.d.ts +4 -12
- package/esm/PileupRenderer/layoutFeature.js +13 -18
- package/esm/PileupRenderer/layoutFeatures.d.ts +2 -2
- package/esm/PileupRenderer/layoutFeatures.js +21 -16
- package/esm/PileupRenderer/makeImageData.d.ts +20 -17
- package/esm/PileupRenderer/makeImageData.js +66 -12
- package/esm/PileupRenderer/renderers/cigarUtil.d.ts +18 -0
- package/esm/PileupRenderer/renderers/cigarUtil.js +23 -0
- package/esm/PileupRenderer/renderers/getAlignmentShapeColor.js +2 -2
- package/esm/PileupRenderer/renderers/renderAlignment.d.ts +2 -2
- package/esm/PileupRenderer/renderers/renderAlignment.js +28 -32
- package/esm/PileupRenderer/renderers/renderAlignmentShape.d.ts +6 -3
- package/esm/PileupRenderer/renderers/renderAlignmentShape.js +113 -65
- package/esm/PileupRenderer/renderers/renderMethylation.d.ts +8 -6
- package/esm/PileupRenderer/renderers/renderMethylation.js +67 -27
- package/esm/PileupRenderer/renderers/renderMismatchesCallback.d.ts +32 -0
- package/esm/PileupRenderer/renderers/renderMismatchesCallback.js +304 -0
- package/esm/PileupRenderer/renderers/renderModifications.d.ts +11 -6
- package/esm/PileupRenderer/renderers/renderModifications.js +59 -41
- package/esm/PileupRenderer/renderers/renderPerBaseLettering.d.ts +2 -2
- package/esm/PileupRenderer/renderers/renderPerBaseLettering.js +38 -18
- package/esm/PileupRenderer/renderers/renderPerBaseQuality.d.ts +3 -4
- package/esm/PileupRenderer/renderers/renderPerBaseQuality.js +32 -16
- package/esm/PileupRenderer/renderers/renderSoftClipping.d.ts +2 -2
- package/esm/PileupRenderer/renderers/renderSoftClipping.js +45 -26
- package/esm/PileupRenderer/sortUtil.d.ts +2 -2
- package/esm/PileupRenderer/sortUtil.js +34 -22
- package/esm/PileupRenderer/types.d.ts +32 -7
- package/esm/PileupRenderer/types.js +71 -1
- package/esm/PileupRenderer/util.d.ts +1 -22
- package/esm/PileupRenderer/util.js +12 -38
- package/esm/RenderLinearReadArcsDisplayRPC/RenderLinearReadArcsDisplay.d.ts +34 -0
- package/esm/RenderLinearReadArcsDisplayRPC/RenderLinearReadArcsDisplay.js +49 -0
- package/esm/RenderLinearReadArcsDisplayRPC/drawFeatsRPC.d.ts +24 -0
- package/esm/RenderLinearReadArcsDisplayRPC/drawFeatsRPC.js +156 -0
- package/esm/RenderLinearReadArcsDisplayRPC/executeRenderLinearReadArcsDisplay.d.ts +6 -0
- package/esm/RenderLinearReadArcsDisplayRPC/executeRenderLinearReadArcsDisplay.js +105 -0
- package/{dist/GuessAlignmentsTypes → esm/RenderLinearReadArcsDisplayRPC}/index.d.ts +1 -1
- package/esm/RenderLinearReadArcsDisplayRPC/index.js +4 -0
- package/esm/RenderLinearReadCloudDisplayRPC/RenderLinearReadCloudDisplay.d.ts +43 -0
- package/esm/RenderLinearReadCloudDisplayRPC/RenderLinearReadCloudDisplay.js +49 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawChainsUtil.d.ts +82 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawChainsUtil.js +164 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsCloud.d.ts +17 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsCloud.js +53 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsCommon.d.ts +72 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsCommon.js +277 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsStack.d.ts +5 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawFeatsStack.js +16 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawLongReadChains.d.ts +27 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawLongReadChains.js +101 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawPairChains.d.ts +27 -0
- package/esm/RenderLinearReadCloudDisplayRPC/drawPairChains.js +95 -0
- package/esm/RenderLinearReadCloudDisplayRPC/executeRenderLinearReadCloudDisplay.d.ts +6 -0
- package/esm/RenderLinearReadCloudDisplayRPC/executeRenderLinearReadCloudDisplay.js +142 -0
- package/esm/RenderLinearReadCloudDisplayRPC/index.d.ts +2 -0
- package/esm/RenderLinearReadCloudDisplayRPC/index.js +4 -0
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +18 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +205 -37
- package/esm/SNPCoverageAdapter/configSchema.d.ts +6 -2
- package/esm/SNPCoverageAdapter/configSchema.js +4 -0
- package/esm/SNPCoverageAdapter/generateCoverageBinsPrefixSum.d.ts +26 -0
- package/esm/SNPCoverageAdapter/generateCoverageBinsPrefixSum.js +438 -0
- package/esm/SNPCoverageAdapter/index.js +2 -2
- package/esm/SNPCoverageAdapter/processDepthPrefixSum.d.ts +10 -0
- package/esm/SNPCoverageAdapter/processDepthPrefixSum.js +55 -0
- package/esm/SNPCoverageAdapter/processModifications.d.ts +1 -1
- package/esm/SNPCoverageAdapter/processModifications.js +26 -38
- package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +2 -3
- package/esm/SNPCoverageAdapter/processReferenceCpGs.js +46 -44
- package/esm/SNPCoverageAdapter/util.d.ts +9 -5
- package/esm/SNPCoverageAdapter/util.js +48 -28
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +14 -4
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +29 -8
- package/esm/SNPCoverageRenderer/WiggleRendering.d.ts +14 -0
- package/esm/SNPCoverageRenderer/WiggleRendering.js +33 -0
- package/esm/SNPCoverageRenderer/calculateModificationCounts.d.ts +20 -0
- package/esm/SNPCoverageRenderer/calculateModificationCounts.js +22 -0
- package/esm/SNPCoverageRenderer/components/SNPCoverageRendering.d.ts +18 -0
- package/esm/SNPCoverageRenderer/components/SNPCoverageRendering.js +114 -0
- package/esm/SNPCoverageRenderer/configSchema.d.ts +2 -2
- package/esm/SNPCoverageRenderer/index.js +4 -4
- package/esm/SNPCoverageRenderer/makeImage.d.ts +2 -2
- package/esm/SNPCoverageRenderer/makeImage.js +372 -200
- package/esm/SNPCoverageRenderer/types.d.ts +54 -5
- package/esm/SNPCoverageRenderer/types.js +103 -1
- package/esm/SVGErrorBox.d.ts +5 -0
- package/esm/SVGErrorBox.js +4 -0
- package/esm/index.d.ts +3 -3
- package/esm/index.js +23 -21
- package/esm/saveTrackFormats/sam.d.ts +6 -0
- package/esm/saveTrackFormats/sam.js +42 -0
- package/esm/shared/LinearReadArcsDisplaySettingsMixin.d.ts +14 -0
- package/esm/shared/LinearReadArcsDisplaySettingsMixin.js +33 -0
- package/esm/shared/LinearReadDisplayBaseMixin.d.ts +20 -11
- package/esm/shared/LinearReadDisplayBaseMixin.js +5 -21
- package/esm/shared/LinearReadDisplayWithLayoutMixin.d.ts +8 -3
- package/esm/shared/LinearReadDisplayWithLayoutMixin.js +9 -1
- package/esm/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +6 -6
- package/esm/shared/LinearReadDisplayWithPairFiltersMixin.js +1 -1
- package/esm/shared/SharedModificationsMixin.d.ts +12 -0
- package/esm/shared/SharedModificationsMixin.js +40 -0
- package/esm/shared/afterAttach.d.ts +1 -1
- package/esm/shared/afterAttach.js +1 -5
- package/esm/shared/arcUtils.d.ts +20 -0
- package/esm/shared/arcUtils.js +73 -0
- package/esm/shared/canvasUtils.d.ts +1 -1
- package/esm/shared/canvasUtils.js +9 -14
- package/esm/shared/color.d.ts +21 -15
- package/esm/shared/color.js +41 -21
- package/esm/shared/components/FilterByTagDialog.d.ts +1 -1
- package/esm/shared/components/FilterByTagDialog.js +4 -5
- package/esm/shared/components/SetFeatureHeightDialog.js +1 -1
- package/esm/shared/components/SetMaxHeightDialog.js +3 -3
- package/esm/{LinearPileupDisplay → shared}/components/SetModificationThresholdDialog.d.ts +1 -1
- package/esm/{LinearPileupDisplay → shared}/components/SetModificationThresholdDialog.js +1 -1
- package/esm/shared/createRPCRenderingSetup.d.ts +37 -0
- package/esm/shared/createRPCRenderingSetup.js +82 -0
- package/esm/shared/decodeSeq.d.ts +2 -0
- package/esm/shared/decodeSeq.js +26 -0
- package/esm/shared/flatbushType.d.ts +16 -3
- package/esm/shared/forEachMismatchTypes.d.ts +18 -0
- package/esm/shared/forEachMismatchTypes.js +24 -0
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/esm/shared/getMaximumModificationAtEachPosition.js +6 -7
- package/esm/shared/getUniqueModifications.d.ts +5 -3
- package/esm/shared/getUniqueModifications.js +3 -2
- package/esm/shared/getUniqueTags.d.ts +2 -2
- package/esm/shared/getUniqueTags.js +2 -1
- package/{dist/PileupRPC/util.d.ts → esm/shared/insertSizeStats.d.ts} +2 -2
- package/esm/shared/insertSizeStats.js +23 -0
- package/esm/shared/legendUtils.d.ts +8 -0
- package/esm/shared/legendUtils.js +123 -0
- package/esm/shared/menuItems.d.ts +101 -5
- package/esm/shared/menuItems.js +224 -21
- package/esm/shared/modificationData.js +1 -2
- package/esm/shared/primaryStrand.d.ts +3 -3
- package/esm/shared/primaryStrand.js +10 -8
- package/esm/shared/samFlags.d.ts +12 -0
- package/esm/shared/samFlags.js +12 -0
- package/esm/shared/setupModificationsAutorun.d.ts +11 -0
- package/esm/shared/setupModificationsAutorun.js +27 -0
- package/esm/shared/types.d.ts +68 -7
- package/esm/shared/util.d.ts +52 -1
- package/esm/shared/util.js +118 -1
- package/esm/svgExportUtil.d.ts +9 -0
- package/esm/svgExportUtil.js +6 -0
- package/esm/util.d.ts +3 -3
- package/esm/util.js +8 -11
- package/package.json +33 -38
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +0 -5
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +0 -63
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -5
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -5
- package/dist/AlignmentsFeatureDetail/Flags.d.ts +0 -3
- package/dist/AlignmentsFeatureDetail/Flags.js +0 -41
- package/dist/AlignmentsFeatureDetail/Formatter.d.ts +0 -3
- package/dist/AlignmentsFeatureDetail/Formatter.js +0 -23
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +0 -6
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +0 -84
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +0 -6
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +0 -107
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +0 -6
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +0 -22
- package/dist/AlignmentsFeatureDetail/PairLink.d.ts +0 -5
- package/dist/AlignmentsFeatureDetail/PairLink.js +0 -12
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +0 -7
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +0 -23
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +0 -5
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +0 -29
- package/dist/AlignmentsFeatureDetail/configSchema.d.ts +0 -1
- package/dist/AlignmentsFeatureDetail/configSchema.js +0 -5
- package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +0 -23
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +0 -36
- package/dist/AlignmentsFeatureDetail/index.d.ts +0 -2
- package/dist/AlignmentsFeatureDetail/index.js +0 -52
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +0 -22
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.js +0 -49
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +0 -103
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +0 -10
- package/dist/AlignmentsFeatureDetail/tagInfo.d.ts +0 -63
- package/dist/AlignmentsFeatureDetail/tagInfo.js +0 -66
- package/dist/AlignmentsFeatureDetail/util.d.ts +0 -6
- package/dist/AlignmentsFeatureDetail/util.js +0 -25
- package/dist/AlignmentsTrack/configSchemaF.d.ts +0 -79
- package/dist/AlignmentsTrack/configSchemaF.js +0 -11
- package/dist/AlignmentsTrack/index.d.ts +0 -2
- package/dist/AlignmentsTrack/index.js +0 -23
- package/dist/BamAdapter/BamAdapter.d.ts +0 -44
- package/dist/BamAdapter/BamAdapter.js +0 -181
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +0 -17
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -69
- package/dist/BamAdapter/configSchema.d.ts +0 -34
- package/dist/BamAdapter/configSchema.js +0 -58
- package/dist/BamAdapter/index.d.ts +0 -2
- package/dist/BamAdapter/index.js +0 -51
- package/dist/CramAdapter/CramAdapter.d.ts +0 -53
- package/dist/CramAdapter/CramAdapter.js +0 -228
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +0 -33
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -125
- package/dist/CramAdapter/CramTestAdapters.d.ts +0 -28
- package/dist/CramAdapter/CramTestAdapters.js +0 -85
- package/dist/CramAdapter/configSchema.d.ts +0 -27
- package/dist/CramAdapter/configSchema.js +0 -48
- package/dist/CramAdapter/index.d.ts +0 -2
- package/dist/CramAdapter/index.js +0 -51
- package/dist/CramAdapter/readFeaturesToCIGAR.d.ts +0 -9
- package/dist/CramAdapter/readFeaturesToCIGAR.js +0 -212
- package/dist/CramAdapter/readFeaturesToMismatches.d.ts +0 -5
- package/dist/CramAdapter/readFeaturesToMismatches.js +0 -106
- package/dist/GuessAlignmentsTypes/index.js +0 -41
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +0 -12
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js +0 -27
- package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -18
- package/dist/HtsgetBamAdapter/configSchema.js +0 -22
- package/dist/HtsgetBamAdapter/index.d.ts +0 -2
- package/dist/HtsgetBamAdapter/index.js +0 -54
- package/dist/LinearAlignmentsDisplay/alignmentsModel.d.ts +0 -12
- package/dist/LinearAlignmentsDisplay/alignmentsModel.js +0 -18
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +0 -5
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +0 -35
- package/dist/LinearAlignmentsDisplay/configSchema.d.ts +0 -36
- package/dist/LinearAlignmentsDisplay/configSchema.js +0 -19
- package/dist/LinearAlignmentsDisplay/index.d.ts +0 -2
- package/dist/LinearAlignmentsDisplay/index.js +0 -24
- package/dist/LinearAlignmentsDisplay/model.d.ts +0 -126
- package/dist/LinearAlignmentsDisplay/model.js +0 -222
- package/dist/LinearAlignmentsDisplay/util.d.ts +0 -2
- package/dist/LinearAlignmentsDisplay/util.js +0 -9
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +0 -409
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +0 -524
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +0 -11
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +0 -20
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +0 -10
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +0 -145
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +0 -7
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +0 -11
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +0 -10
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +0 -26
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +0 -28
- package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.d.ts +0 -10
- package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.js +0 -39
- package/dist/LinearPileupDisplay/components/SortByTagDialog.d.ts +0 -7
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +0 -26
- package/dist/LinearPileupDisplay/configSchema.d.ts +0 -61
- package/dist/LinearPileupDisplay/configSchema.js +0 -40
- package/dist/LinearPileupDisplay/doAfterAttach.d.ts +0 -21
- package/dist/LinearPileupDisplay/doAfterAttach.js +0 -72
- package/dist/LinearPileupDisplay/index.d.ts +0 -5
- package/dist/LinearPileupDisplay/index.js +0 -32
- package/dist/LinearPileupDisplay/model.d.ts +0 -515
- package/dist/LinearPileupDisplay/model.js +0 -399
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +0 -5
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +0 -23
- package/dist/LinearReadArcsDisplay/configSchema.d.ts +0 -61
- package/dist/LinearReadArcsDisplay/configSchema.js +0 -36
- package/dist/LinearReadArcsDisplay/drawFeats.d.ts +0 -2
- package/dist/LinearReadArcsDisplay/drawFeats.js +0 -152
- package/dist/LinearReadArcsDisplay/index.d.ts +0 -2
- package/dist/LinearReadArcsDisplay/index.js +0 -58
- package/dist/LinearReadArcsDisplay/model.d.ts +0 -189
- package/dist/LinearReadArcsDisplay/model.js +0 -199
- package/dist/LinearReadArcsDisplay/util.d.ts +0 -2
- package/dist/LinearReadArcsDisplay/util.js +0 -11
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +0 -105
- package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.d.ts +0 -10
- package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +0 -26
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +0 -55
- package/dist/LinearReadCloudDisplay/configSchema.js +0 -30
- package/dist/LinearReadCloudDisplay/drawFeatsAbstract.d.ts +0 -2
- package/dist/LinearReadCloudDisplay/drawFeatsAbstract.js +0 -13
- package/dist/LinearReadCloudDisplay/drawFeatsCloud.d.ts +0 -2
- package/dist/LinearReadCloudDisplay/drawFeatsCloud.js +0 -24
- package/dist/LinearReadCloudDisplay/drawFeatsCommon.d.ts +0 -23
- package/dist/LinearReadCloudDisplay/drawFeatsCommon.js +0 -198
- package/dist/LinearReadCloudDisplay/drawFeatsStack.d.ts +0 -2
- package/dist/LinearReadCloudDisplay/drawFeatsStack.js +0 -36
- package/dist/LinearReadCloudDisplay/index.d.ts +0 -2
- package/dist/LinearReadCloudDisplay/index.js +0 -58
- package/dist/LinearReadCloudDisplay/model.d.ts +0 -195
- package/dist/LinearReadCloudDisplay/model.js +0 -213
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +0 -12
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +0 -15
- package/dist/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +0 -14
- package/dist/LinearSNPCoverageDisplay/components/TooltipContents.js +0 -177
- package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +0 -80
- package/dist/LinearSNPCoverageDisplay/configSchema.js +0 -62
- package/dist/LinearSNPCoverageDisplay/index.d.ts +0 -2
- package/dist/LinearSNPCoverageDisplay/index.js +0 -24
- package/dist/LinearSNPCoverageDisplay/model.d.ts +0 -111
- package/dist/LinearSNPCoverageDisplay/model.js +0 -273
- package/dist/MismatchParser/cigarToMismatches.d.ts +0 -2
- package/dist/MismatchParser/getNextRefPos.d.ts +0 -4
- package/dist/MismatchParser/getNextRefPos.js +0 -38
- package/dist/MismatchParser/index.d.ts +0 -27
- package/dist/MismatchParser/index.js +0 -145
- package/dist/MismatchParser/mdToMismatches.d.ts +0 -2
- package/dist/MismatchParser/mdToMismatches.js +0 -74
- package/dist/ModificationParser/consts.d.ts +0 -1
- package/dist/ModificationParser/consts.js +0 -4
- package/dist/ModificationParser/detectSimplexModifications.d.ts +0 -4
- package/dist/ModificationParser/detectSimplexModifications.js +0 -20
- package/dist/ModificationParser/getMethBins.d.ts +0 -7
- package/dist/ModificationParser/getMethBins.js +0 -49
- package/dist/ModificationParser/getModPositions.d.ts +0 -6
- package/dist/ModificationParser/getModPositions.js +0 -61
- package/dist/ModificationParser/getModProbabilities.d.ts +0 -2
- package/dist/ModificationParser/getModProbabilities.js +0 -34
- package/dist/ModificationParser/getModTypes.d.ts +0 -5
- package/dist/ModificationParser/getModTypes.js +0 -35
- package/dist/PileupRPC/base.d.ts +0 -8
- package/dist/PileupRPC/base.js +0 -20
- package/dist/PileupRPC/index.d.ts +0 -2
- package/dist/PileupRPC/index.js +0 -9
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +0 -13
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +0 -29
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +0 -37
- package/dist/PileupRPC/methods/GetReducedFeatures.js +0 -54
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +0 -17
- package/dist/PileupRPC/methods/GetVisibleModifications.js +0 -49
- package/dist/PileupRPC/rpcMethods.d.ts +0 -3
- package/dist/PileupRPC/rpcMethods.js +0 -12
- package/dist/PileupRPC/util.js +0 -18
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +0 -23
- package/dist/PileupRenderer/PileupLayoutSession.js +0 -35
- package/dist/PileupRenderer/PileupRenderer.d.ts +0 -53
- package/dist/PileupRenderer/PileupRenderer.js +0 -126
- package/dist/PileupRenderer/colorBy.d.ts +0 -7
- package/dist/PileupRenderer/colorBy.js +0 -61
- package/dist/PileupRenderer/components/PileupRendering.d.ts +0 -19
- package/dist/PileupRenderer/components/PileupRendering.js +0 -152
- package/dist/PileupRenderer/configSchema.d.ts +0 -62
- package/dist/PileupRenderer/configSchema.js +0 -71
- package/dist/PileupRenderer/index.d.ts +0 -2
- package/dist/PileupRenderer/index.js +0 -20
- package/dist/PileupRenderer/layoutFeature.d.ts +0 -18
- package/dist/PileupRenderer/layoutFeature.js +0 -42
- package/dist/PileupRenderer/layoutFeatures.d.ts +0 -5
- package/dist/PileupRenderer/layoutFeatures.js +0 -29
- package/dist/PileupRenderer/makeImageData.d.ts +0 -17
- package/dist/PileupRenderer/makeImageData.js +0 -97
- package/dist/PileupRenderer/renderers/getAlignmentShapeColor.d.ts +0 -10
- package/dist/PileupRenderer/renderers/getAlignmentShapeColor.js +0 -61
- package/dist/PileupRenderer/renderers/renderAlignment.d.ts +0 -16
- package/dist/PileupRenderer/renderers/renderAlignment.js +0 -90
- package/dist/PileupRenderer/renderers/renderAlignmentShape.d.ts +0 -7
- package/dist/PileupRenderer/renderers/renderAlignmentShape.js +0 -120
- package/dist/PileupRenderer/renderers/renderMethylation.d.ts +0 -12
- package/dist/PileupRenderer/renderers/renderMethylation.js +0 -60
- package/dist/PileupRenderer/renderers/renderMismatches.d.ts +0 -21
- package/dist/PileupRenderer/renderers/renderMismatches.js +0 -148
- package/dist/PileupRenderer/renderers/renderModifications.d.ts +0 -15
- package/dist/PileupRenderer/renderers/renderModifications.js +0 -84
- package/dist/PileupRenderer/renderers/renderPerBaseLettering.d.ts +0 -14
- package/dist/PileupRenderer/renderers/renderPerBaseLettering.js +0 -42
- package/dist/PileupRenderer/renderers/renderPerBaseQuality.d.ts +0 -10
- package/dist/PileupRenderer/renderers/renderPerBaseQuality.js +0 -35
- package/dist/PileupRenderer/renderers/renderSoftClipping.d.ts +0 -13
- package/dist/PileupRenderer/renderers/renderSoftClipping.js +0 -59
- package/dist/PileupRenderer/sortUtil.d.ts +0 -3
- package/dist/PileupRenderer/sortUtil.js +0 -80
- package/dist/PileupRenderer/types.d.ts +0 -33
- package/dist/PileupRenderer/types.js +0 -2
- package/dist/PileupRenderer/util.d.ts +0 -28
- package/dist/PileupRenderer/util.js +0 -49
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +0 -14
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +0 -89
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -7
- package/dist/SNPCoverageAdapter/configSchema.js +0 -11
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +0 -13
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +0 -87
- package/dist/SNPCoverageAdapter/index.d.ts +0 -2
- package/dist/SNPCoverageAdapter/index.js +0 -54
- package/dist/SNPCoverageAdapter/processDepth.d.ts +0 -8
- package/dist/SNPCoverageAdapter/processDepth.js +0 -38
- package/dist/SNPCoverageAdapter/processMismatches.d.ts +0 -9
- package/dist/SNPCoverageAdapter/processMismatches.js +0 -58
- package/dist/SNPCoverageAdapter/processModifications.d.ts +0 -10
- package/dist/SNPCoverageAdapter/processModifications.js +0 -60
- package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +0 -9
- package/dist/SNPCoverageAdapter/processReferenceCpGs.js +0 -63
- package/dist/SNPCoverageAdapter/util.d.ts +0 -10
- package/dist/SNPCoverageAdapter/util.js +0 -41
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +0 -5
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +0 -46
- package/dist/SNPCoverageRenderer/configSchema.d.ts +0 -33
- package/dist/SNPCoverageRenderer/configSchema.js +0 -37
- package/dist/SNPCoverageRenderer/index.d.ts +0 -2
- package/dist/SNPCoverageRenderer/index.js +0 -17
- package/dist/SNPCoverageRenderer/makeImage.d.ts +0 -2
- package/dist/SNPCoverageRenderer/makeImage.js +0 -270
- package/dist/SNPCoverageRenderer/types.d.ts +0 -21
- package/dist/SNPCoverageRenderer/types.js +0 -2
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -89
- package/dist/shared/LinearReadDisplayBaseMixin.d.ts +0 -24
- package/dist/shared/LinearReadDisplayBaseMixin.js +0 -50
- package/dist/shared/LinearReadDisplayWithLayoutMixin.d.ts +0 -11
- package/dist/shared/LinearReadDisplayWithLayoutMixin.js +0 -24
- package/dist/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +0 -11
- package/dist/shared/LinearReadDisplayWithPairFiltersMixin.js +0 -27
- package/dist/shared/afterAttach.d.ts +0 -2
- package/dist/shared/afterAttach.js +0 -41
- package/dist/shared/canvasUtils.d.ts +0 -2
- package/dist/shared/canvasUtils.js +0 -32
- package/dist/shared/chainToSimpleFeature.js +0 -43
- package/dist/shared/chevron.d.ts +0 -1
- package/dist/shared/chevron.js +0 -27
- package/dist/shared/color.d.ts +0 -95
- package/dist/shared/color.js +0 -158
- package/dist/shared/components/BaseDisplayComponent.d.ts +0 -16
- package/dist/shared/components/BaseDisplayComponent.js +0 -44
- package/dist/shared/components/FilterByTagDialog.d.ts +0 -9
- package/dist/shared/components/FilterByTagDialog.js +0 -88
- package/dist/shared/components/SetFeatureHeightDialog.d.ts +0 -10
- package/dist/shared/components/SetFeatureHeightDialog.js +0 -26
- package/dist/shared/components/SetMaxHeightDialog.d.ts +0 -8
- package/dist/shared/components/SetMaxHeightDialog.js +0 -28
- package/dist/shared/drawLongReadChains.d.ts +0 -24
- package/dist/shared/drawLongReadChains.js +0 -104
- package/dist/shared/drawPairChains.d.ts +0 -24
- package/dist/shared/drawPairChains.js +0 -94
- package/dist/shared/fetchChains.d.ts +0 -28
- package/dist/shared/fetchChains.js +0 -22
- package/dist/shared/flatbushType.d.ts +0 -12
- package/dist/shared/flatbushType.js +0 -2
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +0 -8
- package/dist/shared/getMaximumModificationAtEachPosition.js +0 -42
- package/dist/shared/getUniqueModifications.d.ts +0 -18
- package/dist/shared/getUniqueModifications.js +0 -22
- package/dist/shared/getUniqueTags.d.ts +0 -15
- package/dist/shared/getUniqueTags.js +0 -18
- package/dist/shared/menuItems.d.ts +0 -23
- package/dist/shared/menuItems.js +0 -89
- package/dist/shared/modificationData.d.ts +0 -6
- package/dist/shared/modificationData.js +0 -22
- package/dist/shared/primaryStrand.d.ts +0 -3
- package/dist/shared/primaryStrand.js +0 -24
- package/dist/shared/renderSvgUtil.d.ts +0 -6
- package/dist/shared/renderSvgUtil.js +0 -66
- package/dist/shared/types.d.ts +0 -96
- package/dist/shared/types.js +0 -2
- package/dist/shared/util.d.ts +0 -22
- package/dist/shared/util.js +0 -68
- package/dist/util.d.ts +0 -25
- package/dist/util.js +0 -114
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/CramAdapter/readFeaturesToCIGAR.d.ts +0 -9
- package/esm/CramAdapter/readFeaturesToCIGAR.js +0 -208
- package/esm/CramAdapter/readFeaturesToMismatches.d.ts +0 -5
- package/esm/CramAdapter/readFeaturesToMismatches.js +0 -103
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearReadArcsDisplay/drawFeats.d.ts +0 -2
- package/esm/LinearReadArcsDisplay/drawFeats.js +0 -149
- package/esm/LinearReadArcsDisplay/util.d.ts +0 -2
- package/esm/LinearReadArcsDisplay/util.js +0 -8
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +0 -5
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +0 -100
- package/esm/LinearReadCloudDisplay/drawFeatsAbstract.d.ts +0 -2
- package/esm/LinearReadCloudDisplay/drawFeatsAbstract.js +0 -10
- package/esm/LinearReadCloudDisplay/drawFeatsCloud.d.ts +0 -2
- package/esm/LinearReadCloudDisplay/drawFeatsCloud.js +0 -21
- package/esm/LinearReadCloudDisplay/drawFeatsCommon.d.ts +0 -23
- package/esm/LinearReadCloudDisplay/drawFeatsCommon.js +0 -187
- package/esm/LinearReadCloudDisplay/drawFeatsStack.d.ts +0 -2
- package/esm/LinearReadCloudDisplay/drawFeatsStack.js +0 -30
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +0 -37
- package/esm/PileupRPC/methods/GetReducedFeatures.js +0 -48
- package/esm/PileupRPC/util.d.ts +0 -8
- package/esm/PileupRPC/util.js +0 -14
- package/esm/PileupRenderer/renderers/renderMismatches.d.ts +0 -21
- package/esm/PileupRenderer/renderers/renderMismatches.js +0 -145
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +0 -13
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +0 -84
- package/esm/SNPCoverageAdapter/processDepth.d.ts +0 -8
- package/esm/SNPCoverageAdapter/processDepth.js +0 -35
- package/esm/SNPCoverageAdapter/processMismatches.d.ts +0 -9
- package/esm/SNPCoverageAdapter/processMismatches.js +0 -55
- package/esm/shared/chainToSimpleFeature.d.ts +0 -3
- package/esm/shared/components/BaseDisplayComponent.d.ts +0 -16
- package/esm/shared/components/BaseDisplayComponent.js +0 -42
- package/esm/shared/drawLongReadChains.d.ts +0 -24
- package/esm/shared/drawLongReadChains.js +0 -101
- package/esm/shared/drawPairChains.d.ts +0 -24
- package/esm/shared/drawPairChains.js +0 -91
- package/esm/shared/fetchChains.d.ts +0 -28
- package/esm/shared/fetchChains.js +0 -19
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { colord } from '@jbrowse/core/util/colord';
|
|
2
|
+
import { DELETION_TYPE, HARDCLIP_TYPE, INSERTION_TYPE, INTERBASE_MASK, MISMATCH_REV_MAP, MISMATCH_TYPE, SKIP_TYPE, SOFTCLIP_TYPE, } from "../../shared/forEachMismatchTypes.js";
|
|
3
|
+
import { measureTextSmallNumber } from "../util.js";
|
|
4
|
+
const alphaColorCache = new Map();
|
|
5
|
+
function applyQualAlpha(baseColor, qual) {
|
|
6
|
+
const key = `${baseColor},${qual}`;
|
|
7
|
+
const hit = alphaColorCache.get(key);
|
|
8
|
+
if (hit) {
|
|
9
|
+
return hit;
|
|
10
|
+
}
|
|
11
|
+
const result = qual >= 0
|
|
12
|
+
? colord(baseColor)
|
|
13
|
+
.alpha(Math.min(1, qual / 50))
|
|
14
|
+
.toHslString()
|
|
15
|
+
: baseColor;
|
|
16
|
+
alphaColorCache.set(key, result);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
export function renderMismatchesCallback({ ctx, feat, bpPerPx, regions, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorMap, colorContrastMap, hideSmallIndels, hideMismatches, hideLargeIndels, canvasWidth, drawSNPsMuted, checkRef, drawIndels = true, }) {
|
|
20
|
+
const items = [];
|
|
21
|
+
const coords = [];
|
|
22
|
+
const { heightPx, topPx, feature } = feat;
|
|
23
|
+
const bottomPx = topPx + heightPx;
|
|
24
|
+
const featStart = feature.get('start');
|
|
25
|
+
const region = checkRef
|
|
26
|
+
? (regions.find(r => {
|
|
27
|
+
const rn = feature.get('refName');
|
|
28
|
+
const end = feature.get('end');
|
|
29
|
+
return r.refName === rn && r.start <= featStart && end <= r.end;
|
|
30
|
+
}) ?? regions[0])
|
|
31
|
+
: regions[0];
|
|
32
|
+
const invBpPerPx = 1 / bpPerPx;
|
|
33
|
+
const pxPerBp = Math.min(invBpPerPx, 2);
|
|
34
|
+
const canRenderText = heightPx >= charHeight - 2;
|
|
35
|
+
const useAlpha = mismatchAlpha === true;
|
|
36
|
+
const regionStart = region.start;
|
|
37
|
+
const regionEnd = region.end;
|
|
38
|
+
const reversed = region.reversed;
|
|
39
|
+
const extraHorizontallyFlippedOffset = reversed ? invBpPerPx + 1 : -1;
|
|
40
|
+
const secondPassItems = [];
|
|
41
|
+
let mismatchDrawn = 0;
|
|
42
|
+
let mismatchSkipped = 0;
|
|
43
|
+
let deletionDrawn = 0;
|
|
44
|
+
let deletionSkipped = 0;
|
|
45
|
+
let lastMismatchX = Number.NEGATIVE_INFINITY;
|
|
46
|
+
const featureWithIterator = feature;
|
|
47
|
+
const mismatchHandler = (type, start, length, base, qualVal, _altbase, cliplen) => {
|
|
48
|
+
const mismatchStart = featStart + start;
|
|
49
|
+
const mismatchEnd = mismatchStart + length;
|
|
50
|
+
if ((1 << type) & INTERBASE_MASK) {
|
|
51
|
+
if (mismatchStart >= regionStart && mismatchStart < regionEnd) {
|
|
52
|
+
secondPassItems.push({
|
|
53
|
+
type,
|
|
54
|
+
start,
|
|
55
|
+
base,
|
|
56
|
+
cliplen: cliplen,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (mismatchEnd <= regionStart || mismatchStart >= regionEnd) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const leftPx = reversed
|
|
65
|
+
? (regionEnd - mismatchEnd) * invBpPerPx
|
|
66
|
+
: (mismatchStart - regionStart) * invBpPerPx;
|
|
67
|
+
const rightPx = reversed
|
|
68
|
+
? (regionEnd - mismatchStart) * invBpPerPx
|
|
69
|
+
: (mismatchEnd - regionStart) * invBpPerPx;
|
|
70
|
+
if (rightPx < 0 || leftPx > canvasWidth) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const widthPx = Math.max(minSubfeatureWidth, rightPx - leftPx);
|
|
74
|
+
if (type === MISMATCH_TYPE) {
|
|
75
|
+
if (!hideMismatches) {
|
|
76
|
+
if (rightPx - leftPx >= 0.2) {
|
|
77
|
+
items.push({
|
|
78
|
+
type: 'mismatch',
|
|
79
|
+
base,
|
|
80
|
+
start: mismatchStart,
|
|
81
|
+
});
|
|
82
|
+
coords.push(leftPx, topPx, rightPx, bottomPx);
|
|
83
|
+
}
|
|
84
|
+
if (!drawSNPsMuted) {
|
|
85
|
+
const baseColor = colorMap[base] || '#888';
|
|
86
|
+
const c = useAlpha && qualVal ? applyQualAlpha(baseColor, qualVal) : baseColor;
|
|
87
|
+
const l = Math.round(leftPx);
|
|
88
|
+
const w = widthPx;
|
|
89
|
+
if (l === lastMismatchX) {
|
|
90
|
+
mismatchSkipped++;
|
|
91
|
+
}
|
|
92
|
+
else if (l + w > 0 && l < canvasWidth) {
|
|
93
|
+
ctx.fillStyle = c;
|
|
94
|
+
ctx.fillRect(l, topPx, w, heightPx);
|
|
95
|
+
mismatchDrawn++;
|
|
96
|
+
lastMismatchX = l;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (widthPx >= charWidth && canRenderText) {
|
|
100
|
+
const contrastColor = drawSNPsMuted
|
|
101
|
+
? 'black'
|
|
102
|
+
: colorContrastMap[base] || 'black';
|
|
103
|
+
const textColor = useAlpha && qualVal
|
|
104
|
+
? applyQualAlpha(contrastColor, qualVal)
|
|
105
|
+
: contrastColor;
|
|
106
|
+
const x = leftPx + (widthPx - charWidth) / 2 + 1;
|
|
107
|
+
if (x > 0 && x < canvasWidth && textColor) {
|
|
108
|
+
ctx.fillStyle = textColor;
|
|
109
|
+
ctx.fillText(base, x, bottomPx);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else if (type === DELETION_TYPE && drawIndels) {
|
|
115
|
+
const shouldHide = (length < 10 && hideSmallIndels) || (length >= 10 && hideLargeIndels);
|
|
116
|
+
if (!shouldHide) {
|
|
117
|
+
const w = Math.abs(leftPx - rightPx);
|
|
118
|
+
if (w >= 0.3 && leftPx + w > 0 && leftPx < canvasWidth) {
|
|
119
|
+
ctx.fillStyle = colorMap.deletion;
|
|
120
|
+
ctx.fillRect(leftPx, topPx, w, heightPx);
|
|
121
|
+
deletionDrawn++;
|
|
122
|
+
items.push({
|
|
123
|
+
type: 'deletion',
|
|
124
|
+
length,
|
|
125
|
+
start: mismatchStart,
|
|
126
|
+
});
|
|
127
|
+
coords.push(leftPx, topPx, rightPx, bottomPx);
|
|
128
|
+
}
|
|
129
|
+
else if (w < 0.3) {
|
|
130
|
+
deletionSkipped++;
|
|
131
|
+
}
|
|
132
|
+
const txt = String(length);
|
|
133
|
+
const rwidth = measureTextSmallNumber(length, 10);
|
|
134
|
+
if (widthPx >= rwidth && canRenderText) {
|
|
135
|
+
const x = (leftPx + rightPx) / 2 - rwidth / 2;
|
|
136
|
+
if (x > 0 && x < canvasWidth) {
|
|
137
|
+
ctx.fillStyle = colorContrastMap.deletion;
|
|
138
|
+
ctx.fillText(txt, x, bottomPx);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else if (type === SKIP_TYPE) {
|
|
144
|
+
const w = Math.max(widthPx, 1.5);
|
|
145
|
+
if (leftPx + w > 0 && leftPx < canvasWidth) {
|
|
146
|
+
ctx.fillStyle = colorMap.skip;
|
|
147
|
+
ctx.fillRect(leftPx, topPx + heightPx / 2 - 1, w, 1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
if ('forEachMismatch' in feature) {
|
|
152
|
+
featureWithIterator.forEachMismatch(mismatchHandler);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
const mismatches = feature.get('mismatches');
|
|
156
|
+
if (mismatches) {
|
|
157
|
+
for (let i = 0, l = mismatches.length; i < l; i++) {
|
|
158
|
+
const m = mismatches[i];
|
|
159
|
+
let base;
|
|
160
|
+
let cliplen;
|
|
161
|
+
if (m.type === 'mismatch') {
|
|
162
|
+
base = m.base;
|
|
163
|
+
}
|
|
164
|
+
else if (m.type === 'insertion') {
|
|
165
|
+
base = m.insertedBases ?? '';
|
|
166
|
+
cliplen = m.insertlen;
|
|
167
|
+
}
|
|
168
|
+
else if (m.type === 'softclip' || m.type === 'hardclip') {
|
|
169
|
+
base = '';
|
|
170
|
+
cliplen = m.cliplen;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
base = '';
|
|
174
|
+
}
|
|
175
|
+
mismatchHandler(MISMATCH_REV_MAP[m.type], m.start, m.length, base, m.type === 'mismatch' ? m.qual : undefined, m.type === 'mismatch' ? m.altbase?.charCodeAt(0) : undefined, cliplen);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
for (const item of secondPassItems) {
|
|
180
|
+
const { type, start, base, cliplen } = item;
|
|
181
|
+
const mstart = featStart + start;
|
|
182
|
+
const leftPx = reversed
|
|
183
|
+
? (regionEnd - mstart - 1) * invBpPerPx
|
|
184
|
+
: (mstart - regionStart) * invBpPerPx;
|
|
185
|
+
const pos = leftPx + extraHorizontallyFlippedOffset;
|
|
186
|
+
if (pos < -20 || pos > canvasWidth + 20) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (type === INSERTION_TYPE && drawIndels) {
|
|
190
|
+
const len = cliplen;
|
|
191
|
+
const insW = Math.max(0, Math.min(1.2, invBpPerPx));
|
|
192
|
+
if (len < 10) {
|
|
193
|
+
if (!hideSmallIndels) {
|
|
194
|
+
const c = colorMap.insertion;
|
|
195
|
+
if (pos + insW > 0 && pos < canvasWidth) {
|
|
196
|
+
ctx.fillStyle = c;
|
|
197
|
+
ctx.fillRect(pos, topPx, insW, heightPx);
|
|
198
|
+
}
|
|
199
|
+
if (invBpPerPx >= charWidth && canRenderText) {
|
|
200
|
+
const l = Math.round(pos - insW);
|
|
201
|
+
const insW3 = insW * 3;
|
|
202
|
+
if (l + insW3 > 0 && l < canvasWidth) {
|
|
203
|
+
ctx.fillRect(l, topPx, insW3, 1);
|
|
204
|
+
ctx.fillRect(l, bottomPx - 1, insW3, 1);
|
|
205
|
+
}
|
|
206
|
+
const x = pos + 3;
|
|
207
|
+
if (x > 0 && x < canvasWidth) {
|
|
208
|
+
ctx.fillText(`(${len})`, x, bottomPx);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (bpPerPx < 3) {
|
|
212
|
+
items.push({
|
|
213
|
+
type: 'insertion',
|
|
214
|
+
length: len,
|
|
215
|
+
...(base ? { sequence: base } : {}),
|
|
216
|
+
start: mstart,
|
|
217
|
+
});
|
|
218
|
+
coords.push(leftPx - 2, topPx, leftPx + insW + 2, bottomPx);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else if (!hideLargeIndels) {
|
|
223
|
+
items.push({
|
|
224
|
+
type: 'insertion',
|
|
225
|
+
length: len,
|
|
226
|
+
...(base ? { sequence: base } : {}),
|
|
227
|
+
start: mstart,
|
|
228
|
+
});
|
|
229
|
+
const txt = `${len}`;
|
|
230
|
+
if (bpPerPx > largeInsertionIndicatorScale) {
|
|
231
|
+
coords.push(leftPx - 1, topPx, leftPx + 1, bottomPx);
|
|
232
|
+
const l = leftPx - 1;
|
|
233
|
+
const w = 2;
|
|
234
|
+
if (l + w > 0 && l < canvasWidth) {
|
|
235
|
+
ctx.fillStyle = colorMap.insertion;
|
|
236
|
+
ctx.fillRect(l, topPx, w, heightPx);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else if (heightPx > charHeight) {
|
|
240
|
+
const rwidth = measureTextSmallNumber(len);
|
|
241
|
+
const padding = 5;
|
|
242
|
+
coords.push(leftPx - rwidth / 2 - padding, topPx, leftPx + rwidth / 2 + padding, bottomPx);
|
|
243
|
+
const l = leftPx - rwidth / 2 - padding;
|
|
244
|
+
const w = rwidth + 2 * padding;
|
|
245
|
+
if (l + w > 0 && l < canvasWidth) {
|
|
246
|
+
ctx.fillStyle = colorMap.insertion;
|
|
247
|
+
ctx.fillRect(l, topPx, w, heightPx);
|
|
248
|
+
}
|
|
249
|
+
const x = leftPx - rwidth / 2;
|
|
250
|
+
if (x > 0 && x < canvasWidth) {
|
|
251
|
+
ctx.fillStyle = colorContrastMap.insertion;
|
|
252
|
+
ctx.fillText(txt, x, bottomPx);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
const padding = 2;
|
|
257
|
+
coords.push(leftPx - padding, topPx, leftPx + padding, bottomPx);
|
|
258
|
+
const l = leftPx - padding;
|
|
259
|
+
const w = 2 * padding;
|
|
260
|
+
if (l + w > 0 && l < canvasWidth) {
|
|
261
|
+
ctx.fillStyle = colorMap.insertion;
|
|
262
|
+
ctx.fillRect(l, topPx, w, heightPx);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else if ((type === SOFTCLIP_TYPE || type === HARDCLIP_TYPE) &&
|
|
268
|
+
!hideLargeIndels) {
|
|
269
|
+
const typeName = type === SOFTCLIP_TYPE ? 'softclip' : 'hardclip';
|
|
270
|
+
const c = colorMap[typeName];
|
|
271
|
+
const clipW = Math.max(minSubfeatureWidth, pxPerBp);
|
|
272
|
+
if (pos + clipW > 0 && pos < canvasWidth) {
|
|
273
|
+
ctx.fillStyle = c;
|
|
274
|
+
ctx.fillRect(pos, topPx, clipW, heightPx);
|
|
275
|
+
}
|
|
276
|
+
items.push({ type: typeName, length: cliplen, start: mstart });
|
|
277
|
+
coords.push(pos - clipW, topPx, pos + clipW * 2, bottomPx);
|
|
278
|
+
if (invBpPerPx >= charWidth && canRenderText) {
|
|
279
|
+
const l = pos - clipW;
|
|
280
|
+
const clipW3 = clipW * 3;
|
|
281
|
+
if (l + clipW3 > 0 && l < canvasWidth) {
|
|
282
|
+
ctx.fillStyle = c;
|
|
283
|
+
ctx.fillRect(l, topPx, clipW3, 1);
|
|
284
|
+
ctx.fillRect(l, bottomPx - 1, clipW3, 1);
|
|
285
|
+
}
|
|
286
|
+
const x = pos + 3;
|
|
287
|
+
if (x > 0 && x < canvasWidth) {
|
|
288
|
+
ctx.fillStyle = c;
|
|
289
|
+
ctx.fillText(`(${base})`, x, bottomPx);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return {
|
|
295
|
+
coords,
|
|
296
|
+
items,
|
|
297
|
+
stats: {
|
|
298
|
+
mismatchDrawn,
|
|
299
|
+
mismatchSkipped,
|
|
300
|
+
deletionDrawn,
|
|
301
|
+
deletionSkipped,
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ColorBy, ModificationTypeWithColor } from '../../shared/types.ts';
|
|
2
|
+
import type { FlatbushItem } from '../types.ts';
|
|
3
|
+
import type { LayoutFeature } from '../util.ts';
|
|
3
4
|
import type { Region } from '@jbrowse/core/util';
|
|
4
|
-
export
|
|
5
|
+
export interface RenderModificationsArgs {
|
|
6
|
+
colorBy?: ColorBy;
|
|
7
|
+
visibleModifications?: Record<string, ModificationTypeWithColor>;
|
|
8
|
+
regionSequence?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, cigarOps, }: {
|
|
5
11
|
ctx: CanvasRenderingContext2D;
|
|
6
12
|
feat: LayoutFeature;
|
|
7
13
|
region: Region;
|
|
8
14
|
bpPerPx: number;
|
|
9
|
-
renderArgs:
|
|
10
|
-
|
|
11
|
-
cigarOps: string[];
|
|
15
|
+
renderArgs: RenderModificationsArgs;
|
|
16
|
+
cigarOps: ArrayLike<number>;
|
|
12
17
|
}): {
|
|
13
18
|
coords: number[];
|
|
14
19
|
items: FlatbushItem[];
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getNextRefPos } from
|
|
3
|
-
import { getModPositions } from
|
|
4
|
-
import { getModProbabilities } from
|
|
5
|
-
import { getMaxProbModAtEachPosition } from
|
|
6
|
-
import { getModificationName } from
|
|
7
|
-
import { alphaColor } from
|
|
8
|
-
import { getTagAlt } from
|
|
9
|
-
|
|
10
|
-
export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs,
|
|
11
|
-
var _a, _b, _c, _d, _e;
|
|
1
|
+
import { colord } from '@jbrowse/core/util/colord';
|
|
2
|
+
import { getNextRefPos } from "../../MismatchParser/index.js";
|
|
3
|
+
import { getModPositions } from "../../ModificationParser/getModPositions.js";
|
|
4
|
+
import { getModProbabilities } from "../../ModificationParser/getModProbabilities.js";
|
|
5
|
+
import { getMaxProbModAtEachPosition } from "../../shared/getMaximumModificationAtEachPosition.js";
|
|
6
|
+
import { getModificationName } from "../../shared/modificationData.js";
|
|
7
|
+
import { alphaColor, buildMismatchMap } from "../../shared/util.js";
|
|
8
|
+
import { getTagAlt } from "../../util.js";
|
|
9
|
+
const BLUE_COLORD = colord('blue');
|
|
10
|
+
export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, cigarOps, }) {
|
|
12
11
|
const items = [];
|
|
13
12
|
const coords = [];
|
|
14
13
|
const { feature, topPx, heightPx } = feat;
|
|
@@ -18,10 +17,12 @@ export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, ca
|
|
|
18
17
|
return { coords, items };
|
|
19
18
|
}
|
|
20
19
|
const start = feature.get('start');
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
20
|
+
const mismatchMap = buildMismatchMap(feature, start);
|
|
21
|
+
const isolatedModification = colorBy?.modifications?.isolatedModification;
|
|
22
|
+
const twoColor = colorBy?.modifications?.twoColor;
|
|
23
|
+
const modificationThreshold = colorBy?.modifications?.threshold ?? 10;
|
|
24
24
|
const thresholdFraction = modificationThreshold / 100;
|
|
25
|
+
const bottomPx = topPx + heightPx;
|
|
25
26
|
const fstrand = feature.get('strand');
|
|
26
27
|
const mm = getTagAlt(feature, 'MM', 'Mm') || '';
|
|
27
28
|
const modifications = getModPositions(mm, seq, fstrand);
|
|
@@ -30,7 +31,7 @@ export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, ca
|
|
|
30
31
|
let probIndex = 0;
|
|
31
32
|
for (const { type, base, strand, positions } of modifications) {
|
|
32
33
|
for (const { ref, idx } of getNextRefPos(cigarOps, positions)) {
|
|
33
|
-
const prob =
|
|
34
|
+
const prob = probabilities?.[probIndex + (fstrand === -1 ? positions.length - 1 - idx : idx)] || 0;
|
|
34
35
|
if (!modsByPosition.has(ref)) {
|
|
35
36
|
modsByPosition.set(ref, []);
|
|
36
37
|
}
|
|
@@ -38,43 +39,60 @@ export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, ca
|
|
|
38
39
|
}
|
|
39
40
|
probIndex += positions.length;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
const regionStart = region.start;
|
|
43
|
+
const regionEnd = region.end;
|
|
44
|
+
const reversed = region.reversed;
|
|
45
|
+
const invBpPerPx = 1 / bpPerPx;
|
|
46
|
+
getMaxProbModAtEachPosition(feature, cigarOps)?.forEach(({ allProbs, prob, type }, pos) => {
|
|
42
47
|
const r = start + pos;
|
|
43
|
-
|
|
44
|
-
const mod = visibleModifications[type];
|
|
45
|
-
if (!mod) {
|
|
46
|
-
console.warn(`${type} not known yet`);
|
|
48
|
+
if (r < regionStart || r >= regionEnd) {
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
const mod = visibleModifications[type];
|
|
52
|
+
if (!mod || (isolatedModification && mod.type !== isolatedModification)) {
|
|
50
53
|
return;
|
|
51
54
|
}
|
|
52
55
|
if (prob < thresholdFraction) {
|
|
53
56
|
return;
|
|
54
57
|
}
|
|
58
|
+
const leftPx = reversed
|
|
59
|
+
? (regionEnd - r - 1) * invBpPerPx
|
|
60
|
+
: (r - regionStart) * invBpPerPx;
|
|
61
|
+
const rightPx = reversed
|
|
62
|
+
? (regionEnd - r) * invBpPerPx
|
|
63
|
+
: (r + 1 - regionStart) * invBpPerPx;
|
|
64
|
+
const widthPx = rightPx - leftPx + 0.5;
|
|
55
65
|
const col = mod.color || 'black';
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
66
|
+
let sumProbs = 0;
|
|
67
|
+
let maxProb = 0;
|
|
68
|
+
for (let i = 0, l = allProbs.length; i < l; i++) {
|
|
69
|
+
const p = allProbs[i];
|
|
70
|
+
sumProbs += p;
|
|
71
|
+
if (p > maxProb) {
|
|
72
|
+
maxProb = p;
|
|
73
|
+
}
|
|
61
74
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
const s = 1 - sumProbs;
|
|
76
|
+
ctx.fillStyle =
|
|
77
|
+
twoColor && s > maxProb
|
|
78
|
+
? BLUE_COLORD.alpha(s).toHslString()
|
|
79
|
+
: alphaColor(col, prob);
|
|
80
|
+
ctx.fillRect(leftPx, topPx, widthPx, heightPx);
|
|
81
|
+
const modsAtPos = modsByPosition.get(pos);
|
|
82
|
+
if (rightPx - leftPx >= 0.2 && modsAtPos) {
|
|
83
|
+
const mismatchBase = mismatchMap.get(r);
|
|
84
|
+
items.push({
|
|
85
|
+
type: 'modification',
|
|
86
|
+
info: modsAtPos
|
|
87
|
+
.map(m => `${m.base}${m.strand}${m.type} ${getModificationName(m.type)} (${(m.prob * 100).toFixed(1)}%)`)
|
|
88
|
+
.join('\n'),
|
|
89
|
+
modType: type,
|
|
90
|
+
probability: prob,
|
|
91
|
+
start: r,
|
|
92
|
+
mismatch: mismatchBase,
|
|
93
|
+
});
|
|
94
|
+
coords.push(leftPx, topPx, rightPx, bottomPx);
|
|
66
95
|
}
|
|
67
|
-
const modsAtPos = modsByPosition.get(pos) || [];
|
|
68
|
-
const strandInfo = modsAtPos
|
|
69
|
-
.map(m => `${m.base}${m.strand}${m.type} ${getModificationName(m.type)} (${(m.prob * 100).toFixed(1)}%)`)
|
|
70
|
-
.join('<br/>');
|
|
71
|
-
items.push({
|
|
72
|
-
type: 'modification',
|
|
73
|
-
seq: strandInfo || mod.base,
|
|
74
|
-
modType: type,
|
|
75
|
-
probability: prob,
|
|
76
|
-
});
|
|
77
|
-
coords.push(leftPx, topPx, rightPx, topPx + heightPx);
|
|
78
96
|
pos++;
|
|
79
97
|
});
|
|
80
98
|
return { coords, items };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LayoutFeature } from '../util';
|
|
1
|
+
import type { LayoutFeature } from '../util.ts';
|
|
2
2
|
import type { Region } from '@jbrowse/core/util';
|
|
3
3
|
export declare function renderPerBaseLettering({ ctx, feat, region, bpPerPx, colorMap, colorContrastMap, charWidth, charHeight, canvasWidth, cigarOps, }: {
|
|
4
4
|
ctx: CanvasRenderingContext2D;
|
|
@@ -10,5 +10,5 @@ export declare function renderPerBaseLettering({ ctx, feat, region, bpPerPx, col
|
|
|
10
10
|
charWidth: number;
|
|
11
11
|
charHeight: number;
|
|
12
12
|
canvasWidth: number;
|
|
13
|
-
cigarOps:
|
|
13
|
+
cigarOps: ArrayLike<number>;
|
|
14
14
|
}): void;
|
|
@@ -1,35 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fillRect } from '../util';
|
|
1
|
+
import { CIGAR_D, CIGAR_EQ, CIGAR_I, CIGAR_M, CIGAR_N, CIGAR_S, CIGAR_X, } from "./cigarUtil.js";
|
|
3
2
|
export function renderPerBaseLettering({ ctx, feat, region, bpPerPx, colorMap, colorContrastMap, charWidth, charHeight, canvasWidth, cigarOps, }) {
|
|
4
3
|
const heightLim = charHeight - 2;
|
|
5
4
|
const { feature, topPx, heightPx } = feat;
|
|
6
5
|
const seq = feature.get('seq');
|
|
7
|
-
const
|
|
6
|
+
const invBpPerPx = 1 / bpPerPx;
|
|
7
|
+
const w = invBpPerPx;
|
|
8
8
|
const start = feature.get('start');
|
|
9
9
|
let soffset = 0;
|
|
10
10
|
let roffset = 0;
|
|
11
11
|
if (!seq) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const regionStart = region.start;
|
|
15
|
+
const regionEnd = region.end;
|
|
16
|
+
const reversed = region.reversed;
|
|
17
|
+
for (let i = 0, l = cigarOps.length; i < l; i++) {
|
|
18
|
+
const packed = cigarOps[i];
|
|
19
|
+
const len = packed >> 4;
|
|
20
|
+
const op = packed & 0xf;
|
|
21
|
+
if (op === CIGAR_S || op === CIGAR_I) {
|
|
18
22
|
soffset += len;
|
|
19
23
|
}
|
|
20
|
-
else if (op ===
|
|
24
|
+
else if (op === CIGAR_D || op === CIGAR_N) {
|
|
21
25
|
roffset += len;
|
|
22
26
|
}
|
|
23
|
-
else if (op ===
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
else if (op === CIGAR_M || op === CIGAR_X || op === CIGAR_EQ) {
|
|
28
|
+
const opStart = start + roffset;
|
|
29
|
+
const opEnd = opStart + len;
|
|
30
|
+
if (opStart >= regionEnd) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
if (opEnd > regionStart) {
|
|
34
|
+
const visStart = Math.max(0, regionStart - opStart);
|
|
35
|
+
const visEnd = Math.min(len, regionEnd - opStart);
|
|
36
|
+
for (let m = visStart; m < visEnd; m++) {
|
|
37
|
+
const letter = seq[soffset + m];
|
|
38
|
+
const r = opStart + m;
|
|
39
|
+
const leftPx = reversed
|
|
40
|
+
? (regionEnd - r - 1) * invBpPerPx
|
|
41
|
+
: (r - regionStart) * invBpPerPx;
|
|
42
|
+
ctx.fillStyle = colorMap[letter];
|
|
43
|
+
ctx.fillRect(leftPx, topPx, w + 0.5, heightPx);
|
|
44
|
+
if (w >= charWidth && heightPx >= heightLim) {
|
|
45
|
+
const x = leftPx + (w - charWidth) / 2 + 1;
|
|
46
|
+
const y = topPx + heightPx;
|
|
47
|
+
const color = colorContrastMap[letter];
|
|
48
|
+
if (x >= 0 && x <= canvasWidth && color) {
|
|
49
|
+
ctx.fillStyle = color;
|
|
50
|
+
ctx.fillText(letter, x, y);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
33
53
|
}
|
|
34
54
|
}
|
|
35
55
|
soffset += len;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { LayoutFeature } from '../util';
|
|
1
|
+
import type { LayoutFeature } from '../util.ts';
|
|
2
2
|
import type { Region } from '@jbrowse/core/util';
|
|
3
|
-
export declare function renderPerBaseQuality({ ctx, feat, region, bpPerPx,
|
|
3
|
+
export declare function renderPerBaseQuality({ ctx, feat, region, bpPerPx, cigarOps, }: {
|
|
4
4
|
ctx: CanvasRenderingContext2D;
|
|
5
5
|
feat: LayoutFeature;
|
|
6
6
|
region: Region;
|
|
7
7
|
bpPerPx: number;
|
|
8
|
-
|
|
9
|
-
cigarOps: string[];
|
|
8
|
+
cigarOps: ArrayLike<number>;
|
|
10
9
|
}): void;
|
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export function renderPerBaseQuality({ ctx, feat, region, bpPerPx,
|
|
1
|
+
import { CIGAR_D, CIGAR_EQ, CIGAR_I, CIGAR_M, CIGAR_N, CIGAR_S, CIGAR_X, } from "./cigarUtil.js";
|
|
2
|
+
const qualityColors = Array.from({ length: 256 }, (_, score) => `hsl(${score === 255 ? 150 : score * 1.5},55%,50%)`);
|
|
3
|
+
export function renderPerBaseQuality({ ctx, feat, region, bpPerPx, cigarOps, }) {
|
|
4
4
|
const { feature, topPx, heightPx } = feat;
|
|
5
5
|
const qual = feature.get('qual') || '';
|
|
6
6
|
const scores = qual.split(' ').map(val => +val);
|
|
7
|
-
const
|
|
7
|
+
const invBpPerPx = 1 / bpPerPx;
|
|
8
|
+
const w = invBpPerPx;
|
|
8
9
|
const start = feature.get('start');
|
|
9
10
|
let soffset = 0;
|
|
10
11
|
let roffset = 0;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const regionStart = region.start;
|
|
13
|
+
const regionEnd = region.end;
|
|
14
|
+
const reversed = region.reversed;
|
|
15
|
+
for (let i = 0, l = cigarOps.length; i < l; i++) {
|
|
16
|
+
const packed = cigarOps[i];
|
|
17
|
+
const len = packed >> 4;
|
|
18
|
+
const opIdx = packed & 0xf;
|
|
19
|
+
if (opIdx === CIGAR_S || opIdx === CIGAR_I) {
|
|
15
20
|
soffset += len;
|
|
16
21
|
}
|
|
17
|
-
else if (
|
|
22
|
+
else if (opIdx === CIGAR_D || opIdx === CIGAR_N) {
|
|
18
23
|
roffset += len;
|
|
19
24
|
}
|
|
20
|
-
else if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
else if (opIdx === CIGAR_M || opIdx === CIGAR_X || opIdx === CIGAR_EQ) {
|
|
26
|
+
const opStart = start + roffset;
|
|
27
|
+
const opEnd = opStart + len;
|
|
28
|
+
if (opStart >= regionEnd) {
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
if (opEnd > regionStart) {
|
|
32
|
+
const visStart = Math.max(0, regionStart - opStart);
|
|
33
|
+
const visEnd = Math.min(len, regionEnd - opStart);
|
|
34
|
+
for (let m = visStart; m < visEnd; m++) {
|
|
35
|
+
const score = scores[soffset + m];
|
|
36
|
+
const refPos = opStart + m;
|
|
37
|
+
const leftPx = reversed
|
|
38
|
+
? (regionEnd - refPos - 1) * invBpPerPx
|
|
39
|
+
: (refPos - regionStart) * invBpPerPx;
|
|
40
|
+
ctx.fillStyle = qualityColors[score] || qualityColors[0];
|
|
41
|
+
ctx.fillRect(leftPx, topPx, w + 0.5, heightPx);
|
|
42
|
+
}
|
|
27
43
|
}
|
|
28
44
|
soffset += len;
|
|
29
45
|
roffset += len;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ProcessedRenderArgs } from '../types';
|
|
2
|
-
import type { LayoutFeature } from '../util';
|
|
1
|
+
import type { ProcessedRenderArgs } from '../types.ts';
|
|
2
|
+
import type { LayoutFeature } from '../util.ts';
|
|
3
3
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
4
|
import type { Theme } from '@mui/material';
|
|
5
5
|
export declare function renderSoftClipping({ ctx, feat, renderArgs, config, theme, colorMap, canvasWidth, }: {
|