@jbrowse/plugin-alignments 2.6.1 → 2.6.3
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.js +0 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureFlags.js +0 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureSuppAligns.js +0 -1
- package/dist/AlignmentsFeatureDetail/index.js +0 -1
- package/dist/AlignmentsFeatureDetail/util.js +0 -1
- package/dist/AlignmentsTrack/configSchemaF.js +0 -1
- package/dist/AlignmentsTrack/index.js +0 -1
- package/dist/BamAdapter/BamAdapter.js +0 -1
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/dist/BamAdapter/configSchema.js +0 -1
- package/dist/BamAdapter/index.js +0 -1
- package/dist/CramAdapter/CramAdapter.js +0 -1
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -1
- package/dist/CramAdapter/CramTestAdapters.js +0 -1
- package/dist/CramAdapter/configSchema.js +0 -1
- package/dist/CramAdapter/index.js +0 -1
- package/dist/CramAdapter/util.js +0 -1
- package/dist/GuessAlignmentsTypes/index.js +0 -1
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js +0 -1
- package/dist/HtsgetBamAdapter/configSchema.js +0 -1
- package/dist/HtsgetBamAdapter/index.js +0 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +5 -2
- package/dist/LinearAlignmentsDisplay/index.js +0 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.js +0 -1
- package/dist/LinearAlignmentsDisplay/models/model.js +5 -2
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +492 -0
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +529 -0
- package/dist/LinearPileupDisplay/components/ColorByModifications.js +0 -1
- package/dist/LinearPileupDisplay/components/ColorByTag.js +0 -1
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +0 -1
- package/dist/LinearPileupDisplay/components/ModificationsTable.js +0 -1
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.js +0 -1
- package/dist/LinearPileupDisplay/components/SetMaxHeight.js +0 -1
- package/dist/LinearPileupDisplay/components/SortByTag.js +0 -1
- package/dist/LinearPileupDisplay/configSchema.js +0 -1
- package/dist/LinearPileupDisplay/index.d.ts +1 -0
- package/dist/LinearPileupDisplay/index.js +3 -2
- package/dist/LinearPileupDisplay/model.d.ts +110 -231
- package/dist/LinearPileupDisplay/model.js +47 -445
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +0 -1
- package/dist/LinearReadArcsDisplay/configSchema.js +0 -1
- package/dist/LinearReadArcsDisplay/drawFeats.js +0 -1
- package/dist/LinearReadArcsDisplay/index.js +0 -1
- package/dist/LinearReadArcsDisplay/model.js +0 -1
- package/dist/LinearReadArcsDisplay/util.js +0 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +0 -1
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +4 -4
- package/dist/LinearReadCloudDisplay/configSchema.js +0 -1
- package/dist/LinearReadCloudDisplay/drawFeats.js +0 -1
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js +0 -1
- package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -1
- package/dist/LinearReadCloudDisplay/index.js +0 -1
- package/dist/LinearReadCloudDisplay/model.d.ts +1 -3
- package/dist/LinearReadCloudDisplay/model.js +0 -1
- package/dist/LinearReadCloudDisplay/util.js +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +0 -1
- package/dist/LinearSNPCoverageDisplay/index.js +0 -1
- package/dist/LinearSNPCoverageDisplay/models/configSchema.d.ts +3 -0
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js +0 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +31 -15
- package/dist/LinearSNPCoverageDisplay/models/model.js +0 -1
- package/dist/MismatchParser/index.js +0 -1
- package/dist/PileupRPC/base.js +0 -1
- package/dist/PileupRPC/index.js +0 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +0 -1
- package/dist/PileupRPC/methods/GetReducedFeatures.js +0 -1
- package/dist/PileupRPC/methods/GetVisibleModifications.js +0 -1
- package/dist/PileupRPC/rpcMethods.js +0 -1
- package/dist/PileupRPC/util.js +0 -1
- package/dist/PileupRenderer/PileupLayoutSession.js +0 -1
- package/dist/PileupRenderer/PileupRenderer.js +0 -1
- package/dist/PileupRenderer/colorBy.js +8 -7
- package/dist/PileupRenderer/components/PileupRendering.js +0 -1
- package/dist/PileupRenderer/configSchema.js +0 -1
- package/dist/PileupRenderer/getAlignmentShapeColor.js +0 -1
- package/dist/PileupRenderer/index.js +0 -1
- package/dist/PileupRenderer/layoutFeature.js +0 -1
- package/dist/PileupRenderer/layoutFeatures.js +0 -1
- package/dist/PileupRenderer/makeImageData.js +0 -1
- package/dist/PileupRenderer/renderAlignment.js +0 -1
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -2
- package/dist/PileupRenderer/renderMethylation.js +0 -1
- package/dist/PileupRenderer/renderMismatches.js +0 -1
- package/dist/PileupRenderer/renderModifications.js +0 -1
- package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/dist/PileupRenderer/renderPerBaseQuality.js +0 -1
- package/dist/PileupRenderer/renderSoftClipping.js +0 -1
- package/dist/PileupRenderer/sortUtil.js +0 -1
- package/dist/PileupRenderer/util.js +0 -1
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +0 -1
- package/dist/SNPCoverageAdapter/configSchema.js +0 -1
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +0 -1
- package/dist/SNPCoverageAdapter/index.js +0 -1
- package/dist/SNPCoverageAdapter/util.js +0 -1
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +0 -1
- package/dist/SNPCoverageRenderer/configSchema.js +0 -1
- package/dist/SNPCoverageRenderer/index.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/shared/BaseDisplayComponent.js +0 -1
- package/dist/shared/FilterByTag.js +0 -1
- package/dist/shared/afterAttach.js +0 -1
- package/dist/shared/color.d.ts +10 -0
- package/dist/shared/color.js +7 -2
- package/dist/shared/fetchChains.js +0 -1
- package/dist/shared/index.js +0 -1
- package/dist/shared/renderSvg.js +0 -1
- package/dist/shared/util.js +0 -1
- package/dist/util.js +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureFlags.js +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureSuppAligns.js +0 -1
- package/esm/AlignmentsFeatureDetail/index.js +0 -1
- package/esm/AlignmentsFeatureDetail/util.js +0 -1
- package/esm/AlignmentsTrack/configSchemaF.js +0 -1
- package/esm/AlignmentsTrack/index.js +0 -1
- package/esm/BamAdapter/BamAdapter.js +0 -1
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/esm/BamAdapter/configSchema.js +0 -1
- package/esm/BamAdapter/index.js +0 -1
- package/esm/CramAdapter/CramAdapter.js +0 -1
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -1
- package/esm/CramAdapter/CramTestAdapters.js +0 -1
- package/esm/CramAdapter/configSchema.js +0 -1
- package/esm/CramAdapter/index.js +0 -1
- package/esm/CramAdapter/util.js +0 -1
- package/esm/GuessAlignmentsTypes/index.js +0 -1
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.js +0 -1
- package/esm/HtsgetBamAdapter/configSchema.js +0 -1
- package/esm/HtsgetBamAdapter/index.js +0 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +5 -2
- package/esm/LinearAlignmentsDisplay/index.js +0 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.js +0 -1
- package/esm/LinearAlignmentsDisplay/models/model.js +5 -2
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +492 -0
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +499 -0
- package/esm/LinearPileupDisplay/components/ColorByModifications.js +0 -1
- package/esm/LinearPileupDisplay/components/ColorByTag.js +0 -1
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +0 -1
- package/esm/LinearPileupDisplay/components/ModificationsTable.js +0 -1
- package/esm/LinearPileupDisplay/components/SetFeatureHeight.js +0 -1
- package/esm/LinearPileupDisplay/components/SetMaxHeight.js +0 -1
- package/esm/LinearPileupDisplay/components/SortByTag.js +0 -1
- package/esm/LinearPileupDisplay/configSchema.js +0 -1
- package/esm/LinearPileupDisplay/index.d.ts +1 -0
- package/esm/LinearPileupDisplay/index.js +1 -1
- package/esm/LinearPileupDisplay/model.d.ts +110 -231
- package/esm/LinearPileupDisplay/model.js +48 -446
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +0 -1
- package/esm/LinearReadArcsDisplay/configSchema.js +0 -1
- package/esm/LinearReadArcsDisplay/drawFeats.js +0 -1
- package/esm/LinearReadArcsDisplay/index.js +0 -1
- package/esm/LinearReadArcsDisplay/model.js +0 -1
- package/esm/LinearReadArcsDisplay/util.js +0 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +0 -1
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +4 -4
- package/esm/LinearReadCloudDisplay/configSchema.js +0 -1
- package/esm/LinearReadCloudDisplay/drawFeats.js +0 -1
- package/esm/LinearReadCloudDisplay/drawLongReadChains.js +0 -1
- package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -1
- package/esm/LinearReadCloudDisplay/index.js +0 -1
- package/esm/LinearReadCloudDisplay/model.d.ts +1 -3
- package/esm/LinearReadCloudDisplay/model.js +0 -1
- package/esm/LinearReadCloudDisplay/util.js +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +0 -1
- package/esm/LinearSNPCoverageDisplay/index.js +0 -1
- package/esm/LinearSNPCoverageDisplay/models/configSchema.d.ts +3 -0
- package/esm/LinearSNPCoverageDisplay/models/configSchema.js +0 -1
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +31 -15
- package/esm/LinearSNPCoverageDisplay/models/model.js +0 -1
- package/esm/MismatchParser/index.js +0 -1
- package/esm/PileupRPC/base.js +0 -1
- package/esm/PileupRPC/index.js +0 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +0 -1
- package/esm/PileupRPC/methods/GetReducedFeatures.js +0 -1
- package/esm/PileupRPC/methods/GetVisibleModifications.js +0 -1
- package/esm/PileupRPC/rpcMethods.js +0 -1
- package/esm/PileupRPC/util.js +0 -1
- package/esm/PileupRenderer/PileupLayoutSession.js +0 -1
- package/esm/PileupRenderer/PileupRenderer.js +0 -1
- package/esm/PileupRenderer/colorBy.js +8 -7
- package/esm/PileupRenderer/components/PileupRendering.js +0 -1
- package/esm/PileupRenderer/configSchema.js +0 -1
- package/esm/PileupRenderer/getAlignmentShapeColor.js +0 -1
- package/esm/PileupRenderer/index.js +0 -1
- package/esm/PileupRenderer/layoutFeature.js +0 -1
- package/esm/PileupRenderer/layoutFeatures.js +0 -1
- package/esm/PileupRenderer/makeImageData.js +0 -1
- package/esm/PileupRenderer/renderAlignment.js +0 -1
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -2
- package/esm/PileupRenderer/renderMethylation.js +0 -1
- package/esm/PileupRenderer/renderMismatches.js +0 -1
- package/esm/PileupRenderer/renderModifications.js +0 -1
- package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
- package/esm/PileupRenderer/renderPerBaseQuality.js +0 -1
- package/esm/PileupRenderer/renderSoftClipping.js +0 -1
- package/esm/PileupRenderer/sortUtil.js +0 -1
- package/esm/PileupRenderer/util.js +0 -1
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +0 -1
- package/esm/SNPCoverageAdapter/configSchema.js +0 -1
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +0 -1
- package/esm/SNPCoverageAdapter/index.js +0 -1
- package/esm/SNPCoverageAdapter/util.js +0 -1
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +0 -1
- package/esm/SNPCoverageRenderer/configSchema.js +0 -1
- package/esm/SNPCoverageRenderer/index.js +0 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -2
- package/esm/shared/BaseDisplayComponent.js +0 -1
- package/esm/shared/FilterByTag.js +0 -1
- package/esm/shared/afterAttach.js +0 -1
- package/esm/shared/color.d.ts +10 -0
- package/esm/shared/color.js +6 -1
- package/esm/shared/fetchChains.js +0 -1
- package/esm/shared/index.js +0 -1
- package/esm/shared/renderSvg.js +0 -1
- package/esm/shared/util.js +0 -1
- package/esm/util.js +0 -1
- package/package.json +4 -5
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js.map +0 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureFlags.js.map +0 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureSuppAligns.js.map +0 -1
- package/dist/AlignmentsFeatureDetail/index.js.map +0 -1
- package/dist/AlignmentsFeatureDetail/util.js.map +0 -1
- package/dist/AlignmentsTrack/configSchemaF.js.map +0 -1
- package/dist/AlignmentsTrack/index.js.map +0 -1
- package/dist/BamAdapter/BamAdapter.js.map +0 -1
- package/dist/BamAdapter/BamSlightlyLazyFeature.js.map +0 -1
- package/dist/BamAdapter/configSchema.js.map +0 -1
- package/dist/BamAdapter/index.js.map +0 -1
- package/dist/CramAdapter/CramAdapter.js.map +0 -1
- package/dist/CramAdapter/CramSlightlyLazyFeature.js.map +0 -1
- package/dist/CramAdapter/CramTestAdapters.js.map +0 -1
- package/dist/CramAdapter/configSchema.js.map +0 -1
- package/dist/CramAdapter/index.js.map +0 -1
- package/dist/CramAdapter/util.js.map +0 -1
- package/dist/GuessAlignmentsTypes/index.js.map +0 -1
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js.map +0 -1
- package/dist/HtsgetBamAdapter/configSchema.js.map +0 -1
- package/dist/HtsgetBamAdapter/index.js.map +0 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js.map +0 -1
- package/dist/LinearAlignmentsDisplay/index.js.map +0 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.js.map +0 -1
- package/dist/LinearAlignmentsDisplay/models/model.js.map +0 -1
- package/dist/LinearPileupDisplay/components/ColorByModifications.js.map +0 -1
- package/dist/LinearPileupDisplay/components/ColorByTag.js.map +0 -1
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js.map +0 -1
- package/dist/LinearPileupDisplay/components/ModificationsTable.js.map +0 -1
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.js.map +0 -1
- package/dist/LinearPileupDisplay/components/SetMaxHeight.js.map +0 -1
- package/dist/LinearPileupDisplay/components/SortByTag.js.map +0 -1
- package/dist/LinearPileupDisplay/configSchema.js.map +0 -1
- package/dist/LinearPileupDisplay/index.js.map +0 -1
- package/dist/LinearPileupDisplay/model.js.map +0 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js.map +0 -1
- package/dist/LinearReadArcsDisplay/configSchema.js.map +0 -1
- package/dist/LinearReadArcsDisplay/drawFeats.js.map +0 -1
- package/dist/LinearReadArcsDisplay/index.js.map +0 -1
- package/dist/LinearReadArcsDisplay/model.js.map +0 -1
- package/dist/LinearReadArcsDisplay/util.js.map +0 -1
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js.map +0 -1
- package/dist/LinearReadCloudDisplay/configSchema.js.map +0 -1
- package/dist/LinearReadCloudDisplay/drawFeats.js.map +0 -1
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js.map +0 -1
- package/dist/LinearReadCloudDisplay/drawPairChains.js.map +0 -1
- package/dist/LinearReadCloudDisplay/index.js.map +0 -1
- package/dist/LinearReadCloudDisplay/model.js.map +0 -1
- package/dist/LinearReadCloudDisplay/util.js.map +0 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js.map +0 -1
- package/dist/LinearSNPCoverageDisplay/index.js.map +0 -1
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js.map +0 -1
- package/dist/LinearSNPCoverageDisplay/models/model.js.map +0 -1
- package/dist/MismatchParser/index.js.map +0 -1
- package/dist/PileupRPC/base.js.map +0 -1
- package/dist/PileupRPC/index.js.map +0 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js.map +0 -1
- package/dist/PileupRPC/methods/GetReducedFeatures.js.map +0 -1
- package/dist/PileupRPC/methods/GetVisibleModifications.js.map +0 -1
- package/dist/PileupRPC/rpcMethods.js.map +0 -1
- package/dist/PileupRPC/util.js.map +0 -1
- package/dist/PileupRenderer/PileupLayoutSession.js.map +0 -1
- package/dist/PileupRenderer/PileupRenderer.js.map +0 -1
- package/dist/PileupRenderer/colorBy.js.map +0 -1
- package/dist/PileupRenderer/components/PileupRendering.js.map +0 -1
- package/dist/PileupRenderer/configSchema.js.map +0 -1
- package/dist/PileupRenderer/getAlignmentShapeColor.js.map +0 -1
- package/dist/PileupRenderer/index.js.map +0 -1
- package/dist/PileupRenderer/layoutFeature.js.map +0 -1
- package/dist/PileupRenderer/layoutFeatures.js.map +0 -1
- package/dist/PileupRenderer/makeImageData.js.map +0 -1
- package/dist/PileupRenderer/renderAlignment.js.map +0 -1
- package/dist/PileupRenderer/renderAlignmentShape.js.map +0 -1
- package/dist/PileupRenderer/renderMethylation.js.map +0 -1
- package/dist/PileupRenderer/renderMismatches.js.map +0 -1
- package/dist/PileupRenderer/renderModifications.js.map +0 -1
- package/dist/PileupRenderer/renderPerBaseLettering.js.map +0 -1
- package/dist/PileupRenderer/renderPerBaseQuality.js.map +0 -1
- package/dist/PileupRenderer/renderSoftClipping.js.map +0 -1
- package/dist/PileupRenderer/sortUtil.js.map +0 -1
- package/dist/PileupRenderer/util.js.map +0 -1
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js.map +0 -1
- package/dist/SNPCoverageAdapter/configSchema.js.map +0 -1
- package/dist/SNPCoverageAdapter/generateCoverageBins.js.map +0 -1
- package/dist/SNPCoverageAdapter/index.js.map +0 -1
- package/dist/SNPCoverageAdapter/util.js.map +0 -1
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js.map +0 -1
- package/dist/SNPCoverageRenderer/configSchema.js.map +0 -1
- package/dist/SNPCoverageRenderer/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/shared/BaseDisplayComponent.js.map +0 -1
- package/dist/shared/FilterByTag.js.map +0 -1
- package/dist/shared/afterAttach.js.map +0 -1
- package/dist/shared/color.js.map +0 -1
- package/dist/shared/fetchChains.js.map +0 -1
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/renderSvg.js.map +0 -1
- package/dist/shared/util.js.map +0 -1
- package/dist/util.js.map +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js.map +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureFlags.js.map +0 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureSuppAligns.js.map +0 -1
- package/esm/AlignmentsFeatureDetail/index.js.map +0 -1
- package/esm/AlignmentsFeatureDetail/util.js.map +0 -1
- package/esm/AlignmentsTrack/configSchemaF.js.map +0 -1
- package/esm/AlignmentsTrack/index.js.map +0 -1
- package/esm/BamAdapter/BamAdapter.js.map +0 -1
- package/esm/BamAdapter/BamSlightlyLazyFeature.js.map +0 -1
- package/esm/BamAdapter/configSchema.js.map +0 -1
- package/esm/BamAdapter/index.js.map +0 -1
- package/esm/CramAdapter/CramAdapter.js.map +0 -1
- package/esm/CramAdapter/CramSlightlyLazyFeature.js.map +0 -1
- package/esm/CramAdapter/CramTestAdapters.js.map +0 -1
- package/esm/CramAdapter/configSchema.js.map +0 -1
- package/esm/CramAdapter/index.js.map +0 -1
- package/esm/CramAdapter/util.js.map +0 -1
- package/esm/GuessAlignmentsTypes/index.js.map +0 -1
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.js.map +0 -1
- package/esm/HtsgetBamAdapter/configSchema.js.map +0 -1
- package/esm/HtsgetBamAdapter/index.js.map +0 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js.map +0 -1
- package/esm/LinearAlignmentsDisplay/index.js.map +0 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.js.map +0 -1
- package/esm/LinearAlignmentsDisplay/models/model.js.map +0 -1
- package/esm/LinearPileupDisplay/components/ColorByModifications.js.map +0 -1
- package/esm/LinearPileupDisplay/components/ColorByTag.js.map +0 -1
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js.map +0 -1
- package/esm/LinearPileupDisplay/components/ModificationsTable.js.map +0 -1
- package/esm/LinearPileupDisplay/components/SetFeatureHeight.js.map +0 -1
- package/esm/LinearPileupDisplay/components/SetMaxHeight.js.map +0 -1
- package/esm/LinearPileupDisplay/components/SortByTag.js.map +0 -1
- package/esm/LinearPileupDisplay/configSchema.js.map +0 -1
- package/esm/LinearPileupDisplay/index.js.map +0 -1
- package/esm/LinearPileupDisplay/model.js.map +0 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js.map +0 -1
- package/esm/LinearReadArcsDisplay/configSchema.js.map +0 -1
- package/esm/LinearReadArcsDisplay/drawFeats.js.map +0 -1
- package/esm/LinearReadArcsDisplay/index.js.map +0 -1
- package/esm/LinearReadArcsDisplay/model.js.map +0 -1
- package/esm/LinearReadArcsDisplay/util.js.map +0 -1
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js.map +0 -1
- package/esm/LinearReadCloudDisplay/configSchema.js.map +0 -1
- package/esm/LinearReadCloudDisplay/drawFeats.js.map +0 -1
- package/esm/LinearReadCloudDisplay/drawLongReadChains.js.map +0 -1
- package/esm/LinearReadCloudDisplay/drawPairChains.js.map +0 -1
- package/esm/LinearReadCloudDisplay/index.js.map +0 -1
- package/esm/LinearReadCloudDisplay/model.js.map +0 -1
- package/esm/LinearReadCloudDisplay/util.js.map +0 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js.map +0 -1
- package/esm/LinearSNPCoverageDisplay/index.js.map +0 -1
- package/esm/LinearSNPCoverageDisplay/models/configSchema.js.map +0 -1
- package/esm/LinearSNPCoverageDisplay/models/model.js.map +0 -1
- package/esm/MismatchParser/index.js.map +0 -1
- package/esm/PileupRPC/base.js.map +0 -1
- package/esm/PileupRPC/index.js.map +0 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js.map +0 -1
- package/esm/PileupRPC/methods/GetReducedFeatures.js.map +0 -1
- package/esm/PileupRPC/methods/GetVisibleModifications.js.map +0 -1
- package/esm/PileupRPC/rpcMethods.js.map +0 -1
- package/esm/PileupRPC/util.js.map +0 -1
- package/esm/PileupRenderer/PileupLayoutSession.js.map +0 -1
- package/esm/PileupRenderer/PileupRenderer.js.map +0 -1
- package/esm/PileupRenderer/colorBy.js.map +0 -1
- package/esm/PileupRenderer/components/PileupRendering.js.map +0 -1
- package/esm/PileupRenderer/configSchema.js.map +0 -1
- package/esm/PileupRenderer/getAlignmentShapeColor.js.map +0 -1
- package/esm/PileupRenderer/index.js.map +0 -1
- package/esm/PileupRenderer/layoutFeature.js.map +0 -1
- package/esm/PileupRenderer/layoutFeatures.js.map +0 -1
- package/esm/PileupRenderer/makeImageData.js.map +0 -1
- package/esm/PileupRenderer/renderAlignment.js.map +0 -1
- package/esm/PileupRenderer/renderAlignmentShape.js.map +0 -1
- package/esm/PileupRenderer/renderMethylation.js.map +0 -1
- package/esm/PileupRenderer/renderMismatches.js.map +0 -1
- package/esm/PileupRenderer/renderModifications.js.map +0 -1
- package/esm/PileupRenderer/renderPerBaseLettering.js.map +0 -1
- package/esm/PileupRenderer/renderPerBaseQuality.js.map +0 -1
- package/esm/PileupRenderer/renderSoftClipping.js.map +0 -1
- package/esm/PileupRenderer/sortUtil.js.map +0 -1
- package/esm/PileupRenderer/util.js.map +0 -1
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js.map +0 -1
- package/esm/SNPCoverageAdapter/configSchema.js.map +0 -1
- package/esm/SNPCoverageAdapter/generateCoverageBins.js.map +0 -1
- package/esm/SNPCoverageAdapter/index.js.map +0 -1
- package/esm/SNPCoverageAdapter/util.js.map +0 -1
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js.map +0 -1
- package/esm/SNPCoverageRenderer/configSchema.js.map +0 -1
- package/esm/SNPCoverageRenderer/index.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/shared/BaseDisplayComponent.js.map +0 -1
- package/esm/shared/FilterByTag.js.map +0 -1
- package/esm/shared/afterAttach.js.map +0 -1
- package/esm/shared/color.js.map +0 -1
- package/esm/shared/fetchChains.js.map +0 -1
- package/esm/shared/index.js.map +0 -1
- package/esm/shared/renderSvg.js.map +0 -1
- package/esm/shared/util.js.map +0 -1
- package/esm/util.js.map +0 -1
- package/src/AlignmentsFeatureDetail/AlignmentsFeatureDetail.tsx +0 -155
- package/src/AlignmentsFeatureDetail/AlignmentsFeatureFlags.tsx +0 -60
- package/src/AlignmentsFeatureDetail/AlignmentsFeatureSuppAligns.tsx +0 -51
- package/src/AlignmentsFeatureDetail/__snapshots__/index.test.tsx.snap +0 -327
- package/src/AlignmentsFeatureDetail/index.test.tsx +0 -47
- package/src/AlignmentsFeatureDetail/index.ts +0 -33
- package/src/AlignmentsFeatureDetail/util.ts +0 -27
- package/src/AlignmentsTrack/configSchemaF.ts +0 -22
- package/src/AlignmentsTrack/index.ts +0 -22
- package/src/BamAdapter/BamAdapter.test.ts +0 -124
- package/src/BamAdapter/BamAdapter.ts +0 -251
- package/src/BamAdapter/BamSlightlyLazyFeature.ts +0 -149
- package/src/BamAdapter/__snapshots__/BamAdapter.test.ts.snap +0 -1105
- package/src/BamAdapter/configSchema.ts +0 -65
- package/src/BamAdapter/index.ts +0 -14
- package/src/CombinationTest.test.ts +0 -108
- package/src/CramAdapter/CramAdapter.test.ts +0 -85
- package/src/CramAdapter/CramAdapter.ts +0 -323
- package/src/CramAdapter/CramSlightlyLazyFeature.ts +0 -185
- package/src/CramAdapter/CramTestAdapters.ts +0 -98
- package/src/CramAdapter/__snapshots__/CramAdapter.test.ts.snap +0 -256
- package/src/CramAdapter/__snapshots__/util.test.ts.snap +0 -14
- package/src/CramAdapter/configSchema.ts +0 -57
- package/src/CramAdapter/index.ts +0 -16
- package/src/CramAdapter/util.test.ts +0 -26
- package/src/CramAdapter/util.ts +0 -251
- package/src/GuessAlignmentsTypes/index.ts +0 -79
- package/src/HtsgetBamAdapter/HtsgetBamAdapter.ts +0 -24
- package/src/HtsgetBamAdapter/configSchema.ts +0 -40
- package/src/HtsgetBamAdapter/index.ts +0 -17
- package/src/LinearAlignmentsDisplay/components/AlignmentsDisplay.tsx +0 -52
- package/src/LinearAlignmentsDisplay/index.ts +0 -21
- package/src/LinearAlignmentsDisplay/models/configSchema.test.ts +0 -60
- package/src/LinearAlignmentsDisplay/models/configSchema.ts +0 -41
- package/src/LinearAlignmentsDisplay/models/model.tsx +0 -403
- package/src/LinearPileupDisplay/components/ColorByModifications.tsx +0 -102
- package/src/LinearPileupDisplay/components/ColorByTag.tsx +0 -61
- package/src/LinearPileupDisplay/components/LinearPileupDisplayBlurb.tsx +0 -32
- package/src/LinearPileupDisplay/components/ModificationsTable.tsx +0 -38
- package/src/LinearPileupDisplay/components/SetFeatureHeight.tsx +0 -82
- package/src/LinearPileupDisplay/components/SetMaxHeight.tsx +0 -71
- package/src/LinearPileupDisplay/components/SortByTag.tsx +0 -64
- package/src/LinearPileupDisplay/configSchema.test.js +0 -55
- package/src/LinearPileupDisplay/configSchema.ts +0 -67
- package/src/LinearPileupDisplay/index.ts +0 -24
- package/src/LinearPileupDisplay/model.ts +0 -884
- package/src/LinearReadArcsDisplay/components/ReactComponent.tsx +0 -50
- package/src/LinearReadArcsDisplay/configSchema.ts +0 -68
- package/src/LinearReadArcsDisplay/declare.d.ts +0 -1
- package/src/LinearReadArcsDisplay/drawFeats.ts +0 -210
- package/src/LinearReadArcsDisplay/index.ts +0 -23
- package/src/LinearReadArcsDisplay/model.tsx +0 -355
- package/src/LinearReadArcsDisplay/util.ts +0 -10
- package/src/LinearReadCloudDisplay/components/ReactComponent.tsx +0 -48
- package/src/LinearReadCloudDisplay/configSchema.ts +0 -57
- package/src/LinearReadCloudDisplay/drawFeats.ts +0 -35
- package/src/LinearReadCloudDisplay/drawLongReadChains.ts +0 -85
- package/src/LinearReadCloudDisplay/drawPairChains.ts +0 -139
- package/src/LinearReadCloudDisplay/index.ts +0 -23
- package/src/LinearReadCloudDisplay/model.tsx +0 -246
- package/src/LinearReadCloudDisplay/util.ts +0 -47
- package/src/LinearSNPCoverageDisplay/components/Tooltip.tsx +0 -128
- package/src/LinearSNPCoverageDisplay/index.ts +0 -20
- package/src/LinearSNPCoverageDisplay/models/configSchema.test.ts +0 -35
- package/src/LinearSNPCoverageDisplay/models/configSchema.ts +0 -82
- package/src/LinearSNPCoverageDisplay/models/model.ts +0 -336
- package/src/MismatchParser/index.test.ts +0 -283
- package/src/MismatchParser/index.ts +0 -508
- package/src/PileupRPC/base.ts +0 -24
- package/src/PileupRPC/index.ts +0 -12
- package/src/PileupRPC/methods/GetGlobalValueForTag.ts +0 -44
- package/src/PileupRPC/methods/GetReducedFeatures.ts +0 -67
- package/src/PileupRPC/methods/GetVisibleModifications.ts +0 -45
- package/src/PileupRPC/rpcMethods.ts +0 -3
- package/src/PileupRPC/util.ts +0 -19
- package/src/PileupRenderer/PileupLayoutSession.ts +0 -64
- package/src/PileupRenderer/PileupRenderer.ts +0 -142
- package/src/PileupRenderer/colorBy.ts +0 -74
- package/src/PileupRenderer/components/PileupRendering.tsx +0 -209
- package/src/PileupRenderer/configSchema.ts +0 -108
- package/src/PileupRenderer/getAlignmentShapeColor.ts +0 -87
- package/src/PileupRenderer/index.ts +0 -16
- package/src/PileupRenderer/layoutFeature.ts +0 -83
- package/src/PileupRenderer/layoutFeatures.ts +0 -44
- package/src/PileupRenderer/makeImageData.ts +0 -93
- package/src/PileupRenderer/renderAlignment.ts +0 -97
- package/src/PileupRenderer/renderAlignmentShape.ts +0 -45
- package/src/PileupRenderer/renderMethylation.ts +0 -75
- package/src/PileupRenderer/renderMismatches.ts +0 -206
- package/src/PileupRenderer/renderModifications.ts +0 -74
- package/src/PileupRenderer/renderPerBaseLettering.ts +0 -67
- package/src/PileupRenderer/renderPerBaseQuality.ts +0 -46
- package/src/PileupRenderer/renderSoftClipping.ts +0 -78
- package/src/PileupRenderer/sortUtil.ts +0 -107
- package/src/PileupRenderer/util.ts +0 -63
- package/src/SNPCoverageAdapter/SNPCoverageAdapter.ts +0 -111
- package/src/SNPCoverageAdapter/configSchema.ts +0 -23
- package/src/SNPCoverageAdapter/generateCoverageBins.ts +0 -259
- package/src/SNPCoverageAdapter/index.ts +0 -18
- package/src/SNPCoverageAdapter/util.ts +0 -33
- package/src/SNPCoverageRenderer/SNPCoverageRenderer.ts +0 -270
- package/src/SNPCoverageRenderer/configSchema.ts +0 -64
- package/src/SNPCoverageRenderer/index.ts +0 -17
- package/src/__snapshots__/index.test.ts.snap +0 -3
- package/src/index.test.ts +0 -17
- package/src/index.ts +0 -48
- package/src/shared/BaseDisplayComponent.tsx +0 -83
- package/src/shared/FilterByTag.tsx +0 -187
- package/src/shared/afterAttach.tsx +0 -66
- package/src/shared/color.ts +0 -86
- package/src/shared/fetchChains.ts +0 -62
- package/src/shared/index.ts +0 -75
- package/src/shared/renderSvg.tsx +0 -64
- package/src/shared/util.ts +0 -10
- package/src/util.ts +0 -154
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react'
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
4
|
-
import { types } from 'mobx-state-tree'
|
|
5
|
-
import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType'
|
|
6
|
-
import { stateModelFactory as baseModelFactory } from '@jbrowse/core/BaseFeatureWidget'
|
|
7
|
-
|
|
8
|
-
const configSchema = ConfigurationSchema('AlignmentsFeatureWidget', {})
|
|
9
|
-
|
|
10
|
-
export function stateModelFactory(pluginManager: PluginManager) {
|
|
11
|
-
const baseModel = baseModelFactory(pluginManager)
|
|
12
|
-
return types.compose(
|
|
13
|
-
baseModel,
|
|
14
|
-
types.model('AlignmentsFeatureWidget', {
|
|
15
|
-
type: types.literal('AlignmentsFeatureWidget'),
|
|
16
|
-
}),
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default function register(pluginManager: PluginManager) {
|
|
21
|
-
pluginManager.addWidgetType(
|
|
22
|
-
() =>
|
|
23
|
-
new WidgetType({
|
|
24
|
-
name: 'AlignmentsFeatureWidget',
|
|
25
|
-
heading: 'Feature details',
|
|
26
|
-
configSchema,
|
|
27
|
-
stateModel: stateModelFactory(pluginManager),
|
|
28
|
-
ReactComponent: lazy(() => import('./AlignmentsFeatureDetail')),
|
|
29
|
-
}),
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { configSchema }
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getSession } from '@jbrowse/core/util'
|
|
2
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree'
|
|
3
|
-
|
|
4
|
-
export function getTag(
|
|
5
|
-
tag: string,
|
|
6
|
-
feat: {
|
|
7
|
-
tags?: { [key: string]: unknown }
|
|
8
|
-
[key: string]: unknown
|
|
9
|
-
},
|
|
10
|
-
) {
|
|
11
|
-
return feat.tags?.[tag] || feat[tag]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export async function navToLoc(locString: string, model: IAnyStateTreeNode) {
|
|
15
|
-
const session = getSession(model)
|
|
16
|
-
const { view } = model
|
|
17
|
-
try {
|
|
18
|
-
if (view) {
|
|
19
|
-
await view.navToLocString(locString)
|
|
20
|
-
} else {
|
|
21
|
-
throw new Error('No view associated with this view anymore')
|
|
22
|
-
}
|
|
23
|
-
} catch (e) {
|
|
24
|
-
console.error(e)
|
|
25
|
-
session.notify(`${e}`)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
|
-
import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes'
|
|
3
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* #config AlignmentsTrack
|
|
7
|
-
* has very little config; most config and state logic is on the display
|
|
8
|
-
*/
|
|
9
|
-
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
10
|
-
|
|
11
|
-
export default function configSchemaFactory(pluginManager: PluginManager) {
|
|
12
|
-
return ConfigurationSchema(
|
|
13
|
-
'AlignmentsTrack',
|
|
14
|
-
{},
|
|
15
|
-
{
|
|
16
|
-
/**
|
|
17
|
-
* #baseConfiguration
|
|
18
|
-
*/
|
|
19
|
-
baseConfiguration: createBaseTrackConfig(pluginManager),
|
|
20
|
-
},
|
|
21
|
-
)
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
-
import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType'
|
|
3
|
-
import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
|
|
4
|
-
import configSchemaF from './configSchemaF'
|
|
5
|
-
|
|
6
|
-
export default function register(pm: PluginManager) {
|
|
7
|
-
pm.addTrackType(() => {
|
|
8
|
-
const configSchema = configSchemaF(pm)
|
|
9
|
-
const track = new TrackType({
|
|
10
|
-
name: 'AlignmentsTrack',
|
|
11
|
-
displayName: 'Alignments track',
|
|
12
|
-
configSchema,
|
|
13
|
-
stateModel: createBaseTrackModel(pm, 'AlignmentsTrack', configSchema),
|
|
14
|
-
})
|
|
15
|
-
const linearAlignmentsDisplay = pm.getDisplayType('LinearAlignmentsDisplay')
|
|
16
|
-
// Add LinearAlignmentsDisplay here so that it has priority over the other
|
|
17
|
-
// linear displays (defaults to order the displays are added, but we have
|
|
18
|
-
// to add the Pileup and SNPCoverage displays first).
|
|
19
|
-
track.addDisplayType(linearAlignmentsDisplay)
|
|
20
|
-
return track
|
|
21
|
-
})
|
|
22
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { toArray } from 'rxjs/operators'
|
|
2
|
-
import { firstValueFrom } from 'rxjs'
|
|
3
|
-
import Adapter from './BamAdapter'
|
|
4
|
-
import configSchema from './configSchema'
|
|
5
|
-
|
|
6
|
-
test('adapter can fetch features from volvox.bam', async () => {
|
|
7
|
-
const adapter = new Adapter(
|
|
8
|
-
configSchema.create({
|
|
9
|
-
bamLocation: {
|
|
10
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam'),
|
|
11
|
-
locationType: 'LocalPathLocation',
|
|
12
|
-
},
|
|
13
|
-
index: {
|
|
14
|
-
location: {
|
|
15
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam.bai'),
|
|
16
|
-
locationType: 'LocalPathLocation',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
const features = adapter.getFeatures({
|
|
23
|
-
assemblyName: 'volvox',
|
|
24
|
-
refName: 'ctgA',
|
|
25
|
-
start: 0,
|
|
26
|
-
end: 20000,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const featuresArray = await firstValueFrom(features.pipe(toArray()))
|
|
30
|
-
expect(featuresArray[0].get('refName')).toBe('ctgA')
|
|
31
|
-
const featuresJsonArray = featuresArray.map(f => f.toJSON())
|
|
32
|
-
expect(featuresJsonArray.length).toEqual(3809)
|
|
33
|
-
expect(featuresJsonArray.slice(1000, 1010)).toMatchSnapshot()
|
|
34
|
-
|
|
35
|
-
expect(adapter.refIdToName(0)).toBe('ctgA')
|
|
36
|
-
expect(adapter.refIdToName(1)).toBe(undefined)
|
|
37
|
-
|
|
38
|
-
expect(await adapter.hasDataForRefName('ctgA')).toBe(true)
|
|
39
|
-
|
|
40
|
-
const adapterCSI = new Adapter(
|
|
41
|
-
configSchema.create({
|
|
42
|
-
bamLocation: {
|
|
43
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam'),
|
|
44
|
-
locationType: 'LocalPathLocation',
|
|
45
|
-
},
|
|
46
|
-
index: {
|
|
47
|
-
indexType: 'CSI',
|
|
48
|
-
location: {
|
|
49
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam.csi'),
|
|
50
|
-
locationType: 'LocalPathLocation',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
const featuresCSI = adapterCSI.getFeatures({
|
|
57
|
-
assemblyName: 'volvox',
|
|
58
|
-
refName: 'ctgA',
|
|
59
|
-
start: 0,
|
|
60
|
-
end: 20000,
|
|
61
|
-
})
|
|
62
|
-
const featuresArrayCSI = await firstValueFrom(featuresCSI.pipe(toArray()))
|
|
63
|
-
const featuresJsonArrayCSI = featuresArrayCSI.map(f => f.toJSON())
|
|
64
|
-
expect(featuresJsonArrayCSI).toEqual(featuresJsonArray)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
test('test usage of BamSlightlyLazyFeature toJSON (used in the widget)', async () => {
|
|
68
|
-
const adapter = new Adapter(
|
|
69
|
-
configSchema.create({
|
|
70
|
-
bamLocation: {
|
|
71
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam'),
|
|
72
|
-
locationType: 'LocalPathLocation',
|
|
73
|
-
},
|
|
74
|
-
index: {
|
|
75
|
-
location: {
|
|
76
|
-
localPath: require.resolve('../../test_data/volvox-sorted.bam.bai'),
|
|
77
|
-
locationType: 'LocalPathLocation',
|
|
78
|
-
},
|
|
79
|
-
indexType: 'BAI',
|
|
80
|
-
},
|
|
81
|
-
}),
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
const features = adapter.getFeatures({
|
|
85
|
-
assemblyName: 'volvox',
|
|
86
|
-
refName: 'ctgA',
|
|
87
|
-
start: 0,
|
|
88
|
-
end: 100,
|
|
89
|
-
})
|
|
90
|
-
const featuresArray = await firstValueFrom(features.pipe(toArray()))
|
|
91
|
-
const f = featuresArray[0].toJSON()
|
|
92
|
-
expect(f.refName).toBe('ctgA')
|
|
93
|
-
expect(f.start).toBe(2)
|
|
94
|
-
expect(f.end).toBe(102)
|
|
95
|
-
expect(f.mismatches).not.toBeTruthy()
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
test('test usage of BamSlightlyLazyFeature for extended CIGAR', async () => {
|
|
99
|
-
const adapter = new Adapter(
|
|
100
|
-
configSchema.create({
|
|
101
|
-
bamLocation: {
|
|
102
|
-
localPath: require.resolve('../../test_data/extended_cigar.bam'),
|
|
103
|
-
locationType: 'LocalPathLocation',
|
|
104
|
-
},
|
|
105
|
-
index: {
|
|
106
|
-
location: {
|
|
107
|
-
localPath: require.resolve('../../test_data/extended_cigar.bam.bai'),
|
|
108
|
-
locationType: 'LocalPathLocation',
|
|
109
|
-
},
|
|
110
|
-
indexType: 'BAI',
|
|
111
|
-
},
|
|
112
|
-
}),
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
const features = adapter.getFeatures({
|
|
116
|
-
assemblyName: 'hg19',
|
|
117
|
-
refName: '1',
|
|
118
|
-
start: 13260,
|
|
119
|
-
end: 13340,
|
|
120
|
-
})
|
|
121
|
-
const featuresArray = await firstValueFrom(features.pipe(toArray()))
|
|
122
|
-
const f = featuresArray[0]
|
|
123
|
-
expect(f.get('mismatches')).toMatchSnapshot()
|
|
124
|
-
})
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { BamFile } from '@gmod/bam'
|
|
2
|
-
import {
|
|
3
|
-
BaseFeatureDataAdapter,
|
|
4
|
-
BaseOptions,
|
|
5
|
-
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
6
|
-
import { Region } from '@jbrowse/core/util/types'
|
|
7
|
-
import { bytesForRegions, updateStatus, Feature } from '@jbrowse/core/util'
|
|
8
|
-
import { openLocation } from '@jbrowse/core/util/io'
|
|
9
|
-
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
10
|
-
import { toArray } from 'rxjs/operators'
|
|
11
|
-
import { firstValueFrom } from 'rxjs'
|
|
12
|
-
|
|
13
|
-
// locals
|
|
14
|
-
import BamSlightlyLazyFeature from './BamSlightlyLazyFeature'
|
|
15
|
-
|
|
16
|
-
interface Header {
|
|
17
|
-
idToName: string[]
|
|
18
|
-
nameToId: Record<string, number>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
22
|
-
private samHeader?: Header
|
|
23
|
-
|
|
24
|
-
private setupP?: Promise<Header>
|
|
25
|
-
private configureP?: Promise<{
|
|
26
|
-
bam: BamFile
|
|
27
|
-
sequenceAdapter?: BaseFeatureDataAdapter
|
|
28
|
-
}>
|
|
29
|
-
|
|
30
|
-
// derived classes may not use the same configuration so a custom
|
|
31
|
-
// configure method allows derived classes to override this behavior
|
|
32
|
-
protected async configurePre() {
|
|
33
|
-
const bamLocation = this.getConf('bamLocation')
|
|
34
|
-
const location = this.getConf(['index', 'location'])
|
|
35
|
-
const indexType = this.getConf(['index', 'indexType'])
|
|
36
|
-
const pm = this.pluginManager
|
|
37
|
-
const csi = indexType === 'CSI'
|
|
38
|
-
const bam = new BamFile({
|
|
39
|
-
bamFilehandle: openLocation(bamLocation, pm),
|
|
40
|
-
csiFilehandle: csi ? openLocation(location, pm) : undefined,
|
|
41
|
-
baiFilehandle: !csi ? openLocation(location, pm) : undefined,
|
|
42
|
-
|
|
43
|
-
// chunkSizeLimit and fetchSizeLimit are more troublesome than
|
|
44
|
-
// helpful, and have given overly large values on the ultra long
|
|
45
|
-
// nanopore reads even with 500MB limits, so disabled with infinity
|
|
46
|
-
yieldThreadTime: Infinity,
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
const adapterConfig = this.getConf('sequenceAdapter')
|
|
50
|
-
if (adapterConfig && this.getSubAdapter) {
|
|
51
|
-
const { dataAdapter } = await this.getSubAdapter(adapterConfig)
|
|
52
|
-
return {
|
|
53
|
-
bam,
|
|
54
|
-
sequenceAdapter: dataAdapter as BaseFeatureDataAdapter,
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
return { bam }
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
protected async configure() {
|
|
62
|
-
if (!this.configureP) {
|
|
63
|
-
this.configureP = this.configurePre().catch(e => {
|
|
64
|
-
this.configureP = undefined
|
|
65
|
-
throw e
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
return this.configureP
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async getHeader(opts?: BaseOptions) {
|
|
72
|
-
const { bam } = await this.configure()
|
|
73
|
-
return bam.getHeaderText(opts)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
private async setupPre(opts?: BaseOptions) {
|
|
77
|
-
const { statusCallback = () => {} } = opts || {}
|
|
78
|
-
const { bam } = await this.configure()
|
|
79
|
-
this.samHeader = await updateStatus(
|
|
80
|
-
'Downloading index',
|
|
81
|
-
statusCallback,
|
|
82
|
-
async () => {
|
|
83
|
-
const samHeader = await bam.getHeader(opts)
|
|
84
|
-
|
|
85
|
-
// use the @SQ lines in the header to figure out the
|
|
86
|
-
// mapping between ref ref ID numbers and names
|
|
87
|
-
const idToName: string[] = []
|
|
88
|
-
const nameToId: Record<string, number> = {}
|
|
89
|
-
samHeader
|
|
90
|
-
?.filter(l => l.tag === 'SQ')
|
|
91
|
-
.forEach((sqLine, refId) => {
|
|
92
|
-
sqLine.data.forEach(item => {
|
|
93
|
-
if (item.tag === 'SN') {
|
|
94
|
-
// this is the ref name
|
|
95
|
-
const refName = item.value
|
|
96
|
-
nameToId[refName] = refId
|
|
97
|
-
idToName[refId] = refName
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
return { idToName, nameToId }
|
|
103
|
-
},
|
|
104
|
-
)
|
|
105
|
-
return this.samHeader
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
async setup(opts?: BaseOptions) {
|
|
109
|
-
if (!this.setupP) {
|
|
110
|
-
this.setupP = this.setupPre(opts).catch(e => {
|
|
111
|
-
this.setupP = undefined
|
|
112
|
-
throw e
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
return this.setupP
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
async getRefNames(opts?: BaseOptions) {
|
|
119
|
-
const { idToName } = await this.setup(opts)
|
|
120
|
-
return idToName
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
private async seqFetch(refName: string, start: number, end: number) {
|
|
124
|
-
const { sequenceAdapter } = await this.configure()
|
|
125
|
-
const refSeqStore = sequenceAdapter
|
|
126
|
-
if (!refSeqStore) {
|
|
127
|
-
return undefined
|
|
128
|
-
}
|
|
129
|
-
if (!refName) {
|
|
130
|
-
return undefined
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const features = refSeqStore.getFeatures({
|
|
134
|
-
refName,
|
|
135
|
-
start,
|
|
136
|
-
end,
|
|
137
|
-
assemblyName: '',
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
const seqChunks = await firstValueFrom(features.pipe(toArray()))
|
|
141
|
-
|
|
142
|
-
let sequence = ''
|
|
143
|
-
seqChunks
|
|
144
|
-
.sort((a, b) => a.get('start') - b.get('start'))
|
|
145
|
-
.forEach(chunk => {
|
|
146
|
-
const chunkStart = chunk.get('start')
|
|
147
|
-
const chunkEnd = chunk.get('end')
|
|
148
|
-
const trimStart = Math.max(start - chunkStart, 0)
|
|
149
|
-
const trimEnd = Math.min(end - chunkStart, chunkEnd - chunkStart)
|
|
150
|
-
const trimLength = trimEnd - trimStart
|
|
151
|
-
const chunkSeq = chunk.get('seq') || chunk.get('residues')
|
|
152
|
-
sequence += chunkSeq.slice(trimStart, trimStart + trimLength)
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
if (sequence.length !== end - start) {
|
|
156
|
-
throw new Error(
|
|
157
|
-
`sequence fetch failed: fetching ${refName}:${(
|
|
158
|
-
start - 1
|
|
159
|
-
).toLocaleString()}-${end.toLocaleString()} returned ${sequence.length.toLocaleString()} bases, but should have returned ${(
|
|
160
|
-
end - start
|
|
161
|
-
).toLocaleString()}`,
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
return sequence
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
getFeatures(
|
|
168
|
-
region: Region & { originalRefName?: string },
|
|
169
|
-
opts?: BaseOptions & {
|
|
170
|
-
filterBy: {
|
|
171
|
-
flagInclude: number
|
|
172
|
-
flagExclude: number
|
|
173
|
-
tagFilter: { tag: string; value: unknown }
|
|
174
|
-
readName: string
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
) {
|
|
178
|
-
const { refName, start, end, originalRefName } = region
|
|
179
|
-
const { signal, filterBy, statusCallback = () => {} } = opts || {}
|
|
180
|
-
return ObservableCreate<Feature>(async observer => {
|
|
181
|
-
const { bam } = await this.configure()
|
|
182
|
-
await this.setup(opts)
|
|
183
|
-
const records = await updateStatus(
|
|
184
|
-
'Downloading alignments',
|
|
185
|
-
statusCallback,
|
|
186
|
-
() => bam.getRecordsForRange(refName, start, end, opts),
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
await updateStatus('Processing alignments', statusCallback, async () => {
|
|
190
|
-
const {
|
|
191
|
-
flagInclude = 0,
|
|
192
|
-
flagExclude = 0,
|
|
193
|
-
tagFilter,
|
|
194
|
-
readName,
|
|
195
|
-
} = filterBy || {}
|
|
196
|
-
|
|
197
|
-
for (const record of records) {
|
|
198
|
-
let ref: string | undefined
|
|
199
|
-
if (!record.get('MD')) {
|
|
200
|
-
ref = await this.seqFetch(
|
|
201
|
-
originalRefName || refName,
|
|
202
|
-
record.get('start'),
|
|
203
|
-
record.get('end'),
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const flags = record.flags
|
|
208
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
209
|
-
continue
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
if (tagFilter) {
|
|
213
|
-
const v = record.get(tagFilter.tag)
|
|
214
|
-
if (!(v === '*' ? v !== undefined : `${v}` === tagFilter.value)) {
|
|
215
|
-
continue
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (readName && record.get('name') !== readName) {
|
|
220
|
-
continue
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
observer.next(new BamSlightlyLazyFeature(record, this, ref))
|
|
224
|
-
}
|
|
225
|
-
observer.complete()
|
|
226
|
-
})
|
|
227
|
-
}, signal)
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
async getMultiRegionFeatureDensityStats(
|
|
231
|
-
regions: Region[],
|
|
232
|
-
opts?: BaseOptions,
|
|
233
|
-
) {
|
|
234
|
-
const { bam } = await this.configure()
|
|
235
|
-
// this is a method to avoid calling on htsget adapters
|
|
236
|
-
if (bam.index) {
|
|
237
|
-
const bytes = await bytesForRegions(regions, bam)
|
|
238
|
-
const fetchSizeLimit = this.getConf('fetchSizeLimit')
|
|
239
|
-
return { bytes, fetchSizeLimit }
|
|
240
|
-
} else {
|
|
241
|
-
return super.getMultiRegionFeatureDensityStats(regions, opts)
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
freeResources(/* { region } */): void {}
|
|
246
|
-
|
|
247
|
-
// depends on setup being called before the BAM constructor
|
|
248
|
-
refIdToName(refId: number) {
|
|
249
|
-
return this.samHeader?.idToName[refId]
|
|
250
|
-
}
|
|
251
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
import {
|
|
3
|
-
Feature,
|
|
4
|
-
SimpleFeatureSerialized,
|
|
5
|
-
} from '@jbrowse/core/util/simpleFeature'
|
|
6
|
-
import { BamRecord } from '@gmod/bam'
|
|
7
|
-
|
|
8
|
-
// locals
|
|
9
|
-
import { getClip, getMismatches } from '../MismatchParser'
|
|
10
|
-
import BamAdapter from './BamAdapter'
|
|
11
|
-
|
|
12
|
-
export default class BamSlightlyLazyFeature implements Feature {
|
|
13
|
-
// uses parameter properties to automatically create fields on the class
|
|
14
|
-
// https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
|
|
15
|
-
constructor(
|
|
16
|
-
private record: BamRecord,
|
|
17
|
-
private adapter: BamAdapter,
|
|
18
|
-
private ref?: string,
|
|
19
|
-
) {}
|
|
20
|
-
|
|
21
|
-
_get_name() {
|
|
22
|
-
return this.record.get('name')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_get_type(): string {
|
|
26
|
-
return 'match'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
_get_score(): number {
|
|
30
|
-
return this.record.get('mq')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_get_flags(): string {
|
|
34
|
-
return this.record.flags
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
_get_strand(): number {
|
|
38
|
-
return this.record.isReverseComplemented() ? -1 : 1
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
_get_pair_orientation() {
|
|
42
|
-
return this.record.isPaired() ? this.record.getPairOrientation() : undefined
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
_get_next_ref() {
|
|
46
|
-
return this.record.isPaired()
|
|
47
|
-
? this.adapter.refIdToName(this.record._next_refid())
|
|
48
|
-
: undefined
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_get_next_pos() {
|
|
52
|
-
return this.record.isPaired() ? this.record._next_pos() : undefined
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_get_next_segment_position() {
|
|
56
|
-
return this.record.isPaired()
|
|
57
|
-
? `${this.adapter.refIdToName(this.record._next_refid())}:${
|
|
58
|
-
this.record._next_pos() + 1
|
|
59
|
-
}`
|
|
60
|
-
: undefined
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
_get_seq() {
|
|
64
|
-
return this.record.getReadBases()
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
qualRaw() {
|
|
68
|
-
return this.record.qualRaw()
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
set() {}
|
|
72
|
-
|
|
73
|
-
tags() {
|
|
74
|
-
const properties = Object.getOwnPropertyNames(
|
|
75
|
-
BamSlightlyLazyFeature.prototype,
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
return [
|
|
79
|
-
...new Set(
|
|
80
|
-
properties
|
|
81
|
-
.filter(
|
|
82
|
-
prop =>
|
|
83
|
-
prop.startsWith('_get_') &&
|
|
84
|
-
prop !== '_get_mismatches' &&
|
|
85
|
-
prop !== '_get_tags',
|
|
86
|
-
)
|
|
87
|
-
.map(methodName => methodName.replace('_get_', ''))
|
|
88
|
-
.concat(this.record._tags()),
|
|
89
|
-
),
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
id() {
|
|
94
|
-
return `${this.adapter.id}-${this.record.id()}`
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
-
get(field: string): any {
|
|
99
|
-
const methodName = `_get_${field}`
|
|
100
|
-
// @ts-expect-error
|
|
101
|
-
if (this[methodName]) {
|
|
102
|
-
// @ts-expect-error
|
|
103
|
-
return this[methodName]()
|
|
104
|
-
}
|
|
105
|
-
return this.record.get(field)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
_get_refName() {
|
|
109
|
-
return this.adapter.refIdToName(this.record.seq_id())
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
parent() {
|
|
113
|
-
return undefined
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
children() {
|
|
117
|
-
return undefined
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
pairedFeature() {
|
|
121
|
-
return false
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
toJSON(): SimpleFeatureSerialized {
|
|
125
|
-
return {
|
|
126
|
-
...Object.fromEntries(
|
|
127
|
-
this.tags()
|
|
128
|
-
.map(t => [t, this.get(t)])
|
|
129
|
-
.filter(elt => elt[1] !== undefined),
|
|
130
|
-
),
|
|
131
|
-
uniqueId: this.id(),
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
_get_mismatches() {
|
|
136
|
-
return getMismatches(
|
|
137
|
-
this.get('CIGAR'),
|
|
138
|
-
this.get('MD'),
|
|
139
|
-
this.get('seq'),
|
|
140
|
-
this.ref,
|
|
141
|
-
this.qualRaw(),
|
|
142
|
-
)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
_get_clipPos() {
|
|
146
|
-
const cigar = this.get('CIGAR') || ''
|
|
147
|
-
return getClip(cigar, this.get('strand'))
|
|
148
|
-
}
|
|
149
|
-
}
|