@jbrowse/plugin-alignments 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +1 -1
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js.map +1 -1
- package/dist/AlignmentsTrack/index.js +1 -0
- package/dist/AlignmentsTrack/index.js.map +1 -1
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -4
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +11 -18
- package/dist/BamAdapter/BamSlightlyLazyFeature.js.map +1 -1
- package/dist/BamAdapter/index.js +1 -0
- package/dist/BamAdapter/index.js.map +1 -1
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +5 -7
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +6 -8
- package/dist/CramAdapter/CramSlightlyLazyFeature.js.map +1 -1
- package/dist/CramAdapter/CramTestAdapters.js +2 -1
- package/dist/CramAdapter/CramTestAdapters.js.map +1 -1
- package/dist/CramAdapter/index.js +1 -0
- package/dist/CramAdapter/index.js.map +1 -1
- package/dist/GuessAlignmentsTypes/index.d.ts +3 -0
- package/dist/GuessAlignmentsTypes/index.js +56 -0
- package/dist/GuessAlignmentsTypes/index.js.map +1 -0
- package/dist/HtsgetBamAdapter/index.js +11 -11
- package/dist/HtsgetBamAdapter/index.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -13
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +1 -0
- package/dist/LinearAlignmentsDisplay/index.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.d.ts +6 -3
- package/dist/LinearAlignmentsDisplay/models/configSchema.js +2 -3
- package/dist/LinearAlignmentsDisplay/models/configSchema.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +22 -36
- package/dist/LinearAlignmentsDisplay/models/model.js +166 -151
- package/dist/LinearAlignmentsDisplay/models/model.js.map +1 -1
- package/dist/LinearPileupDisplay/components/ColorByModifications.d.ts +3 -1
- package/dist/LinearPileupDisplay/components/ColorByModifications.js +7 -22
- package/dist/LinearPileupDisplay/components/ColorByModifications.js.map +1 -1
- package/dist/LinearPileupDisplay/components/ColorByTag.js +2 -22
- package/dist/LinearPileupDisplay/components/ColorByTag.js.map +1 -1
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.d.ts +2 -2
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.js +3 -22
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.js.map +1 -1
- package/dist/LinearPileupDisplay/components/SetMaxHeight.js +2 -18
- package/dist/LinearPileupDisplay/components/SetMaxHeight.js.map +1 -1
- package/dist/LinearPileupDisplay/components/SortByTag.js +2 -23
- package/dist/LinearPileupDisplay/components/SortByTag.js.map +1 -1
- package/dist/LinearPileupDisplay/configSchema.d.ts +0 -3
- package/dist/LinearPileupDisplay/configSchema.js.map +1 -1
- package/dist/LinearPileupDisplay/index.js +2 -0
- package/dist/LinearPileupDisplay/index.js.map +1 -1
- package/dist/LinearPileupDisplay/model.d.ts +19 -16
- package/dist/LinearPileupDisplay/model.js +28 -13
- package/dist/LinearPileupDisplay/model.js.map +1 -1
- package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +6 -0
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +49 -0
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js.map +1 -0
- package/dist/LinearReadArcsDisplay/configSchema.d.ts +6 -0
- package/dist/LinearReadArcsDisplay/configSchema.js +52 -0
- package/dist/LinearReadArcsDisplay/configSchema.js.map +1 -0
- package/dist/LinearReadArcsDisplay/drawFeats.d.ts +14 -0
- package/dist/LinearReadArcsDisplay/drawFeats.js +162 -0
- package/dist/LinearReadArcsDisplay/drawFeats.js.map +1 -0
- package/dist/LinearReadArcsDisplay/index.d.ts +2 -0
- package/dist/LinearReadArcsDisplay/index.js +27 -0
- package/dist/LinearReadArcsDisplay/index.js.map +1 -0
- package/dist/LinearReadArcsDisplay/model.d.ts +342 -0
- package/dist/LinearReadArcsDisplay/model.js +327 -0
- package/dist/LinearReadArcsDisplay/model.js.map +1 -0
- package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +6 -0
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +49 -0
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js.map +1 -0
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +6 -0
- package/dist/LinearReadCloudDisplay/configSchema.js +51 -0
- package/dist/LinearReadCloudDisplay/configSchema.js.map +1 -0
- package/dist/LinearReadCloudDisplay/drawFeats.d.ts +10 -0
- package/dist/LinearReadCloudDisplay/drawFeats.js +159 -0
- package/dist/LinearReadCloudDisplay/drawFeats.js.map +1 -0
- package/dist/LinearReadCloudDisplay/index.d.ts +2 -0
- package/dist/LinearReadCloudDisplay/index.js +27 -0
- package/dist/LinearReadCloudDisplay/index.js.map +1 -0
- package/dist/LinearReadCloudDisplay/model.d.ts +320 -0
- package/dist/LinearReadCloudDisplay/model.js +252 -0
- package/dist/LinearReadCloudDisplay/model.js.map +1 -0
- package/dist/LinearSNPCoverageDisplay/index.js +1 -0
- package/dist/LinearSNPCoverageDisplay/index.js.map +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +22 -19
- package/dist/LinearSNPCoverageDisplay/models/model.js +9 -12
- package/dist/LinearSNPCoverageDisplay/models/model.js.map +1 -1
- package/dist/{BamAdapter/MismatchParser.d.ts → MismatchParser/index.d.ts} +23 -0
- package/dist/{BamAdapter/MismatchParser.js → MismatchParser/index.js} +116 -3
- package/dist/MismatchParser/index.js.map +1 -0
- package/dist/PileupRPC/base.d.ts +8 -0
- package/dist/PileupRPC/base.js +22 -0
- package/dist/PileupRPC/base.js.map +1 -0
- package/dist/PileupRPC/index.d.ts +3 -0
- package/dist/PileupRPC/index.js +9 -0
- package/dist/PileupRPC/index.js.map +1 -0
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +14 -0
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +29 -0
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js.map +1 -0
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +25 -0
- package/dist/PileupRPC/methods/GetReducedFeatures.js +61 -0
- package/dist/PileupRPC/methods/GetReducedFeatures.js.map +1 -0
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +14 -0
- package/dist/PileupRPC/methods/GetVisibleModifications.js +32 -0
- package/dist/PileupRPC/methods/GetVisibleModifications.js.map +1 -0
- package/dist/PileupRPC/rpcMethods.d.ts +4 -34
- package/dist/PileupRPC/rpcMethods.js +7 -77
- package/dist/PileupRPC/rpcMethods.js.map +1 -1
- package/dist/PileupRPC/util.d.ts +8 -0
- package/dist/PileupRPC/util.js +20 -0
- package/dist/PileupRPC/util.js.map +1 -0
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/PileupRenderer/PileupRenderer.js +5 -5
- package/dist/PileupRenderer/PileupRenderer.js.map +1 -1
- package/dist/PileupRenderer/configSchema.js +1 -1
- package/dist/PileupRenderer/configSchema.js.map +1 -1
- package/dist/PileupRenderer/index.js +1 -0
- package/dist/PileupRenderer/index.js.map +1 -1
- package/dist/PileupRenderer/sortUtil.d.ts +1 -1
- package/dist/PileupRenderer/sortUtil.js +2 -2
- package/dist/PileupRenderer/sortUtil.js.map +1 -1
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +0 -51
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +3 -182
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js.map +1 -1
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +53 -0
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +185 -0
- package/dist/SNPCoverageAdapter/generateCoverageBins.js.map +1 -0
- package/dist/SNPCoverageAdapter/index.js +1 -3
- package/dist/SNPCoverageAdapter/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -58
- package/dist/index.js.map +1 -1
- package/dist/{LinearPileupDisplay/components → shared}/FilterByTag.d.ts +0 -0
- package/dist/{LinearPileupDisplay/components → shared}/FilterByTag.js +5 -24
- package/dist/shared/FilterByTag.js.map +1 -0
- package/dist/shared/color.d.ts +17 -0
- package/dist/shared/color.js +43 -0
- package/dist/shared/color.js.map +1 -0
- package/dist/shared/fetchChains.d.ts +27 -0
- package/dist/shared/fetchChains.js +30 -0
- package/dist/shared/fetchChains.js.map +1 -0
- package/dist/shared/index.d.ts +36 -0
- package/dist/{shared.js → shared/index.js} +12 -2
- package/dist/shared/index.js.map +1 -0
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js.map +1 -1
- package/esm/AlignmentsTrack/index.js +1 -0
- package/esm/AlignmentsTrack/index.js.map +1 -1
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -4
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +11 -18
- package/esm/BamAdapter/BamSlightlyLazyFeature.js.map +1 -1
- package/esm/BamAdapter/index.js +1 -0
- package/esm/BamAdapter/index.js.map +1 -1
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +5 -7
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +6 -8
- package/esm/CramAdapter/CramSlightlyLazyFeature.js.map +1 -1
- package/esm/CramAdapter/CramTestAdapters.js +2 -1
- package/esm/CramAdapter/CramTestAdapters.js.map +1 -1
- package/esm/CramAdapter/index.js +1 -0
- package/esm/CramAdapter/index.js.map +1 -1
- package/esm/GuessAlignmentsTypes/index.d.ts +3 -0
- package/esm/GuessAlignmentsTypes/index.js +54 -0
- package/esm/GuessAlignmentsTypes/index.js.map +1 -0
- package/esm/HtsgetBamAdapter/index.js +11 -11
- package/esm/HtsgetBamAdapter/index.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -13
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +1 -0
- package/esm/LinearAlignmentsDisplay/index.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.d.ts +6 -3
- package/esm/LinearAlignmentsDisplay/models/configSchema.js +2 -4
- package/esm/LinearAlignmentsDisplay/models/configSchema.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/models/model.d.ts +22 -36
- package/esm/LinearAlignmentsDisplay/models/model.js +167 -152
- package/esm/LinearAlignmentsDisplay/models/model.js.map +1 -1
- package/esm/LinearPileupDisplay/components/ColorByModifications.d.ts +3 -1
- package/esm/LinearPileupDisplay/components/ColorByModifications.js +8 -23
- package/esm/LinearPileupDisplay/components/ColorByModifications.js.map +1 -1
- package/esm/LinearPileupDisplay/components/ColorByTag.js +3 -20
- package/esm/LinearPileupDisplay/components/ColorByTag.js.map +1 -1
- package/esm/LinearPileupDisplay/components/SetFeatureHeight.d.ts +2 -2
- package/esm/LinearPileupDisplay/components/SetFeatureHeight.js +4 -20
- package/esm/LinearPileupDisplay/components/SetFeatureHeight.js.map +1 -1
- package/esm/LinearPileupDisplay/components/SetMaxHeight.js +3 -16
- package/esm/LinearPileupDisplay/components/SetMaxHeight.js.map +1 -1
- package/esm/LinearPileupDisplay/components/SortByTag.js +3 -21
- package/esm/LinearPileupDisplay/components/SortByTag.js.map +1 -1
- package/esm/LinearPileupDisplay/configSchema.d.ts +0 -3
- package/esm/LinearPileupDisplay/configSchema.js.map +1 -1
- package/esm/LinearPileupDisplay/index.js +2 -0
- package/esm/LinearPileupDisplay/index.js.map +1 -1
- package/esm/LinearPileupDisplay/model.d.ts +19 -16
- package/esm/LinearPileupDisplay/model.js +29 -14
- package/esm/LinearPileupDisplay/model.js.map +1 -1
- package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +6 -0
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +44 -0
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js.map +1 -0
- package/esm/LinearReadArcsDisplay/configSchema.d.ts +6 -0
- package/esm/LinearReadArcsDisplay/configSchema.js +50 -0
- package/esm/LinearReadArcsDisplay/configSchema.js.map +1 -0
- package/esm/LinearReadArcsDisplay/drawFeats.d.ts +14 -0
- package/esm/LinearReadArcsDisplay/drawFeats.js +157 -0
- package/esm/LinearReadArcsDisplay/drawFeats.js.map +1 -0
- package/esm/LinearReadArcsDisplay/index.d.ts +2 -0
- package/esm/LinearReadArcsDisplay/index.js +21 -0
- package/esm/LinearReadArcsDisplay/index.js.map +1 -0
- package/esm/LinearReadArcsDisplay/model.d.ts +342 -0
- package/esm/LinearReadArcsDisplay/model.js +299 -0
- package/esm/LinearReadArcsDisplay/model.js.map +1 -0
- package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +6 -0
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +44 -0
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js.map +1 -0
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +6 -0
- package/esm/LinearReadCloudDisplay/configSchema.js +49 -0
- package/esm/LinearReadCloudDisplay/configSchema.js.map +1 -0
- package/esm/LinearReadCloudDisplay/drawFeats.d.ts +10 -0
- package/esm/LinearReadCloudDisplay/drawFeats.js +156 -0
- package/esm/LinearReadCloudDisplay/drawFeats.js.map +1 -0
- package/esm/LinearReadCloudDisplay/index.d.ts +2 -0
- package/esm/LinearReadCloudDisplay/index.js +21 -0
- package/esm/LinearReadCloudDisplay/index.js.map +1 -0
- package/esm/LinearReadCloudDisplay/model.d.ts +320 -0
- package/esm/LinearReadCloudDisplay/model.js +224 -0
- package/esm/LinearReadCloudDisplay/model.js.map +1 -0
- package/esm/LinearSNPCoverageDisplay/index.js +1 -0
- package/esm/LinearSNPCoverageDisplay/index.js.map +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +22 -19
- package/esm/LinearSNPCoverageDisplay/models/model.js +11 -14
- package/esm/LinearSNPCoverageDisplay/models/model.js.map +1 -1
- package/esm/{BamAdapter/MismatchParser.d.ts → MismatchParser/index.d.ts} +23 -0
- package/esm/{BamAdapter/MismatchParser.js → MismatchParser/index.js} +107 -2
- package/esm/MismatchParser/index.js.map +1 -0
- package/esm/PileupRPC/base.d.ts +8 -0
- package/esm/PileupRPC/base.js +16 -0
- package/esm/PileupRPC/base.js.map +1 -0
- package/esm/PileupRPC/index.d.ts +3 -0
- package/esm/PileupRPC/index.js +7 -0
- package/esm/PileupRPC/index.js.map +1 -0
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +14 -0
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +23 -0
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js.map +1 -0
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +25 -0
- package/esm/PileupRPC/methods/GetReducedFeatures.js +55 -0
- package/esm/PileupRPC/methods/GetReducedFeatures.js.map +1 -0
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +14 -0
- package/esm/PileupRPC/methods/GetVisibleModifications.js +26 -0
- package/esm/PileupRPC/methods/GetVisibleModifications.js.map +1 -0
- package/esm/PileupRPC/rpcMethods.d.ts +4 -34
- package/esm/PileupRPC/rpcMethods.js +4 -74
- package/esm/PileupRPC/rpcMethods.js.map +1 -1
- package/esm/PileupRPC/util.d.ts +8 -0
- package/esm/PileupRPC/util.js +15 -0
- package/esm/PileupRPC/util.js.map +1 -0
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/PileupRenderer/PileupRenderer.js +5 -5
- package/esm/PileupRenderer/PileupRenderer.js.map +1 -1
- package/esm/PileupRenderer/configSchema.js +1 -1
- package/esm/PileupRenderer/configSchema.js.map +1 -1
- package/esm/PileupRenderer/index.js +1 -0
- package/esm/PileupRenderer/index.js.map +1 -1
- package/esm/PileupRenderer/sortUtil.d.ts +1 -1
- package/esm/PileupRenderer/sortUtil.js +1 -1
- package/esm/PileupRenderer/sortUtil.js.map +1 -1
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +0 -51
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +4 -183
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js.map +1 -1
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +53 -0
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +182 -0
- package/esm/SNPCoverageAdapter/generateCoverageBins.js.map +1 -0
- package/esm/SNPCoverageAdapter/index.js +1 -3
- package/esm/SNPCoverageAdapter/index.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +10 -56
- package/esm/index.js.map +1 -1
- package/esm/{LinearPileupDisplay/components → shared}/FilterByTag.d.ts +0 -0
- package/esm/{LinearPileupDisplay/components → shared}/FilterByTag.js +6 -22
- package/esm/shared/FilterByTag.js.map +1 -0
- package/esm/shared/color.d.ts +17 -0
- package/esm/shared/color.js +37 -0
- package/esm/shared/color.js.map +1 -0
- package/esm/shared/fetchChains.d.ts +27 -0
- package/esm/shared/fetchChains.js +26 -0
- package/esm/shared/fetchChains.js.map +1 -0
- package/esm/shared/index.d.ts +36 -0
- package/esm/{shared.js → shared/index.js} +11 -1
- package/esm/shared/index.js.map +1 -0
- package/package.json +5 -5
- package/src/AlignmentsFeatureDetail/AlignmentsFeatureDetail.tsx +1 -1
- package/src/AlignmentsTrack/index.ts +1 -0
- package/src/BamAdapter/BamSlightlyLazyFeature.ts +13 -19
- package/src/BamAdapter/index.ts +1 -0
- package/src/CramAdapter/CramSlightlyLazyFeature.ts +13 -15
- package/src/CramAdapter/CramTestAdapters.ts +1 -0
- package/src/CramAdapter/__snapshots__/CramAdapter.test.ts.snap +0 -10
- package/src/CramAdapter/index.ts +1 -0
- package/src/GuessAlignmentsTypes/index.ts +79 -0
- package/src/HtsgetBamAdapter/index.ts +11 -15
- package/src/LinearAlignmentsDisplay/components/AlignmentsDisplay.tsx +21 -29
- package/src/LinearAlignmentsDisplay/index.ts +1 -0
- package/src/LinearAlignmentsDisplay/models/configSchema.ts +2 -6
- package/src/LinearAlignmentsDisplay/models/model.tsx +238 -199
- package/src/LinearPileupDisplay/components/ColorByModifications.tsx +5 -34
- package/src/LinearPileupDisplay/components/ColorByTag.tsx +2 -29
- package/src/LinearPileupDisplay/components/SetFeatureHeight.tsx +5 -27
- package/src/LinearPileupDisplay/components/SetMaxHeight.tsx +2 -24
- package/src/LinearPileupDisplay/components/SortByTag.tsx +2 -31
- package/src/LinearPileupDisplay/configSchema.ts +1 -3
- package/src/LinearPileupDisplay/index.ts +2 -0
- package/src/LinearPileupDisplay/model.ts +36 -23
- package/src/LinearReadArcsDisplay/components/ReactComponent.tsx +86 -0
- package/src/LinearReadArcsDisplay/configSchema.ts +58 -0
- package/src/LinearReadArcsDisplay/declare.d.ts +1 -0
- package/src/LinearReadArcsDisplay/drawFeats.ts +199 -0
- package/src/LinearReadArcsDisplay/index.ts +23 -0
- package/src/LinearReadArcsDisplay/model.tsx +370 -0
- package/src/LinearReadCloudDisplay/components/ReactComponent.tsx +86 -0
- package/src/LinearReadCloudDisplay/configSchema.ts +57 -0
- package/src/LinearReadCloudDisplay/drawFeats.ts +201 -0
- package/src/LinearReadCloudDisplay/index.ts +23 -0
- package/src/LinearReadCloudDisplay/model.tsx +289 -0
- package/src/LinearSNPCoverageDisplay/index.ts +1 -0
- package/src/LinearSNPCoverageDisplay/models/model.ts +15 -21
- package/src/{BamAdapter/MismatchParser.test.ts → MismatchParser/index.test.ts} +1 -1
- package/src/{BamAdapter/MismatchParser.ts → MismatchParser/index.ts} +129 -2
- package/src/PileupRPC/base.ts +24 -0
- package/src/PileupRPC/index.ts +12 -0
- package/src/PileupRPC/methods/GetGlobalValueForTag.ts +41 -0
- package/src/PileupRPC/methods/GetReducedFeatures.ts +76 -0
- package/src/PileupRPC/methods/GetVisibleModifications.ts +45 -0
- package/src/PileupRPC/rpcMethods.ts +8 -113
- package/src/PileupRPC/util.ts +19 -0
- package/src/PileupRenderer/PileupRenderer.ts +5 -8
- package/src/PileupRenderer/configSchema.ts +1 -1
- package/src/PileupRenderer/index.ts +1 -0
- package/src/PileupRenderer/sortUtil.ts +2 -3
- package/src/SNPCoverageAdapter/SNPCoverageAdapter.ts +5 -249
- package/src/SNPCoverageAdapter/generateCoverageBins.ts +245 -0
- package/src/SNPCoverageAdapter/index.ts +1 -3
- package/src/index.ts +12 -93
- package/src/{LinearPileupDisplay/components → shared}/FilterByTag.tsx +5 -31
- package/src/shared/color.ts +47 -0
- package/src/shared/fetchChains.ts +63 -0
- package/src/{shared.ts → shared/index.ts} +17 -4
- package/dist/BamAdapter/MismatchParser.js.map +0 -1
- package/dist/LinearPileupDisplay/components/FilterByTag.js.map +0 -1
- package/dist/shared.d.ts +0 -25
- package/dist/shared.js.map +0 -1
- package/esm/BamAdapter/MismatchParser.js.map +0 -1
- package/esm/LinearPileupDisplay/components/FilterByTag.js.map +0 -1
- package/esm/shared.d.ts +0 -25
- package/esm/shared.js.map +0 -1
|
@@ -4,23 +4,14 @@ import { ObservableMap } from 'mobx'
|
|
|
4
4
|
import {
|
|
5
5
|
Button,
|
|
6
6
|
CircularProgress,
|
|
7
|
-
Dialog,
|
|
8
7
|
DialogActions,
|
|
9
8
|
DialogContent,
|
|
10
|
-
DialogTitle,
|
|
11
|
-
IconButton,
|
|
12
9
|
Typography,
|
|
13
10
|
} from '@mui/material'
|
|
11
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
14
12
|
import { makeStyles } from 'tss-react/mui'
|
|
15
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
16
13
|
|
|
17
14
|
const useStyles = makeStyles()(theme => ({
|
|
18
|
-
closeButton: {
|
|
19
|
-
position: 'absolute',
|
|
20
|
-
right: theme.spacing(1),
|
|
21
|
-
top: theme.spacing(1),
|
|
22
|
-
color: theme.palette.grey[500],
|
|
23
|
-
},
|
|
24
15
|
table: {
|
|
25
16
|
border: '1px solid #888',
|
|
26
17
|
margin: theme.spacing(4),
|
|
@@ -58,30 +49,19 @@ function ModificationTable({
|
|
|
58
49
|
|
|
59
50
|
function ColorByTagDlg(props: {
|
|
60
51
|
model: {
|
|
61
|
-
setColorScheme:
|
|
52
|
+
setColorScheme: (arg: { type: string }) => void
|
|
62
53
|
modificationTagMap: ObservableMap<string, string>
|
|
63
54
|
colorBy?: { type: string }
|
|
64
55
|
}
|
|
65
56
|
handleClose: () => void
|
|
66
57
|
}) {
|
|
67
|
-
const { classes } = useStyles()
|
|
68
58
|
const { model, handleClose } = props
|
|
69
59
|
const { colorBy, modificationTagMap } = model
|
|
70
60
|
|
|
71
61
|
const modifications = [...modificationTagMap.entries()]
|
|
72
62
|
|
|
73
63
|
return (
|
|
74
|
-
<Dialog open onClose={handleClose}>
|
|
75
|
-
<DialogTitle>
|
|
76
|
-
Color by modifications
|
|
77
|
-
<IconButton
|
|
78
|
-
aria-label="close"
|
|
79
|
-
className={classes.closeButton}
|
|
80
|
-
onClick={handleClose}
|
|
81
|
-
>
|
|
82
|
-
<CloseIcon />
|
|
83
|
-
</IconButton>
|
|
84
|
-
</DialogTitle>
|
|
64
|
+
<Dialog open onClose={handleClose} title="Color by modifications">
|
|
85
65
|
<DialogContent>
|
|
86
66
|
<Typography>
|
|
87
67
|
You can choose to color the modifications in the BAM/CRAM MM/ML
|
|
@@ -126,12 +106,8 @@ function ColorByTagDlg(props: {
|
|
|
126
106
|
<DialogActions>
|
|
127
107
|
<Button
|
|
128
108
|
variant="contained"
|
|
129
|
-
color="primary"
|
|
130
|
-
style={{ margin: 5 }}
|
|
131
109
|
onClick={() => {
|
|
132
|
-
model.setColorScheme({
|
|
133
|
-
type: 'modifications',
|
|
134
|
-
})
|
|
110
|
+
model.setColorScheme({ type: 'modifications' })
|
|
135
111
|
handleClose()
|
|
136
112
|
}}
|
|
137
113
|
>
|
|
@@ -139,12 +115,8 @@ function ColorByTagDlg(props: {
|
|
|
139
115
|
</Button>
|
|
140
116
|
<Button
|
|
141
117
|
variant="contained"
|
|
142
|
-
color="primary"
|
|
143
|
-
style={{ margin: 5 }}
|
|
144
118
|
onClick={() => {
|
|
145
|
-
model.setColorScheme({
|
|
146
|
-
type: 'methylation',
|
|
147
|
-
})
|
|
119
|
+
model.setColorScheme({ type: 'methylation' })
|
|
148
120
|
handleClose()
|
|
149
121
|
}}
|
|
150
122
|
>
|
|
@@ -153,7 +125,6 @@ function ColorByTagDlg(props: {
|
|
|
153
125
|
<Button
|
|
154
126
|
variant="contained"
|
|
155
127
|
color="secondary"
|
|
156
|
-
style={{ margin: 5 }}
|
|
157
128
|
onClick={() => handleClose()}
|
|
158
129
|
>
|
|
159
130
|
Cancel
|
|
@@ -2,50 +2,23 @@ import React, { useState } from 'react'
|
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
-
Dialog,
|
|
6
5
|
DialogContent,
|
|
7
6
|
DialogActions,
|
|
8
|
-
DialogTitle,
|
|
9
|
-
IconButton,
|
|
10
7
|
TextField,
|
|
11
8
|
Typography,
|
|
12
9
|
} from '@mui/material'
|
|
13
|
-
import {
|
|
14
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
15
|
-
|
|
16
|
-
const useStyles = makeStyles()(theme => ({
|
|
17
|
-
root: {
|
|
18
|
-
width: 300,
|
|
19
|
-
},
|
|
20
|
-
closeButton: {
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
right: theme.spacing(1),
|
|
23
|
-
top: theme.spacing(1),
|
|
24
|
-
color: theme.palette.grey[500],
|
|
25
|
-
},
|
|
26
|
-
}))
|
|
10
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
27
11
|
|
|
28
12
|
function ColorByTagDlg(props: {
|
|
29
13
|
model: { setColorScheme: Function }
|
|
30
14
|
handleClose: () => void
|
|
31
15
|
}) {
|
|
32
|
-
const { classes } = useStyles()
|
|
33
16
|
const { model, handleClose } = props
|
|
34
17
|
const [tag, setTag] = useState('')
|
|
35
18
|
const validTag = tag.match(/^[A-Za-z][A-Za-z0-9]$/)
|
|
36
19
|
|
|
37
20
|
return (
|
|
38
|
-
<Dialog open onClose={handleClose}>
|
|
39
|
-
<DialogTitle>
|
|
40
|
-
Color by tag
|
|
41
|
-
<IconButton
|
|
42
|
-
aria-label="close"
|
|
43
|
-
className={classes.closeButton}
|
|
44
|
-
onClick={handleClose}
|
|
45
|
-
>
|
|
46
|
-
<CloseIcon />
|
|
47
|
-
</IconButton>
|
|
48
|
-
</DialogTitle>
|
|
21
|
+
<Dialog open onClose={handleClose} title="Color by tag">
|
|
49
22
|
<DialogContent style={{ overflowX: 'hidden' }}>
|
|
50
23
|
<Typography>Enter tag to color by: </Typography>
|
|
51
24
|
<Typography color="textSecondary">
|
|
@@ -3,37 +3,23 @@ import { observer } from 'mobx-react'
|
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
Checkbox,
|
|
6
|
-
Dialog,
|
|
7
6
|
DialogActions,
|
|
8
7
|
DialogContent,
|
|
9
|
-
DialogTitle,
|
|
10
8
|
FormControlLabel,
|
|
11
|
-
IconButton,
|
|
12
9
|
TextField,
|
|
13
10
|
Typography,
|
|
14
11
|
} from '@mui/material'
|
|
15
|
-
import {
|
|
16
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
17
|
-
|
|
18
|
-
const useStyles = makeStyles()(theme => ({
|
|
19
|
-
closeButton: {
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
right: theme.spacing(1),
|
|
22
|
-
top: theme.spacing(1),
|
|
23
|
-
color: theme.palette.grey[500],
|
|
24
|
-
},
|
|
25
|
-
}))
|
|
12
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
26
13
|
|
|
27
14
|
function SetFeatureHeightDlg(props: {
|
|
28
15
|
model: {
|
|
29
|
-
setFeatureHeight:
|
|
30
|
-
setNoSpacing:
|
|
16
|
+
setFeatureHeight: (arg?: number) => void
|
|
17
|
+
setNoSpacing: (arg?: boolean) => void
|
|
31
18
|
featureHeightSetting: number
|
|
32
19
|
noSpacing?: boolean
|
|
33
20
|
}
|
|
34
21
|
handleClose: () => void
|
|
35
22
|
}) {
|
|
36
|
-
const { classes } = useStyles()
|
|
37
23
|
const { model, handleClose } = props
|
|
38
24
|
const { featureHeightSetting, noSpacing: noSpacingSetting } = model
|
|
39
25
|
const [height, setHeight] = useState(`${featureHeightSetting}`)
|
|
@@ -42,13 +28,7 @@ function SetFeatureHeightDlg(props: {
|
|
|
42
28
|
const ok = height !== '' && !Number.isNaN(+height)
|
|
43
29
|
|
|
44
30
|
return (
|
|
45
|
-
<Dialog open onClose={handleClose}>
|
|
46
|
-
<DialogTitle>
|
|
47
|
-
Set feature height
|
|
48
|
-
<IconButton className={classes.closeButton} onClick={handleClose}>
|
|
49
|
-
<CloseIcon />
|
|
50
|
-
</IconButton>
|
|
51
|
-
</DialogTitle>
|
|
31
|
+
<Dialog open onClose={handleClose} title="Set feature height">
|
|
52
32
|
<DialogContent>
|
|
53
33
|
<Typography>
|
|
54
34
|
Adjust the feature height and whether there is any spacing between
|
|
@@ -58,9 +38,7 @@ function SetFeatureHeightDlg(props: {
|
|
|
58
38
|
<TextField
|
|
59
39
|
value={height}
|
|
60
40
|
helperText="Feature height"
|
|
61
|
-
onChange={event =>
|
|
62
|
-
setHeight(event.target.value)
|
|
63
|
-
}}
|
|
41
|
+
onChange={event => setHeight(event.target.value)}
|
|
64
42
|
/>
|
|
65
43
|
<FormControlLabel
|
|
66
44
|
control={
|
|
@@ -2,30 +2,18 @@ import React, { useState } from 'react'
|
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
-
Dialog,
|
|
6
5
|
DialogActions,
|
|
7
6
|
DialogContent,
|
|
8
|
-
DialogTitle,
|
|
9
|
-
IconButton,
|
|
10
7
|
TextField,
|
|
11
8
|
Typography,
|
|
12
9
|
} from '@mui/material'
|
|
10
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
13
11
|
import { makeStyles } from 'tss-react/mui'
|
|
14
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
15
12
|
|
|
16
13
|
const useStyles = makeStyles()(theme => ({
|
|
17
14
|
root: {
|
|
18
15
|
width: 500,
|
|
19
16
|
},
|
|
20
|
-
closeButton: {
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
right: theme.spacing(1),
|
|
23
|
-
top: theme.spacing(1),
|
|
24
|
-
color: theme.palette.grey[500],
|
|
25
|
-
},
|
|
26
|
-
field: {
|
|
27
|
-
margin: theme.spacing(2),
|
|
28
|
-
},
|
|
29
17
|
}))
|
|
30
18
|
|
|
31
19
|
function SetMaxHeightDlg(props: {
|
|
@@ -41,17 +29,7 @@ function SetMaxHeightDlg(props: {
|
|
|
41
29
|
const [max, setMax] = useState(`${maxHeight}`)
|
|
42
30
|
|
|
43
31
|
return (
|
|
44
|
-
<Dialog open onClose={handleClose}>
|
|
45
|
-
<DialogTitle>
|
|
46
|
-
Filter options
|
|
47
|
-
<IconButton
|
|
48
|
-
aria-label="close"
|
|
49
|
-
className={classes.closeButton}
|
|
50
|
-
onClick={handleClose}
|
|
51
|
-
>
|
|
52
|
-
<CloseIcon />
|
|
53
|
-
</IconButton>
|
|
54
|
-
</DialogTitle>
|
|
32
|
+
<Dialog open onClose={handleClose} title="Filter options">
|
|
55
33
|
<DialogContent className={classes.root}>
|
|
56
34
|
<Typography>
|
|
57
35
|
Set max height for the track. For example, you can increase this if
|
|
@@ -2,51 +2,22 @@ import React, { useState } from 'react'
|
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
-
Dialog,
|
|
6
5
|
DialogActions,
|
|
7
6
|
DialogContent,
|
|
8
|
-
DialogTitle,
|
|
9
|
-
IconButton,
|
|
10
7
|
TextField,
|
|
11
8
|
Typography,
|
|
12
9
|
} from '@mui/material'
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
16
|
-
|
|
17
|
-
const useStyles = makeStyles()(theme => ({
|
|
18
|
-
root: {
|
|
19
|
-
margin: 0,
|
|
20
|
-
padding: theme.spacing(2),
|
|
21
|
-
},
|
|
22
|
-
closeButton: {
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
right: theme.spacing(1),
|
|
25
|
-
top: theme.spacing(1),
|
|
26
|
-
color: theme.palette.grey[500],
|
|
27
|
-
},
|
|
28
|
-
}))
|
|
10
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
29
11
|
|
|
30
12
|
function SortByTagDlg(props: {
|
|
31
13
|
model: { setSortedBy: Function }
|
|
32
14
|
handleClose: () => void
|
|
33
15
|
}) {
|
|
34
|
-
const { classes } = useStyles()
|
|
35
16
|
const { model, handleClose } = props
|
|
36
17
|
const [tag, setTag] = useState('')
|
|
37
18
|
const validTag = tag.match(/^[A-Za-z][A-Za-z0-9]$/)
|
|
38
19
|
return (
|
|
39
|
-
<Dialog open onClose={handleClose}>
|
|
40
|
-
<DialogTitle>
|
|
41
|
-
Sort by tag
|
|
42
|
-
<IconButton
|
|
43
|
-
aria-label="close"
|
|
44
|
-
className={classes.closeButton}
|
|
45
|
-
onClick={handleClose}
|
|
46
|
-
>
|
|
47
|
-
<CloseIcon />
|
|
48
|
-
</IconButton>
|
|
49
|
-
</DialogTitle>
|
|
20
|
+
<Dialog open onClose={handleClose} title="Sort by tag">
|
|
50
21
|
<DialogContent>
|
|
51
22
|
<Typography>Set the tag to sort by</Typography>
|
|
52
23
|
<Typography color="textSecondary">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
2
|
import { linearBasicDisplayConfigSchemaFactory } from '@jbrowse/plugin-linear-genome-view'
|
|
3
|
-
import { types
|
|
3
|
+
import { types } from 'mobx-state-tree'
|
|
4
4
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -64,6 +64,4 @@ function configSchemaF(pluginManager: PluginManager) {
|
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export type LinearPileupDisplayConfigModel = ReturnType<typeof configSchemaF>
|
|
68
|
-
export type LinearPileupDisplayConfig = Instance<LinearPileupDisplayConfigModel>
|
|
69
67
|
export default configSchemaF
|
|
@@ -9,8 +9,10 @@ export default function register(pluginManager: PluginManager) {
|
|
|
9
9
|
const configSchema = configSchemaFactory(pluginManager)
|
|
10
10
|
return new DisplayType({
|
|
11
11
|
name: 'LinearPileupDisplay',
|
|
12
|
+
displayName: 'Pileup display',
|
|
12
13
|
configSchema,
|
|
13
14
|
stateModel: modelFactory(configSchema),
|
|
15
|
+
subDisplay: { type: 'LinearAlignmentsDisplay', lowerPanel: true },
|
|
14
16
|
trackType: 'AlignmentsTrack',
|
|
15
17
|
viewType: 'LinearGenomeView',
|
|
16
18
|
ReactComponent: BaseLinearDisplayComponent,
|
|
@@ -4,6 +4,7 @@ import { cast, types, addDisposer, Instance } from 'mobx-state-tree'
|
|
|
4
4
|
import copy from 'copy-to-clipboard'
|
|
5
5
|
import {
|
|
6
6
|
AnyConfigurationModel,
|
|
7
|
+
AnyConfigurationSchemaType,
|
|
7
8
|
ConfigurationReference,
|
|
8
9
|
readConfObject,
|
|
9
10
|
getConf,
|
|
@@ -32,14 +33,17 @@ import PaletteIcon from '@mui/icons-material/Palette'
|
|
|
32
33
|
import FilterListIcon from '@mui/icons-material/ClearAll'
|
|
33
34
|
|
|
34
35
|
// locals
|
|
35
|
-
import { LinearPileupDisplayConfigModel } from './configSchema'
|
|
36
36
|
import LinearPileupDisplayBlurb from './components/LinearPileupDisplayBlurb'
|
|
37
|
-
import {
|
|
37
|
+
import {
|
|
38
|
+
getUniqueTagValues,
|
|
39
|
+
getUniqueModificationValues,
|
|
40
|
+
FilterModel,
|
|
41
|
+
} from '../shared'
|
|
38
42
|
import { SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature'
|
|
39
43
|
|
|
40
44
|
// async
|
|
45
|
+
const FilterByTagDlg = lazy(() => import('../shared/FilterByTag'))
|
|
41
46
|
const ColorByTagDlg = lazy(() => import('./components/ColorByTag'))
|
|
42
|
-
const FilterByTagDlg = lazy(() => import('./components/FilterByTag'))
|
|
43
47
|
const SortByTagDlg = lazy(() => import('./components/SortByTag'))
|
|
44
48
|
const SetFeatureHeightDlg = lazy(() => import('./components/SetFeatureHeight'))
|
|
45
49
|
const SetMaxHeightDlg = lazy(() => import('./components/SetMaxHeight'))
|
|
@@ -57,7 +61,7 @@ type LGV = LinearGenomeViewModel
|
|
|
57
61
|
* #stateModel LinearPileupDisplay
|
|
58
62
|
* extends `BaseLinearDisplay`
|
|
59
63
|
*/
|
|
60
|
-
function stateModelFactory(configSchema:
|
|
64
|
+
function stateModelFactory(configSchema: AnyConfigurationSchemaType) {
|
|
61
65
|
return types
|
|
62
66
|
.compose(
|
|
63
67
|
'LinearPileupDisplay',
|
|
@@ -122,17 +126,7 @@ function stateModelFactory(configSchema: LinearPileupDisplayConfigModel) {
|
|
|
122
126
|
/**
|
|
123
127
|
* #property
|
|
124
128
|
*/
|
|
125
|
-
filterBy: types.optional(
|
|
126
|
-
types.model({
|
|
127
|
-
flagInclude: types.optional(types.number, 0),
|
|
128
|
-
flagExclude: types.optional(types.number, 1540),
|
|
129
|
-
readName: types.maybe(types.string),
|
|
130
|
-
tagFilter: types.maybe(
|
|
131
|
-
types.model({ tag: types.string, value: types.string }),
|
|
132
|
-
),
|
|
133
|
-
}),
|
|
134
|
-
{},
|
|
135
|
-
),
|
|
129
|
+
filterBy: types.optional(FilterModel, {}),
|
|
136
130
|
}),
|
|
137
131
|
)
|
|
138
132
|
.volatile(() => ({
|
|
@@ -164,13 +158,13 @@ function stateModelFactory(configSchema: LinearPileupDisplayConfigModel) {
|
|
|
164
158
|
/**
|
|
165
159
|
* #action
|
|
166
160
|
*/
|
|
167
|
-
setFeatureHeight(n
|
|
161
|
+
setFeatureHeight(n?: number) {
|
|
168
162
|
self.featureHeight = n
|
|
169
163
|
},
|
|
170
164
|
/**
|
|
171
165
|
* #action
|
|
172
166
|
*/
|
|
173
|
-
setNoSpacing(flag
|
|
167
|
+
setNoSpacing(flag?: boolean) {
|
|
174
168
|
self.noSpacing = flag
|
|
175
169
|
},
|
|
176
170
|
|
|
@@ -788,12 +782,31 @@ function stateModelFactory(configSchema: LinearPileupDisplayConfigModel) {
|
|
|
788
782
|
},
|
|
789
783
|
{
|
|
790
784
|
label: 'Set feature height',
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
785
|
+
subMenu: [
|
|
786
|
+
{
|
|
787
|
+
label: 'Normal',
|
|
788
|
+
onClick: () => {
|
|
789
|
+
self.setFeatureHeight(7)
|
|
790
|
+
self.setNoSpacing(false)
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
label: 'Compact',
|
|
795
|
+
onClick: () => {
|
|
796
|
+
self.setFeatureHeight(2)
|
|
797
|
+
self.setNoSpacing(true)
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
label: 'Manually set height',
|
|
802
|
+
onClick: () => {
|
|
803
|
+
getSession(self).queueDialog(doneCallback => [
|
|
804
|
+
SetFeatureHeightDlg,
|
|
805
|
+
{ model: self, handleClose: doneCallback },
|
|
806
|
+
])
|
|
807
|
+
},
|
|
808
|
+
},
|
|
809
|
+
],
|
|
797
810
|
},
|
|
798
811
|
{
|
|
799
812
|
label: 'Set max height',
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { isAlive } from 'mobx-state-tree'
|
|
3
|
+
import { makeStyles } from 'tss-react/mui'
|
|
4
|
+
import { observer } from 'mobx-react'
|
|
5
|
+
import { getContainingView } from '@jbrowse/core/util'
|
|
6
|
+
import { LoadingEllipses } from '@jbrowse/core/ui'
|
|
7
|
+
import {
|
|
8
|
+
BlockMsg,
|
|
9
|
+
LinearGenomeViewModel,
|
|
10
|
+
} from '@jbrowse/plugin-linear-genome-view'
|
|
11
|
+
|
|
12
|
+
// local
|
|
13
|
+
import { LinearReadArcsDisplayModel } from '../model'
|
|
14
|
+
|
|
15
|
+
type LGV = LinearGenomeViewModel
|
|
16
|
+
|
|
17
|
+
const useStyles = makeStyles()(theme => ({
|
|
18
|
+
loading: {
|
|
19
|
+
paddingLeft: '0.6em',
|
|
20
|
+
backgroundColor: theme.palette.action.disabledBackground,
|
|
21
|
+
backgroundImage:
|
|
22
|
+
'repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,.5) 5px, rgba(255,255,255,.5) 10px)',
|
|
23
|
+
height: '100%',
|
|
24
|
+
width: '100%',
|
|
25
|
+
pointerEvents: 'none',
|
|
26
|
+
textAlign: 'center',
|
|
27
|
+
},
|
|
28
|
+
}))
|
|
29
|
+
|
|
30
|
+
const Arcs = observer(function ({
|
|
31
|
+
model,
|
|
32
|
+
}: {
|
|
33
|
+
model: LinearReadArcsDisplayModel
|
|
34
|
+
}) {
|
|
35
|
+
const view = getContainingView(model) as LGV
|
|
36
|
+
return (
|
|
37
|
+
<canvas
|
|
38
|
+
data-testid={`Arc-display-${model.drawn}`}
|
|
39
|
+
ref={ref => {
|
|
40
|
+
if (isAlive(model)) {
|
|
41
|
+
model.setRef(ref)
|
|
42
|
+
}
|
|
43
|
+
}}
|
|
44
|
+
style={{
|
|
45
|
+
position: 'absolute',
|
|
46
|
+
left: -view.offsetPx + model.lastDrawnOffsetPx,
|
|
47
|
+
width: view.dynamicBlocks.totalWidthPx,
|
|
48
|
+
height: model.height,
|
|
49
|
+
}}
|
|
50
|
+
width={view.dynamicBlocks.totalWidthPx * 2}
|
|
51
|
+
height={model.height * 2}
|
|
52
|
+
/>
|
|
53
|
+
)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
export default observer(function ({
|
|
57
|
+
model,
|
|
58
|
+
}: {
|
|
59
|
+
model: LinearReadArcsDisplayModel
|
|
60
|
+
}) {
|
|
61
|
+
const view = getContainingView(model)
|
|
62
|
+
const { classes } = useStyles()
|
|
63
|
+
const err = model.error
|
|
64
|
+
return err ? (
|
|
65
|
+
<BlockMsg
|
|
66
|
+
message={`${err}`}
|
|
67
|
+
severity="error"
|
|
68
|
+
buttonText={'Reload'}
|
|
69
|
+
action={model.reload}
|
|
70
|
+
/>
|
|
71
|
+
) : model.loading ? (
|
|
72
|
+
<div
|
|
73
|
+
className={classes.loading}
|
|
74
|
+
style={{
|
|
75
|
+
width: view.dynamicBlocks.totalWidthPx,
|
|
76
|
+
height: 20,
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
left: Math.max(0, -view.offsetPx),
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
<LoadingEllipses message={model.message} />
|
|
82
|
+
</div>
|
|
83
|
+
) : (
|
|
84
|
+
<Arcs model={model} />
|
|
85
|
+
)
|
|
86
|
+
})
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
3
|
+
import { linearBasicDisplayConfigSchemaFactory } from '@jbrowse/plugin-linear-genome-view'
|
|
4
|
+
import { types } from 'mobx-state-tree'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* #config LinearReadArcsDisplay
|
|
8
|
+
*/
|
|
9
|
+
function configSchemaF(pluginManager: PluginManager) {
|
|
10
|
+
return ConfigurationSchema(
|
|
11
|
+
'LinearReadArcsDisplay',
|
|
12
|
+
{
|
|
13
|
+
/**
|
|
14
|
+
* #slot
|
|
15
|
+
*/
|
|
16
|
+
maxFeatureScreenDensity: {
|
|
17
|
+
type: 'number',
|
|
18
|
+
description: 'maximum features per pixel that is displayed in the view',
|
|
19
|
+
defaultValue: 5,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* #slot
|
|
24
|
+
*/
|
|
25
|
+
lineWidth: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'set arc line width',
|
|
28
|
+
defaultValue: 1,
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* #slot
|
|
33
|
+
*/
|
|
34
|
+
colorScheme: {
|
|
35
|
+
type: 'stringEnum',
|
|
36
|
+
model: types.enumeration('colorScheme', [
|
|
37
|
+
'strand',
|
|
38
|
+
'normal',
|
|
39
|
+
'insertSize',
|
|
40
|
+
'insertSizeAndOrientation',
|
|
41
|
+
'mappingQuality',
|
|
42
|
+
'tag',
|
|
43
|
+
]),
|
|
44
|
+
description: 'color scheme to use',
|
|
45
|
+
defaultValue: 'normal',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
/**
|
|
50
|
+
* #baseConfiguration
|
|
51
|
+
*/
|
|
52
|
+
baseConfiguration: linearBasicDisplayConfigSchemaFactory(pluginManager),
|
|
53
|
+
explicitlyTyped: true,
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default configSchemaF
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'canvas2svg'
|