@jbrowse/plugin-variants 2.16.1 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +8 -38
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +73 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +47 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/dist/MultiLinearVariantDisplay/model.js +235 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +18 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +42 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +81 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +218 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +21 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +106 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +12 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +60 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +43 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +13 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/Chord.js +5 -9
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +58 -0
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +4 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +9 -13
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +1 -1
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +67 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +63 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/dist/VcfAdapter/VcfAdapter.js +7 -12
- package/dist/VcfAdapter/configSchema.d.ts +0 -3
- package/dist/VcfAdapter/configSchema.js +1 -7
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +35 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +0 -12
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +10 -5
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/dist/VcfTabixAdapter/configSchema.js +2 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/configSchema.d.ts +34 -0
- package/dist/configSchema.js +44 -0
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/dist/getMultiVariantFeaturesAutorun.js +40 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +6 -0
- package/dist/shared/BulkEditPanel.js +103 -0
- package/dist/shared/ClusterDialog.d.ts +12 -0
- package/dist/shared/ClusterDialog.js +150 -0
- package/dist/shared/ColorLegend.d.ts +11 -0
- package/dist/shared/ColorLegend.js +24 -0
- package/dist/shared/DraggableDialog.d.ts +6 -0
- package/dist/shared/DraggableDialog.js +62 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +38 -0
- package/dist/shared/MAFFilterDialog.d.ts +9 -0
- package/dist/shared/MAFFilterDialog.js +56 -0
- package/dist/shared/RectBg.d.ts +9 -0
- package/dist/shared/RectBg.js +12 -0
- package/dist/shared/RowPalettizer.d.ts +6 -0
- package/dist/shared/RowPalettizer.js +38 -0
- package/dist/shared/SetColorDialog.d.ts +12 -0
- package/dist/shared/SetColorDialog.js +94 -0
- package/dist/shared/SetMinMaxDialog.d.ts +11 -0
- package/dist/shared/SetMinMaxDialog.js +56 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesGrid.d.ts +8 -0
- package/dist/shared/SourcesGrid.js +143 -0
- package/dist/shared/Tooltip.d.ts +18 -0
- package/dist/shared/Tooltip.js +38 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +53 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +8 -38
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +45 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/esm/MultiLinearVariantDisplay/model.js +206 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +12 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +53 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +189 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +100 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +54 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +18 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/Chord.js +5 -9
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +30 -0
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +5 -7
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +10 -14
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +60 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +56 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/esm/VcfAdapter/VcfAdapter.js +9 -14
- package/esm/VcfAdapter/configSchema.d.ts +0 -3
- package/esm/VcfAdapter/configSchema.js +1 -7
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +35 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +0 -12
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +11 -6
- package/esm/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/esm/VcfTabixAdapter/configSchema.js +2 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/configSchema.d.ts +34 -0
- package/esm/configSchema.js +42 -0
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +1 -1
- package/esm/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/esm/getMultiVariantFeaturesAutorun.js +37 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +6 -0
- package/esm/shared/BulkEditPanel.js +77 -0
- package/esm/shared/ClusterDialog.d.ts +12 -0
- package/esm/shared/ClusterDialog.js +121 -0
- package/esm/shared/ColorLegend.d.ts +11 -0
- package/esm/shared/ColorLegend.js +19 -0
- package/esm/shared/DraggableDialog.d.ts +6 -0
- package/esm/shared/DraggableDialog.js +34 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +32 -0
- package/esm/shared/MAFFilterDialog.d.ts +9 -0
- package/esm/shared/MAFFilterDialog.js +31 -0
- package/esm/shared/RectBg.d.ts +9 -0
- package/esm/shared/RectBg.js +7 -0
- package/esm/shared/RowPalettizer.d.ts +6 -0
- package/esm/shared/RowPalettizer.js +32 -0
- package/esm/shared/SetColorDialog.d.ts +12 -0
- package/esm/shared/SetColorDialog.js +65 -0
- package/esm/shared/SetMinMaxDialog.d.ts +11 -0
- package/esm/shared/SetMinMaxDialog.js +30 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesGrid.d.ts +8 -0
- package/esm/shared/SourcesGrid.js +115 -0
- package/esm/shared/Tooltip.d.ts +18 -0
- package/esm/shared/Tooltip.js +33 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/util.d.ts +11 -0
- package/esm/util.js +47 -0
- package/package.json +4 -4
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = SharedVariantMixin;
|
|
4
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
+
const util_1 = require("@jbrowse/core/util");
|
|
6
|
+
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
+
function SharedVariantMixin(configSchema) {
|
|
9
|
+
return mobx_state_tree_1.types
|
|
10
|
+
.compose(plugin_linear_genome_view_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
11
|
+
selectedRendering: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, ''),
|
|
12
|
+
summaryScoreMode: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
13
|
+
rendererTypeNameState: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
14
|
+
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
15
|
+
}))
|
|
16
|
+
.volatile(() => ({
|
|
17
|
+
message: undefined,
|
|
18
|
+
}))
|
|
19
|
+
.actions(self => ({
|
|
20
|
+
selectFeature(feature) {
|
|
21
|
+
const session = (0, util_1.getSession)(self);
|
|
22
|
+
if ((0, util_1.isSelectionContainer)(session)) {
|
|
23
|
+
session.setSelection(feature);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setRendererType(val) {
|
|
27
|
+
self.rendererTypeNameState = val;
|
|
28
|
+
},
|
|
29
|
+
}))
|
|
30
|
+
.views(self => ({
|
|
31
|
+
get adapterTypeName() {
|
|
32
|
+
return self.adapterConfig.type;
|
|
33
|
+
},
|
|
34
|
+
get rendererTypeNameSimple() {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = self.rendererTypeNameState) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, 'defaultRendering');
|
|
37
|
+
},
|
|
38
|
+
get filters() {
|
|
39
|
+
return undefined;
|
|
40
|
+
},
|
|
41
|
+
}))
|
|
42
|
+
.views(self => ({
|
|
43
|
+
get adapterCapabilities() {
|
|
44
|
+
const type = self.adapterTypeName;
|
|
45
|
+
const { pluginManager } = (0, util_1.getEnv)(self);
|
|
46
|
+
return pluginManager.getAdapterType(type).adapterCapabilities;
|
|
47
|
+
},
|
|
48
|
+
}))
|
|
49
|
+
.actions(self => {
|
|
50
|
+
const { reload: superReload } = self;
|
|
51
|
+
return {
|
|
52
|
+
async reload() {
|
|
53
|
+
self.setError();
|
|
54
|
+
superReload();
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
31
|
+
const ColorPicker_1 = __importStar(require("@jbrowse/core/ui/ColorPicker"));
|
|
32
|
+
const util_1 = require("@jbrowse/core/util");
|
|
33
|
+
const KeyboardArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
34
|
+
const KeyboardArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardArrowUp"));
|
|
35
|
+
const KeyboardDoubleArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowDown"));
|
|
36
|
+
const KeyboardDoubleArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowUp"));
|
|
37
|
+
const material_1 = require("@mui/material");
|
|
38
|
+
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
39
|
+
const mui_1 = require("tss-react/mui");
|
|
40
|
+
const util_2 = require("./util");
|
|
41
|
+
const useStyles = (0, mui_1.makeStyles)()({
|
|
42
|
+
cell: {
|
|
43
|
+
whiteSpace: 'nowrap',
|
|
44
|
+
overflow: 'hidden',
|
|
45
|
+
textOverflow: 'ellipsis',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
function SourcesGrid({ rows, onChange, showTips, }) {
|
|
49
|
+
const { classes } = useStyles();
|
|
50
|
+
const [selected, setSelected] = (0, react_1.useState)([]);
|
|
51
|
+
const { name: _name, color: _color, baseUri: _baseUri, ...rest } = rows[0];
|
|
52
|
+
const [currSort, setCurrSort] = (0, react_1.useState)({
|
|
53
|
+
idx: 0,
|
|
54
|
+
field: null,
|
|
55
|
+
});
|
|
56
|
+
return (react_1.default.createElement("div", null,
|
|
57
|
+
react_1.default.createElement(GridHeader, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }),
|
|
58
|
+
react_1.default.createElement("div", { style: { height: 400, width: '100%' } },
|
|
59
|
+
react_1.default.createElement(x_data_grid_1.DataGrid, { getRowId: row => row.name, checkboxSelection: true, disableRowSelectionOnClick: true, onRowSelectionModelChange: arg => {
|
|
60
|
+
setSelected(arg);
|
|
61
|
+
}, rows: rows, rowHeight: 25, columnHeaderHeight: 33, columns: [
|
|
62
|
+
{
|
|
63
|
+
field: 'color',
|
|
64
|
+
headerName: 'Color',
|
|
65
|
+
renderCell: params => {
|
|
66
|
+
const { value, id } = params;
|
|
67
|
+
return (react_1.default.createElement(ColorPicker_1.default, { color: value || 'blue', onChange: c => {
|
|
68
|
+
const elt = rows.find(f => f.name === id);
|
|
69
|
+
if (elt) {
|
|
70
|
+
elt.color = c;
|
|
71
|
+
}
|
|
72
|
+
onChange([...rows]);
|
|
73
|
+
} }));
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
field: 'name',
|
|
78
|
+
headerName: 'Name',
|
|
79
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => r.name)),
|
|
80
|
+
},
|
|
81
|
+
...Object.keys(rest).map(val => ({
|
|
82
|
+
field: val,
|
|
83
|
+
renderCell: ({ value }) => (react_1.default.createElement("div", { className: classes.cell },
|
|
84
|
+
react_1.default.createElement(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value) }))),
|
|
85
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => `${r[val]}`)),
|
|
86
|
+
})),
|
|
87
|
+
], sortModel: [], onSortModelChange: args => {
|
|
88
|
+
const sort = args[0];
|
|
89
|
+
const idx = (currSort.idx + 1) % 2;
|
|
90
|
+
const field = sort.field || currSort.field;
|
|
91
|
+
setCurrSort({ idx, field });
|
|
92
|
+
onChange(field
|
|
93
|
+
? [...rows].sort((a, b) => {
|
|
94
|
+
const aa = (0, util_1.getStr)(a[field]);
|
|
95
|
+
const bb = (0, util_1.getStr)(b[field]);
|
|
96
|
+
return idx === 1
|
|
97
|
+
? aa.localeCompare(bb)
|
|
98
|
+
: bb.localeCompare(aa);
|
|
99
|
+
})
|
|
100
|
+
: rows);
|
|
101
|
+
} }))));
|
|
102
|
+
}
|
|
103
|
+
function GridHeader({ selected, onChange, rows, showTips, }) {
|
|
104
|
+
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
105
|
+
const [widgetColor, setWidgetColor] = (0, react_1.useState)('blue');
|
|
106
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
107
|
+
react_1.default.createElement(material_1.Button, { disabled: !selected.length, onClick: event => {
|
|
108
|
+
setAnchorEl(event.currentTarget);
|
|
109
|
+
} }, "Change color of selected items"),
|
|
110
|
+
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
111
|
+
onChange((0, util_2.moveUp)([...rows], selected));
|
|
112
|
+
}, disabled: !selected.length },
|
|
113
|
+
react_1.default.createElement(KeyboardArrowUp_1.default, null),
|
|
114
|
+
showTips ? 'Move selected items up' : null),
|
|
115
|
+
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
116
|
+
onChange((0, util_2.moveDown)([...rows], selected));
|
|
117
|
+
}, disabled: !selected.length },
|
|
118
|
+
react_1.default.createElement(KeyboardArrowDown_1.default, null),
|
|
119
|
+
showTips ? 'Move selected items down' : null),
|
|
120
|
+
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
121
|
+
onChange((0, util_2.moveUp)([...rows], selected, rows.length));
|
|
122
|
+
}, disabled: !selected.length },
|
|
123
|
+
react_1.default.createElement(KeyboardDoubleArrowUp_1.default, null),
|
|
124
|
+
showTips ? 'Move selected items to top' : null),
|
|
125
|
+
react_1.default.createElement(material_1.Button, { onClick: () => {
|
|
126
|
+
onChange((0, util_2.moveDown)([...rows], selected, rows.length));
|
|
127
|
+
}, disabled: !selected.length },
|
|
128
|
+
react_1.default.createElement(KeyboardDoubleArrowDown_1.default, null),
|
|
129
|
+
showTips ? 'Move selected items to bottom' : null),
|
|
130
|
+
react_1.default.createElement(ColorPicker_1.ColorPopover, { anchorEl: anchorEl, color: widgetColor, onChange: c => {
|
|
131
|
+
setWidgetColor(c);
|
|
132
|
+
selected.forEach(id => {
|
|
133
|
+
const elt = rows.find(f => f.name === id);
|
|
134
|
+
if (elt) {
|
|
135
|
+
elt.color = c;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
onChange([...rows]);
|
|
139
|
+
}, onClose: () => {
|
|
140
|
+
setAnchorEl(null);
|
|
141
|
+
} })));
|
|
142
|
+
}
|
|
143
|
+
exports.default = SourcesGrid;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TooltipContentsComponent } from '../Tooltip';
|
|
3
|
+
import type { Source } from '../util';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
+
type Coord = [number, number];
|
|
6
|
+
declare const VariantTooltip: (props: {
|
|
7
|
+
model: {
|
|
8
|
+
featureUnderMouse: Feature;
|
|
9
|
+
sources: Source[];
|
|
10
|
+
rowHeight: number;
|
|
11
|
+
};
|
|
12
|
+
height: number;
|
|
13
|
+
offsetMouseCoord: Coord;
|
|
14
|
+
clientMouseCoord: Coord;
|
|
15
|
+
clientRect?: DOMRect;
|
|
16
|
+
TooltipContents?: TooltipContentsComponent;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default VariantTooltip;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const mobx_react_1 = require("mobx-react");
|
|
8
|
+
const Tooltip_1 = __importDefault(require("../Tooltip"));
|
|
9
|
+
const en = (n) => n.toLocaleString('en-US');
|
|
10
|
+
const TooltipContents = react_1.default.forwardRef(function TooltipContents2({ model, feature }, ref) {
|
|
11
|
+
const start = feature.get('start');
|
|
12
|
+
const end = feature.get('end');
|
|
13
|
+
const refName = feature.get('refName');
|
|
14
|
+
const coord = start === end ? en(start) : `${en(start)}..${en(end)}`;
|
|
15
|
+
const sources = feature.get('sources');
|
|
16
|
+
const source = feature.get('source');
|
|
17
|
+
const obj = Object.fromEntries(model.sources.map(ent => [ent.name, ent]));
|
|
18
|
+
return (react_1.default.createElement("div", { ref: ref },
|
|
19
|
+
[refName, coord].filter(f => !!f).join(':'),
|
|
20
|
+
react_1.default.createElement("br", null),
|
|
21
|
+
sources ? (react_1.default.createElement("table", null,
|
|
22
|
+
react_1.default.createElement("thead", null,
|
|
23
|
+
react_1.default.createElement("tr", null,
|
|
24
|
+
react_1.default.createElement("th", null, "color"),
|
|
25
|
+
react_1.default.createElement("th", null, "source"),
|
|
26
|
+
react_1.default.createElement("th", null, "score"))),
|
|
27
|
+
react_1.default.createElement("tbody", null, Object.entries(sources).map(([source, data]) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return (react_1.default.createElement("tr", { key: source },
|
|
30
|
+
react_1.default.createElement("td", { style: { background: (_a = obj[source]) === null || _a === void 0 ? void 0 : _a.color } }, " "),
|
|
31
|
+
react_1.default.createElement("td", null, source),
|
|
32
|
+
react_1.default.createElement("td", null, data.score)));
|
|
33
|
+
})))) : (react_1.default.createElement("span", null, source))));
|
|
34
|
+
});
|
|
35
|
+
const VariantTooltip = (0, mobx_react_1.observer)((props) => {
|
|
36
|
+
return react_1.default.createElement(Tooltip_1.default, { useClientY: true, TooltipContents: TooltipContents, ...props });
|
|
37
|
+
});
|
|
38
|
+
exports.default = VariantTooltip;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moveUp = moveUp;
|
|
4
|
+
exports.moveDown = moveDown;
|
|
5
|
+
function moveUp(arr, sel, by = 1) {
|
|
6
|
+
const idxs = sel
|
|
7
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
8
|
+
.sort((a, b) => a - b);
|
|
9
|
+
let lastIdx = 0;
|
|
10
|
+
for (const old of idxs) {
|
|
11
|
+
const idx = Math.max(lastIdx, old - by);
|
|
12
|
+
if (idx >= lastIdx) {
|
|
13
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
14
|
+
}
|
|
15
|
+
lastIdx = lastIdx + 1;
|
|
16
|
+
}
|
|
17
|
+
return arr;
|
|
18
|
+
}
|
|
19
|
+
function moveDown(arr, sel, by = 1) {
|
|
20
|
+
const idxs = sel
|
|
21
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
22
|
+
.sort((a, b) => b - a);
|
|
23
|
+
let lastIdx = arr.length - 1;
|
|
24
|
+
for (const old of idxs) {
|
|
25
|
+
const idx = Math.min(lastIdx, old + by);
|
|
26
|
+
if (idx <= lastIdx) {
|
|
27
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
28
|
+
}
|
|
29
|
+
lastIdx = lastIdx - 1;
|
|
30
|
+
}
|
|
31
|
+
return arr;
|
|
32
|
+
}
|
package/dist/util.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Source {
|
|
2
|
+
baseUri?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function fillRectCtx(x: number, y: number, width: number, height: number, ctx: CanvasRenderingContext2D, color?: string): void;
|
|
9
|
+
export declare function getCol(gt: string): "#ccc" | "teal" | "blue" | "#CBC3E3";
|
|
10
|
+
export declare const colorPaletteDefault: string[];
|
|
11
|
+
export declare function randomColor(str: string): string;
|
package/dist/util.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colorPaletteDefault = void 0;
|
|
4
|
+
exports.fillRectCtx = fillRectCtx;
|
|
5
|
+
exports.getCol = getCol;
|
|
6
|
+
exports.randomColor = randomColor;
|
|
7
|
+
function fillRectCtx(x, y, width, height, ctx, color) {
|
|
8
|
+
if (width < 0) {
|
|
9
|
+
x += width;
|
|
10
|
+
width = -width;
|
|
11
|
+
}
|
|
12
|
+
if (height < 0) {
|
|
13
|
+
y += height;
|
|
14
|
+
height = -height;
|
|
15
|
+
}
|
|
16
|
+
if (color) {
|
|
17
|
+
ctx.fillStyle = color;
|
|
18
|
+
}
|
|
19
|
+
ctx.fillRect(x, y, width, height);
|
|
20
|
+
}
|
|
21
|
+
function getCol(gt) {
|
|
22
|
+
if (gt === '0|0' || gt === '0/0') {
|
|
23
|
+
return '#ccc';
|
|
24
|
+
}
|
|
25
|
+
else if (gt === '1|0' || gt === '0|1' || gt === '0/1' || gt === '1/0') {
|
|
26
|
+
return 'teal';
|
|
27
|
+
}
|
|
28
|
+
else if (gt === '1|1' || gt === '1/1') {
|
|
29
|
+
return 'blue';
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return '#CBC3E3';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.colorPaletteDefault = [
|
|
36
|
+
'red',
|
|
37
|
+
'blue',
|
|
38
|
+
'green',
|
|
39
|
+
'orange',
|
|
40
|
+
'purple',
|
|
41
|
+
'cyan',
|
|
42
|
+
'pink',
|
|
43
|
+
'darkblue',
|
|
44
|
+
'darkred',
|
|
45
|
+
'pink',
|
|
46
|
+
];
|
|
47
|
+
function randomColor(str) {
|
|
48
|
+
let sum = 0;
|
|
49
|
+
for (let i = 0; i < str.length; i++) {
|
|
50
|
+
sum += str.charCodeAt(i);
|
|
51
|
+
}
|
|
52
|
+
return `hsl(${sum * 10}, 20%, 50%)`;
|
|
53
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ChordVariantDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BaseChordDisplayComponent } from '@jbrowse/plugin-circular-view';
|
|
2
1
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
3
|
-
|
|
2
|
+
import { BaseChordDisplayComponent } from '@jbrowse/plugin-circular-view';
|
|
4
3
|
import configSchemaF from './models/configSchema';
|
|
5
4
|
import stateModelF from './models/stateModelFactory';
|
|
6
5
|
export default function ChordVariantDisplayF(pluginManager) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
/**
|
|
4
|
-
* #slot
|
|
5
|
-
*/
|
|
6
3
|
renderer: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IAnyModelType, [undefined]>;
|
|
7
4
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
5
|
onChordClick: {
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { baseChordDisplayConfig } from '@jbrowse/plugin-circular-view';
|
|
3
3
|
import { types } from 'mobx-state-tree';
|
|
4
|
-
|
|
5
|
-
* #config ChordVariantDisplay
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
function stateModelFactory(pluginManager) {
|
|
9
6
|
return ConfigurationSchema('ChordVariantDisplay', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
renderer: types.optional(pluginManager.pluggableConfigSchemaType('renderer'), { type: 'StructuralVariantChordRenderer' }),
|
|
14
8
|
}, {
|
|
15
|
-
/**
|
|
16
|
-
* #baseConfiguration
|
|
17
|
-
*/
|
|
18
9
|
baseConfiguration: baseChordDisplayConfig,
|
|
19
10
|
explicitlyTyped: true,
|
|
20
11
|
});
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
import { Feature } from '@jbrowse/core/util';
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel ChordVariantDisplay
|
|
5
|
-
* extends
|
|
6
|
-
* - [BaseChordDisplay](../basechorddisplay)
|
|
7
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
8
3
|
declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => import("mobx-state-tree").IModelType<{
|
|
9
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
10
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -21,13 +16,7 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
|
|
|
21
16
|
};
|
|
22
17
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
23
18
|
} & {
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
19
|
type: import("mobx-state-tree").ISimpleType<"ChordVariantDisplay">;
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
20
|
configuration: AnyConfigurationSchemaType;
|
|
32
21
|
}, {
|
|
33
22
|
rendererTypeName: string;
|
|
@@ -98,36 +87,29 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
|
|
|
98
87
|
} & {
|
|
99
88
|
onChordClick(feature: Feature): void;
|
|
100
89
|
} & {
|
|
101
|
-
readonly blockDefinitions: import("@jbrowse/plugin-circular-view/src/CircularView/
|
|
90
|
+
readonly blockDefinitions: import("@jbrowse/plugin-circular-view/src/CircularView/slices").Slice[];
|
|
102
91
|
renderProps(): any;
|
|
103
92
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType | undefined;
|
|
104
|
-
isCompatibleWithRenderer(renderer: import("@jbrowse/core/pluggableElementTypes").RendererType): renderer is import("@jbrowse/core/pluggableElementTypes").CircularChordRendererType;
|
|
105
93
|
readonly selectedFeatureId: string | undefined;
|
|
106
94
|
} & {
|
|
107
95
|
renderStarted(): void;
|
|
108
96
|
renderSuccess({ message, data, reactElement, html, renderingComponent, }: {
|
|
109
|
-
message
|
|
110
|
-
data
|
|
111
|
-
html
|
|
112
|
-
reactElement
|
|
113
|
-
renderingComponent
|
|
97
|
+
message?: string;
|
|
98
|
+
data?: any;
|
|
99
|
+
html?: string;
|
|
100
|
+
reactElement?: React.ReactElement;
|
|
101
|
+
renderingComponent?: import("@jbrowse/core/util").AnyReactComponentType;
|
|
114
102
|
}): void;
|
|
115
103
|
renderError(error: unknown): void;
|
|
116
104
|
setRefNameMap(refNameMap: Record<string, string>): void;
|
|
117
105
|
} & {
|
|
118
106
|
afterAttach(): void;
|
|
119
107
|
} & {
|
|
120
|
-
renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/
|
|
108
|
+
renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/model").ExportSvgOptions & {
|
|
121
109
|
theme?: import("@mui/material").ThemeOptions;
|
|
122
110
|
}): Promise<import("react").JSX.Element>;
|
|
123
111
|
} & {
|
|
124
|
-
/**
|
|
125
|
-
* #getter
|
|
126
|
-
*/
|
|
127
112
|
readonly rendererTypeName: any;
|
|
128
|
-
/**
|
|
129
|
-
* #method
|
|
130
|
-
*/
|
|
131
113
|
renderProps(): Record<string, unknown>;
|
|
132
114
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
133
115
|
export default stateModelFactory;
|
|
@@ -1,35 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigurationReference, } from '@jbrowse/core/configuration';
|
|
3
|
-
import { types } from 'mobx-state-tree';
|
|
1
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
4
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
5
3
|
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* extends
|
|
9
|
-
* - [BaseChordDisplay](../basechorddisplay)
|
|
10
|
-
*/
|
|
4
|
+
import { BaseChordDisplayModel } from '@jbrowse/plugin-circular-view';
|
|
5
|
+
import { types } from 'mobx-state-tree';
|
|
11
6
|
const stateModelFactory = (configSchema) => {
|
|
12
7
|
return types
|
|
13
8
|
.compose('ChordVariantDisplay', BaseChordDisplayModel, types.model({
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
9
|
type: types.literal('ChordVariantDisplay'),
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
10
|
configuration: ConfigurationReference(configSchema),
|
|
22
11
|
}))
|
|
23
12
|
.views(self => ({
|
|
24
|
-
/**
|
|
25
|
-
* #getter
|
|
26
|
-
*/
|
|
27
13
|
get rendererTypeName() {
|
|
28
14
|
return self.configuration.renderer.type;
|
|
29
15
|
},
|
|
30
|
-
/**
|
|
31
|
-
* #method
|
|
32
|
-
*/
|
|
33
16
|
renderProps() {
|
|
34
17
|
const view = getContainingView(self);
|
|
35
18
|
return {
|
|
@@ -47,8 +30,4 @@ const stateModelFactory = (configSchema) => {
|
|
|
47
30
|
},
|
|
48
31
|
}));
|
|
49
32
|
};
|
|
50
|
-
// http://localhost:3000/test_data/hs37d5.HG002-SequelII-CCS.sv.vcf.gz.tbi
|
|
51
|
-
// render request is for 1.5x the current viewing window
|
|
52
|
-
// tracks all have a height
|
|
53
|
-
//
|
|
54
33
|
export default stateModelFactory;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
3
|
export default function configSchemaF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
4
4
|
renderer: import("mobx-state-tree").IAnyModelType;
|
|
5
5
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { linearBasicDisplayConfigSchemaFactory } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
|
|
4
|
-
* #config LinearVariantDisplay
|
|
5
|
-
* mostly empty, this display type is very much
|
|
6
|
-
* like a `FeatureTrack` with a `LinearBasicDisplay` except it has a custom
|
|
7
|
-
* feature details widget
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
10
4
|
export default function configSchemaF(pluginManager) {
|
|
11
5
|
return ConfigurationSchema('LinearVariantDisplay', {}, {
|
|
12
|
-
/**
|
|
13
|
-
* #baseConfiguration
|
|
14
|
-
*/
|
|
15
6
|
baseConfiguration: linearBasicDisplayConfigSchemaFactory(pluginManager),
|
|
16
7
|
explicitlyTyped: true,
|
|
17
8
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearVariantDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
2
1
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
3
|
-
import
|
|
2
|
+
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
4
3
|
import configSchemaF from './configSchema';
|
|
4
|
+
import stateModelFactory from './model';
|
|
5
5
|
export default function LinearVariantDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaF(pluginManager);
|