@jbrowse/plugin-alignments 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +25 -24
- package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/AlignmentsFeatureDetail/Flags.d.ts +1 -2
- package/dist/AlignmentsFeatureDetail/Flags.js +8 -10
- package/dist/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
- package/dist/AlignmentsFeatureDetail/Formatter.js +11 -39
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
- package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +46 -54
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
- package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +58 -61
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
- package/dist/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/PairLink.js +3 -7
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +21 -31
- package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
- package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/dist/AlignmentsFeatureDetail/index.js +17 -7
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/dist/AlignmentsTrack/configSchemaF.js +1 -8
- package/dist/AlignmentsTrack/index.d.ts +1 -1
- package/dist/AlignmentsTrack/index.js +0 -3
- package/dist/BamAdapter/BamAdapter.d.ts +6 -5
- package/dist/BamAdapter/BamAdapter.js +21 -39
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- package/dist/BamAdapter/configSchema.d.ts +0 -17
- package/dist/BamAdapter/configSchema.js +1 -22
- package/dist/BamAdapter/index.d.ts +1 -1
- package/dist/BamAdapter/index.js +17 -7
- package/dist/CramAdapter/CramAdapter.d.ts +6 -9
- package/dist/CramAdapter/CramAdapter.js +25 -43
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/dist/CramAdapter/CramTestAdapters.js +6 -6
- package/dist/CramAdapter/configSchema.d.ts +0 -14
- package/dist/CramAdapter/configSchema.js +1 -19
- package/dist/CramAdapter/index.d.ts +1 -1
- package/dist/CramAdapter/index.js +17 -8
- package/dist/CramAdapter/util.d.ts +2 -2
- package/dist/CramAdapter/util.js +1 -24
- package/dist/GuessAlignmentsTypes/index.d.ts +1 -1
- package/dist/GuessAlignmentsTypes/index.js +19 -34
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/dist/HtsgetBamAdapter/configSchema.js +1 -14
- package/dist/HtsgetBamAdapter/index.d.ts +1 -1
- package/dist/HtsgetBamAdapter/index.js +18 -8
- package/dist/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
- package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -3
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -18
- package/dist/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/dist/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +1 -2
- package/dist/LinearAlignmentsDisplay/model.d.ts +7 -77
- package/dist/LinearAlignmentsDisplay/model.js +10 -85
- package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +71 -145
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +12 -41
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +106 -92
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -7
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -44
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -40
- package/dist/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +17 -46
- package/dist/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/dist/LinearPileupDisplay/configSchema.js +12 -30
- package/dist/LinearPileupDisplay/index.d.ts +1 -1
- package/dist/LinearPileupDisplay/index.js +2 -2
- package/dist/LinearPileupDisplay/model.d.ts +123 -111
- package/dist/LinearPileupDisplay/model.js +29 -109
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +6 -33
- package/dist/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/dist/LinearReadArcsDisplay/configSchema.js +8 -31
- package/dist/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/dist/LinearReadArcsDisplay/index.d.ts +1 -1
- package/dist/LinearReadArcsDisplay/index.js +18 -9
- package/dist/LinearReadArcsDisplay/model.d.ts +16 -94
- package/dist/LinearReadArcsDisplay/model.js +34 -111
- package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +6 -33
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/dist/LinearReadCloudDisplay/configSchema.js +3 -28
- package/dist/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/dist/LinearReadCloudDisplay/index.d.ts +1 -1
- package/dist/LinearReadCloudDisplay/index.js +18 -9
- package/dist/LinearReadCloudDisplay/model.d.ts +14 -56
- package/dist/LinearReadCloudDisplay/model.js +34 -75
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +16 -55
- package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/dist/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/index.js +1 -2
- package/dist/LinearSNPCoverageDisplay/model.d.ts +13 -54
- package/dist/LinearSNPCoverageDisplay/model.js +69 -159
- package/dist/MismatchParser/cigarToMismatches.d.ts +2 -3
- package/dist/MismatchParser/cigarToMismatches.js +4 -7
- package/dist/MismatchParser/getNextRefPos.js +0 -2
- package/dist/MismatchParser/index.d.ts +3 -4
- package/dist/MismatchParser/index.js +1 -9
- package/dist/MismatchParser/mdToMismatches.d.ts +2 -3
- package/dist/MismatchParser/mdToMismatches.js +0 -6
- package/dist/ModificationParser/index.d.ts +1 -1
- package/dist/ModificationParser/index.js +1 -18
- package/dist/PileupRPC/base.d.ts +2 -2
- package/dist/PileupRPC/base.js +0 -1
- package/dist/PileupRPC/index.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/dist/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/dist/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/dist/PileupRPC/util.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
- package/dist/PileupRenderer/PileupRenderer.d.ts +14 -24
- package/dist/PileupRenderer/PileupRenderer.js +28 -23
- package/dist/PileupRenderer/colorBy.d.ts +2 -2
- package/dist/PileupRenderer/colorBy.js +0 -6
- package/dist/PileupRenderer/components/PileupRendering.d.ts +2 -3
- package/dist/PileupRenderer/components/PileupRendering.js +15 -43
- package/dist/PileupRenderer/configSchema.d.ts +5 -31
- package/dist/PileupRenderer/configSchema.js +6 -35
- package/dist/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -6
- package/dist/PileupRenderer/index.d.ts +1 -1
- package/dist/PileupRenderer/index.js +1 -1
- package/dist/PileupRenderer/layoutFeature.d.ts +2 -2
- package/dist/PileupRenderer/layoutFeature.js +0 -1
- package/dist/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/dist/PileupRenderer/layoutFeatures.js +6 -4
- package/dist/PileupRenderer/makeImageData.d.ts +3 -4
- package/dist/PileupRenderer/makeImageData.js +10 -2
- package/dist/PileupRenderer/renderAlignment.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignment.js +3 -5
- package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
- package/dist/PileupRenderer/renderMethylation.d.ts +4 -4
- package/dist/PileupRenderer/renderMethylation.js +0 -4
- package/dist/PileupRenderer/renderMismatches.d.ts +5 -4
- package/dist/PileupRenderer/renderMismatches.js +19 -25
- package/dist/PileupRenderer/renderModifications.d.ts +3 -3
- package/dist/PileupRenderer/renderModifications.js +1 -3
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/dist/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/dist/PileupRenderer/renderSoftClipping.js +0 -4
- package/dist/PileupRenderer/sortUtil.d.ts +2 -2
- package/dist/PileupRenderer/sortUtil.js +1 -4
- package/dist/PileupRenderer/types.d.ts +26 -0
- package/dist/PileupRenderer/types.js +2 -0
- package/dist/PileupRenderer/util.d.ts +2 -2
- package/dist/PileupRenderer/util.js +1 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +4 -6
- package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/dist/SNPCoverageAdapter/configSchema.js +1 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +25 -247
- package/dist/SNPCoverageAdapter/index.d.ts +1 -1
- package/dist/SNPCoverageAdapter/index.js +17 -7
- package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/dist/SNPCoverageAdapter/processDepth.js +38 -0
- package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
- package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/dist/SNPCoverageAdapter/processModifications.js +49 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
- package/dist/SNPCoverageAdapter/util.d.ts +10 -0
- package/dist/SNPCoverageAdapter/util.js +41 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -18
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +35 -288
- package/dist/SNPCoverageRenderer/configSchema.d.ts +3 -18
- package/dist/SNPCoverageRenderer/configSchema.js +4 -22
- package/dist/SNPCoverageRenderer/index.d.ts +1 -1
- package/dist/SNPCoverageRenderer/index.js +2 -2
- package/dist/SNPCoverageRenderer/makeImage.d.ts +2 -0
- package/dist/SNPCoverageRenderer/makeImage.js +270 -0
- package/dist/SNPCoverageRenderer/types.d.ts +19 -0
- package/dist/SNPCoverageRenderer/types.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -19
- package/dist/shared/afterAttach.d.ts +1 -1
- package/dist/shared/afterAttach.js +0 -2
- package/dist/shared/color.d.ts +1 -1
- package/dist/shared/color.js +0 -8
- package/dist/shared/components/BaseDisplayComponent.d.ts +3 -4
- package/dist/shared/components/BaseDisplayComponent.js +13 -19
- package/dist/shared/components/FilterByTagDialog.d.ts +2 -3
- package/dist/shared/components/FilterByTagDialog.js +44 -94
- package/dist/shared/fetchChains.d.ts +2 -2
- package/dist/shared/fetchChains.js +1 -2
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/dist/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/dist/shared/getUniqueModifications.d.ts +5 -5
- package/dist/shared/getUniqueTags.d.ts +4 -4
- package/dist/shared/renderSvgUtil.d.ts +1 -2
- package/dist/shared/renderSvgUtil.js +20 -19
- package/dist/shared/util.d.ts +11 -1
- package/dist/shared/util.js +27 -1
- package/dist/util.d.ts +4 -4
- package/dist/util.js +3 -9
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +2 -3
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +8 -17
- package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/AlignmentsFeatureDetail/Flags.d.ts +1 -2
- package/esm/AlignmentsFeatureDetail/Flags.js +8 -10
- package/esm/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
- package/esm/AlignmentsFeatureDetail/Formatter.js +11 -16
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
- package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +30 -48
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
- package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +41 -54
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
- package/esm/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
- package/esm/AlignmentsFeatureDetail/PairLink.js +3 -4
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +22 -29
- package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
- package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
- package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
- package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
- package/esm/AlignmentsTrack/configSchemaF.js +1 -8
- package/esm/AlignmentsTrack/index.d.ts +1 -1
- package/esm/AlignmentsTrack/index.js +0 -3
- package/esm/BamAdapter/BamAdapter.d.ts +6 -5
- package/esm/BamAdapter/BamAdapter.js +19 -37
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -3
- package/esm/BamAdapter/configSchema.d.ts +0 -17
- package/esm/BamAdapter/configSchema.js +1 -22
- package/esm/BamAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.d.ts +6 -9
- package/esm/CramAdapter/CramAdapter.js +24 -42
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -17
- package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
- package/esm/CramAdapter/CramTestAdapters.js +6 -6
- package/esm/CramAdapter/configSchema.d.ts +0 -14
- package/esm/CramAdapter/configSchema.js +1 -19
- package/esm/CramAdapter/index.d.ts +1 -1
- package/esm/CramAdapter/index.js +0 -1
- package/esm/CramAdapter/util.d.ts +2 -2
- package/esm/CramAdapter/util.js +1 -24
- package/esm/GuessAlignmentsTypes/index.d.ts +1 -1
- package/esm/GuessAlignmentsTypes/index.js +20 -35
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
- package/esm/HtsgetBamAdapter/configSchema.d.ts +0 -9
- package/esm/HtsgetBamAdapter/configSchema.js +1 -14
- package/esm/HtsgetBamAdapter/index.d.ts +1 -1
- package/esm/HtsgetBamAdapter/index.js +1 -1
- package/esm/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
- package/esm/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -3
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -15
- package/esm/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
- package/esm/LinearAlignmentsDisplay/configSchema.js +3 -20
- package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +1 -2
- package/esm/LinearAlignmentsDisplay/model.d.ts +7 -77
- package/esm/LinearAlignmentsDisplay/model.js +11 -86
- package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +56 -140
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +12 -18
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +106 -69
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -4
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -21
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -17
- package/esm/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +17 -23
- package/esm/LinearPileupDisplay/configSchema.d.ts +13 -16
- package/esm/LinearPileupDisplay/configSchema.js +12 -30
- package/esm/LinearPileupDisplay/index.d.ts +1 -1
- package/esm/LinearPileupDisplay/index.js +2 -2
- package/esm/LinearPileupDisplay/model.d.ts +123 -111
- package/esm/LinearPileupDisplay/model.js +13 -103
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +6 -10
- package/esm/LinearReadArcsDisplay/configSchema.d.ts +12 -20
- package/esm/LinearReadArcsDisplay/configSchema.js +8 -31
- package/esm/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/drawFeats.js +1 -9
- package/esm/LinearReadArcsDisplay/index.d.ts +1 -1
- package/esm/LinearReadArcsDisplay/index.js +1 -2
- package/esm/LinearReadArcsDisplay/model.d.ts +16 -94
- package/esm/LinearReadArcsDisplay/model.js +18 -105
- package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +6 -10
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +5 -17
- package/esm/LinearReadCloudDisplay/configSchema.js +3 -28
- package/esm/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/drawFeats.js +2 -2
- package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -3
- package/esm/LinearReadCloudDisplay/index.d.ts +1 -1
- package/esm/LinearReadCloudDisplay/index.js +1 -2
- package/esm/LinearReadCloudDisplay/model.d.ts +14 -56
- package/esm/LinearReadCloudDisplay/model.js +17 -68
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +16 -52
- package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
- package/esm/LinearSNPCoverageDisplay/configSchema.js +16 -32
- package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/index.js +1 -2
- package/esm/LinearSNPCoverageDisplay/model.d.ts +13 -54
- package/esm/LinearSNPCoverageDisplay/model.js +53 -153
- package/esm/MismatchParser/cigarToMismatches.d.ts +2 -3
- package/esm/MismatchParser/cigarToMismatches.js +4 -7
- package/esm/MismatchParser/getNextRefPos.js +0 -2
- package/esm/MismatchParser/index.d.ts +3 -4
- package/esm/MismatchParser/index.js +1 -9
- package/esm/MismatchParser/mdToMismatches.d.ts +2 -3
- package/esm/MismatchParser/mdToMismatches.js +0 -6
- package/esm/ModificationParser/index.d.ts +1 -1
- package/esm/ModificationParser/index.js +1 -18
- package/esm/PileupRPC/base.d.ts +2 -2
- package/esm/PileupRPC/base.js +0 -1
- package/esm/PileupRPC/index.d.ts +1 -1
- package/esm/PileupRPC/index.js +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
- package/esm/PileupRPC/methods/GetReducedFeatures.js +3 -5
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
- package/esm/PileupRPC/methods/GetVisibleModifications.js +1 -1
- package/esm/PileupRPC/util.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +5 -5
- package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
- package/esm/PileupRenderer/PileupRenderer.d.ts +14 -24
- package/esm/PileupRenderer/PileupRenderer.js +12 -17
- package/esm/PileupRenderer/colorBy.d.ts +2 -2
- package/esm/PileupRenderer/colorBy.js +1 -7
- package/esm/PileupRenderer/components/PileupRendering.d.ts +2 -3
- package/esm/PileupRenderer/components/PileupRendering.js +15 -20
- package/esm/PileupRenderer/configSchema.d.ts +5 -31
- package/esm/PileupRenderer/configSchema.js +6 -35
- package/esm/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
- package/esm/PileupRenderer/getAlignmentShapeColor.js +2 -7
- package/esm/PileupRenderer/index.d.ts +1 -1
- package/esm/PileupRenderer/index.js +1 -1
- package/esm/PileupRenderer/layoutFeature.d.ts +2 -2
- package/esm/PileupRenderer/layoutFeature.js +0 -1
- package/esm/PileupRenderer/layoutFeatures.d.ts +5 -2
- package/esm/PileupRenderer/layoutFeatures.js +7 -5
- package/esm/PileupRenderer/makeImageData.d.ts +3 -4
- package/esm/PileupRenderer/makeImageData.js +10 -2
- package/esm/PileupRenderer/renderAlignment.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignment.js +3 -5
- package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
- package/esm/PileupRenderer/renderMethylation.d.ts +4 -4
- package/esm/PileupRenderer/renderMethylation.js +0 -4
- package/esm/PileupRenderer/renderMismatches.d.ts +5 -4
- package/esm/PileupRenderer/renderMismatches.js +19 -25
- package/esm/PileupRenderer/renderModifications.d.ts +3 -3
- package/esm/PileupRenderer/renderModifications.js +1 -3
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
- package/esm/PileupRenderer/renderPerBaseQuality.js +2 -2
- package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
- package/esm/PileupRenderer/renderSoftClipping.js +1 -5
- package/esm/PileupRenderer/sortUtil.d.ts +2 -2
- package/esm/PileupRenderer/sortUtil.js +1 -4
- package/esm/PileupRenderer/types.d.ts +26 -0
- package/esm/PileupRenderer/types.js +1 -0
- package/esm/PileupRenderer/util.d.ts +2 -2
- package/esm/PileupRenderer/util.js +1 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +5 -7
- package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
- package/esm/SNPCoverageAdapter/configSchema.js +1 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +24 -246
- package/esm/SNPCoverageAdapter/index.d.ts +1 -1
- package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
- package/esm/SNPCoverageAdapter/processDepth.js +35 -0
- package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
- package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
- package/esm/SNPCoverageAdapter/processModifications.js +46 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
- package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
- package/esm/SNPCoverageAdapter/util.d.ts +10 -0
- package/esm/SNPCoverageAdapter/util.js +35 -0
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -18
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +3 -289
- package/esm/SNPCoverageRenderer/configSchema.d.ts +3 -18
- package/esm/SNPCoverageRenderer/configSchema.js +4 -22
- package/esm/SNPCoverageRenderer/index.d.ts +1 -1
- package/esm/SNPCoverageRenderer/index.js +2 -2
- package/esm/SNPCoverageRenderer/makeImage.d.ts +2 -0
- package/esm/SNPCoverageRenderer/makeImage.js +267 -0
- package/esm/SNPCoverageRenderer/types.d.ts +19 -0
- package/esm/SNPCoverageRenderer/types.js +1 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +10 -10
- package/esm/shared/afterAttach.d.ts +1 -1
- package/esm/shared/afterAttach.js +0 -2
- package/esm/shared/color.d.ts +1 -1
- package/esm/shared/color.js +0 -8
- package/esm/shared/components/BaseDisplayComponent.d.ts +3 -4
- package/esm/shared/components/BaseDisplayComponent.js +13 -16
- package/esm/shared/components/FilterByTagDialog.d.ts +2 -3
- package/esm/shared/components/FilterByTagDialog.js +44 -71
- package/esm/shared/fetchChains.d.ts +2 -2
- package/esm/shared/fetchChains.js +1 -2
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
- package/esm/shared/getMaximumModificationAtEachPosition.js +1 -2
- package/esm/shared/getUniqueModifications.d.ts +5 -5
- package/esm/shared/getUniqueTags.d.ts +4 -4
- package/esm/shared/renderSvgUtil.d.ts +1 -2
- package/esm/shared/renderSvgUtil.js +3 -9
- package/esm/shared/util.d.ts +11 -1
- package/esm/shared/util.js +24 -0
- package/esm/util.d.ts +4 -4
- package/esm/util.js +3 -9
- package/package.json +6 -7
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import { BamFile } from '@gmod/bam';
|
|
2
|
-
import {
|
|
3
|
-
import { firstValueFrom } from 'rxjs';
|
|
4
|
-
// jbrowse
|
|
5
|
-
import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
6
3
|
import { bytesForRegions, updateStatus } from '@jbrowse/core/util';
|
|
4
|
+
import QuickLRU from '@jbrowse/core/util/QuickLRU';
|
|
7
5
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
8
6
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
9
|
-
import
|
|
10
|
-
|
|
7
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
|
+
import { firstValueFrom } from 'rxjs';
|
|
9
|
+
import { toArray } from 'rxjs/operators';
|
|
11
10
|
import BamSlightlyLazyFeature from './BamSlightlyLazyFeature';
|
|
11
|
+
import { filterReadFlag, filterTagValue } from '../shared/util';
|
|
12
12
|
export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
// used for avoiding re-creation new BamSlightlyLazyFeatures, keeping
|
|
16
|
-
// mismatches in cache. at an average of 100kb-300kb, keeping even just 500
|
|
17
|
-
// of these in memory is memory intensive but can reduce recomputation on
|
|
18
|
-
// these objects
|
|
19
15
|
this.ultraLongFeatureCache = new QuickLRU({
|
|
20
16
|
maxSize: 500,
|
|
21
17
|
});
|
|
22
18
|
}
|
|
23
|
-
// derived classes may not use the same configuration so a custom configure
|
|
24
|
-
// method allows derived classes to override this behavior
|
|
25
19
|
async configurePre() {
|
|
26
20
|
const bamLocation = this.getConf('bamLocation');
|
|
27
21
|
const location = this.getConf(['index', 'location']);
|
|
@@ -53,23 +47,20 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
53
47
|
}
|
|
54
48
|
return this.configureP;
|
|
55
49
|
}
|
|
56
|
-
async getHeader(
|
|
50
|
+
async getHeader(_opts) {
|
|
57
51
|
const { bam } = await this.configure();
|
|
58
|
-
return bam.getHeaderText(
|
|
52
|
+
return bam.getHeaderText();
|
|
59
53
|
}
|
|
60
54
|
async setupPre(opts) {
|
|
61
55
|
const { statusCallback = () => { } } = opts || {};
|
|
62
56
|
const { bam } = await this.configure();
|
|
63
57
|
this.samHeader = await updateStatus('Downloading index', statusCallback, async () => {
|
|
64
|
-
const samHeader = await bam.getHeader(
|
|
65
|
-
// use the @SQ lines in the header to figure out the
|
|
66
|
-
// mapping between ref ref ID numbers and names
|
|
58
|
+
const samHeader = await bam.getHeader();
|
|
67
59
|
const idToName = [];
|
|
68
60
|
const nameToId = {};
|
|
69
61
|
samHeader === null || samHeader === void 0 ? void 0 : samHeader.filter(l => l.tag === 'SQ').forEach((sqLine, refId) => {
|
|
70
62
|
const SN = sqLine.data.find(item => item.tag === 'SN');
|
|
71
63
|
if (SN) {
|
|
72
|
-
// this is the ref name
|
|
73
64
|
const refName = SN.value;
|
|
74
65
|
nameToId[refName] = refId;
|
|
75
66
|
idToName[refId] = refName;
|
|
@@ -127,11 +118,13 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
127
118
|
}
|
|
128
119
|
getFeatures(region, opts) {
|
|
129
120
|
const { refName, start, end, originalRefName } = region;
|
|
130
|
-
const {
|
|
121
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
131
122
|
return ObservableCreate(async (observer) => {
|
|
132
123
|
const { bam } = await this.configure();
|
|
133
124
|
await this.setup(opts);
|
|
134
|
-
|
|
125
|
+
checkStopToken(stopToken);
|
|
126
|
+
const records = await updateStatus('Downloading alignments', statusCallback, () => bam.getRecordsForRange(refName, start, end));
|
|
127
|
+
checkStopToken(stopToken);
|
|
135
128
|
await updateStatus('Processing alignments', statusCallback, async () => {
|
|
136
129
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
137
130
|
for (const record of records) {
|
|
@@ -139,25 +132,16 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
139
132
|
if (!record.tags.MD) {
|
|
140
133
|
ref = await this.seqFetch(originalRefName || refName, record.start, record.end);
|
|
141
134
|
}
|
|
142
|
-
|
|
143
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
135
|
+
if (filterReadFlag(record.flags, flagInclude, flagExclude)) {
|
|
144
136
|
continue;
|
|
145
137
|
}
|
|
146
|
-
if (tagFilter
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (filterVal === '*'
|
|
150
|
-
? readVal === undefined
|
|
151
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
138
|
+
if (tagFilter &&
|
|
139
|
+
filterTagValue(record.tags[tagFilter.tag], tagFilter.value)) {
|
|
140
|
+
continue;
|
|
154
141
|
}
|
|
155
142
|
if (readName && record.name !== readName) {
|
|
156
143
|
continue;
|
|
157
144
|
}
|
|
158
|
-
// retrieve a feature from our feature cache if it is available, the
|
|
159
|
-
// features in the cache have pre-computed mismatches objects that
|
|
160
|
-
// can be re-used across blocks
|
|
161
145
|
const ret = this.ultraLongFeatureCache.get(`${record.id}`);
|
|
162
146
|
if (!ret) {
|
|
163
147
|
const elt = new BamSlightlyLazyFeature(record, this, ref);
|
|
@@ -170,11 +154,10 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
170
154
|
}
|
|
171
155
|
observer.complete();
|
|
172
156
|
});
|
|
173
|
-
}
|
|
157
|
+
});
|
|
174
158
|
}
|
|
175
159
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
176
160
|
const { bam } = await this.configure();
|
|
177
|
-
// this is a method to avoid calling on htsget adapters
|
|
178
161
|
if (bam.index) {
|
|
179
162
|
const bytes = await bytesForRegions(regions, bam);
|
|
180
163
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -182,8 +165,7 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
182
165
|
}
|
|
183
166
|
return super.getMultiRegionFeatureDensityStats(regions, opts);
|
|
184
167
|
}
|
|
185
|
-
freeResources(
|
|
186
|
-
// depends on setup being called before the BAM constructor
|
|
168
|
+
freeResources() { }
|
|
187
169
|
refIdToName(refId) {
|
|
188
170
|
var _a;
|
|
189
171
|
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,9 +1,6 @@
|
|
|
1
|
-
// locals
|
|
2
1
|
import { getMismatches } from '../MismatchParser';
|
|
3
2
|
import { cacheGetter } from '../shared/util';
|
|
4
3
|
export default class BamSlightlyLazyFeature {
|
|
5
|
-
// uses parameter properties to automatically create fields on the class
|
|
6
|
-
// https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
|
|
7
4
|
constructor(record, adapter, ref) {
|
|
8
5
|
this.record = record;
|
|
9
6
|
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;
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { types } from 'mobx-state-tree';
|
|
3
|
-
|
|
4
|
-
* #config BamAdapter
|
|
5
|
-
* used to configure BAM adapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
8
4
|
const configSchema = ConfigurationSchema('BamAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
5
|
bamLocation: {
|
|
13
6
|
type: 'fileLocation',
|
|
14
7
|
defaultValue: { uri: '/path/to/my.bam', locationType: 'UriLocation' },
|
|
15
8
|
},
|
|
16
9
|
index: ConfigurationSchema('BamIndex', {
|
|
17
|
-
/**
|
|
18
|
-
* #slot index.indexType
|
|
19
|
-
*/
|
|
20
10
|
indexType: {
|
|
21
11
|
model: types.enumeration('IndexType', ['BAI', 'CSI']),
|
|
22
12
|
type: 'stringEnum',
|
|
23
13
|
defaultValue: 'BAI',
|
|
24
14
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot index.location
|
|
27
|
-
*/
|
|
28
15
|
location: {
|
|
29
16
|
type: 'fileLocation',
|
|
30
17
|
defaultValue: {
|
|
@@ -33,19 +20,11 @@ const configSchema = ConfigurationSchema('BamAdapter', {
|
|
|
33
20
|
},
|
|
34
21
|
},
|
|
35
22
|
}),
|
|
36
|
-
/**
|
|
37
|
-
* #slot
|
|
38
|
-
*/
|
|
39
23
|
fetchSizeLimit: {
|
|
40
24
|
type: 'number',
|
|
41
25
|
description: 'size to fetch in bytes over which to display a warning to the user that too much data will be fetched',
|
|
42
26
|
defaultValue: 5000000,
|
|
43
27
|
},
|
|
44
|
-
/**
|
|
45
|
-
* #slot
|
|
46
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
47
|
-
* currently needs to be manually added
|
|
48
|
-
*/
|
|
49
28
|
sequenceAdapter: {
|
|
50
29
|
type: 'frozen',
|
|
51
30
|
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 {};
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { CraiIndex, IndexedCramFile } from '@gmod/cram';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
6
|
-
import { checkAbortSignal, updateStatus, toLocale } from '@jbrowse/core/util';
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import { toLocale, updateStatus } from '@jbrowse/core/util';
|
|
4
|
+
import QuickLRU from '@jbrowse/core/util/QuickLRU';
|
|
7
5
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
8
6
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
9
|
-
import
|
|
10
|
-
|
|
7
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
|
+
import { firstValueFrom } from 'rxjs';
|
|
9
|
+
import { toArray } from 'rxjs/operators';
|
|
11
10
|
import CramSlightlyLazyFeature from './CramSlightlyLazyFeature';
|
|
11
|
+
import { filterReadFlag, filterTagValue } from '../shared/util';
|
|
12
12
|
export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.samHeader = {};
|
|
16
|
-
// used for avoiding re-creation new BamSlightlyLazyFeatures, keeping
|
|
17
|
-
// mismatches in cache. at an average of 100kb-300kb, keeping even just 500
|
|
18
|
-
// of these in memory is fairly intensive but can reduce recomputation on
|
|
19
|
-
// these objects
|
|
20
16
|
this.ultraLongFeatureCache = new QuickLRU({
|
|
21
17
|
maxSize: 500,
|
|
22
18
|
});
|
|
23
|
-
// maps a seqId to original refname, passed specially to render args, to a seqid
|
|
24
19
|
this.seqIdToOriginalRefName = [];
|
|
25
20
|
}
|
|
26
21
|
async configurePre() {
|
|
@@ -29,7 +24,9 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
29
24
|
const pm = this.pluginManager;
|
|
30
25
|
const cram = new IndexedCramFile({
|
|
31
26
|
cramFilehandle: openLocation(cramLocation, pm),
|
|
32
|
-
index: new CraiIndex({
|
|
27
|
+
index: new CraiIndex({
|
|
28
|
+
filehandle: openLocation(craiLocation, pm),
|
|
29
|
+
}),
|
|
33
30
|
seqFetch: (...args) => this.seqFetch(...args),
|
|
34
31
|
checkSequenceMD5: false,
|
|
35
32
|
});
|
|
@@ -60,7 +57,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
60
57
|
return cram.cram.getHeaderText();
|
|
61
58
|
}
|
|
62
59
|
async seqFetch(seqId, start, end) {
|
|
63
|
-
start -= 1;
|
|
60
|
+
start -= 1;
|
|
64
61
|
const { sequenceAdapter } = await this.configure();
|
|
65
62
|
const refName = this.refIdToOriginalName(seqId) || this.refIdToName(seqId);
|
|
66
63
|
if (!refName) {
|
|
@@ -98,8 +95,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
98
95
|
const conf = await this.configure();
|
|
99
96
|
const { cram } = conf;
|
|
100
97
|
const samHeader = await cram.cram.getSamHeader();
|
|
101
|
-
// use the @SQ lines in the header to figure out the
|
|
102
|
-
// mapping between ref ID numbers and names
|
|
103
98
|
const idToName = [];
|
|
104
99
|
const nameToId = {};
|
|
105
100
|
samHeader
|
|
@@ -117,7 +112,10 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
117
112
|
.map(rgLine => { var _a; return (_a = rgLine.data.find(item => item.tag === 'ID')) === null || _a === void 0 ? void 0 : _a.value; });
|
|
118
113
|
const data = { idToName, nameToId, readGroups };
|
|
119
114
|
this.samHeader = data;
|
|
120
|
-
return {
|
|
115
|
+
return {
|
|
116
|
+
samHeader: data,
|
|
117
|
+
...conf,
|
|
118
|
+
};
|
|
121
119
|
});
|
|
122
120
|
}
|
|
123
121
|
async setup(opts) {
|
|
@@ -136,8 +134,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
136
134
|
}
|
|
137
135
|
return samHeader.idToName;
|
|
138
136
|
}
|
|
139
|
-
// use info from the SAM header if possible, but fall back to using
|
|
140
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
141
137
|
refNameToId(refName) {
|
|
142
138
|
if (this.samHeader.nameToId) {
|
|
143
139
|
return this.samHeader.nameToId[refName];
|
|
@@ -147,8 +143,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
147
143
|
}
|
|
148
144
|
return undefined;
|
|
149
145
|
}
|
|
150
|
-
// use info from the SAM header if possible, but fall back to using
|
|
151
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
152
146
|
refIdToName(refId) {
|
|
153
147
|
var _a, _b;
|
|
154
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]);
|
|
@@ -157,7 +151,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
157
151
|
return this.seqIdToOriginalRefName[refId];
|
|
158
152
|
}
|
|
159
153
|
getFeatures(region, opts) {
|
|
160
|
-
const {
|
|
154
|
+
const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
|
|
161
155
|
const { refName, start, end, originalRefName } = region;
|
|
162
156
|
return ObservableCreate(async (observer) => {
|
|
163
157
|
const { cram, samHeader } = await this.setup(opts);
|
|
@@ -171,25 +165,19 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
171
165
|
this.seqIdToOriginalRefName[refId] = originalRefName;
|
|
172
166
|
}
|
|
173
167
|
const records = await updateStatus('Downloading alignments', statusCallback, () => cram.getRecordsForRange(refId, start, end));
|
|
174
|
-
|
|
168
|
+
checkStopToken(stopToken);
|
|
175
169
|
await updateStatus('Processing alignments', statusCallback, () => {
|
|
176
170
|
var _a;
|
|
177
171
|
const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
|
|
178
172
|
for (const record of records) {
|
|
179
|
-
|
|
180
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
173
|
+
if (filterReadFlag(record.flags, flagInclude, flagExclude)) {
|
|
181
174
|
continue;
|
|
182
175
|
}
|
|
183
|
-
if (tagFilter
|
|
184
|
-
|
|
176
|
+
if (tagFilter &&
|
|
177
|
+
filterTagValue(tagFilter.tag === 'RG'
|
|
185
178
|
? (_a = samHeader.readGroups) === null || _a === void 0 ? void 0 : _a[record.readGroupId]
|
|
186
|
-
: record.tags[tagFilter.tag]
|
|
187
|
-
|
|
188
|
-
if (filterVal === '*'
|
|
189
|
-
? readVal === undefined
|
|
190
|
-
: `${readVal}` !== `${filterVal}`) {
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
179
|
+
: record.tags[tagFilter.tag], tagFilter.value)) {
|
|
180
|
+
continue;
|
|
193
181
|
}
|
|
194
182
|
if (readName && record.readName !== readName) {
|
|
195
183
|
continue;
|
|
@@ -206,13 +194,12 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
206
194
|
}
|
|
207
195
|
observer.complete();
|
|
208
196
|
});
|
|
209
|
-
},
|
|
197
|
+
}, stopToken);
|
|
210
198
|
}
|
|
211
|
-
freeResources(
|
|
199
|
+
freeResources() { }
|
|
212
200
|
cramRecordToFeature(record) {
|
|
213
201
|
return new CramSlightlyLazyFeature(record, this);
|
|
214
202
|
}
|
|
215
|
-
// we return the configured fetchSizeLimit, and the bytes for the region
|
|
216
203
|
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
217
204
|
const bytes = await this.bytesForRegions(regions, opts);
|
|
218
205
|
const fetchSizeLimit = this.getConf('fetchSizeLimit');
|
|
@@ -221,11 +208,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
221
208
|
fetchSizeLimit,
|
|
222
209
|
};
|
|
223
210
|
}
|
|
224
|
-
/**
|
|
225
|
-
* get the approximate number of bytes queried from the file for the given
|
|
226
|
-
* query regions
|
|
227
|
-
* @param regions - list of query regions
|
|
228
|
-
*/
|
|
229
211
|
async bytesForRegions(regions, _opts) {
|
|
230
212
|
const { cram } = await this.configure();
|
|
231
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;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { readFeaturesToCIGAR, readFeaturesToMismatches } from './util';
|
|
2
2
|
import { cacheGetter } from '../shared/util';
|
|
3
3
|
export default class CramSlightlyLazyFeature {
|
|
4
|
-
// uses parameter properties to automatically create fields on the class
|
|
5
|
-
// https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
|
|
6
4
|
constructor(record, _store) {
|
|
7
5
|
this.record = record;
|
|
8
6
|
this._store = _store;
|
|
@@ -66,7 +64,6 @@ export default class CramSlightlyLazyFeature {
|
|
|
66
64
|
get seq() {
|
|
67
65
|
return this.record.getReadBases();
|
|
68
66
|
}
|
|
69
|
-
// generate a CIGAR, based on code from jkbonfield
|
|
70
67
|
get CIGAR() {
|
|
71
68
|
return readFeaturesToCIGAR(this.record.readFeatures, this.record.alignmentStart, this.record.readLength, this.record._refRegion);
|
|
72
69
|
}
|
|
@@ -90,18 +87,6 @@ export default class CramSlightlyLazyFeature {
|
|
|
90
87
|
}
|
|
91
88
|
get mismatches() {
|
|
92
89
|
return readFeaturesToMismatches(this.record.readFeatures, this.start, this.qualRaw);
|
|
93
|
-
// this commented code can try to resolve MD tags, xref https://github.com/galaxyproject/tools-iuc/issues/6523#issuecomment-2462927211 but put on hold
|
|
94
|
-
// return this.tags.MD && this.seq
|
|
95
|
-
// ? mismatches.concat(
|
|
96
|
-
// mdToMismatches(
|
|
97
|
-
// this.tags.MD,
|
|
98
|
-
// parseCigar(this.CIGAR),
|
|
99
|
-
// mismatches,
|
|
100
|
-
// this.seq,
|
|
101
|
-
// this.qualRaw,
|
|
102
|
-
// ),
|
|
103
|
-
// )
|
|
104
|
-
// : mismatches
|
|
105
90
|
}
|
|
106
91
|
get fields() {
|
|
107
92
|
return {
|
|
@@ -126,9 +111,7 @@ export default class CramSlightlyLazyFeature {
|
|
|
126
111
|
toJSON() {
|
|
127
112
|
return {
|
|
128
113
|
...this.fields,
|
|
129
|
-
// lazy
|
|
130
114
|
CIGAR: this.CIGAR,
|
|
131
|
-
// lazy
|
|
132
115
|
qual: this.qual,
|
|
133
116
|
};
|
|
134
117
|
}
|
|
@@ -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-filehandle2';
|
|
5
5
|
export declare function parseSmallFasta(text: string): {
|
|
6
6
|
id: string;
|
|
7
7
|
description: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
3
|
-
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
5
|
-
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
6
5
|
export function parseSmallFasta(text) {
|
|
7
6
|
return text
|
|
8
7
|
.split('>')
|
|
@@ -22,7 +21,8 @@ export function parseSmallFasta(text) {
|
|
|
22
21
|
export class FetchableSmallFasta {
|
|
23
22
|
constructor(filehandle) {
|
|
24
23
|
this.data = filehandle.readFile().then(buffer => {
|
|
25
|
-
const
|
|
24
|
+
const decoder = new TextDecoder('utf8');
|
|
25
|
+
const text = decoder.decode(buffer);
|
|
26
26
|
return parseSmallFasta(text);
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -73,5 +73,5 @@ export class SequenceAdapter extends BaseFeatureDataAdapter {
|
|
|
73
73
|
return { unsubscribe: () => { } };
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
freeResources(
|
|
76
|
+
freeResources() { }
|
|
77
77
|
}
|
|
@@ -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,21 +1,11 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config CramAdapter
|
|
4
|
-
* used to configure CRAM adapter
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
7
3
|
const configSchema = ConfigurationSchema('CramAdapter', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot fetchSizeLimit
|
|
10
|
-
*/
|
|
11
4
|
fetchSizeLimit: {
|
|
12
5
|
type: 'number',
|
|
13
6
|
description: 'size in bytes over which to display a warning to the user that too much data will be fetched',
|
|
14
7
|
defaultValue: 3000000,
|
|
15
8
|
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot cramLocation
|
|
18
|
-
*/
|
|
19
9
|
cramLocation: {
|
|
20
10
|
type: 'fileLocation',
|
|
21
11
|
defaultValue: {
|
|
@@ -23,9 +13,6 @@ const configSchema = ConfigurationSchema('CramAdapter', {
|
|
|
23
13
|
locationType: 'UriLocation',
|
|
24
14
|
},
|
|
25
15
|
},
|
|
26
|
-
/**
|
|
27
|
-
* #slot craiLocation
|
|
28
|
-
*/
|
|
29
16
|
craiLocation: {
|
|
30
17
|
type: 'fileLocation',
|
|
31
18
|
defaultValue: {
|
|
@@ -33,11 +20,6 @@ const configSchema = ConfigurationSchema('CramAdapter', {
|
|
|
33
20
|
locationType: 'UriLocation',
|
|
34
21
|
},
|
|
35
22
|
},
|
|
36
|
-
/**
|
|
37
|
-
* #slot sequenceAdapter
|
|
38
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
39
|
-
* currently needs to be manually added
|
|
40
|
-
*/
|
|
41
23
|
sequenceAdapter: {
|
|
42
24
|
type: 'frozen',
|
|
43
25
|
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;
|
package/esm/CramAdapter/index.js
CHANGED
|
@@ -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?: {
|