@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
|
@@ -6,15 +6,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const bam_1 = require("@gmod/bam");
|
|
7
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const QuickLRU_1 = __importDefault(require("@jbrowse/core/util/QuickLRU"));
|
|
9
10
|
const io_1 = require("@jbrowse/core/util/io");
|
|
10
11
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
11
|
-
const
|
|
12
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
12
13
|
const rxjs_2 = require("rxjs");
|
|
13
|
-
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
14
15
|
const BamSlightlyLazyFeature_1 = __importDefault(require("./BamSlightlyLazyFeature"));
|
|
16
|
+
const util_2 = require("../shared/util");
|
|
15
17
|
class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.ultraLongFeatureCache = new QuickLRU_1.default({
|
|
21
|
+
maxSize: 500,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
18
24
|
async configurePre() {
|
|
19
25
|
const bamLocation = this.getConf('bamLocation');
|
|
20
26
|
const location = this.getConf(['index', 'location']);
|
|
@@ -46,23 +52,20 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
46
52
|
}
|
|
47
53
|
return this.configureP;
|
|
48
54
|
}
|
|
49
|
-
async getHeader(
|
|
55
|
+
async getHeader(_opts) {
|
|
50
56
|
const { bam } = await this.configure();
|
|
51
|
-
return bam.getHeaderText(
|
|
57
|
+
return bam.getHeaderText();
|
|
52
58
|
}
|
|
53
59
|
async setupPre(opts) {
|
|
54
60
|
const { statusCallback = () => { } } = opts || {};
|
|
55
61
|
const { bam } = await this.configure();
|
|
56
62
|
this.samHeader = await (0, util_1.updateStatus)('Downloading index', statusCallback, async () => {
|
|
57
|
-
const samHeader = await bam.getHeader(
|
|
58
|
-
// use the @SQ lines in the header to figure out the
|
|
59
|
-
// mapping between ref ref ID numbers and names
|
|
63
|
+
const samHeader = await bam.getHeader();
|
|
60
64
|
const idToName = [];
|
|
61
65
|
const nameToId = {};
|
|
62
66
|
samHeader === null || samHeader === void 0 ? void 0 : samHeader.filter(l => l.tag === 'SQ').forEach((sqLine, refId) => {
|
|
63
67
|
const SN = sqLine.data.find(item => item.tag === 'SN');
|
|
64
68
|
if (SN) {
|
|
65
|
-
// this is the ref name
|
|
66
69
|
const refName = SN.value;
|
|
67
70
|
nameToId[refName] = refId;
|
|
68
71
|
idToName[refId] = refName;
|
|
@@ -120,43 +123,46 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
120
123
|
}
|
|
121
124
|
getFeatures(region, opts) {
|
|
122
125
|
const { refName, start, end, originalRefName } = region;
|
|
123
|
-
const {
|
|
126
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
124
127
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
125
128
|
const { bam } = await this.configure();
|
|
126
129
|
await this.setup(opts);
|
|
127
|
-
|
|
130
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
131
|
+
const records = await (0, util_1.updateStatus)('Downloading alignments', statusCallback, () => bam.getRecordsForRange(refName, start, end));
|
|
132
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
128
133
|
await (0, util_1.updateStatus)('Processing alignments', statusCallback, async () => {
|
|
129
134
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
130
135
|
for (const record of records) {
|
|
131
136
|
let ref;
|
|
132
|
-
if (!record.
|
|
133
|
-
ref = await this.seqFetch(originalRefName || refName, record.
|
|
137
|
+
if (!record.tags.MD) {
|
|
138
|
+
ref = await this.seqFetch(originalRefName || refName, record.start, record.end);
|
|
134
139
|
}
|
|
135
|
-
|
|
136
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
140
|
+
if ((0, util_2.filterReadFlag)(record.flags, flagInclude, flagExclude)) {
|
|
137
141
|
continue;
|
|
138
142
|
}
|
|
139
|
-
if (tagFilter
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (filterVal === '*'
|
|
143
|
-
? readVal !== undefined
|
|
144
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
143
|
+
if (tagFilter &&
|
|
144
|
+
(0, util_2.filterTagValue)(record.tags[tagFilter.tag], tagFilter.value)) {
|
|
145
|
+
continue;
|
|
147
146
|
}
|
|
148
|
-
if (readName && record.
|
|
147
|
+
if (readName && record.name !== readName) {
|
|
149
148
|
continue;
|
|
150
149
|
}
|
|
151
|
-
|
|
150
|
+
const ret = this.ultraLongFeatureCache.get(`${record.id}`);
|
|
151
|
+
if (!ret) {
|
|
152
|
+
const elt = new BamSlightlyLazyFeature_1.default(record, this, ref);
|
|
153
|
+
this.ultraLongFeatureCache.set(`${record.id}`, elt);
|
|
154
|
+
observer.next(elt);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
observer.next(ret);
|
|
158
|
+
}
|
|
152
159
|
}
|
|
153
160
|
observer.complete();
|
|
154
161
|
});
|
|
155
|
-
}
|
|
162
|
+
});
|
|
156
163
|
}
|
|
157
164
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
158
165
|
const { bam } = await this.configure();
|
|
159
|
-
// this is a method to avoid calling on htsget adapters
|
|
160
166
|
if (bam.index) {
|
|
161
167
|
const bytes = await (0, util_1.bytesForRegions)(regions, bam);
|
|
162
168
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -164,8 +170,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
164
170
|
}
|
|
165
171
|
return super.getMultiRegionFeatureDensityStats(regions, opts);
|
|
166
172
|
}
|
|
167
|
-
freeResources(
|
|
168
|
-
// depends on setup being called before the BAM constructor
|
|
173
|
+
freeResources() { }
|
|
169
174
|
refIdToName(refId) {
|
|
170
175
|
var _a;
|
|
171
176
|
return (_a = this.samHeader) === null || _a === void 0 ? void 0 : _a.idToName[refId];
|
|
@@ -1,31 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BamRecord } from '@gmod/bam';
|
|
3
|
-
import
|
|
1
|
+
import type BamAdapter from './BamAdapter';
|
|
2
|
+
import type { BamRecord } from '@gmod/bam';
|
|
3
|
+
import type { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
|
|
4
4
|
export default class BamSlightlyLazyFeature implements Feature {
|
|
5
5
|
private record;
|
|
6
6
|
private adapter;
|
|
7
7
|
private ref?;
|
|
8
8
|
constructor(record: BamRecord, adapter: BamAdapter, ref?: string | undefined);
|
|
9
|
-
_get_name(): any;
|
|
10
|
-
_get_type(): string;
|
|
11
|
-
_get_score(): number;
|
|
12
|
-
_get_flags(): string;
|
|
13
|
-
_get_strand(): number;
|
|
14
|
-
_get_pair_orientation(): string | undefined;
|
|
15
|
-
_get_next_ref(): string | undefined;
|
|
16
|
-
_get_next_pos(): number | undefined;
|
|
17
|
-
_get_next_segment_position(): string | undefined;
|
|
18
|
-
_get_seq(): string;
|
|
19
|
-
qualRaw(): Buffer | undefined;
|
|
20
|
-
set(): void;
|
|
21
|
-
tags(): string[];
|
|
22
9
|
id(): string;
|
|
10
|
+
get mismatches(): import("../shared/types").Mismatch[];
|
|
11
|
+
get qual(): string | undefined;
|
|
23
12
|
get(field: string): any;
|
|
24
|
-
_get_refName(): string | undefined;
|
|
25
13
|
parent(): undefined;
|
|
26
14
|
children(): undefined;
|
|
27
|
-
|
|
15
|
+
get fields(): SimpleFeatureSerialized;
|
|
28
16
|
toJSON(): SimpleFeatureSerialized;
|
|
29
|
-
_get_mismatches(): import("../MismatchParser").Mismatch[];
|
|
30
|
-
_get_clipPos(): number;
|
|
31
17
|
}
|
|
@@ -1,78 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// locals
|
|
4
3
|
const MismatchParser_1 = require("../MismatchParser");
|
|
4
|
+
const util_1 = require("../shared/util");
|
|
5
5
|
class BamSlightlyLazyFeature {
|
|
6
|
-
// uses parameter properties to automatically create fields on the class
|
|
7
|
-
// https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
|
|
8
6
|
constructor(record, adapter, ref) {
|
|
9
7
|
this.record = record;
|
|
10
8
|
this.adapter = adapter;
|
|
11
9
|
this.ref = ref;
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
return this.record.
|
|
15
|
-
}
|
|
16
|
-
_get_type() {
|
|
17
|
-
return 'match';
|
|
18
|
-
}
|
|
19
|
-
_get_score() {
|
|
20
|
-
return this.record.get('mq');
|
|
21
|
-
}
|
|
22
|
-
_get_flags() {
|
|
23
|
-
return this.record.flags;
|
|
24
|
-
}
|
|
25
|
-
_get_strand() {
|
|
26
|
-
return this.record.isReverseComplemented() ? -1 : 1;
|
|
27
|
-
}
|
|
28
|
-
_get_pair_orientation() {
|
|
29
|
-
return this.record.isPaired() ? this.record.getPairOrientation() : undefined;
|
|
30
|
-
}
|
|
31
|
-
_get_next_ref() {
|
|
32
|
-
return this.record.isPaired()
|
|
33
|
-
? this.adapter.refIdToName(this.record._next_refid())
|
|
34
|
-
: undefined;
|
|
35
|
-
}
|
|
36
|
-
_get_next_pos() {
|
|
37
|
-
return this.record.isPaired() ? this.record._next_pos() : undefined;
|
|
38
|
-
}
|
|
39
|
-
_get_next_segment_position() {
|
|
40
|
-
return this.record.isPaired()
|
|
41
|
-
? `${this.adapter.refIdToName(this.record._next_refid())}:${this.record._next_pos() + 1}`
|
|
42
|
-
: undefined;
|
|
43
|
-
}
|
|
44
|
-
_get_seq() {
|
|
45
|
-
return this.record.getReadBases();
|
|
46
|
-
}
|
|
47
|
-
qualRaw() {
|
|
48
|
-
return this.record.qualRaw();
|
|
11
|
+
id() {
|
|
12
|
+
return `${this.adapter.id}-${this.record.id}`;
|
|
49
13
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const properties = Object.getOwnPropertyNames(BamSlightlyLazyFeature.prototype);
|
|
53
|
-
return [
|
|
54
|
-
...new Set(properties
|
|
55
|
-
.filter(prop => prop.startsWith('_get_') &&
|
|
56
|
-
prop !== '_get_mismatches' &&
|
|
57
|
-
prop !== '_get_tags')
|
|
58
|
-
.map(methodName => methodName.replace('_get_', ''))
|
|
59
|
-
.concat(this.record._tags())),
|
|
60
|
-
];
|
|
14
|
+
get mismatches() {
|
|
15
|
+
return (0, MismatchParser_1.getMismatches)(this.record.CIGAR, this.record.tags.MD, this.record.seq, this.ref, this.record.qual);
|
|
61
16
|
}
|
|
62
|
-
|
|
63
|
-
|
|
17
|
+
get qual() {
|
|
18
|
+
var _a;
|
|
19
|
+
return (_a = this.record.qual) === null || _a === void 0 ? void 0 : _a.join(' ');
|
|
64
20
|
}
|
|
65
21
|
get(field) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
return this.record.get(field);
|
|
73
|
-
}
|
|
74
|
-
_get_refName() {
|
|
75
|
-
return this.adapter.refIdToName(this.record.seq_id());
|
|
22
|
+
return field === 'mismatches'
|
|
23
|
+
? this.mismatches
|
|
24
|
+
: field === 'qual'
|
|
25
|
+
? this.qual
|
|
26
|
+
: this.fields[field];
|
|
76
27
|
}
|
|
77
28
|
parent() {
|
|
78
29
|
return undefined;
|
|
@@ -80,23 +31,39 @@ class BamSlightlyLazyFeature {
|
|
|
80
31
|
children() {
|
|
81
32
|
return undefined;
|
|
82
33
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
34
|
+
get fields() {
|
|
35
|
+
const r = this.record;
|
|
36
|
+
const a = this.adapter;
|
|
37
|
+
const p = r.isPaired();
|
|
87
38
|
return {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
39
|
+
start: r.start,
|
|
40
|
+
name: r.name,
|
|
41
|
+
end: r.end,
|
|
42
|
+
score: r.score,
|
|
43
|
+
strand: r.strand,
|
|
44
|
+
template_length: r.template_length,
|
|
45
|
+
flags: r.flags,
|
|
46
|
+
tags: r.tags,
|
|
47
|
+
refName: a.refIdToName(r.ref_id),
|
|
48
|
+
CIGAR: r.CIGAR,
|
|
49
|
+
seq: r.seq,
|
|
50
|
+
type: 'match',
|
|
51
|
+
pair_orientation: r.pair_orientation,
|
|
52
|
+
next_ref: p ? a.refIdToName(r.next_refid) : undefined,
|
|
53
|
+
next_pos: p ? r.next_pos : undefined,
|
|
54
|
+
next_segment_position: p
|
|
55
|
+
? `${a.refIdToName(r.next_refid)}:${r.next_pos + 1}`
|
|
56
|
+
: undefined,
|
|
91
57
|
uniqueId: this.id(),
|
|
92
58
|
};
|
|
93
59
|
}
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return (0, MismatchParser_1.getClip)(cigar, this.get('strand'));
|
|
60
|
+
toJSON() {
|
|
61
|
+
return {
|
|
62
|
+
...this.fields,
|
|
63
|
+
qual: this.qual,
|
|
64
|
+
};
|
|
100
65
|
}
|
|
101
66
|
}
|
|
102
67
|
exports.default = BamSlightlyLazyFeature;
|
|
68
|
+
(0, util_1.cacheGetter)(BamSlightlyLazyFeature, 'fields');
|
|
69
|
+
(0, util_1.cacheGetter)(BamSlightlyLazyFeature, 'mismatches');
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
bamLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -10,17 +7,11 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
|
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
9
|
index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
13
|
-
/**
|
|
14
|
-
* #slot index.indexType
|
|
15
|
-
*/
|
|
16
10
|
indexType: {
|
|
17
11
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
18
12
|
type: string;
|
|
19
13
|
defaultValue: string;
|
|
20
14
|
};
|
|
21
|
-
/**
|
|
22
|
-
* #slot index.location
|
|
23
|
-
*/
|
|
24
15
|
location: {
|
|
25
16
|
type: string;
|
|
26
17
|
defaultValue: {
|
|
@@ -29,19 +20,11 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
|
|
|
29
20
|
};
|
|
30
21
|
};
|
|
31
22
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
32
|
-
/**
|
|
33
|
-
* #slot
|
|
34
|
-
*/
|
|
35
23
|
fetchSizeLimit: {
|
|
36
24
|
type: string;
|
|
37
25
|
description: string;
|
|
38
26
|
defaultValue: number;
|
|
39
27
|
};
|
|
40
|
-
/**
|
|
41
|
-
* #slot
|
|
42
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
43
|
-
* currently needs to be manually added
|
|
44
|
-
*/
|
|
45
28
|
sequenceAdapter: {
|
|
46
29
|
type: string;
|
|
47
30
|
description: string;
|
|
@@ -2,31 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
|
|
6
|
-
* #config BamAdapter
|
|
7
|
-
* used to configure BAM adapter
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
function x() { }
|
|
10
6
|
const configSchema = (0, configuration_1.ConfigurationSchema)('BamAdapter', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
7
|
bamLocation: {
|
|
15
8
|
type: 'fileLocation',
|
|
16
9
|
defaultValue: { uri: '/path/to/my.bam', locationType: 'UriLocation' },
|
|
17
10
|
},
|
|
18
11
|
index: (0, configuration_1.ConfigurationSchema)('BamIndex', {
|
|
19
|
-
/**
|
|
20
|
-
* #slot index.indexType
|
|
21
|
-
*/
|
|
22
12
|
indexType: {
|
|
23
13
|
model: mobx_state_tree_1.types.enumeration('IndexType', ['BAI', 'CSI']),
|
|
24
14
|
type: 'stringEnum',
|
|
25
15
|
defaultValue: 'BAI',
|
|
26
16
|
},
|
|
27
|
-
/**
|
|
28
|
-
* #slot index.location
|
|
29
|
-
*/
|
|
30
17
|
location: {
|
|
31
18
|
type: 'fileLocation',
|
|
32
19
|
defaultValue: {
|
|
@@ -35,19 +22,11 @@ const configSchema = (0, configuration_1.ConfigurationSchema)('BamAdapter', {
|
|
|
35
22
|
},
|
|
36
23
|
},
|
|
37
24
|
}),
|
|
38
|
-
/**
|
|
39
|
-
* #slot
|
|
40
|
-
*/
|
|
41
25
|
fetchSizeLimit: {
|
|
42
26
|
type: 'number',
|
|
43
27
|
description: 'size to fetch in bytes over which to display a warning to the user that too much data will be fetched',
|
|
44
28
|
defaultValue: 5000000,
|
|
45
29
|
},
|
|
46
|
-
/**
|
|
47
|
-
* #slot
|
|
48
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
49
|
-
* currently needs to be manually added
|
|
50
|
-
*/
|
|
51
30
|
sequenceAdapter: {
|
|
52
31
|
type: 'frozen',
|
|
53
32
|
description: 'sequence data adapter, used to calculate SNPs when BAM reads lacking MD tags',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function BamAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { IndexedCramFile
|
|
2
|
-
import { BaseFeatureDataAdapter
|
|
3
|
-
import { Region, Feature } from '@jbrowse/core/util';
|
|
1
|
+
import { IndexedCramFile } from '@gmod/cram';
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
3
|
import CramSlightlyLazyFeature from './CramSlightlyLazyFeature';
|
|
5
|
-
import {
|
|
4
|
+
import type { FilterBy } from '../shared/types';
|
|
5
|
+
import type { CramRecord } from '@gmod/cram';
|
|
6
|
+
import type { BaseOptions, BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
7
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
6
8
|
interface Header {
|
|
7
9
|
idToName?: string[];
|
|
8
10
|
nameToId?: Record<string, number>;
|
|
@@ -12,6 +14,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
12
14
|
samHeader: Header;
|
|
13
15
|
private setupP?;
|
|
14
16
|
private configureP?;
|
|
17
|
+
private ultraLongFeatureCache;
|
|
15
18
|
private seqIdToRefName;
|
|
16
19
|
private seqIdToOriginalRefName;
|
|
17
20
|
configurePre(): Promise<{
|
|
@@ -33,7 +36,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
33
36
|
getFeatures(region: Region & {
|
|
34
37
|
originalRefName?: string;
|
|
35
38
|
}, opts?: BaseOptions & {
|
|
36
|
-
filterBy:
|
|
39
|
+
filterBy: FilterBy;
|
|
37
40
|
}): import("rxjs").Observable<Feature>;
|
|
38
41
|
freeResources(): void;
|
|
39
42
|
cramRecordToFeature(record: CramRecord): CramSlightlyLazyFeature;
|
|
@@ -41,11 +44,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
41
44
|
bytes: number;
|
|
42
45
|
fetchSizeLimit: any;
|
|
43
46
|
}>;
|
|
44
|
-
/**
|
|
45
|
-
* get the approximate number of bytes queried from the file for the given
|
|
46
|
-
* query regions
|
|
47
|
-
* @param regions - list of query regions
|
|
48
|
-
*/
|
|
49
47
|
private bytesForRegions;
|
|
50
48
|
}
|
|
51
49
|
export {};
|
|
@@ -6,17 +6,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const cram_1 = require("@gmod/cram");
|
|
7
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
|
+
const QuickLRU_1 = __importDefault(require("@jbrowse/core/util/QuickLRU"));
|
|
9
10
|
const io_1 = require("@jbrowse/core/util/io");
|
|
10
11
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
11
|
-
const
|
|
12
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
12
13
|
const rxjs_2 = require("rxjs");
|
|
13
|
-
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
14
15
|
const CramSlightlyLazyFeature_1 = __importDefault(require("./CramSlightlyLazyFeature"));
|
|
16
|
+
const util_2 = require("../shared/util");
|
|
15
17
|
class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
16
18
|
constructor() {
|
|
17
19
|
super(...arguments);
|
|
18
20
|
this.samHeader = {};
|
|
19
|
-
|
|
21
|
+
this.ultraLongFeatureCache = new QuickLRU_1.default({
|
|
22
|
+
maxSize: 500,
|
|
23
|
+
});
|
|
20
24
|
this.seqIdToOriginalRefName = [];
|
|
21
25
|
}
|
|
22
26
|
async configurePre() {
|
|
@@ -56,7 +60,7 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
56
60
|
return cram.cram.getHeaderText();
|
|
57
61
|
}
|
|
58
62
|
async seqFetch(seqId, start, end) {
|
|
59
|
-
start -= 1;
|
|
63
|
+
start -= 1;
|
|
60
64
|
const { sequenceAdapter } = await this.configure();
|
|
61
65
|
const refName = this.refIdToOriginalName(seqId) || this.refIdToName(seqId);
|
|
62
66
|
if (!refName) {
|
|
@@ -94,8 +98,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
94
98
|
const conf = await this.configure();
|
|
95
99
|
const { cram } = conf;
|
|
96
100
|
const samHeader = await cram.cram.getSamHeader();
|
|
97
|
-
// use the @SQ lines in the header to figure out the
|
|
98
|
-
// mapping between ref ID numbers and names
|
|
99
101
|
const idToName = [];
|
|
100
102
|
const nameToId = {};
|
|
101
103
|
samHeader
|
|
@@ -132,8 +134,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
132
134
|
}
|
|
133
135
|
return samHeader.idToName;
|
|
134
136
|
}
|
|
135
|
-
// use info from the SAM header if possible, but fall back to using
|
|
136
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
137
137
|
refNameToId(refName) {
|
|
138
138
|
if (this.samHeader.nameToId) {
|
|
139
139
|
return this.samHeader.nameToId[refName];
|
|
@@ -143,8 +143,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
143
143
|
}
|
|
144
144
|
return undefined;
|
|
145
145
|
}
|
|
146
|
-
// use info from the SAM header if possible, but fall back to using
|
|
147
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
148
146
|
refIdToName(refId) {
|
|
149
147
|
var _a, _b;
|
|
150
148
|
return ((_a = this.samHeader.idToName) === null || _a === void 0 ? void 0 : _a[refId]) || ((_b = this.seqIdToRefName) === null || _b === void 0 ? void 0 : _b[refId]);
|
|
@@ -153,7 +151,7 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
153
151
|
return this.seqIdToOriginalRefName[refId];
|
|
154
152
|
}
|
|
155
153
|
getFeatures(region, opts) {
|
|
156
|
-
const {
|
|
154
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
157
155
|
const { refName, start, end, originalRefName } = region;
|
|
158
156
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
159
157
|
const { cram, samHeader } = await this.setup(opts);
|
|
@@ -167,40 +165,41 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
167
165
|
this.seqIdToOriginalRefName[refId] = originalRefName;
|
|
168
166
|
}
|
|
169
167
|
const records = await (0, util_1.updateStatus)('Downloading alignments', statusCallback, () => cram.getRecordsForRange(refId, start, end));
|
|
170
|
-
(0,
|
|
168
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
171
169
|
await (0, util_1.updateStatus)('Processing alignments', statusCallback, () => {
|
|
172
170
|
var _a;
|
|
173
171
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
174
172
|
for (const record of records) {
|
|
175
|
-
|
|
176
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
173
|
+
if ((0, util_2.filterReadFlag)(record.flags, flagInclude, flagExclude)) {
|
|
177
174
|
continue;
|
|
178
175
|
}
|
|
179
|
-
if (tagFilter
|
|
180
|
-
|
|
176
|
+
if (tagFilter &&
|
|
177
|
+
(0, util_2.filterTagValue)(tagFilter.tag === 'RG'
|
|
181
178
|
? (_a = samHeader.readGroups) === null || _a === void 0 ? void 0 : _a[record.readGroupId]
|
|
182
|
-
: record.tags[tagFilter.tag]
|
|
183
|
-
|
|
184
|
-
if (filterVal === '*'
|
|
185
|
-
? readVal !== undefined
|
|
186
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
179
|
+
: record.tags[tagFilter.tag], tagFilter.value)) {
|
|
180
|
+
continue;
|
|
189
181
|
}
|
|
190
182
|
if (readName && record.readName !== readName) {
|
|
191
183
|
continue;
|
|
192
184
|
}
|
|
193
|
-
|
|
185
|
+
const ret = this.ultraLongFeatureCache.get(`${record.uniqueId}`);
|
|
186
|
+
if (!ret) {
|
|
187
|
+
const elt = this.cramRecordToFeature(record);
|
|
188
|
+
this.ultraLongFeatureCache.set(`${record.uniqueId}`, elt);
|
|
189
|
+
observer.next(elt);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
observer.next(ret);
|
|
193
|
+
}
|
|
194
194
|
}
|
|
195
195
|
observer.complete();
|
|
196
196
|
});
|
|
197
|
-
},
|
|
197
|
+
}, stopToken);
|
|
198
198
|
}
|
|
199
|
-
freeResources(
|
|
199
|
+
freeResources() { }
|
|
200
200
|
cramRecordToFeature(record) {
|
|
201
201
|
return new CramSlightlyLazyFeature_1.default(record, this);
|
|
202
202
|
}
|
|
203
|
-
// we return the configured fetchSizeLimit, and the bytes for the region
|
|
204
203
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
205
204
|
const bytes = await this.bytesForRegions(regions, opts);
|
|
206
205
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -209,11 +208,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
209
208
|
fetchSizeLimit,
|
|
210
209
|
};
|
|
211
210
|
}
|
|
212
|
-
/**
|
|
213
|
-
* get the approximate number of bytes queried from the file for the given
|
|
214
|
-
* query regions
|
|
215
|
-
* @param regions - list of query regions
|
|
216
|
-
*/
|
|
217
211
|
async bytesForRegions(regions, _opts) {
|
|
218
212
|
const { cram } = await this.configure();
|
|
219
213
|
const blockResults = await Promise.all(regions.map(region => {
|
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CramRecord } from '@gmod/cram';
|
|
3
|
-
import
|
|
1
|
+
import type CramAdapter from './CramAdapter';
|
|
2
|
+
import type { CramRecord } from '@gmod/cram';
|
|
3
|
+
import type { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
4
4
|
export default class CramSlightlyLazyFeature implements Feature {
|
|
5
5
|
private record;
|
|
6
6
|
private _store;
|
|
7
7
|
constructor(record: CramRecord, _store: CramAdapter);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_get_tags(): Record<string, string>;
|
|
27
|
-
_get_seq(): string | null | undefined;
|
|
28
|
-
_get_CIGAR(): string;
|
|
29
|
-
tags(): string[];
|
|
8
|
+
get name(): string | undefined;
|
|
9
|
+
get start(): number;
|
|
10
|
+
get end(): number;
|
|
11
|
+
get score(): number | undefined;
|
|
12
|
+
get flags(): number;
|
|
13
|
+
get strand(): 1 | -1;
|
|
14
|
+
get qual(): string;
|
|
15
|
+
get qualRaw(): number[] | null | undefined;
|
|
16
|
+
get refName(): string;
|
|
17
|
+
get pair_orientation(): string | null | undefined;
|
|
18
|
+
get template_length(): number | undefined;
|
|
19
|
+
get next_ref(): string | undefined;
|
|
20
|
+
get next_segment_position(): string | undefined;
|
|
21
|
+
get is_paired(): boolean;
|
|
22
|
+
get next_pos(): number | undefined;
|
|
23
|
+
get tags(): Record<string, string>;
|
|
24
|
+
get seq(): string | null | undefined;
|
|
25
|
+
get CIGAR(): string;
|
|
30
26
|
id(): string;
|
|
31
27
|
get(field: string): any;
|
|
32
28
|
parent(): undefined;
|
|
33
29
|
children(): undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_get_clipPos(): any;
|
|
30
|
+
get mismatches(): import("../shared/types").Mismatch[];
|
|
31
|
+
get fields(): SimpleFeatureSerialized;
|
|
37
32
|
toJSON(): SimpleFeatureSerialized;
|
|
38
|
-
_get_mismatches(): import("./util").Mismatch[];
|
|
39
33
|
}
|