@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,65 +0,0 @@
|
|
|
1
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
|
-
import { types } from 'mobx-state-tree'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* #config BamAdapter
|
|
6
|
-
* used to configure BAM adapter
|
|
7
|
-
*/
|
|
8
|
-
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
|
-
|
|
10
|
-
const configSchema = ConfigurationSchema(
|
|
11
|
-
'BamAdapter',
|
|
12
|
-
{
|
|
13
|
-
/**
|
|
14
|
-
* #slot
|
|
15
|
-
*/
|
|
16
|
-
bamLocation: {
|
|
17
|
-
type: 'fileLocation',
|
|
18
|
-
defaultValue: { uri: '/path/to/my.bam', locationType: 'UriLocation' },
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
index: ConfigurationSchema('BamIndex', {
|
|
22
|
-
/**
|
|
23
|
-
* #slot index.indexType
|
|
24
|
-
*/
|
|
25
|
-
indexType: {
|
|
26
|
-
model: types.enumeration('IndexType', ['BAI', 'CSI']),
|
|
27
|
-
type: 'stringEnum',
|
|
28
|
-
defaultValue: 'BAI',
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* #slot index.location
|
|
32
|
-
*/
|
|
33
|
-
location: {
|
|
34
|
-
type: 'fileLocation',
|
|
35
|
-
defaultValue: {
|
|
36
|
-
uri: '/path/to/my.bam.bai',
|
|
37
|
-
locationType: 'UriLocation',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
/**
|
|
42
|
-
* #slot
|
|
43
|
-
*/
|
|
44
|
-
fetchSizeLimit: {
|
|
45
|
-
type: 'number',
|
|
46
|
-
description:
|
|
47
|
-
'size to fetch in bytes over which to display a warning to the user that too much data will be fetched',
|
|
48
|
-
defaultValue: 5_000_000,
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* #slot
|
|
52
|
-
* generally refers to the reference genome assembly's sequence adapter
|
|
53
|
-
* currently needs to be manually added
|
|
54
|
-
*/
|
|
55
|
-
sequenceAdapter: {
|
|
56
|
-
type: 'frozen',
|
|
57
|
-
description:
|
|
58
|
-
'sequence data adapter, used to calculate SNPs when BAM reads lacking MD tags',
|
|
59
|
-
defaultValue: null,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
{ explicitlyTyped: true },
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
export default configSchema
|
package/src/BamAdapter/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
-
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'
|
|
3
|
-
import configSchema from './configSchema'
|
|
4
|
-
|
|
5
|
-
export default (pluginManager: PluginManager) => {
|
|
6
|
-
pluginManager.addAdapterType(() => {
|
|
7
|
-
return new AdapterType({
|
|
8
|
-
name: 'BamAdapter',
|
|
9
|
-
displayName: 'BAM adapter',
|
|
10
|
-
configSchema,
|
|
11
|
-
getAdapterClass: () => import('./BamAdapter').then(r => r.default),
|
|
12
|
-
})
|
|
13
|
-
})
|
|
14
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
-
import { toArray } from 'rxjs/operators'
|
|
3
|
-
import { LocalFile } from 'generic-filehandle'
|
|
4
|
-
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'
|
|
5
|
-
|
|
6
|
-
import CramAdapter from './CramAdapter/CramAdapter'
|
|
7
|
-
import BamAdapter from './BamAdapter/BamAdapter'
|
|
8
|
-
import { SequenceAdapter } from './CramAdapter/CramTestAdapters'
|
|
9
|
-
|
|
10
|
-
import cramConfigSchema from './CramAdapter/configSchema'
|
|
11
|
-
import bamConfigSchema from './BamAdapter/configSchema'
|
|
12
|
-
import { firstValueFrom } from 'rxjs'
|
|
13
|
-
|
|
14
|
-
const pluginManager = new PluginManager()
|
|
15
|
-
|
|
16
|
-
const getVolvoxSequenceSubAdapter: getSubAdapterType = async () => {
|
|
17
|
-
return {
|
|
18
|
-
dataAdapter: new SequenceAdapter(
|
|
19
|
-
new LocalFile(require.resolve('../test_data/volvox.fa')),
|
|
20
|
-
),
|
|
21
|
-
sessionIds: new Set(),
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function getFeats(f1: string, f2: string) {
|
|
26
|
-
const cramAdapter = new CramAdapter(
|
|
27
|
-
cramConfigSchema.create({
|
|
28
|
-
cramLocation: {
|
|
29
|
-
localPath: require.resolve(f1),
|
|
30
|
-
},
|
|
31
|
-
craiLocation: {
|
|
32
|
-
localPath: require.resolve(f1 + '.crai'),
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
getVolvoxSequenceSubAdapter,
|
|
36
|
-
pluginManager,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
const bamAdapter = new BamAdapter(
|
|
40
|
-
bamConfigSchema.create({
|
|
41
|
-
bamLocation: {
|
|
42
|
-
localPath: require.resolve(f2),
|
|
43
|
-
},
|
|
44
|
-
index: {
|
|
45
|
-
location: {
|
|
46
|
-
localPath: require.resolve(f2 + '.bai'),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
)
|
|
51
|
-
const query = {
|
|
52
|
-
assemblyName: 'volvox',
|
|
53
|
-
refName: 'ctgA',
|
|
54
|
-
start: 1,
|
|
55
|
-
end: 10200,
|
|
56
|
-
}
|
|
57
|
-
const bamFeatures = bamAdapter.getFeatures(query)
|
|
58
|
-
const cramFeatures = cramAdapter.getFeatures(query)
|
|
59
|
-
const bamFeaturesArray = await firstValueFrom(bamFeatures.pipe(toArray()))
|
|
60
|
-
const cramFeaturesArray = await firstValueFrom(cramFeatures.pipe(toArray()))
|
|
61
|
-
return { bamFeaturesArray, cramFeaturesArray }
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
type M = { start: number }
|
|
65
|
-
|
|
66
|
-
async function cigarCheck(f: string) {
|
|
67
|
-
const { cramFeaturesArray, bamFeaturesArray } = await getFeats(
|
|
68
|
-
`../test_data/${f}.cram`,
|
|
69
|
-
`../test_data/${f}.bam`,
|
|
70
|
-
)
|
|
71
|
-
const cramMap = Object.fromEntries(
|
|
72
|
-
cramFeaturesArray.map(f => [f.get('name'), f.get('CIGAR')]),
|
|
73
|
-
)
|
|
74
|
-
const bamMap = Object.fromEntries(
|
|
75
|
-
bamFeaturesArray.map(f => [f.get('name'), f.get('CIGAR')]),
|
|
76
|
-
)
|
|
77
|
-
expect(bamMap).toEqual(cramMap)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async function mismatchesCheck(f: string) {
|
|
81
|
-
const { cramFeaturesArray, bamFeaturesArray } = await getFeats(
|
|
82
|
-
`../test_data/${f}.cram`,
|
|
83
|
-
`../test_data/${f}.bam`,
|
|
84
|
-
)
|
|
85
|
-
const cramMap = Object.fromEntries(
|
|
86
|
-
cramFeaturesArray.map(f => [
|
|
87
|
-
f.get('name'),
|
|
88
|
-
f.get('mismatches').sort((a: M, b: M) => b.start - a.start),
|
|
89
|
-
]),
|
|
90
|
-
)
|
|
91
|
-
const bamMap = Object.fromEntries(
|
|
92
|
-
bamFeaturesArray.map(f => [
|
|
93
|
-
f.get('name'),
|
|
94
|
-
f.get('mismatches').sort((a: M, b: M) => b.start - a.start),
|
|
95
|
-
]),
|
|
96
|
-
)
|
|
97
|
-
expect(bamMap).toEqual(cramMap)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
test('match CIGAR across file types', async () => {
|
|
101
|
-
await cigarCheck('volvox-sorted')
|
|
102
|
-
await cigarCheck('volvox-long-reads.fastq.sorted')
|
|
103
|
-
}, 20000)
|
|
104
|
-
|
|
105
|
-
test('mismatches same across file types', async () => {
|
|
106
|
-
await mismatchesCheck('volvox-sorted')
|
|
107
|
-
await mismatchesCheck('volvox-long-reads.fastq.sorted')
|
|
108
|
-
}, 20000)
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { toArray } from 'rxjs/operators'
|
|
2
|
-
import { firstValueFrom } from 'rxjs'
|
|
3
|
-
import { LocalFile } from 'generic-filehandle'
|
|
4
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
5
|
-
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'
|
|
6
|
-
import Adapter from './CramAdapter'
|
|
7
|
-
import { SequenceAdapter } from './CramTestAdapters'
|
|
8
|
-
import configSchema from './configSchema'
|
|
9
|
-
|
|
10
|
-
const pluginManager = new PluginManager()
|
|
11
|
-
|
|
12
|
-
const getVolvoxSequenceSubAdapter: getSubAdapterType = async () => {
|
|
13
|
-
return {
|
|
14
|
-
dataAdapter: new SequenceAdapter(
|
|
15
|
-
new LocalFile(require.resolve('../../test_data/volvox.fa')),
|
|
16
|
-
),
|
|
17
|
-
sessionIds: new Set(),
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
test('adapter can fetch features from volvox-sorted.cram', async () => {
|
|
22
|
-
const adapter = new Adapter(
|
|
23
|
-
configSchema.create({
|
|
24
|
-
cramLocation: {
|
|
25
|
-
localPath: require.resolve('../../test_data/volvox-sorted.cram'),
|
|
26
|
-
locationType: 'LocalPathLocation',
|
|
27
|
-
},
|
|
28
|
-
craiLocation: {
|
|
29
|
-
localPath: require.resolve('../../test_data/volvox-sorted.cram.crai'),
|
|
30
|
-
locationType: 'LocalPathLocation',
|
|
31
|
-
},
|
|
32
|
-
}),
|
|
33
|
-
getVolvoxSequenceSubAdapter,
|
|
34
|
-
pluginManager,
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
const features = adapter.getFeatures({
|
|
38
|
-
assemblyName: 'volvox',
|
|
39
|
-
refName: 'ctgA',
|
|
40
|
-
start: 0,
|
|
41
|
-
end: 20000,
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const featuresArray = await firstValueFrom(features.pipe(toArray()))
|
|
45
|
-
expect(featuresArray[0].get('refName')).toBe('ctgA')
|
|
46
|
-
const featuresJsonArray = featuresArray.map(f => f.toJSON())
|
|
47
|
-
expect(featuresJsonArray.length).toEqual(3809)
|
|
48
|
-
expect(featuresJsonArray.slice(1000, 1010)).toMatchSnapshot()
|
|
49
|
-
|
|
50
|
-
expect(adapter.refIdToName(0)).toBe('ctgA')
|
|
51
|
-
expect(adapter.refIdToName(1)).toBe(undefined)
|
|
52
|
-
|
|
53
|
-
expect(await adapter.hasDataForRefName('ctgA')).toBe(true)
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
test('test usage of cramSlightlyLazyFeature toJSON (used in the widget)', async () => {
|
|
57
|
-
const adapter = new Adapter(
|
|
58
|
-
configSchema.create({
|
|
59
|
-
cramLocation: {
|
|
60
|
-
localPath: require.resolve('../../test_data/volvox-sorted.cram'),
|
|
61
|
-
locationType: 'LocalPathLocation',
|
|
62
|
-
},
|
|
63
|
-
craiLocation: {
|
|
64
|
-
localPath: require.resolve('../../test_data/volvox-sorted.cram.crai'),
|
|
65
|
-
locationType: 'LocalPathLocation',
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
getVolvoxSequenceSubAdapter,
|
|
69
|
-
pluginManager,
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
const features = adapter.getFeatures({
|
|
73
|
-
assemblyName: 'volvox',
|
|
74
|
-
refName: 'ctgA',
|
|
75
|
-
start: 0,
|
|
76
|
-
end: 100,
|
|
77
|
-
})
|
|
78
|
-
const featuresArray = await firstValueFrom(features.pipe(toArray()))
|
|
79
|
-
const f = featuresArray[0].toJSON()
|
|
80
|
-
expect(f.refName).toBe('ctgA')
|
|
81
|
-
expect(f.start).toBe(2)
|
|
82
|
-
expect(f.end).toBe(102)
|
|
83
|
-
// don't pass the mismatches to the frontend
|
|
84
|
-
expect(f.mismatches).toEqual(undefined)
|
|
85
|
-
})
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { CraiIndex, IndexedCramFile, CramRecord } from '@gmod/cram'
|
|
2
|
-
import {
|
|
3
|
-
BaseFeatureDataAdapter,
|
|
4
|
-
BaseOptions,
|
|
5
|
-
BaseSequenceAdapter,
|
|
6
|
-
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
7
|
-
import {
|
|
8
|
-
checkAbortSignal,
|
|
9
|
-
Region,
|
|
10
|
-
Feature,
|
|
11
|
-
updateStatus,
|
|
12
|
-
} from '@jbrowse/core/util'
|
|
13
|
-
import { openLocation } from '@jbrowse/core/util/io'
|
|
14
|
-
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
15
|
-
import { toArray } from 'rxjs/operators'
|
|
16
|
-
import { firstValueFrom } from 'rxjs'
|
|
17
|
-
import CramSlightlyLazyFeature from './CramSlightlyLazyFeature'
|
|
18
|
-
|
|
19
|
-
interface Header {
|
|
20
|
-
idToName?: string[]
|
|
21
|
-
nameToId?: Record<string, number>
|
|
22
|
-
readGroups?: (string | undefined)[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface FilterBy {
|
|
26
|
-
flagInclude: number
|
|
27
|
-
flagExclude: number
|
|
28
|
-
tagFilter: { tag: string; value: unknown }
|
|
29
|
-
readName: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
33
|
-
samHeader: Header = {}
|
|
34
|
-
|
|
35
|
-
private setupP?: Promise<{
|
|
36
|
-
samHeader: Header
|
|
37
|
-
cram: IndexedCramFile
|
|
38
|
-
sequenceAdapter: BaseSequenceAdapter
|
|
39
|
-
}>
|
|
40
|
-
|
|
41
|
-
private configureP?: Promise<{
|
|
42
|
-
cram: IndexedCramFile
|
|
43
|
-
sequenceAdapter: BaseSequenceAdapter
|
|
44
|
-
}>
|
|
45
|
-
|
|
46
|
-
// maps a refname to an id
|
|
47
|
-
private seqIdToRefName: string[] | undefined
|
|
48
|
-
|
|
49
|
-
// maps a seqId to original refname, passed specially to render args, to a seqid
|
|
50
|
-
private seqIdToOriginalRefName: string[] = []
|
|
51
|
-
|
|
52
|
-
public async configurePre() {
|
|
53
|
-
const cramLocation = this.getConf('cramLocation')
|
|
54
|
-
const craiLocation = this.getConf('craiLocation')
|
|
55
|
-
if (!cramLocation) {
|
|
56
|
-
throw new Error('missing cramLocation argument')
|
|
57
|
-
}
|
|
58
|
-
if (!craiLocation) {
|
|
59
|
-
throw new Error('missing craiLocation argument')
|
|
60
|
-
}
|
|
61
|
-
const pm = this.pluginManager
|
|
62
|
-
|
|
63
|
-
const cram = new IndexedCramFile({
|
|
64
|
-
cramFilehandle: openLocation(cramLocation, pm),
|
|
65
|
-
index: new CraiIndex({ filehandle: openLocation(craiLocation, pm) }),
|
|
66
|
-
seqFetch: (...args) => this.seqFetch(...args),
|
|
67
|
-
checkSequenceMD5: false,
|
|
68
|
-
fetchSizeLimit: 200_000_000, // just make this a large size to avoid hitting it
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
if (!this.getSubAdapter) {
|
|
72
|
-
throw new Error('Error getting subadapter')
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const seqConf = this.getConf('sequenceAdapter')
|
|
76
|
-
const subadapter = await this.getSubAdapter(seqConf)
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
cram,
|
|
80
|
-
sequenceAdapter: subadapter.dataAdapter as BaseSequenceAdapter,
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
public async configure() {
|
|
85
|
-
if (!this.configureP) {
|
|
86
|
-
this.configureP = this.configurePre().catch(e => {
|
|
87
|
-
this.configureP = undefined
|
|
88
|
-
throw e
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
return this.configureP
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async getHeader(opts?: BaseOptions) {
|
|
95
|
-
const { cram } = await this.configure()
|
|
96
|
-
return cram.cram.getHeaderText()
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
private async seqFetch(
|
|
100
|
-
seqId: number,
|
|
101
|
-
start: number,
|
|
102
|
-
end: number,
|
|
103
|
-
): Promise<string> {
|
|
104
|
-
start -= 1 // convert from 1-based closed to interbase
|
|
105
|
-
|
|
106
|
-
const { sequenceAdapter } = await this.configure()
|
|
107
|
-
const refName = this.refIdToOriginalName(seqId) || this.refIdToName(seqId)
|
|
108
|
-
if (!refName) {
|
|
109
|
-
throw new Error('unknown')
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const seqChunks = await firstValueFrom(
|
|
113
|
-
sequenceAdapter
|
|
114
|
-
.getFeatures({
|
|
115
|
-
refName,
|
|
116
|
-
start,
|
|
117
|
-
end,
|
|
118
|
-
assemblyName: '',
|
|
119
|
-
})
|
|
120
|
-
.pipe(toArray()),
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
const sequence = seqChunks
|
|
124
|
-
.sort((a, b) => a.get('start') - b.get('start'))
|
|
125
|
-
.map(chunk => {
|
|
126
|
-
const chunkStart = chunk.get('start')
|
|
127
|
-
const chunkEnd = chunk.get('end')
|
|
128
|
-
const trimStart = Math.max(start - chunkStart, 0)
|
|
129
|
-
const trimEnd = Math.min(end - chunkStart, chunkEnd - chunkStart)
|
|
130
|
-
const trimLength = trimEnd - trimStart
|
|
131
|
-
const chunkSeq = chunk.get('seq') || chunk.get('residues')
|
|
132
|
-
return chunkSeq.slice(trimStart, trimStart + trimLength)
|
|
133
|
-
})
|
|
134
|
-
.join('')
|
|
135
|
-
|
|
136
|
-
if (sequence.length !== end - start) {
|
|
137
|
-
throw new Error(
|
|
138
|
-
`sequence fetch failed: fetching ${refName}:${(
|
|
139
|
-
start - 1
|
|
140
|
-
).toLocaleString()}-${end.toLocaleString()} returned ${sequence.length.toLocaleString()} bases, but should have returned ${(
|
|
141
|
-
end - start
|
|
142
|
-
).toLocaleString()}`,
|
|
143
|
-
)
|
|
144
|
-
}
|
|
145
|
-
return sequence
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
private async setupPre(opts?: BaseOptions) {
|
|
149
|
-
const { statusCallback = () => {} } = opts || {}
|
|
150
|
-
return updateStatus('Downloading index', statusCallback, async () => {
|
|
151
|
-
const conf = await this.configure()
|
|
152
|
-
const { cram } = conf
|
|
153
|
-
const samHeader = await cram.cram.getSamHeader()
|
|
154
|
-
|
|
155
|
-
// use the @SQ lines in the header to figure out the
|
|
156
|
-
// mapping between ref ID numbers and names
|
|
157
|
-
const idToName: string[] = []
|
|
158
|
-
const nameToId: Record<string, number> = {}
|
|
159
|
-
samHeader
|
|
160
|
-
.filter(l => l.tag === 'SQ')
|
|
161
|
-
.forEach((sqLine, refId) => {
|
|
162
|
-
sqLine.data.forEach(item => {
|
|
163
|
-
if (item.tag === 'SN') {
|
|
164
|
-
// this is the ref name
|
|
165
|
-
const refName = item.value
|
|
166
|
-
nameToId[refName] = refId
|
|
167
|
-
idToName[refId] = refName
|
|
168
|
-
}
|
|
169
|
-
})
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
const readGroups = samHeader
|
|
173
|
-
.filter(l => l.tag === 'RG')
|
|
174
|
-
.map(rgLine => rgLine.data.find(item => item.tag === 'ID')?.value)
|
|
175
|
-
|
|
176
|
-
const data = { idToName, nameToId, readGroups }
|
|
177
|
-
this.samHeader = data
|
|
178
|
-
return { samHeader: data, ...conf }
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
private async setup(opts?: BaseOptions) {
|
|
183
|
-
if (!this.setupP) {
|
|
184
|
-
this.setupP = this.setupPre(opts).catch(e => {
|
|
185
|
-
this.setupP = undefined
|
|
186
|
-
throw e
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
return this.setupP
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async getRefNames(opts?: BaseOptions) {
|
|
193
|
-
const { samHeader } = await this.setup(opts)
|
|
194
|
-
if (!samHeader.idToName) {
|
|
195
|
-
throw new Error('CRAM file has no header lines')
|
|
196
|
-
}
|
|
197
|
-
return samHeader.idToName
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// use info from the SAM header if possible, but fall back to using
|
|
201
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
202
|
-
refNameToId(refName: string) {
|
|
203
|
-
if (this.samHeader.nameToId) {
|
|
204
|
-
return this.samHeader.nameToId[refName]
|
|
205
|
-
}
|
|
206
|
-
if (this.seqIdToRefName) {
|
|
207
|
-
return this.seqIdToRefName.indexOf(refName)
|
|
208
|
-
}
|
|
209
|
-
return undefined
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// use info from the SAM header if possible, but fall back to using
|
|
213
|
-
// the ref seq order from when the browser's refseqs were loaded
|
|
214
|
-
refIdToName(refId: number) {
|
|
215
|
-
return this.samHeader.idToName?.[refId] || this.seqIdToRefName?.[refId]
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
refIdToOriginalName(refId: number) {
|
|
219
|
-
return this.seqIdToOriginalRefName[refId]
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
getFeatures(
|
|
223
|
-
region: Region & { originalRefName?: string },
|
|
224
|
-
opts?: BaseOptions & {
|
|
225
|
-
filterBy: FilterBy
|
|
226
|
-
},
|
|
227
|
-
) {
|
|
228
|
-
const { signal, filterBy, statusCallback = () => {} } = opts || {}
|
|
229
|
-
const { refName, start, end, originalRefName } = region
|
|
230
|
-
|
|
231
|
-
return ObservableCreate<Feature>(async observer => {
|
|
232
|
-
const { cram } = await this.setup(opts)
|
|
233
|
-
|
|
234
|
-
const refId = this.refNameToId(refName)
|
|
235
|
-
if (refId === undefined) {
|
|
236
|
-
console.warn('Unknown refName', refName)
|
|
237
|
-
observer.complete()
|
|
238
|
-
return
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (originalRefName) {
|
|
242
|
-
this.seqIdToOriginalRefName[refId] = originalRefName
|
|
243
|
-
}
|
|
244
|
-
const records = await updateStatus(
|
|
245
|
-
'Downloading alignments',
|
|
246
|
-
statusCallback,
|
|
247
|
-
() => cram.getRecordsForRange(refId, start, end),
|
|
248
|
-
)
|
|
249
|
-
checkAbortSignal(signal)
|
|
250
|
-
await updateStatus('Processing alignments', statusCallback, () => {
|
|
251
|
-
const {
|
|
252
|
-
flagInclude = 0,
|
|
253
|
-
flagExclude = 0,
|
|
254
|
-
tagFilter,
|
|
255
|
-
readName,
|
|
256
|
-
} = filterBy || {}
|
|
257
|
-
|
|
258
|
-
for (const record of records) {
|
|
259
|
-
const flags = record.flags
|
|
260
|
-
if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
|
|
261
|
-
continue
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (tagFilter) {
|
|
265
|
-
const v =
|
|
266
|
-
tagFilter.tag === 'RG'
|
|
267
|
-
? this.samHeader.readGroups?.[record.readGroupId]
|
|
268
|
-
: record.tags[tagFilter.tag]
|
|
269
|
-
if (!(v === '*' ? v !== undefined : `${v}` === tagFilter.value)) {
|
|
270
|
-
continue
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (readName && record.readName !== readName) {
|
|
275
|
-
continue
|
|
276
|
-
}
|
|
277
|
-
observer.next(this.cramRecordToFeature(record))
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
observer.complete()
|
|
281
|
-
})
|
|
282
|
-
}, signal)
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
freeResources(/* { region } */): void {}
|
|
286
|
-
|
|
287
|
-
cramRecordToFeature(record: CramRecord) {
|
|
288
|
-
return new CramSlightlyLazyFeature(record, this)
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// we return the configured fetchSizeLimit, and the bytes for the region
|
|
292
|
-
async getMultiRegionFeatureDensityStats(
|
|
293
|
-
regions: Region[],
|
|
294
|
-
opts?: BaseOptions,
|
|
295
|
-
) {
|
|
296
|
-
const bytes = await this.bytesForRegions(regions, opts)
|
|
297
|
-
const fetchSizeLimit = this.getConf('fetchSizeLimit')
|
|
298
|
-
return {
|
|
299
|
-
bytes,
|
|
300
|
-
fetchSizeLimit,
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* get the approximate number of bytes queried from the file for the given
|
|
306
|
-
* query regions
|
|
307
|
-
* @param regions - list of query regions
|
|
308
|
-
*/
|
|
309
|
-
private async bytesForRegions(regions: Region[], _opts?: BaseOptions) {
|
|
310
|
-
const { cram } = await this.configure()
|
|
311
|
-
const blockResults = await Promise.all(
|
|
312
|
-
regions.map(region => {
|
|
313
|
-
const { refName, start, end } = region
|
|
314
|
-
const chrId = this.refNameToId(refName)
|
|
315
|
-
return chrId !== undefined
|
|
316
|
-
? cram.index.getEntriesForRange(chrId, start, end)
|
|
317
|
-
: [{ sliceBytes: 0 }]
|
|
318
|
-
}),
|
|
319
|
-
)
|
|
320
|
-
|
|
321
|
-
return blockResults.flat().reduce((a, b) => a + b.sliceBytes, 0)
|
|
322
|
-
}
|
|
323
|
-
}
|