@jbrowse/plugin-variants 3.2.0 → 3.4.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/LinearVariantDisplay/model.d.ts +1 -1
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +3 -3
- package/dist/MultiLinearVariantDisplay/index.js +1 -1
- package/dist/MultiLinearVariantDisplay/model.d.ts +40 -4
- package/dist/MultiLinearVariantDisplay/model.js +0 -1
- package/dist/MultiLinearVariantDisplay/renderSvg.js +2 -2
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +3 -3
- package/dist/MultiLinearVariantMatrixDisplay/index.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +40 -3
- package/dist/MultiLinearVariantMatrixDisplay/model.js +1 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +2 -2
- package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +14 -11
- package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +3 -3
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +41 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +3 -3
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +71 -17
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +34 -5
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +13 -7
- package/dist/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
- package/dist/MultiLinearVariantRenderer/{MultiVariantRendering.js → components/MultiLinearVariantRendering.js} +25 -7
- package/dist/MultiLinearVariantRenderer/components/util.d.ts +1 -0
- package/dist/MultiLinearVariantRenderer/components/util.js +15 -0
- package/dist/MultiLinearVariantRenderer/index.js +2 -2
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.js +104 -41
- package/dist/MultiLinearVariantRenderer/types.d.ts +2 -0
- package/dist/MultiVariantBaseRenderer.d.ts +4 -4
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -1
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -1
- package/dist/SplitVcfTabixAdapter/configSchema.js +4 -2
- package/dist/VariantFeatureWidget/AltFormatter.d.ts +4 -0
- package/dist/VariantFeatureWidget/AltFormatter.js +13 -0
- package/dist/VariantFeatureWidget/Checkbox2.js +1 -8
- package/dist/VariantFeatureWidget/Formatter.d.ts +3 -0
- package/dist/VariantFeatureWidget/Formatter.js +23 -0
- package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +3 -5
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +16 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +80 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +41 -20
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +14 -0
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +9 -6
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -16
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +4 -7
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -15
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -13
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +14 -8
- package/dist/VariantRPC/getGenotypeMatrix.js +20 -7
- package/dist/VariantRPC/types.d.ts +23 -0
- package/dist/VcfAdapter/VcfAdapter.d.ts +0 -1
- package/dist/VcfAdapter/VcfAdapter.js +0 -1
- package/dist/VcfFeature/index.js +0 -1
- package/dist/VcfFeature/util.d.ts +2 -0
- package/dist/VcfFeature/util.js +123 -25
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -1
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +12 -8
- package/dist/getMultiVariantFeaturesAutorun.d.ts +2 -0
- package/dist/getMultiVariantFeaturesAutorun.js +9 -2
- package/dist/getMultiVariantSourcesAutorun.js +3 -2
- package/dist/shared/MultiVariantBaseModel.d.ts +41 -4
- package/dist/shared/MultiVariantBaseModel.js +69 -3
- package/dist/shared/SharedVariantMixin.d.ts +1 -1
- package/dist/shared/components/AddFiltersDialog.d.ts +9 -0
- package/dist/shared/components/AddFiltersDialog.js +61 -0
- package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
- package/dist/shared/components/MultiVariantBaseDisplayComponent.js +29 -0
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.js +2 -2
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.js +8 -3
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.js +29 -28
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/types.d.ts +1 -0
- package/dist/shared/components/MultiVariantClusterDialog/types.js +2 -0
- package/{esm/shared/components/ColorLegend.d.ts → dist/shared/components/MultiVariantColorLegend.d.ts} +2 -2
- package/dist/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +5 -3
- package/dist/shared/components/MultiVariantCrosshairs.d.ts +7 -0
- package/dist/shared/components/MultiVariantCrosshairs.js +40 -0
- package/dist/shared/components/MultiVariantLegendBar.d.ts +7 -0
- package/dist/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +2 -2
- package/dist/shared/components/MultiVariantTooltip.d.ts +4 -0
- package/dist/shared/components/MultiVariantTooltip.js +3 -2
- package/dist/shared/components/RectBg.js +4 -2
- package/dist/shared/components/SetColorDialog.js +1 -1
- package/dist/shared/components/SourcesDataGrid.d.ts +2 -1
- package/dist/shared/components/SourcesDataGrid.js +40 -47
- package/dist/shared/components/SourcesGrid.js +1 -1
- package/dist/shared/components/SourcesGridHeader.d.ts +2 -1
- package/dist/shared/drawAlleleCount.d.ts +2 -1
- package/dist/shared/drawAlleleCount.js +26 -24
- package/dist/shared/drawPhased.d.ts +1 -1
- package/dist/shared/drawPhased.js +14 -10
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +9 -4
- package/dist/shared/minorAlleleFrequencyUtils.js +19 -14
- package/dist/shared/sourcesGridUtils.d.ts +3 -2
- package/esm/LinearVariantDisplay/model.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +2 -2
- package/esm/MultiLinearVariantDisplay/index.js +1 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +40 -4
- package/esm/MultiLinearVariantDisplay/model.js +0 -1
- package/esm/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -8
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +2 -2
- package/esm/MultiLinearVariantMatrixDisplay/index.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +40 -3
- package/esm/MultiLinearVariantMatrixDisplay/model.js +1 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +14 -11
- package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +39 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +73 -19
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +34 -5
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +13 -7
- package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
- package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.js → MultiLinearVariantRendering.js} +25 -7
- package/esm/MultiLinearVariantRenderer/components/util.d.ts +1 -0
- package/esm/MultiLinearVariantRenderer/components/util.js +12 -0
- package/esm/MultiLinearVariantRenderer/index.js +1 -1
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.js +106 -43
- package/esm/MultiLinearVariantRenderer/types.d.ts +2 -0
- package/esm/MultiVariantBaseRenderer.d.ts +4 -4
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -1
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -1
- package/esm/SplitVcfTabixAdapter/configSchema.js +4 -2
- package/esm/VariantFeatureWidget/AltFormatter.d.ts +4 -0
- package/esm/VariantFeatureWidget/AltFormatter.js +10 -0
- package/esm/VariantFeatureWidget/Checkbox2.js +2 -9
- package/esm/VariantFeatureWidget/Formatter.d.ts +3 -0
- package/esm/VariantFeatureWidget/Formatter.js +17 -0
- package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +4 -6
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -6
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +74 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +43 -22
- package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +11 -0
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +9 -6
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -16
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +4 -7
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -15
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -13
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +14 -8
- package/esm/VariantRPC/getGenotypeMatrix.js +20 -7
- package/esm/VariantRPC/types.d.ts +23 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +0 -1
- package/esm/VcfAdapter/VcfAdapter.js +0 -1
- package/esm/VcfFeature/index.js +0 -1
- package/esm/VcfFeature/util.d.ts +2 -0
- package/esm/VcfFeature/util.js +121 -25
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -1
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +13 -9
- package/esm/getMultiVariantFeaturesAutorun.d.ts +2 -0
- package/esm/getMultiVariantFeaturesAutorun.js +9 -2
- package/esm/getMultiVariantSourcesAutorun.js +3 -2
- package/esm/shared/MultiVariantBaseModel.d.ts +41 -4
- package/esm/shared/MultiVariantBaseModel.js +71 -5
- package/esm/shared/SharedVariantMixin.d.ts +1 -1
- package/esm/shared/components/AddFiltersDialog.d.ts +9 -0
- package/esm/shared/components/AddFiltersDialog.js +59 -0
- package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
- package/esm/shared/components/MultiVariantBaseDisplayComponent.js +24 -0
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.js +2 -2
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.js +9 -4
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.js +29 -28
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/types.d.ts +1 -0
- package/esm/shared/components/MultiVariantClusterDialog/types.js +1 -0
- package/{dist/shared/components/ColorLegend.d.ts → esm/shared/components/MultiVariantColorLegend.d.ts} +2 -2
- package/esm/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +6 -4
- package/esm/shared/components/MultiVariantCrosshairs.d.ts +7 -0
- package/esm/shared/components/MultiVariantCrosshairs.js +35 -0
- package/esm/shared/components/MultiVariantLegendBar.d.ts +7 -0
- package/esm/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +1 -1
- package/esm/shared/components/MultiVariantTooltip.d.ts +4 -0
- package/esm/shared/components/MultiVariantTooltip.js +3 -2
- package/esm/shared/components/RectBg.js +4 -2
- package/esm/shared/components/SetColorDialog.js +1 -1
- package/esm/shared/components/SourcesDataGrid.d.ts +2 -1
- package/esm/shared/components/SourcesDataGrid.js +40 -47
- package/esm/shared/components/SourcesGrid.js +1 -1
- package/esm/shared/components/SourcesGridHeader.d.ts +2 -1
- package/esm/shared/drawAlleleCount.d.ts +2 -1
- package/esm/shared/drawAlleleCount.js +25 -24
- package/esm/shared/drawPhased.d.ts +1 -1
- package/esm/shared/drawPhased.js +14 -10
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +9 -4
- package/esm/shared/minorAlleleFrequencyUtils.js +20 -15
- package/esm/shared/sourcesGridUtils.d.ts +3 -2
- package/package.json +12 -11
- package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
- package/dist/MultiLinearVariantDisplay/components/Crosshair.js +0 -35
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -28
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -38
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.js +0 -52
- package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequencePanel.js +0 -15
- package/dist/VariantRPC/cluster.d.ts +0 -17
- package/dist/VariantRPC/cluster.js +0 -84
- package/dist/shared/components/LegendBar.d.ts +0 -18
- package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +0 -30
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -23
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -36
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +0 -47
- package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
- package/esm/VariantFeatureWidget/VariantConsequencePanel.js +0 -9
- package/esm/VariantRPC/cluster.d.ts +0 -17
- package/esm/VariantRPC/cluster.js +0 -79
- package/esm/shared/components/LegendBar.d.ts +0 -18
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
- /package/dist/{shared/components/ClusterDialog → VariantFeatureWidget/VariantSampleGrid}/types.js +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.d.ts +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.d.ts +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.d.ts +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
- /package/esm/{shared/components/ClusterDialog → VariantFeatureWidget/VariantSampleGrid}/types.js +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.d.ts +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.d.ts +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.d.ts +0 -0
|
@@ -200,7 +200,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
200
200
|
} & {
|
|
201
201
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
202
202
|
deleteBlock(key: string): void;
|
|
203
|
-
selectFeature(feature: Feature): void
|
|
203
|
+
selectFeature(feature: Feature): Promise<void>;
|
|
204
204
|
navToFeature(feature: Feature): void;
|
|
205
205
|
clearFeatureSelection(): void;
|
|
206
206
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
@@ -7,8 +7,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
9
9
|
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const MultiVariantCrosshairs_1 = __importDefault(require("../../shared/components/MultiVariantCrosshairs"));
|
|
11
|
+
const MultiVariantLegendBar_1 = __importDefault(require("../../shared/components/MultiVariantLegendBar"));
|
|
12
12
|
const MultiLinearVariantDisplayComponent = (0, mobx_react_1.observer)(function (props) {
|
|
13
13
|
const { model } = props;
|
|
14
14
|
const ref = (0, react_1.useRef)(null);
|
|
@@ -24,6 +24,6 @@ const MultiLinearVariantDisplayComponent = (0, mobx_react_1.observer)(function (
|
|
|
24
24
|
}, onMouseLeave: () => {
|
|
25
25
|
setMouseY(undefined);
|
|
26
26
|
setMouseX(undefined);
|
|
27
|
-
}, children: [(0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.BaseLinearDisplayComponent, { ...props }), (0, jsx_runtime_1.jsx)(
|
|
27
|
+
}, children: [(0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.BaseLinearDisplayComponent, { ...props }), (0, jsx_runtime_1.jsx)(MultiVariantLegendBar_1.default, { model: model }), mouseX && mouseY ? ((0, jsx_runtime_1.jsx)(MultiVariantCrosshairs_1.default, { mouseX: mouseX, mouseY: mouseY, model: model })) : null] }));
|
|
28
28
|
});
|
|
29
29
|
exports.default = MultiLinearVariantDisplayComponent;
|
|
@@ -46,7 +46,7 @@ function MultiLinearVariantDisplayF(pluginManager) {
|
|
|
46
46
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
47
47
|
return new DisplayType_1.default({
|
|
48
48
|
name: 'MultiLinearVariantDisplay',
|
|
49
|
-
displayName: 'Multi-variant display (regular)',
|
|
49
|
+
displayName: 'Multi-sample variant display (regular)',
|
|
50
50
|
configSchema,
|
|
51
51
|
stateModel: (0, model_1.default)(configSchema),
|
|
52
52
|
trackType: 'VariantTrack',
|
|
@@ -89,11 +89,13 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
89
89
|
renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
90
90
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
91
91
|
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
92
|
+
lengthCutoffFilter: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
93
|
+
jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
94
|
+
referenceDrawingMode: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
92
95
|
} & {
|
|
93
96
|
type: import("mobx-state-tree").ISimpleType<"MultiLinearVariantDisplay">;
|
|
94
97
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
95
98
|
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
96
|
-
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
97
99
|
}, {
|
|
98
100
|
rendererTypeName: string;
|
|
99
101
|
error: unknown;
|
|
@@ -206,7 +208,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
206
208
|
} & {
|
|
207
209
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
208
210
|
deleteBlock(key: string): void;
|
|
209
|
-
selectFeature(feature: import("@jbrowse/core/util").Feature): void
|
|
211
|
+
selectFeature(feature: import("@jbrowse/core/util").Feature): Promise<void>;
|
|
210
212
|
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
211
213
|
clearFeatureSelection(): void;
|
|
212
214
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
@@ -237,19 +239,28 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
237
239
|
renderProps(): any;
|
|
238
240
|
} & {
|
|
239
241
|
sourcesLoadingStopToken: string | undefined;
|
|
242
|
+
simplifiedFeaturesStopToken: string | undefined;
|
|
240
243
|
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
241
244
|
sourcesVolatile: import("../shared/types").Source[] | undefined;
|
|
242
245
|
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
243
246
|
hasPhased: boolean;
|
|
244
247
|
sampleInfo: undefined | Record<string, import("../shared/types").SampleInfo>;
|
|
245
|
-
hoveredGenotype:
|
|
248
|
+
hoveredGenotype: {
|
|
249
|
+
genotype: string;
|
|
250
|
+
name: string;
|
|
251
|
+
} | undefined;
|
|
246
252
|
} & {
|
|
253
|
+
setJexlFilters(f?: string[]): void;
|
|
247
254
|
setRowHeight(arg: number): void;
|
|
248
|
-
setHoveredGenotype(arg
|
|
255
|
+
setHoveredGenotype(arg?: {
|
|
256
|
+
genotype: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}): void;
|
|
249
259
|
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
250
260
|
setLayout(layout: import("../shared/types").Source[]): void;
|
|
251
261
|
clearLayout(): void;
|
|
252
262
|
setSourcesLoading(str: string): void;
|
|
263
|
+
setSimplifiedFeaturesLoading(str: string): void;
|
|
253
264
|
setSources(sources: import("../shared/types").Source[]): void;
|
|
254
265
|
setMafFilter(arg: number): void;
|
|
255
266
|
setShowSidebarLabels(arg: boolean): void;
|
|
@@ -257,7 +268,9 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
257
268
|
setAutoHeight(arg: boolean): void;
|
|
258
269
|
setHasPhased(arg: boolean): void;
|
|
259
270
|
setSampleInfo(arg: Record<string, import("../shared/types").SampleInfo>): void;
|
|
271
|
+
setReferenceDrawingMode(arg: string): void;
|
|
260
272
|
} & {
|
|
273
|
+
readonly activeFilters: any;
|
|
261
274
|
readonly preSources: import("../shared/types").Source[] | undefined;
|
|
262
275
|
readonly sourcesWithoutLayout: {
|
|
263
276
|
label: string;
|
|
@@ -278,6 +291,17 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
278
291
|
HP?: number;
|
|
279
292
|
}[] | undefined;
|
|
280
293
|
} & {
|
|
294
|
+
readonly sourceMap: {
|
|
295
|
+
[k: string]: {
|
|
296
|
+
label: string;
|
|
297
|
+
id: string;
|
|
298
|
+
baseUri?: string;
|
|
299
|
+
name: string;
|
|
300
|
+
color?: string;
|
|
301
|
+
group?: string;
|
|
302
|
+
HP?: number;
|
|
303
|
+
};
|
|
304
|
+
} | undefined;
|
|
281
305
|
readonly rowHeight: number;
|
|
282
306
|
adapterProps(): any;
|
|
283
307
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
@@ -331,6 +355,18 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
331
355
|
type?: undefined;
|
|
332
356
|
checked?: undefined;
|
|
333
357
|
onClick?: undefined;
|
|
358
|
+
} | {
|
|
359
|
+
label: string;
|
|
360
|
+
type: string;
|
|
361
|
+
subMenu: {
|
|
362
|
+
label: string;
|
|
363
|
+
type: string;
|
|
364
|
+
checked: boolean;
|
|
365
|
+
onClick: () => void;
|
|
366
|
+
}[];
|
|
367
|
+
icon?: undefined;
|
|
368
|
+
checked?: undefined;
|
|
369
|
+
onClick?: undefined;
|
|
334
370
|
} | {
|
|
335
371
|
label: string;
|
|
336
372
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
@@ -46,7 +46,6 @@ function stateModelFactory(configSchema) {
|
|
|
46
46
|
type: mobx_state_tree_1.types.literal('MultiLinearVariantDisplay'),
|
|
47
47
|
rowHeightSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 11),
|
|
48
48
|
minorAlleleFrequencyFilter: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
|
|
49
|
-
autoHeight: false,
|
|
50
49
|
}))
|
|
51
50
|
.views(() => ({
|
|
52
51
|
get rendererTypeName() {
|
|
@@ -7,9 +7,9 @@ exports.renderSvg = renderSvg;
|
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
9
|
const mobx_1 = require("mobx");
|
|
10
|
-
const
|
|
10
|
+
const MultiVariantLegendBar_1 = __importDefault(require("../shared/components/MultiVariantLegendBar"));
|
|
11
11
|
async function renderSvg(self, opts, superRenderSvg) {
|
|
12
12
|
await (0, mobx_1.when)(() => !!self.regionCannotBeRenderedText);
|
|
13
13
|
const { offsetPx } = (0, util_1.getContainingView)(self);
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("g", { children: await superRenderSvg(opts) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: (0, jsx_runtime_1.jsx)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("g", { children: await superRenderSvg(opts) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: (0, jsx_runtime_1.jsx)(MultiVariantLegendBar_1.default, { model: self, orientation: "left", exportSVG: true }) })] }));
|
|
15
15
|
}
|
package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
7
|
const react_1 = require("react");
|
|
5
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
+
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
6
10
|
const util_1 = require("@jbrowse/core/util");
|
|
7
11
|
const mobx_react_1 = require("mobx-react");
|
|
8
12
|
const mui_1 = require("tss-react/mui");
|
|
@@ -37,15 +41,21 @@ const LinesConnectingMatrixToGenomicPosition = (0, mobx_react_1.observer)(functi
|
|
|
37
41
|
const assembly = assemblyManager.get(assemblyNames[0]);
|
|
38
42
|
const b0 = ((_a = dynamicBlocks.contentBlocks[0]) === null || _a === void 0 ? void 0 : _a.widthPx) || 0;
|
|
39
43
|
const w = b0 / ((featuresVolatile === null || featuresVolatile === void 0 ? void 0 : featuresVolatile.length) || 1);
|
|
40
|
-
return assembly && featuresVolatile ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Wrapper, { exportSVG: exportSVG, model: model, children: [(0, jsx_runtime_1.jsx)(AllLines, { model: model, setMouseOverLine: setMouseOverLine }), mouseOverLine ? ((0, jsx_runtime_1.jsx)("line", { stroke: "#f00c", strokeWidth: 2, style: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
return assembly && featuresVolatile ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Wrapper, { exportSVG: exportSVG, model: model, children: [(0, jsx_runtime_1.jsx)(AllLines, { model: model, setMouseOverLine: setMouseOverLine }), mouseOverLine ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("line", { stroke: "#f00c", strokeWidth: 2, style: {
|
|
45
|
+
pointerEvents: 'none',
|
|
46
|
+
}, x1: mouseOverLine.idx * w + w / 2, x2: mouseOverLine.c, y1: lineZoneHeight, y2: 0, onMouseLeave: () => {
|
|
47
|
+
setMouseOverLine(undefined);
|
|
48
|
+
} }), (0, jsx_runtime_1.jsx)(LineTooltip, { contents: mouseOverLine.f.get('name') })] })) : null] }), !exportSVG ? ((0, jsx_runtime_1.jsx)(ui_1.ResizeHandle, { style: {
|
|
45
49
|
position: 'absolute',
|
|
46
50
|
top: lineZoneHeight - 4,
|
|
47
51
|
}, onDrag: n => model.setLineZoneHeight(lineZoneHeight + n), className: classes.resizeHandle })) : null] })) : null;
|
|
48
52
|
});
|
|
53
|
+
const TooltipContents = (0, react_1.forwardRef)(function TooltipContents2({ message }, ref) {
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, children: (0, react_1.isValidElement)(message) ? (message) : message ? ((0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: String(message) })) : null }));
|
|
55
|
+
});
|
|
56
|
+
const LineTooltip = (0, mobx_react_1.observer)(function ({ contents }) {
|
|
57
|
+
return contents ? ((0, jsx_runtime_1.jsx)(BaseTooltip_1.default, { children: (0, jsx_runtime_1.jsx)(TooltipContents, { message: contents }) })) : null;
|
|
58
|
+
});
|
|
49
59
|
const AllLines = (0, mobx_react_1.observer)(function ({ model, setMouseOverLine, }) {
|
|
50
60
|
var _a;
|
|
51
61
|
const { assemblyManager } = (0, util_1.getSession)(model);
|
|
@@ -7,9 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
9
9
|
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const Crosshair_1 = __importDefault(require("./Crosshair"));
|
|
11
10
|
const LinesConnectingMatrixToGenomicPosition_1 = __importDefault(require("./LinesConnectingMatrixToGenomicPosition"));
|
|
12
|
-
const
|
|
11
|
+
const MultiVariantCrosshairs_1 = __importDefault(require("../../shared/components/MultiVariantCrosshairs"));
|
|
12
|
+
const MultiVariantLegendBar_1 = __importDefault(require("../../shared/components/MultiVariantLegendBar"));
|
|
13
13
|
const MultiLinearVariantMatrixDisplayComponent = (0, mobx_react_1.observer)(function (props) {
|
|
14
14
|
const { model } = props;
|
|
15
15
|
const { lineZoneHeight } = model;
|
|
@@ -26,6 +26,6 @@ const MultiLinearVariantMatrixDisplayComponent = (0, mobx_react_1.observer)(func
|
|
|
26
26
|
}, onMouseLeave: () => {
|
|
27
27
|
setMouseY(undefined);
|
|
28
28
|
setMouseX(undefined);
|
|
29
|
-
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(LinesConnectingMatrixToGenomicPosition_1.default, { model: model }), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'absolute', top: lineZoneHeight }, children: [(0, jsx_runtime_1.jsx)(
|
|
29
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(LinesConnectingMatrixToGenomicPosition_1.default, { model: model }), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'absolute', top: lineZoneHeight }, children: [(0, jsx_runtime_1.jsx)(MultiVariantLegendBar_1.default, { model: model }), (0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.BaseLinearDisplayComponent, { ...props })] })] }), mouseX && mouseY && mouseY > lineZoneHeight ? ((0, jsx_runtime_1.jsx)(MultiVariantCrosshairs_1.default, { mouseX: mouseX, mouseY: mouseY, model: model })) : null] }));
|
|
30
30
|
});
|
|
31
31
|
exports.default = MultiLinearVariantMatrixDisplayComponent;
|
|
@@ -13,7 +13,7 @@ function LinearVariantMatrixDisplayF(pluginManager) {
|
|
|
13
13
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
14
14
|
return new DisplayType_1.default({
|
|
15
15
|
name: 'LinearVariantMatrixDisplay',
|
|
16
|
-
displayName: 'Multi-variant display (matrix)',
|
|
16
|
+
displayName: 'Multi-sample variant display (matrix)',
|
|
17
17
|
configSchema,
|
|
18
18
|
stateModel: (0, model_1.default)(configSchema),
|
|
19
19
|
trackType: 'VariantTrack',
|
|
@@ -89,6 +89,9 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
89
89
|
renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
90
90
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
91
91
|
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
92
|
+
lengthCutoffFilter: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
93
|
+
jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
94
|
+
referenceDrawingMode: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
92
95
|
} & {
|
|
93
96
|
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
94
97
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -205,7 +208,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
205
208
|
} & {
|
|
206
209
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
207
210
|
deleteBlock(key: string): void;
|
|
208
|
-
selectFeature(feature: import("@jbrowse/core/util").Feature): void
|
|
211
|
+
selectFeature(feature: import("@jbrowse/core/util").Feature): Promise<void>;
|
|
209
212
|
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
210
213
|
clearFeatureSelection(): void;
|
|
211
214
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
@@ -236,19 +239,28 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
236
239
|
renderProps(): any;
|
|
237
240
|
} & {
|
|
238
241
|
sourcesLoadingStopToken: string | undefined;
|
|
242
|
+
simplifiedFeaturesStopToken: string | undefined;
|
|
239
243
|
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
240
244
|
sourcesVolatile: import("../shared/types").Source[] | undefined;
|
|
241
245
|
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
242
246
|
hasPhased: boolean;
|
|
243
247
|
sampleInfo: undefined | Record<string, import("../shared/types").SampleInfo>;
|
|
244
|
-
hoveredGenotype:
|
|
248
|
+
hoveredGenotype: {
|
|
249
|
+
genotype: string;
|
|
250
|
+
name: string;
|
|
251
|
+
} | undefined;
|
|
245
252
|
} & {
|
|
253
|
+
setJexlFilters(f?: string[]): void;
|
|
246
254
|
setRowHeight(arg: number): void;
|
|
247
|
-
setHoveredGenotype(arg
|
|
255
|
+
setHoveredGenotype(arg?: {
|
|
256
|
+
genotype: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}): void;
|
|
248
259
|
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
249
260
|
setLayout(layout: import("../shared/types").Source[]): void;
|
|
250
261
|
clearLayout(): void;
|
|
251
262
|
setSourcesLoading(str: string): void;
|
|
263
|
+
setSimplifiedFeaturesLoading(str: string): void;
|
|
252
264
|
setSources(sources: import("../shared/types").Source[]): void;
|
|
253
265
|
setMafFilter(arg: number): void;
|
|
254
266
|
setShowSidebarLabels(arg: boolean): void;
|
|
@@ -256,7 +268,9 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
256
268
|
setAutoHeight(arg: boolean): void;
|
|
257
269
|
setHasPhased(arg: boolean): void;
|
|
258
270
|
setSampleInfo(arg: Record<string, import("../shared/types").SampleInfo>): void;
|
|
271
|
+
setReferenceDrawingMode(arg: string): void;
|
|
259
272
|
} & {
|
|
273
|
+
readonly activeFilters: any;
|
|
260
274
|
readonly preSources: import("../shared/types").Source[] | undefined;
|
|
261
275
|
readonly sourcesWithoutLayout: {
|
|
262
276
|
label: string;
|
|
@@ -277,6 +291,17 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
277
291
|
HP?: number;
|
|
278
292
|
}[] | undefined;
|
|
279
293
|
} & {
|
|
294
|
+
readonly sourceMap: {
|
|
295
|
+
[k: string]: {
|
|
296
|
+
label: string;
|
|
297
|
+
id: string;
|
|
298
|
+
baseUri?: string;
|
|
299
|
+
name: string;
|
|
300
|
+
color?: string;
|
|
301
|
+
group?: string;
|
|
302
|
+
HP?: number;
|
|
303
|
+
};
|
|
304
|
+
} | undefined;
|
|
280
305
|
readonly rowHeight: number;
|
|
281
306
|
adapterProps(): any;
|
|
282
307
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
@@ -330,6 +355,18 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
330
355
|
type?: undefined;
|
|
331
356
|
checked?: undefined;
|
|
332
357
|
onClick?: undefined;
|
|
358
|
+
} | {
|
|
359
|
+
label: string;
|
|
360
|
+
type: string;
|
|
361
|
+
subMenu: {
|
|
362
|
+
label: string;
|
|
363
|
+
type: string;
|
|
364
|
+
checked: boolean;
|
|
365
|
+
onClick: () => void;
|
|
366
|
+
}[];
|
|
367
|
+
icon?: undefined;
|
|
368
|
+
checked?: undefined;
|
|
369
|
+
onClick?: undefined;
|
|
333
370
|
} | {
|
|
334
371
|
label: string;
|
|
335
372
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
@@ -77,6 +77,7 @@ function stateModelFactory(configSchema) {
|
|
|
77
77
|
notReady: superProps.notReady || !self.sources || !self.featuresReady,
|
|
78
78
|
renderingMode: self.renderingMode,
|
|
79
79
|
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
80
|
+
lengthCutoffFilter: self.lengthCutoffFilter,
|
|
80
81
|
height: self.totalHeight,
|
|
81
82
|
sources: self.sources,
|
|
82
83
|
};
|
|
@@ -8,10 +8,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
9
|
const mobx_1 = require("mobx");
|
|
10
10
|
const LinesConnectingMatrixToGenomicPosition_1 = __importDefault(require("./components/LinesConnectingMatrixToGenomicPosition"));
|
|
11
|
-
const
|
|
11
|
+
const MultiVariantLegendBar_1 = __importDefault(require("../shared/components/MultiVariantLegendBar"));
|
|
12
12
|
async function renderSvg(model, opts, superRenderSvg) {
|
|
13
13
|
await (0, mobx_1.when)(() => !!model.regionCannotBeRenderedText);
|
|
14
14
|
const { offsetPx } = (0, util_1.getContainingView)(model);
|
|
15
15
|
const { lineZoneHeight } = model;
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: [(0, jsx_runtime_1.jsx)(LinesConnectingMatrixToGenomicPosition_1.default, { exportSVG: true, model: model }), (0, jsx_runtime_1.jsxs)("g", { transform: `translate(0,${lineZoneHeight})`, children: [(0, jsx_runtime_1.jsx)("g", { children: await superRenderSvg(opts) }), (0, jsx_runtime_1.jsx)(
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: [(0, jsx_runtime_1.jsx)(LinesConnectingMatrixToGenomicPosition_1.default, { exportSVG: true, model: model }), (0, jsx_runtime_1.jsxs)("g", { transform: `translate(0,${lineZoneHeight})`, children: [(0, jsx_runtime_1.jsx)("g", { children: await superRenderSvg(opts) }), (0, jsx_runtime_1.jsx)(MultiVariantLegendBar_1.default, { model: model, orientation: "left", exportSVG: true })] })] }) }));
|
|
17
17
|
}
|
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
import BoxRendererType from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
2
|
+
import { SimpleFeature } from '@jbrowse/core/util';
|
|
2
3
|
import type { RenderArgsDeserialized } from './types';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
export default class LinearVariantMatrixRenderer extends BoxRendererType {
|
|
5
5
|
supportsSVG: boolean;
|
|
6
6
|
render(renderProps: RenderArgsDeserialized): Promise<{
|
|
7
7
|
features: Map<any, any>;
|
|
8
|
-
simplifiedFeatures:
|
|
8
|
+
simplifiedFeatures: SimpleFeature[];
|
|
9
9
|
height: number;
|
|
10
10
|
width: number;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
arr: string[][];
|
|
12
|
+
canvasRecordedData: Record<string, unknown>;
|
|
13
|
+
layout: import("@jbrowse/core/util/layouts/BaseLayout").BaseLayout<import("@jbrowse/core/util").Feature>;
|
|
13
14
|
reactElement?: React.ReactElement;
|
|
14
15
|
html?: string;
|
|
15
16
|
} | {
|
|
16
17
|
features: Map<any, any>;
|
|
17
|
-
simplifiedFeatures:
|
|
18
|
+
simplifiedFeatures: SimpleFeature[];
|
|
18
19
|
height: number;
|
|
19
20
|
width: number;
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
arr: string[][];
|
|
22
|
+
imageData: any;
|
|
23
|
+
layout: import("@jbrowse/core/util/layouts/BaseLayout").BaseLayout<import("@jbrowse/core/util").Feature>;
|
|
24
|
+
reactElement?: React.ReactElement;
|
|
22
25
|
html?: string;
|
|
23
26
|
} | {
|
|
24
27
|
features: Map<any, any>;
|
|
25
|
-
simplifiedFeatures:
|
|
28
|
+
simplifiedFeatures: SimpleFeature[];
|
|
26
29
|
height: number;
|
|
27
30
|
width: number;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
arr: string[][];
|
|
32
|
+
reactElement: React.ReactElement;
|
|
33
|
+
layout: import("@jbrowse/core/util/layouts/BaseLayout").BaseLayout<import("@jbrowse/core/util").Feature>;
|
|
31
34
|
html?: string;
|
|
32
35
|
}>;
|
|
33
36
|
}
|
|
@@ -50,7 +50,7 @@ class LinearVariantMatrixRenderer extends BoxRendererType_1.default {
|
|
|
50
50
|
const { end, start } = region;
|
|
51
51
|
const width = (end - start) / bpPerPx;
|
|
52
52
|
const { makeImageData } = await Promise.resolve().then(() => __importStar(require('./makeImageData')));
|
|
53
|
-
const { mafs, ...
|
|
53
|
+
const { mafs, ...rest } = await (0, util_1.renderToAbstractCanvas)(width, height, renderProps, ctx => makeImageData({
|
|
54
54
|
ctx,
|
|
55
55
|
canvasWidth: width,
|
|
56
56
|
canvasHeight: height,
|
|
@@ -62,14 +62,14 @@ class LinearVariantMatrixRenderer extends BoxRendererType_1.default {
|
|
|
62
62
|
}));
|
|
63
63
|
const results = await super.render({
|
|
64
64
|
...renderProps,
|
|
65
|
-
...
|
|
65
|
+
...rest,
|
|
66
66
|
features,
|
|
67
67
|
height,
|
|
68
68
|
width,
|
|
69
69
|
});
|
|
70
70
|
return {
|
|
71
71
|
...results,
|
|
72
|
-
...
|
|
72
|
+
...rest,
|
|
73
73
|
features: new Map(),
|
|
74
74
|
simplifiedFeatures: mafs.map(({ feature }) => new util_1.SimpleFeature({
|
|
75
75
|
id: feature.id(),
|
package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MultiVariantBaseModel } from '../../shared/MultiVariantBaseModel';
|
|
2
|
+
declare const MultiLinearVariantMatrixRendering: (props: {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
displayModel: MultiVariantBaseModel;
|
|
6
|
+
arr: string[][];
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default MultiLinearVariantMatrixRendering;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
6
|
+
const mobx_react_1 = require("mobx-react");
|
|
7
|
+
const MultiLinearVariantMatrixRendering = (0, mobx_react_1.observer)(function (props) {
|
|
8
|
+
const { arr, width, height, displayModel } = props;
|
|
9
|
+
const ref = (0, react_1.useRef)(null);
|
|
10
|
+
function getFeatureUnderMouse(eventClientX, eventClientY) {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
if (!ref.current) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const r = ref.current.getBoundingClientRect();
|
|
16
|
+
const offsetX = eventClientX - r.left;
|
|
17
|
+
const offsetY = eventClientY - r.top;
|
|
18
|
+
const dimY = arr.length;
|
|
19
|
+
const dimX = ((_a = arr[0]) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
20
|
+
const name = (_b = displayModel.sources[Math.floor((offsetY / height) * dimX)]) === null || _b === void 0 ? void 0 : _b.name;
|
|
21
|
+
const genotype = (_c = arr[Math.floor((offsetX / width) * dimY)]) === null || _c === void 0 ? void 0 : _c[Math.floor((offsetY / height) * dimX)];
|
|
22
|
+
return genotype && name
|
|
23
|
+
? {
|
|
24
|
+
name,
|
|
25
|
+
genotype,
|
|
26
|
+
}
|
|
27
|
+
: undefined;
|
|
28
|
+
}
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, onMouseMove: e => {
|
|
30
|
+
displayModel.setHoveredGenotype(getFeatureUnderMouse(e.clientX, e.clientY));
|
|
31
|
+
}, onMouseLeave: () => {
|
|
32
|
+
displayModel.setHoveredGenotype(undefined);
|
|
33
|
+
}, onMouseOut: () => {
|
|
34
|
+
displayModel.setHoveredGenotype(undefined);
|
|
35
|
+
}, style: {
|
|
36
|
+
overflow: 'visible',
|
|
37
|
+
position: 'relative',
|
|
38
|
+
height,
|
|
39
|
+
}, children: (0, jsx_runtime_1.jsx)(ui_1.PrerenderedCanvas, { ...props }) }));
|
|
40
|
+
});
|
|
41
|
+
exports.default = MultiLinearVariantMatrixRendering;
|
|
@@ -4,15 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = LinearVariantMatrixRendererF;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const MultiLinearVariantMatrixRenderer_1 = __importDefault(require("./MultiLinearVariantMatrixRenderer"));
|
|
8
|
+
const MultiLinearVariantMatrixRendering_1 = __importDefault(require("./components/MultiLinearVariantMatrixRendering"));
|
|
9
9
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
10
|
function LinearVariantMatrixRendererF(pluginManager) {
|
|
11
11
|
pluginManager.addRendererType(() => {
|
|
12
|
-
return new
|
|
12
|
+
return new MultiLinearVariantMatrixRenderer_1.default({
|
|
13
13
|
name: 'LinearVariantMatrixRenderer',
|
|
14
14
|
displayName: 'Linear variant matrix renderer',
|
|
15
|
-
ReactComponent:
|
|
15
|
+
ReactComponent: MultiLinearVariantMatrixRendering_1.default,
|
|
16
16
|
configSchema: configSchema_1.default,
|
|
17
17
|
pluginManager,
|
|
18
18
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RenderArgsDeserialized } from './types';
|
|
2
2
|
export declare function makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }: {
|
|
3
3
|
ctx: CanvasRenderingContext2D;
|
|
4
4
|
canvasWidth: number;
|
|
5
5
|
canvasHeight: number;
|
|
6
|
-
renderArgs:
|
|
6
|
+
renderArgs: RenderArgsDeserialized;
|
|
7
7
|
}): Promise<{
|
|
8
8
|
mafs: {
|
|
9
9
|
feature: import("@jbrowse/core/util").Feature;
|
|
10
10
|
mostFrequentAlt: string;
|
|
11
|
-
alleleCounts:
|
|
11
|
+
alleleCounts: Record<string, number>;
|
|
12
12
|
}[];
|
|
13
13
|
arr: string[][];
|
|
14
14
|
}>;
|