@jbrowse/plugin-alignments 2.17.0 → 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 -12
- 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 +0 -4
- package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.js +1 -8
- package/dist/AlignmentsTrack/index.d.ts +1 -1
- package/dist/AlignmentsTrack/index.js +0 -3
- package/dist/BamAdapter/BamAdapter.d.ts +6 -5
- package/dist/BamAdapter/BamAdapter.js +21 -39
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- package/dist/BamAdapter/configSchema.d.ts +0 -17
- package/dist/BamAdapter/configSchema.js +1 -22
- package/dist/BamAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/CramAdapter.d.ts +6 -9
- package/dist/CramAdapter/CramAdapter.js +18 -41
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/dist/CramAdapter/CramTestAdapters.js +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 -2
- 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/alignmentsModel.d.ts +2 -5
- package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/dist/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/dist/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +1 -2
- package/dist/LinearAlignmentsDisplay/model.d.ts +6 -75
- package/dist/LinearAlignmentsDisplay/model.js +5 -78
- package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +34 -133
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +109 -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 +2 -2
- 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 +103 -105
- package/dist/LinearPileupDisplay/model.js +10 -101
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
- 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 +15 -93
- package/dist/LinearReadArcsDisplay/model.js +17 -104
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
- 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 +13 -55
- package/dist/LinearReadCloudDisplay/model.js +17 -68
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/dist/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/index.js +1 -2
- package/dist/LinearSNPCoverageDisplay/model.d.ts +9 -50
- package/dist/LinearSNPCoverageDisplay/model.js +20 -124
- package/dist/MismatchParser/cigarToMismatches.d.ts +1 -1
- package/dist/MismatchParser/cigarToMismatches.js +4 -7
- package/dist/MismatchParser/getNextRefPos.js +0 -2
- package/dist/MismatchParser/index.d.ts +2 -2
- package/dist/MismatchParser/index.js +1 -9
- package/dist/MismatchParser/mdToMismatches.d.ts +2 -2
- package/dist/MismatchParser/mdToMismatches.js +0 -6
- package/dist/ModificationParser/index.d.ts +1 -1
- package/dist/ModificationParser/index.js +1 -18
- package/dist/PileupRPC/base.d.ts +2 -2
- package/dist/PileupRPC/base.js +0 -1
- package/dist/PileupRPC/index.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/dist/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/dist/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/dist/PileupRPC/util.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
- package/dist/PileupRenderer/PileupRenderer.d.ts +10 -20
- package/dist/PileupRenderer/PileupRenderer.js +11 -16
- 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 +3 -5
- package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
- package/dist/PileupRenderer/renderMethylation.d.ts +4 -4
- package/dist/PileupRenderer/renderMethylation.js +0 -4
- package/dist/PileupRenderer/renderMismatches.d.ts +3 -3
- package/dist/PileupRenderer/renderMismatches.js +1 -12
- package/dist/PileupRenderer/renderModifications.d.ts +3 -3
- package/dist/PileupRenderer/renderModifications.js +1 -3
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/dist/PileupRenderer/renderSoftClipping.js +0 -4
- package/dist/PileupRenderer/sortUtil.d.ts +2 -2
- package/dist/PileupRenderer/sortUtil.js +1 -4
- package/dist/PileupRenderer/types.d.ts +26 -0
- package/dist/PileupRenderer/types.js +2 -0
- package/dist/PileupRenderer/util.d.ts +2 -2
- package/dist/PileupRenderer/util.js +1 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +4 -6
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/dist/SNPCoverageAdapter/configSchema.js +1 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +25 -247
- package/dist/SNPCoverageAdapter/index.d.ts +1 -1
- package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/dist/SNPCoverageAdapter/processDepth.js +38 -0
- package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
- package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/dist/SNPCoverageAdapter/processModifications.js +49 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
- package/dist/SNPCoverageAdapter/util.d.ts +10 -0
- package/dist/SNPCoverageAdapter/util.js +41 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +14 -38
- 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 -1
- package/dist/shared/color.js +0 -8
- package/dist/shared/components/BaseDisplayComponent.d.ts +2 -2
- package/dist/shared/components/BaseDisplayComponent.js +12 -11
- package/dist/shared/components/FilterByTagDialog.d.ts +1 -1
- package/dist/shared/components/FilterByTagDialog.js +2 -2
- package/dist/shared/fetchChains.d.ts +2 -2
- package/dist/shared/fetchChains.js +1 -2
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/dist/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/dist/shared/getUniqueModifications.d.ts +5 -5
- package/dist/shared/getUniqueTags.d.ts +4 -4
- package/dist/shared/renderSvgUtil.js +0 -2
- package/dist/shared/util.d.ts +11 -1
- package/dist/shared/util.js +27 -1
- package/dist/util.d.ts +4 -4
- package/dist/util.js +3 -9
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -12
- 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 +0 -4
- package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.js +1 -8
- package/esm/AlignmentsTrack/index.d.ts +1 -1
- package/esm/AlignmentsTrack/index.js +0 -3
- package/esm/BamAdapter/BamAdapter.d.ts +6 -5
- package/esm/BamAdapter/BamAdapter.js +19 -37
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- package/esm/BamAdapter/configSchema.d.ts +0 -17
- package/esm/BamAdapter/configSchema.js +1 -22
- package/esm/BamAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.d.ts +6 -9
- package/esm/CramAdapter/CramAdapter.js +17 -40
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/esm/CramAdapter/CramTestAdapters.js +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 -2
- 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/alignmentsModel.d.ts +2 -5
- package/esm/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
- package/esm/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/esm/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +1 -2
- package/esm/LinearAlignmentsDisplay/model.d.ts +6 -75
- package/esm/LinearAlignmentsDisplay/model.js +6 -79
- package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -135
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +109 -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 +2 -2
- 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 +103 -105
- package/esm/LinearPileupDisplay/model.js +11 -102
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
- 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 +15 -93
- package/esm/LinearReadArcsDisplay/model.js +18 -105
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
- 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 +13 -55
- package/esm/LinearReadCloudDisplay/model.js +17 -68
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/esm/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/index.js +1 -2
- package/esm/LinearSNPCoverageDisplay/model.d.ts +9 -50
- package/esm/LinearSNPCoverageDisplay/model.js +21 -125
- package/esm/MismatchParser/cigarToMismatches.d.ts +1 -1
- package/esm/MismatchParser/cigarToMismatches.js +4 -7
- package/esm/MismatchParser/getNextRefPos.js +0 -2
- package/esm/MismatchParser/index.d.ts +2 -2
- package/esm/MismatchParser/index.js +1 -9
- package/esm/MismatchParser/mdToMismatches.d.ts +2 -2
- package/esm/MismatchParser/mdToMismatches.js +0 -6
- package/esm/ModificationParser/index.d.ts +1 -1
- package/esm/ModificationParser/index.js +1 -18
- package/esm/PileupRPC/base.d.ts +2 -2
- package/esm/PileupRPC/base.js +0 -1
- package/esm/PileupRPC/index.d.ts +1 -1
- package/esm/PileupRPC/index.js +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/esm/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/esm/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/esm/PileupRPC/util.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +10 -20
- package/esm/PileupRenderer/PileupRenderer.js +12 -17
- package/esm/PileupRenderer/colorBy.d.ts +2 -2
- package/esm/PileupRenderer/colorBy.js +1 -7
- package/esm/PileupRenderer/components/PileupRendering.d.ts +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 +3 -5
- package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
- package/esm/PileupRenderer/renderMethylation.d.ts +4 -4
- package/esm/PileupRenderer/renderMethylation.js +0 -4
- package/esm/PileupRenderer/renderMismatches.d.ts +3 -3
- package/esm/PileupRenderer/renderMismatches.js +1 -12
- package/esm/PileupRenderer/renderModifications.d.ts +3 -3
- package/esm/PileupRenderer/renderModifications.js +1 -3
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/esm/PileupRenderer/renderSoftClipping.js +1 -5
- package/esm/PileupRenderer/sortUtil.d.ts +2 -2
- package/esm/PileupRenderer/sortUtil.js +1 -4
- package/esm/PileupRenderer/types.d.ts +26 -0
- package/esm/PileupRenderer/types.js +1 -0
- package/esm/PileupRenderer/util.d.ts +2 -2
- package/esm/PileupRenderer/util.js +1 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +5 -7
- package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/esm/SNPCoverageAdapter/configSchema.js +1 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +24 -246
- package/esm/SNPCoverageAdapter/index.d.ts +1 -1
- package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/esm/SNPCoverageAdapter/processDepth.js +35 -0
- package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
- package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/esm/SNPCoverageAdapter/processModifications.js +46 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
- package/esm/SNPCoverageAdapter/util.d.ts +10 -0
- package/esm/SNPCoverageAdapter/util.js +35 -0
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +16 -40
- 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 -1
- package/esm/shared/color.js +0 -8
- package/esm/shared/components/BaseDisplayComponent.d.ts +2 -2
- package/esm/shared/components/BaseDisplayComponent.js +12 -11
- package/esm/shared/components/FilterByTagDialog.d.ts +1 -1
- package/esm/shared/components/FilterByTagDialog.js +2 -2
- package/esm/shared/fetchChains.d.ts +2 -2
- package/esm/shared/fetchChains.js +1 -2
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/esm/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/esm/shared/getUniqueModifications.d.ts +5 -5
- package/esm/shared/getUniqueTags.d.ts +4 -4
- package/esm/shared/renderSvgUtil.js +0 -2
- package/esm/shared/util.d.ts +11 -1
- package/esm/shared/util.js +24 -0
- package/esm/util.d.ts +4 -4
- package/esm/util.js +3 -9
- package/package.json +3 -4
|
@@ -4,29 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const bam_1 = require("@gmod/bam");
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
|
-
const rxjs_1 = require("rxjs");
|
|
9
|
-
// jbrowse
|
|
10
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
11
8
|
const util_1 = require("@jbrowse/core/util");
|
|
12
|
-
const io_1 = require("@jbrowse/core/util/io");
|
|
13
|
-
const rxjs_2 = require("@jbrowse/core/util/rxjs");
|
|
14
9
|
const QuickLRU_1 = __importDefault(require("@jbrowse/core/util/QuickLRU"));
|
|
15
|
-
|
|
10
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
11
|
+
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
12
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
13
|
+
const rxjs_2 = require("rxjs");
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
16
15
|
const BamSlightlyLazyFeature_1 = __importDefault(require("./BamSlightlyLazyFeature"));
|
|
16
|
+
const util_2 = require("../shared/util");
|
|
17
17
|
class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
// used for avoiding re-creation new BamSlightlyLazyFeatures, keeping
|
|
21
|
-
// mismatches in cache. at an average of 100kb-300kb, keeping even just 500
|
|
22
|
-
// of these in memory is memory intensive but can reduce recomputation on
|
|
23
|
-
// these objects
|
|
24
20
|
this.ultraLongFeatureCache = new QuickLRU_1.default({
|
|
25
21
|
maxSize: 500,
|
|
26
22
|
});
|
|
27
23
|
}
|
|
28
|
-
// derived classes may not use the same configuration so a custom configure
|
|
29
|
-
// method allows derived classes to override this behavior
|
|
30
24
|
async configurePre() {
|
|
31
25
|
const bamLocation = this.getConf('bamLocation');
|
|
32
26
|
const location = this.getConf(['index', 'location']);
|
|
@@ -58,23 +52,20 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
58
52
|
}
|
|
59
53
|
return this.configureP;
|
|
60
54
|
}
|
|
61
|
-
async getHeader(
|
|
55
|
+
async getHeader(_opts) {
|
|
62
56
|
const { bam } = await this.configure();
|
|
63
|
-
return bam.getHeaderText(
|
|
57
|
+
return bam.getHeaderText();
|
|
64
58
|
}
|
|
65
59
|
async setupPre(opts) {
|
|
66
60
|
const { statusCallback = () => { } } = opts || {};
|
|
67
61
|
const { bam } = await this.configure();
|
|
68
62
|
this.samHeader = await (0, util_1.updateStatus)('Downloading index', statusCallback, async () => {
|
|
69
|
-
const samHeader = await bam.getHeader(
|
|
70
|
-
// use the @SQ lines in the header to figure out the
|
|
71
|
-
// mapping between ref ref ID numbers and names
|
|
63
|
+
const samHeader = await bam.getHeader();
|
|
72
64
|
const idToName = [];
|
|
73
65
|
const nameToId = {};
|
|
74
66
|
samHeader === null || samHeader === void 0 ? void 0 : samHeader.filter(l => l.tag === 'SQ').forEach((sqLine, refId) => {
|
|
75
67
|
const SN = sqLine.data.find(item => item.tag === 'SN');
|
|
76
68
|
if (SN) {
|
|
77
|
-
// this is the ref name
|
|
78
69
|
const refName = SN.value;
|
|
79
70
|
nameToId[refName] = refId;
|
|
80
71
|
idToName[refId] = refName;
|
|
@@ -112,7 +103,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
112
103
|
end,
|
|
113
104
|
assemblyName: '',
|
|
114
105
|
});
|
|
115
|
-
const seqChunks = await (0,
|
|
106
|
+
const seqChunks = await (0, rxjs_2.firstValueFrom)(features.pipe((0, operators_1.toArray)()));
|
|
116
107
|
let sequence = '';
|
|
117
108
|
seqChunks
|
|
118
109
|
.sort((a, b) => a.get('start') - b.get('start'))
|
|
@@ -132,11 +123,13 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
132
123
|
}
|
|
133
124
|
getFeatures(region, opts) {
|
|
134
125
|
const { refName, start, end, originalRefName } = region;
|
|
135
|
-
const {
|
|
136
|
-
return (0,
|
|
126
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
127
|
+
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
137
128
|
const { bam } = await this.configure();
|
|
138
129
|
await this.setup(opts);
|
|
139
|
-
|
|
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);
|
|
140
133
|
await (0, util_1.updateStatus)('Processing alignments', statusCallback, async () => {
|
|
141
134
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
142
135
|
for (const record of records) {
|
|
@@ -144,25 +137,16 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
144
137
|
if (!record.tags.MD) {
|
|
145
138
|
ref = await this.seqFetch(originalRefName || refName, record.start, record.end);
|
|
146
139
|
}
|
|
147
|
-
|
|
148
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
140
|
+
if ((0, util_2.filterReadFlag)(record.flags, flagInclude, flagExclude)) {
|
|
149
141
|
continue;
|
|
150
142
|
}
|
|
151
|
-
if (tagFilter
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (filterVal === '*'
|
|
155
|
-
? readVal === undefined
|
|
156
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
143
|
+
if (tagFilter &&
|
|
144
|
+
(0, util_2.filterTagValue)(record.tags[tagFilter.tag], tagFilter.value)) {
|
|
145
|
+
continue;
|
|
159
146
|
}
|
|
160
147
|
if (readName && record.name !== readName) {
|
|
161
148
|
continue;
|
|
162
149
|
}
|
|
163
|
-
// retrieve a feature from our feature cache if it is available, the
|
|
164
|
-
// features in the cache have pre-computed mismatches objects that
|
|
165
|
-
// can be re-used across blocks
|
|
166
150
|
const ret = this.ultraLongFeatureCache.get(`${record.id}`);
|
|
167
151
|
if (!ret) {
|
|
168
152
|
const elt = new BamSlightlyLazyFeature_1.default(record, this, ref);
|
|
@@ -175,11 +159,10 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
175
159
|
}
|
|
176
160
|
observer.complete();
|
|
177
161
|
});
|
|
178
|
-
}
|
|
162
|
+
});
|
|
179
163
|
}
|
|
180
164
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
181
165
|
const { bam } = await this.configure();
|
|
182
|
-
// this is a method to avoid calling on htsget adapters
|
|
183
166
|
if (bam.index) {
|
|
184
167
|
const bytes = await (0, util_1.bytesForRegions)(regions, bam);
|
|
185
168
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -187,8 +170,7 @@ class BamAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
187
170
|
}
|
|
188
171
|
return super.getMultiRegionFeatureDensityStats(regions, opts);
|
|
189
172
|
}
|
|
190
|
-
freeResources(
|
|
191
|
-
// depends on setup being called before the BAM constructor
|
|
173
|
+
freeResources() { }
|
|
192
174
|
refIdToName(refId) {
|
|
193
175
|
var _a;
|
|
194
176
|
return (_a = this.samHeader) === null || _a === void 0 ? void 0 : _a.idToName[refId];
|
|
@@ -1,6 +1,6 @@
|
|
|
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;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// locals
|
|
4
3
|
const MismatchParser_1 = require("../MismatchParser");
|
|
5
4
|
const util_1 = require("../shared/util");
|
|
6
5
|
class BamSlightlyLazyFeature {
|
|
7
|
-
// uses parameter properties to automatically create fields on the class
|
|
8
|
-
// https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
|
|
9
6
|
constructor(record, adapter, ref) {
|
|
10
7
|
this.record = record;
|
|
11
8
|
this.adapter = adapter;
|
|
@@ -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 type { 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 { FilterBy } from '../shared/types';
|
|
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>;
|
|
@@ -42,11 +44,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
42
44
|
bytes: number;
|
|
43
45
|
fetchSizeLimit: any;
|
|
44
46
|
}>;
|
|
45
|
-
/**
|
|
46
|
-
* get the approximate number of bytes queried from the file for the given
|
|
47
|
-
* query regions
|
|
48
|
-
* @param regions - list of query regions
|
|
49
|
-
*/
|
|
50
47
|
private bytesForRegions;
|
|
51
48
|
}
|
|
52
49
|
export {};
|
|
@@ -4,28 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const cram_1 = require("@gmod/cram");
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
|
-
const rxjs_1 = require("rxjs");
|
|
9
|
-
// jbrowse
|
|
10
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
11
8
|
const util_1 = require("@jbrowse/core/util");
|
|
12
|
-
const io_1 = require("@jbrowse/core/util/io");
|
|
13
|
-
const rxjs_2 = require("@jbrowse/core/util/rxjs");
|
|
14
9
|
const QuickLRU_1 = __importDefault(require("@jbrowse/core/util/QuickLRU"));
|
|
15
|
-
|
|
10
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
11
|
+
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
12
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
13
|
+
const rxjs_2 = require("rxjs");
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
16
15
|
const CramSlightlyLazyFeature_1 = __importDefault(require("./CramSlightlyLazyFeature"));
|
|
16
|
+
const util_2 = require("../shared/util");
|
|
17
17
|
class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this.samHeader = {};
|
|
21
|
-
// used for avoiding re-creation new BamSlightlyLazyFeatures, keeping
|
|
22
|
-
// mismatches in cache. at an average of 100kb-300kb, keeping even just 500
|
|
23
|
-
// of these in memory is fairly intensive but can reduce recomputation on
|
|
24
|
-
// these objects
|
|
25
21
|
this.ultraLongFeatureCache = new QuickLRU_1.default({
|
|
26
22
|
maxSize: 500,
|
|
27
23
|
});
|
|
28
|
-
// maps a seqId to original refname, passed specially to render args, to a seqid
|
|
29
24
|
this.seqIdToOriginalRefName = [];
|
|
30
25
|
}
|
|
31
26
|
async configurePre() {
|
|
@@ -65,13 +60,13 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
65
60
|
return cram.cram.getHeaderText();
|
|
66
61
|
}
|
|
67
62
|
async seqFetch(seqId, start, end) {
|
|
68
|
-
start -= 1;
|
|
63
|
+
start -= 1;
|
|
69
64
|
const { sequenceAdapter } = await this.configure();
|
|
70
65
|
const refName = this.refIdToOriginalName(seqId) || this.refIdToName(seqId);
|
|
71
66
|
if (!refName) {
|
|
72
67
|
throw new Error('unknown');
|
|
73
68
|
}
|
|
74
|
-
const seqChunks = await (0,
|
|
69
|
+
const seqChunks = await (0, rxjs_2.firstValueFrom)(sequenceAdapter
|
|
75
70
|
.getFeatures({
|
|
76
71
|
refName,
|
|
77
72
|
start,
|
|
@@ -103,8 +98,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
103
98
|
const conf = await this.configure();
|
|
104
99
|
const { cram } = conf;
|
|
105
100
|
const samHeader = await cram.cram.getSamHeader();
|
|
106
|
-
// use the @SQ lines in the header to figure out the
|
|
107
|
-
// mapping between ref ID numbers and names
|
|
108
101
|
const idToName = [];
|
|
109
102
|
const nameToId = {};
|
|
110
103
|
samHeader
|
|
@@ -141,8 +134,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
141
134
|
}
|
|
142
135
|
return samHeader.idToName;
|
|
143
136
|
}
|
|
144
|
-
// use info from the SAM header if possible, but fall back to using
|
|
145
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
146
137
|
refNameToId(refName) {
|
|
147
138
|
if (this.samHeader.nameToId) {
|
|
148
139
|
return this.samHeader.nameToId[refName];
|
|
@@ -152,8 +143,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
152
143
|
}
|
|
153
144
|
return undefined;
|
|
154
145
|
}
|
|
155
|
-
// use info from the SAM header if possible, but fall back to using
|
|
156
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
157
146
|
refIdToName(refId) {
|
|
158
147
|
var _a, _b;
|
|
159
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]);
|
|
@@ -162,9 +151,9 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
162
151
|
return this.seqIdToOriginalRefName[refId];
|
|
163
152
|
}
|
|
164
153
|
getFeatures(region, opts) {
|
|
165
|
-
const {
|
|
154
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
166
155
|
const { refName, start, end, originalRefName } = region;
|
|
167
|
-
return (0,
|
|
156
|
+
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
168
157
|
const { cram, samHeader } = await this.setup(opts);
|
|
169
158
|
const refId = this.refNameToId(refName);
|
|
170
159
|
if (refId === undefined) {
|
|
@@ -176,25 +165,19 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
176
165
|
this.seqIdToOriginalRefName[refId] = originalRefName;
|
|
177
166
|
}
|
|
178
167
|
const records = await (0, util_1.updateStatus)('Downloading alignments', statusCallback, () => cram.getRecordsForRange(refId, start, end));
|
|
179
|
-
(0,
|
|
168
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
180
169
|
await (0, util_1.updateStatus)('Processing alignments', statusCallback, () => {
|
|
181
170
|
var _a;
|
|
182
171
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
183
172
|
for (const record of records) {
|
|
184
|
-
|
|
185
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
173
|
+
if ((0, util_2.filterReadFlag)(record.flags, flagInclude, flagExclude)) {
|
|
186
174
|
continue;
|
|
187
175
|
}
|
|
188
|
-
if (tagFilter
|
|
189
|
-
|
|
176
|
+
if (tagFilter &&
|
|
177
|
+
(0, util_2.filterTagValue)(tagFilter.tag === 'RG'
|
|
190
178
|
? (_a = samHeader.readGroups) === null || _a === void 0 ? void 0 : _a[record.readGroupId]
|
|
191
|
-
: record.tags[tagFilter.tag]
|
|
192
|
-
|
|
193
|
-
if (filterVal === '*'
|
|
194
|
-
? readVal === undefined
|
|
195
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
196
|
-
continue;
|
|
197
|
-
}
|
|
179
|
+
: record.tags[tagFilter.tag], tagFilter.value)) {
|
|
180
|
+
continue;
|
|
198
181
|
}
|
|
199
182
|
if (readName && record.readName !== readName) {
|
|
200
183
|
continue;
|
|
@@ -211,13 +194,12 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
211
194
|
}
|
|
212
195
|
observer.complete();
|
|
213
196
|
});
|
|
214
|
-
},
|
|
197
|
+
}, stopToken);
|
|
215
198
|
}
|
|
216
|
-
freeResources(
|
|
199
|
+
freeResources() { }
|
|
217
200
|
cramRecordToFeature(record) {
|
|
218
201
|
return new CramSlightlyLazyFeature_1.default(record, this);
|
|
219
202
|
}
|
|
220
|
-
// we return the configured fetchSizeLimit, and the bytes for the region
|
|
221
203
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
222
204
|
const bytes = await this.bytesForRegions(regions, opts);
|
|
223
205
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -226,11 +208,6 @@ class CramAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
226
208
|
fetchSizeLimit,
|
|
227
209
|
};
|
|
228
210
|
}
|
|
229
|
-
/**
|
|
230
|
-
* get the approximate number of bytes queried from the file for the given
|
|
231
|
-
* query regions
|
|
232
|
-
* @param regions - list of query regions
|
|
233
|
-
*/
|
|
234
211
|
async bytesForRegions(regions, _opts) {
|
|
235
212
|
const { cram } = await this.configure();
|
|
236
213
|
const blockResults = await Promise.all(regions.map(region => {
|
|
@@ -1,6 +1,6 @@
|
|
|
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;
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const util_1 = require("./util");
|
|
4
4
|
const util_2 = require("../shared/util");
|
|
5
5
|
class CramSlightlyLazyFeature {
|
|
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, _store) {
|
|
9
7
|
this.record = record;
|
|
10
8
|
this._store = _store;
|
|
@@ -68,7 +66,6 @@ class CramSlightlyLazyFeature {
|
|
|
68
66
|
get seq() {
|
|
69
67
|
return this.record.getReadBases();
|
|
70
68
|
}
|
|
71
|
-
// generate a CIGAR, based on code from jkbonfield
|
|
72
69
|
get CIGAR() {
|
|
73
70
|
return (0, util_1.readFeaturesToCIGAR)(this.record.readFeatures, this.record.alignmentStart, this.record.readLength, this.record._refRegion);
|
|
74
71
|
}
|
|
@@ -92,18 +89,6 @@ class CramSlightlyLazyFeature {
|
|
|
92
89
|
}
|
|
93
90
|
get mismatches() {
|
|
94
91
|
return (0, util_1.readFeaturesToMismatches)(this.record.readFeatures, this.start, this.qualRaw);
|
|
95
|
-
// this commented code can try to resolve MD tags, xref https://github.com/galaxyproject/tools-iuc/issues/6523#issuecomment-2462927211 but put on hold
|
|
96
|
-
// return this.tags.MD && this.seq
|
|
97
|
-
// ? mismatches.concat(
|
|
98
|
-
// mdToMismatches(
|
|
99
|
-
// this.tags.MD,
|
|
100
|
-
// parseCigar(this.CIGAR),
|
|
101
|
-
// mismatches,
|
|
102
|
-
// this.seq,
|
|
103
|
-
// this.qualRaw,
|
|
104
|
-
// ),
|
|
105
|
-
// )
|
|
106
|
-
// : mismatches
|
|
107
92
|
}
|
|
108
93
|
get fields() {
|
|
109
94
|
return {
|
|
@@ -128,9 +113,7 @@ class CramSlightlyLazyFeature {
|
|
|
128
113
|
toJSON() {
|
|
129
114
|
return {
|
|
130
115
|
...this.fields,
|
|
131
|
-
// lazy
|
|
132
116
|
CIGAR: this.CIGAR,
|
|
133
|
-
// lazy
|
|
134
117
|
qual: this.qual,
|
|
135
118
|
};
|
|
136
119
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GenericFilehandle } from 'generic-filehandle';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
4
1
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import type { GenericFilehandle } from 'generic-filehandle';
|
|
5
5
|
export declare function parseSmallFasta(text: string): {
|
|
6
6
|
id: string;
|
|
7
7
|
description: string;
|
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SequenceAdapter = exports.FetchableSmallFasta = void 0;
|
|
7
7
|
exports.parseSmallFasta = parseSmallFasta;
|
|
8
|
-
const rxjs_1 = require("rxjs");
|
|
9
|
-
const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
|
|
10
|
-
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
11
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
12
|
-
|
|
9
|
+
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
10
|
+
const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
|
|
11
|
+
const rxjs_1 = require("rxjs");
|
|
13
12
|
function parseSmallFasta(text) {
|
|
14
13
|
return text
|
|
15
14
|
.split('>')
|
|
@@ -81,6 +80,6 @@ class SequenceAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
81
80
|
return { unsubscribe: () => { } };
|
|
82
81
|
});
|
|
83
82
|
}
|
|
84
|
-
freeResources(
|
|
83
|
+
freeResources() { }
|
|
85
84
|
}
|
|
86
85
|
exports.SequenceAdapter = SequenceAdapter;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot fetchSizeLimit
|
|
4
|
-
*/
|
|
5
2
|
fetchSizeLimit: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: number;
|
|
9
6
|
};
|
|
10
|
-
/**
|
|
11
|
-
* #slot cramLocation
|
|
12
|
-
*/
|
|
13
7
|
cramLocation: {
|
|
14
8
|
type: string;
|
|
15
9
|
defaultValue: {
|
|
@@ -17,9 +11,6 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
|
|
|
17
11
|
locationType: string;
|
|
18
12
|
};
|
|
19
13
|
};
|
|
20
|
-
/**
|
|
21
|
-
* #slot craiLocation
|
|
22
|
-
*/
|
|
23
14
|
craiLocation: {
|
|
24
15
|
type: string;
|
|
25
16
|
defaultValue: {
|
|
@@ -27,11 +18,6 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
|
|
|
27
18
|
locationType: string;
|
|
28
19
|
};
|
|
29
20
|
};
|
|
30
|
-
/**
|
|
31
|
-
* #slot sequenceAdapter
|
|
32
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
33
|
-
* currently needs to be manually added
|
|
34
|
-
*/
|
|
35
21
|
sequenceAdapter: {
|
|
36
22
|
type: string;
|
|
37
23
|
description: string;
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config CramAdapter
|
|
6
|
-
* used to configure CRAM adapter
|
|
7
|
-
*/
|
|
8
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
9
5
|
const configSchema = (0, configuration_1.ConfigurationSchema)('CramAdapter', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot fetchSizeLimit
|
|
12
|
-
*/
|
|
13
6
|
fetchSizeLimit: {
|
|
14
7
|
type: 'number',
|
|
15
8
|
description: 'size in bytes over which to display a warning to the user that too much data will be fetched',
|
|
16
9
|
defaultValue: 3000000,
|
|
17
10
|
},
|
|
18
|
-
/**
|
|
19
|
-
* #slot cramLocation
|
|
20
|
-
*/
|
|
21
11
|
cramLocation: {
|
|
22
12
|
type: 'fileLocation',
|
|
23
13
|
defaultValue: {
|
|
@@ -25,9 +15,6 @@ const configSchema = (0, configuration_1.ConfigurationSchema)('CramAdapter', {
|
|
|
25
15
|
locationType: 'UriLocation',
|
|
26
16
|
},
|
|
27
17
|
},
|
|
28
|
-
/**
|
|
29
|
-
* #slot craiLocation
|
|
30
|
-
*/
|
|
31
18
|
craiLocation: {
|
|
32
19
|
type: 'fileLocation',
|
|
33
20
|
defaultValue: {
|
|
@@ -35,11 +22,6 @@ const configSchema = (0, configuration_1.ConfigurationSchema)('CramAdapter', {
|
|
|
35
22
|
locationType: 'UriLocation',
|
|
36
23
|
},
|
|
37
24
|
},
|
|
38
|
-
/**
|
|
39
|
-
* #slot sequenceAdapter
|
|
40
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
41
|
-
* currently needs to be manually added
|
|
42
|
-
*/
|
|
43
25
|
sequenceAdapter: {
|
|
44
26
|
type: 'frozen',
|
|
45
27
|
description: 'sequence data adapter',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function CramAdapterF(pluginManager: PluginManager): void;
|
|
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.default = CramAdapterF;
|
|
30
30
|
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
31
|
-
// locals
|
|
32
31
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
33
32
|
function CramAdapterF(pluginManager) {
|
|
34
33
|
pluginManager.addAdapterType(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Mismatch } from '../shared/types';
|
|
2
|
+
import type { CramRecord } from '@gmod/cram';
|
|
3
3
|
type ReadFeatures = CramRecord['readFeatures'];
|
|
4
4
|
export declare function readFeaturesToMismatches(readFeatures: ReadFeatures, start: number, qual?: number[] | null): Mismatch[];
|
|
5
5
|
export declare function readFeaturesToCIGAR(readFeatures: ReadFeatures, alignmentStart: number, readLen: number, refRegion?: {
|