@jbrowse/plugin-variants 2.18.0 → 3.0.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/models/stateModelFactory.d.ts +1 -1
- package/dist/LinearVariantDisplay/model.d.ts +5 -5
- package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantDisplay/components/Crosshair.js +35 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -2
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +5 -49
- package/dist/MultiLinearVariantDisplay/index.js +18 -8
- package/dist/MultiLinearVariantDisplay/model.d.ts +113 -40
- package/dist/MultiLinearVariantDisplay/model.js +24 -176
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +1 -2
- package/dist/MultiLinearVariantDisplay/renderSvg.js +2 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +28 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +1 -2
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +13 -16
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -2
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +6 -56
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +109 -27
- package/dist/MultiLinearVariantMatrixDisplay/model.js +31 -136
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -2
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -7
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +4 -32
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +44 -63
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +3 -2
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +31 -5
- package/dist/MultiLinearVariantMatrixRenderer/index.js +2 -2
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +100 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/dist/MultiLinearVariantMatrixRenderer/types.js +2 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +4 -21
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +38 -25
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +7 -3
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +36 -27
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +1 -33
- package/dist/MultiLinearVariantRenderer/configSchema.js +0 -5
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.js +67 -0
- package/dist/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/dist/MultiLinearVariantRenderer/types.js +2 -0
- package/dist/MultiVariantBaseRenderer.d.ts +4 -4
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -19
- package/dist/StructuralVariantChordRenderer/Chord.js +3 -25
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +7 -29
- package/dist/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/dist/StructuralVariantChordRenderer/types.js +2 -0
- package/dist/Tooltip.d.ts +2 -2
- package/dist/Tooltip.js +6 -32
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/dist/VariantFeatureWidget/Checkbox2.js +2 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -3
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +66 -69
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.js +60 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.js +15 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +20 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/dist/VariantFeatureWidget/VariantConsequencePanel.js +15 -0
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -2
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +47 -36
- package/dist/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/dist/VariantFeatureWidget/VariantSampleFilters.js +10 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -7
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +14 -44
- package/dist/VariantFeatureWidget/index.js +17 -7
- package/dist/VariantFeatureWidget/types.d.ts +16 -0
- package/dist/VariantFeatureWidget/types.js +2 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +10 -27
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +12 -7
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +27 -37
- package/dist/VcfAdapter/VcfAdapter.d.ts +7 -0
- package/dist/VcfAdapter/VcfAdapter.js +29 -3
- package/dist/VcfAdapter/configSchema.d.ts +8 -0
- package/dist/VcfAdapter/configSchema.js +12 -1
- package/dist/VcfAdapter/index.js +17 -7
- package/dist/VcfFeature/index.js +2 -1
- package/dist/VcfFeature/util.js +3 -4
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +38 -12
- package/dist/VcfTabixAdapter/configSchema.d.ts +8 -0
- package/dist/VcfTabixAdapter/configSchema.js +8 -0
- package/dist/VcfTabixAdapter/index.js +17 -7
- package/dist/extensionPoints.js +21 -33
- package/dist/getMultiVariantFeaturesAutorun.d.ts +4 -7
- package/dist/getMultiVariantFeaturesAutorun.js +16 -15
- package/dist/getMultiVariantSourcesAutorun.d.ts +1 -6
- package/dist/shared/BulkEditPanel.d.ts +4 -5
- package/dist/shared/BulkEditPanel.js +69 -88
- package/dist/shared/ClusterDialog.d.ts +4 -5
- package/dist/shared/ClusterDialog.js +45 -86
- package/dist/shared/ColorLegend.d.ts +2 -3
- package/dist/shared/ColorLegend.js +8 -10
- package/dist/shared/HelpfulTips.d.ts +1 -0
- package/dist/shared/HelpfulTips.js +7 -0
- package/dist/shared/LegendBar.d.ts +3 -3
- package/dist/shared/LegendBar.js +6 -12
- package/dist/shared/MAFFilterDialog.d.ts +2 -3
- package/dist/shared/MAFFilterDialog.js +14 -42
- package/dist/shared/MultiVariantBaseModel.d.ts +341 -0
- package/dist/shared/MultiVariantBaseModel.js +316 -0
- package/dist/shared/MultiVariantTooltip.d.ts +6 -0
- package/dist/shared/MultiVariantTooltip.js +23 -0
- package/dist/shared/RectBg.d.ts +2 -3
- package/dist/shared/RectBg.js +3 -7
- package/dist/shared/RowPalettizer.d.ts +2 -3
- package/dist/shared/RowPalettizer.js +30 -28
- package/dist/shared/SetColorDialog.d.ts +2 -3
- package/dist/shared/SetColorDialog.js +26 -65
- package/dist/shared/SetMinMaxDialog.d.ts +1 -2
- package/dist/shared/SetMinMaxDialog.js +11 -41
- package/dist/shared/SetRowHeightDialog.d.ts +8 -0
- package/dist/shared/SetRowHeightDialog.js +18 -0
- package/dist/shared/SharedVariantMixin.d.ts +7 -7
- package/dist/shared/SourcesDataGrid.d.ts +6 -0
- package/dist/shared/SourcesDataGrid.js +68 -0
- package/dist/shared/SourcesGrid.d.ts +2 -3
- package/dist/shared/SourcesGrid.js +5 -134
- package/dist/shared/SourcesGridHeader.d.ts +7 -0
- package/dist/shared/SourcesGridHeader.js +41 -0
- package/dist/shared/multiVariantColor.d.ts +3 -0
- package/dist/shared/multiVariantColor.js +50 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -0
- package/dist/util.d.ts +6 -9
- package/dist/util.js +47 -14
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +1 -1
- package/esm/LinearVariantDisplay/model.d.ts +5 -5
- package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +30 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -2
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +5 -26
- package/esm/MultiLinearVariantDisplay/index.js +1 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +113 -40
- package/esm/MultiLinearVariantDisplay/model.js +7 -169
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -2
- package/esm/MultiLinearVariantDisplay/renderSvg.js +2 -5
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +23 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +1 -2
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +13 -13
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -2
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +6 -33
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +109 -27
- package/esm/MultiLinearVariantMatrixDisplay/model.js +14 -129
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -2
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -7
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +4 -32
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +11 -63
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +3 -2
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +31 -2
- package/esm/MultiLinearVariantMatrixRenderer/index.js +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +97 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/types.js +1 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +4 -21
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +6 -26
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +7 -3
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +34 -5
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -33
- package/esm/MultiLinearVariantRenderer/configSchema.js +0 -2
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.js +61 -0
- package/esm/MultiLinearVariantRenderer/types.d.ts +19 -0
- package/esm/MultiLinearVariantRenderer/types.js +1 -0
- package/esm/MultiVariantBaseRenderer.d.ts +4 -4
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -19
- package/esm/StructuralVariantChordRenderer/Chord.js +3 -2
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +7 -6
- package/esm/StructuralVariantChordRenderer/types.d.ts +17 -0
- package/esm/StructuralVariantChordRenderer/types.js +1 -0
- package/esm/Tooltip.d.ts +2 -2
- package/esm/Tooltip.js +6 -9
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +1 -2
- package/esm/VariantFeatureWidget/Checkbox2.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -3
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +48 -61
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
- package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.js +24 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.js +9 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +17 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
- package/esm/VariantFeatureWidget/VariantConsequencePanel.js +9 -0
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -2
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +30 -29
- package/esm/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
- package/esm/VariantFeatureWidget/VariantSampleFilters.js +7 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -7
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +15 -22
- package/esm/VariantFeatureWidget/types.d.ts +16 -0
- package/esm/VariantFeatureWidget/types.js +1 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +10 -27
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +12 -7
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +27 -37
- package/esm/VcfAdapter/VcfAdapter.d.ts +7 -0
- package/esm/VcfAdapter/VcfAdapter.js +31 -5
- package/esm/VcfAdapter/configSchema.d.ts +8 -0
- package/esm/VcfAdapter/configSchema.js +12 -1
- package/esm/VcfFeature/index.js +2 -1
- package/esm/VcfFeature/util.js +3 -4
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +38 -12
- package/esm/VcfTabixAdapter/configSchema.d.ts +8 -0
- package/esm/VcfTabixAdapter/configSchema.js +8 -0
- package/esm/extensionPoints.js +21 -33
- package/esm/getMultiVariantFeaturesAutorun.d.ts +4 -7
- package/esm/getMultiVariantFeaturesAutorun.js +16 -15
- package/esm/getMultiVariantSourcesAutorun.d.ts +1 -6
- package/esm/shared/BulkEditPanel.d.ts +4 -5
- package/esm/shared/BulkEditPanel.js +70 -66
- package/esm/shared/ClusterDialog.d.ts +4 -5
- package/esm/shared/ClusterDialog.js +44 -62
- package/esm/shared/ColorLegend.d.ts +2 -3
- package/esm/shared/ColorLegend.js +8 -10
- package/esm/shared/HelpfulTips.d.ts +1 -0
- package/esm/shared/HelpfulTips.js +4 -0
- package/esm/shared/LegendBar.d.ts +3 -3
- package/esm/shared/LegendBar.js +7 -13
- package/esm/shared/MAFFilterDialog.d.ts +2 -3
- package/esm/shared/MAFFilterDialog.js +14 -19
- package/esm/shared/MultiVariantBaseModel.d.ts +341 -0
- package/esm/shared/MultiVariantBaseModel.js +277 -0
- package/esm/shared/MultiVariantTooltip.d.ts +6 -0
- package/esm/shared/MultiVariantTooltip.js +17 -0
- package/esm/shared/RectBg.d.ts +2 -3
- package/esm/shared/RectBg.js +3 -4
- package/esm/shared/RowPalettizer.d.ts +2 -3
- package/esm/shared/RowPalettizer.js +30 -25
- package/esm/shared/SetColorDialog.d.ts +2 -3
- package/esm/shared/SetColorDialog.js +26 -42
- package/esm/shared/SetMinMaxDialog.d.ts +1 -2
- package/esm/shared/SetMinMaxDialog.js +11 -18
- package/esm/shared/SetRowHeightDialog.d.ts +8 -0
- package/esm/shared/SetRowHeightDialog.js +15 -0
- package/esm/shared/SharedVariantMixin.d.ts +7 -7
- package/esm/shared/SourcesDataGrid.d.ts +6 -0
- package/esm/shared/SourcesDataGrid.js +62 -0
- package/esm/shared/SourcesGrid.d.ts +2 -3
- package/esm/shared/SourcesGrid.js +5 -111
- package/esm/shared/SourcesGridHeader.d.ts +7 -0
- package/esm/shared/SourcesGridHeader.js +35 -0
- package/esm/shared/multiVariantColor.d.ts +3 -0
- package/esm/shared/multiVariantColor.js +45 -0
- package/esm/types.d.ts +14 -0
- package/esm/types.js +1 -0
- package/esm/util.d.ts +6 -9
- package/esm/util.js +43 -13
- package/package.json +6 -7
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/AnnotGrid.js +0 -39
- package/dist/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +0 -16
- package/dist/configSchema.d.ts +0 -34
- package/dist/configSchema.js +0 -44
- package/dist/shared/DraggableDialog.d.ts +0 -6
- package/dist/shared/DraggableDialog.js +0 -62
- package/dist/shared/Tooltip.d.ts +0 -18
- package/dist/shared/Tooltip.js +0 -38
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
- package/esm/VariantFeatureWidget/AnnotGrid.js +0 -13
- package/esm/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +0 -10
- package/esm/configSchema.d.ts +0 -34
- package/esm/configSchema.js +0 -42
- package/esm/shared/DraggableDialog.d.ts +0 -6
- package/esm/shared/DraggableDialog.js +0 -34
- package/esm/shared/Tooltip.d.ts +0 -18
- package/esm/shared/Tooltip.js +0 -33
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { type ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
2
|
-
import type { Source } from '../util';
|
|
3
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
4
1
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
5
|
-
import type {
|
|
2
|
+
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
6
3
|
import type { Instance } from 'mobx-state-tree';
|
|
7
|
-
export declare function stateModelFactory(
|
|
4
|
+
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
8
5
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
6
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
10
7
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -24,7 +21,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
24
21
|
stopToken: string | undefined;
|
|
25
22
|
filled: boolean;
|
|
26
23
|
reactElement: React.ReactElement | undefined;
|
|
27
|
-
features: Map<string, Feature> | undefined;
|
|
24
|
+
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
28
25
|
layout: any;
|
|
29
26
|
status: string;
|
|
30
27
|
error: unknown;
|
|
@@ -39,7 +36,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
39
36
|
status?: string;
|
|
40
37
|
reactElement?: React.ReactElement;
|
|
41
38
|
};
|
|
42
|
-
}) => import("react").JSX.Element | undefined;
|
|
39
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
43
40
|
renderProps: any;
|
|
44
41
|
} & {
|
|
45
42
|
doReload(): void;
|
|
@@ -83,12 +80,20 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
83
80
|
} & {
|
|
84
81
|
type: import("mobx-state-tree").ISimpleType<"LinearBareDisplay">;
|
|
85
82
|
configuration: AnyConfigurationSchemaType;
|
|
83
|
+
} & {
|
|
84
|
+
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
85
|
+
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../types").Source[], import("../types").Source[], import("../types").Source[]>, [undefined]>;
|
|
86
|
+
configuration: AnyConfigurationSchemaType;
|
|
87
|
+
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
88
|
+
showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
89
|
+
renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
90
|
+
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
91
|
+
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
86
92
|
} & {
|
|
87
93
|
type: import("mobx-state-tree").ISimpleType<"MultiLinearVariantDisplay">;
|
|
88
|
-
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
|
|
89
94
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
95
|
+
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
90
96
|
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
91
|
-
showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
92
97
|
}, {
|
|
93
98
|
rendererTypeName: string;
|
|
94
99
|
error: unknown;
|
|
@@ -180,32 +185,32 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
180
185
|
} & {
|
|
181
186
|
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
182
187
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
183
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
188
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
184
189
|
} & {
|
|
185
190
|
featureIdUnderMouse: undefined | string;
|
|
186
|
-
contextMenuFeature: undefined | Feature;
|
|
191
|
+
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
187
192
|
} & {
|
|
188
|
-
readonly DisplayMessageComponent:
|
|
189
|
-
readonly blockType: "
|
|
193
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
194
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
190
195
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
191
196
|
} & {
|
|
192
197
|
readonly renderDelay: number;
|
|
193
|
-
readonly TooltipComponent: AnyReactComponentType;
|
|
198
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
194
199
|
readonly selectedFeatureId: string | undefined;
|
|
195
200
|
} & {
|
|
196
|
-
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
197
|
-
readonly featureUnderMouse: Feature | undefined;
|
|
201
|
+
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
202
|
+
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
198
203
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
199
204
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
200
205
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
201
206
|
} & {
|
|
202
207
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
203
208
|
deleteBlock(key: string): void;
|
|
204
|
-
selectFeature(feature: Feature): void;
|
|
205
|
-
navToFeature(feature: Feature): void;
|
|
209
|
+
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
210
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
206
211
|
clearFeatureSelection(): void;
|
|
207
212
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
208
|
-
setContextMenuFeature(feature?: Feature): void;
|
|
213
|
+
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature): void;
|
|
209
214
|
} & {
|
|
210
215
|
reload(): Promise<void>;
|
|
211
216
|
} & {
|
|
@@ -213,7 +218,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
213
218
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
214
219
|
renderProps(): any;
|
|
215
220
|
} & {
|
|
216
|
-
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
221
|
+
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
217
222
|
afterAttach(): void;
|
|
218
223
|
} & {
|
|
219
224
|
readonly rendererConfig: {
|
|
@@ -232,46 +237,114 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
232
237
|
renderProps(): any;
|
|
233
238
|
} & {
|
|
234
239
|
sourcesLoadingStopToken: string | undefined;
|
|
235
|
-
featureUnderMouseVolatile: Feature | undefined;
|
|
236
|
-
sourcesVolatile: Source[] | undefined;
|
|
240
|
+
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
241
|
+
sourcesVolatile: import("../types").Source[] | undefined;
|
|
242
|
+
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
243
|
+
hasPhased: boolean;
|
|
244
|
+
sampleInfo: undefined | Record<string, import("../types").SampleInfo>;
|
|
245
|
+
hoveredGenotype: string | undefined;
|
|
237
246
|
} & {
|
|
238
|
-
setSourcesLoading(str: string): void;
|
|
239
|
-
setLayout(layout: Source[]): void;
|
|
240
|
-
clearLayout(): void;
|
|
241
|
-
setSources(sources: Source[]): void;
|
|
242
|
-
setFeatureUnderMouse(f?: Feature): void;
|
|
243
247
|
setRowHeight(arg: number): void;
|
|
244
|
-
|
|
248
|
+
setHoveredGenotype(arg: string): void;
|
|
249
|
+
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
250
|
+
setLayout(layout: import("../types").Source[]): void;
|
|
251
|
+
clearLayout(): void;
|
|
252
|
+
setSourcesLoading(str: string): void;
|
|
253
|
+
setSources(sources: import("../types").Source[]): void;
|
|
254
|
+
setMafFilter(arg: number): void;
|
|
245
255
|
setShowSidebarLabels(arg: boolean): void;
|
|
256
|
+
setPhasedMode(arg: string): void;
|
|
257
|
+
setAutoHeight(arg: boolean): void;
|
|
258
|
+
setHasPhased(arg: boolean): void;
|
|
259
|
+
setSampleInfo(arg: Record<string, import("../types").SampleInfo>): void;
|
|
246
260
|
} & {
|
|
247
|
-
readonly
|
|
248
|
-
readonly TooltipComponent: AnyReactComponentType;
|
|
249
|
-
} & {
|
|
250
|
-
readonly rendererTypeName: string;
|
|
261
|
+
readonly preSources: import("../types").Source[] | undefined;
|
|
251
262
|
readonly sources: {
|
|
252
|
-
|
|
263
|
+
label: string;
|
|
264
|
+
id: string;
|
|
253
265
|
baseUri?: string;
|
|
254
266
|
name: string;
|
|
267
|
+
color?: string;
|
|
255
268
|
group?: string;
|
|
269
|
+
HP?: number;
|
|
256
270
|
}[] | undefined;
|
|
257
271
|
} & {
|
|
258
272
|
readonly rowHeight: number;
|
|
259
|
-
} & {
|
|
260
|
-
readonly canDisplayLabels: boolean;
|
|
261
|
-
readonly totalHeight: number;
|
|
262
273
|
adapterProps(): any;
|
|
263
|
-
} & {
|
|
264
|
-
renderProps(): any;
|
|
265
|
-
} & {
|
|
266
274
|
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 | {
|
|
267
275
|
label: string;
|
|
276
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
277
|
+
muiName: string;
|
|
278
|
+
};
|
|
268
279
|
type: string;
|
|
269
280
|
checked: boolean;
|
|
270
281
|
onClick: () => void;
|
|
282
|
+
subMenu?: undefined;
|
|
283
|
+
} | {
|
|
284
|
+
label: string;
|
|
285
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
286
|
+
muiName: string;
|
|
287
|
+
};
|
|
288
|
+
subMenu: ({
|
|
289
|
+
label: string;
|
|
290
|
+
disabled: boolean;
|
|
291
|
+
onClick: () => void;
|
|
292
|
+
type?: undefined;
|
|
293
|
+
checked?: undefined;
|
|
294
|
+
} | {
|
|
295
|
+
label: string;
|
|
296
|
+
type: string;
|
|
297
|
+
checked: boolean;
|
|
298
|
+
onClick: () => void;
|
|
299
|
+
disabled?: undefined;
|
|
300
|
+
})[];
|
|
301
|
+
type?: undefined;
|
|
302
|
+
checked?: undefined;
|
|
303
|
+
onClick?: undefined;
|
|
304
|
+
} | {
|
|
305
|
+
label: string;
|
|
306
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
307
|
+
muiName: string;
|
|
308
|
+
};
|
|
309
|
+
subMenu: ({
|
|
310
|
+
label: string;
|
|
311
|
+
type: string;
|
|
312
|
+
checked: boolean;
|
|
313
|
+
onClick: () => void;
|
|
314
|
+
disabled?: undefined;
|
|
315
|
+
} | {
|
|
316
|
+
label: string;
|
|
317
|
+
disabled: boolean;
|
|
318
|
+
checked: boolean;
|
|
319
|
+
type: string;
|
|
320
|
+
onClick: () => void;
|
|
321
|
+
})[];
|
|
322
|
+
type?: undefined;
|
|
323
|
+
checked?: undefined;
|
|
324
|
+
onClick?: undefined;
|
|
325
|
+
} | {
|
|
326
|
+
label: string;
|
|
327
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
328
|
+
muiName: string;
|
|
329
|
+
};
|
|
330
|
+
subMenu: {
|
|
331
|
+
label: string;
|
|
332
|
+
onClick: () => void;
|
|
333
|
+
}[];
|
|
334
|
+
type?: undefined;
|
|
335
|
+
checked?: undefined;
|
|
336
|
+
onClick?: undefined;
|
|
271
337
|
})[];
|
|
338
|
+
} & {
|
|
339
|
+
readonly canDisplayLabels: boolean;
|
|
340
|
+
readonly totalHeight: number;
|
|
341
|
+
} & {
|
|
342
|
+
renderProps(): any;
|
|
343
|
+
} & {
|
|
344
|
+
readonly rendererTypeName: string;
|
|
272
345
|
} & {
|
|
273
346
|
afterAttach(): void;
|
|
274
|
-
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
347
|
+
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
275
348
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
276
349
|
export type MultiLinearVariantDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
277
350
|
export type MultiLinearVariantDisplayModel = Instance<MultiLinearVariantDisplayStateModel>;
|
|
@@ -1,183 +1,19 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
import { set1 } from '@jbrowse/core/ui/colors';
|
|
3
1
|
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import { stopStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
|
-
import { linearBareDisplayStateModelFactory, } from '@jbrowse/plugin-linear-genome-view';
|
|
6
|
-
import deepEqual from 'fast-deep-equal';
|
|
7
2
|
import { isAlive, types } from 'mobx-state-tree';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const SetColorDialog = lazy(() => import('../shared/SetColorDialog'));
|
|
11
|
-
const ClusterDialog = lazy(() => import('../shared/ClusterDialog'));
|
|
12
|
-
export function stateModelFactory(pluginManager, configSchema) {
|
|
3
|
+
import MultiVariantBaseModelF from '../shared/MultiVariantBaseModel';
|
|
4
|
+
export function stateModelFactory(configSchema) {
|
|
13
5
|
return types
|
|
14
|
-
.compose('MultiLinearVariantDisplay',
|
|
6
|
+
.compose('MultiLinearVariantDisplay', MultiVariantBaseModelF(configSchema), types.model({
|
|
15
7
|
type: types.literal('MultiLinearVariantDisplay'),
|
|
16
|
-
layout: types.optional(types.frozen(), []),
|
|
17
8
|
rowHeightSetting: types.optional(types.number, 11),
|
|
9
|
+
minorAlleleFrequencyFilter: types.optional(types.number, 0),
|
|
18
10
|
autoHeight: false,
|
|
19
|
-
showSidebarLabelsSetting: true,
|
|
20
11
|
}))
|
|
21
|
-
.
|
|
22
|
-
sourcesLoadingStopToken: undefined,
|
|
23
|
-
featureUnderMouseVolatile: undefined,
|
|
24
|
-
sourcesVolatile: undefined,
|
|
25
|
-
}))
|
|
26
|
-
.actions(self => ({
|
|
27
|
-
setSourcesLoading(str) {
|
|
28
|
-
if (self.sourcesLoadingStopToken) {
|
|
29
|
-
stopStopToken(self.sourcesLoadingStopToken);
|
|
30
|
-
}
|
|
31
|
-
self.sourcesLoadingStopToken = str;
|
|
32
|
-
},
|
|
33
|
-
setLayout(layout) {
|
|
34
|
-
self.layout = layout;
|
|
35
|
-
},
|
|
36
|
-
clearLayout() {
|
|
37
|
-
self.layout = [];
|
|
38
|
-
},
|
|
39
|
-
setSources(sources) {
|
|
40
|
-
if (!deepEqual(sources, self.sourcesVolatile)) {
|
|
41
|
-
self.sourcesVolatile = sources;
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
setFeatureUnderMouse(f) {
|
|
45
|
-
self.featureUnderMouseVolatile = f;
|
|
46
|
-
},
|
|
47
|
-
setRowHeight(arg) {
|
|
48
|
-
self.rowHeightSetting = arg;
|
|
49
|
-
},
|
|
50
|
-
setAutoHeight(arg) {
|
|
51
|
-
self.autoHeight = arg;
|
|
52
|
-
},
|
|
53
|
-
setShowSidebarLabels(arg) {
|
|
54
|
-
self.showSidebarLabelsSetting = arg;
|
|
55
|
-
},
|
|
56
|
-
}))
|
|
57
|
-
.views(self => ({
|
|
58
|
-
get featureUnderMouse() {
|
|
59
|
-
return self.featureUnderMouseVolatile;
|
|
60
|
-
},
|
|
61
|
-
get TooltipComponent() {
|
|
62
|
-
return Tooltip;
|
|
63
|
-
},
|
|
64
|
-
}))
|
|
65
|
-
.views(self => ({
|
|
12
|
+
.views(() => ({
|
|
66
13
|
get rendererTypeName() {
|
|
67
14
|
return 'MultiVariantRenderer';
|
|
68
15
|
},
|
|
69
|
-
get sources() {
|
|
70
|
-
var _a;
|
|
71
|
-
const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
|
|
72
|
-
const iter = self.layout.length ? self.layout : self.sourcesVolatile;
|
|
73
|
-
return iter === null || iter === void 0 ? void 0 : iter.map(s => ({
|
|
74
|
-
...sources[s.name],
|
|
75
|
-
...s,
|
|
76
|
-
})).map((s, i) => ({
|
|
77
|
-
...s,
|
|
78
|
-
color: s.color || set1[i] || randomColor(s.name),
|
|
79
|
-
}));
|
|
80
|
-
},
|
|
81
|
-
}))
|
|
82
|
-
.views(self => ({
|
|
83
|
-
get rowHeight() {
|
|
84
|
-
const { autoHeight, sources, rowHeightSetting, height } = self;
|
|
85
|
-
return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
|
|
86
|
-
},
|
|
87
16
|
}))
|
|
88
|
-
.views(self => {
|
|
89
|
-
const { renderProps: superRenderProps } = self;
|
|
90
|
-
return {
|
|
91
|
-
get canDisplayLabels() {
|
|
92
|
-
return self.rowHeight > 8 && self.showSidebarLabelsSetting;
|
|
93
|
-
},
|
|
94
|
-
get totalHeight() {
|
|
95
|
-
var _a;
|
|
96
|
-
return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
|
|
97
|
-
},
|
|
98
|
-
adapterProps() {
|
|
99
|
-
const superProps = superRenderProps();
|
|
100
|
-
return {
|
|
101
|
-
...superProps,
|
|
102
|
-
displayModel: self,
|
|
103
|
-
config: self.rendererConfig,
|
|
104
|
-
rpcDriverName: self.rpcDriverName,
|
|
105
|
-
sources: self.sources,
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
})
|
|
110
|
-
.views(self => ({
|
|
111
|
-
renderProps() {
|
|
112
|
-
const superProps = self.adapterProps();
|
|
113
|
-
return {
|
|
114
|
-
...superProps,
|
|
115
|
-
notReady: superProps.notReady || !self.sources,
|
|
116
|
-
displayModel: self,
|
|
117
|
-
rpcDriverName: self.rpcDriverName,
|
|
118
|
-
height: self.height,
|
|
119
|
-
totalHeight: self.totalHeight,
|
|
120
|
-
rowHeight: self.rowHeight,
|
|
121
|
-
scrollTop: self.scrollTop,
|
|
122
|
-
onMouseMove: (_, f) => {
|
|
123
|
-
self.setFeatureUnderMouse(f);
|
|
124
|
-
},
|
|
125
|
-
onMouseLeave: () => {
|
|
126
|
-
self.setFeatureUnderMouse(undefined);
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
},
|
|
130
|
-
}))
|
|
131
|
-
.views(self => {
|
|
132
|
-
const { trackMenuItems: superTrackMenuItems } = self;
|
|
133
|
-
return {
|
|
134
|
-
trackMenuItems() {
|
|
135
|
-
return [
|
|
136
|
-
...superTrackMenuItems(),
|
|
137
|
-
{
|
|
138
|
-
label: 'Adjust to height of display?',
|
|
139
|
-
type: 'checkbox',
|
|
140
|
-
checked: self.autoHeight,
|
|
141
|
-
onClick: () => {
|
|
142
|
-
self.setAutoHeight(!self.autoHeight);
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
label: 'Show sidebar labels',
|
|
147
|
-
type: 'checkbox',
|
|
148
|
-
checked: self.showSidebarLabelsSetting,
|
|
149
|
-
onClick: () => {
|
|
150
|
-
self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
label: 'Cluster by genotype',
|
|
155
|
-
onClick: () => {
|
|
156
|
-
getSession(self).queueDialog(handleClose => [
|
|
157
|
-
ClusterDialog,
|
|
158
|
-
{
|
|
159
|
-
model: self,
|
|
160
|
-
handleClose,
|
|
161
|
-
},
|
|
162
|
-
]);
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
label: 'Edit colors/arrangement...',
|
|
167
|
-
onClick: () => {
|
|
168
|
-
getSession(self).queueDialog(handleClose => [
|
|
169
|
-
SetColorDialog,
|
|
170
|
-
{
|
|
171
|
-
model: self,
|
|
172
|
-
handleClose,
|
|
173
|
-
},
|
|
174
|
-
]);
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
];
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
})
|
|
181
17
|
.actions(self => {
|
|
182
18
|
const { renderSvg: superRenderSvg } = self;
|
|
183
19
|
return {
|
|
@@ -186,7 +22,9 @@ export function stateModelFactory(pluginManager, configSchema) {
|
|
|
186
22
|
(async () => {
|
|
187
23
|
try {
|
|
188
24
|
const { getMultiVariantSourcesAutorun } = await import('../getMultiVariantSourcesAutorun');
|
|
25
|
+
const { getMultiVariantFeaturesAutorun } = await import('../getMultiVariantFeaturesAutorun');
|
|
189
26
|
getMultiVariantSourcesAutorun(self);
|
|
27
|
+
getMultiVariantFeaturesAutorun(self);
|
|
190
28
|
}
|
|
191
29
|
catch (e) {
|
|
192
30
|
if (isAlive(self)) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { MultiLinearVariantDisplayModel } from './model';
|
|
3
2
|
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
-
export declare function renderSvg(self: MultiLinearVariantDisplayModel, opts: ExportSvgDisplayOptions, superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>): Promise<
|
|
3
|
+
export declare function renderSvg(self: MultiLinearVariantDisplayModel, opts: ExportSvgDisplayOptions, superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { when } from 'mobx';
|
|
4
4
|
import LegendBar from '../shared/LegendBar';
|
|
5
5
|
export async function renderSvg(self, opts, superRenderSvg) {
|
|
6
6
|
await when(() => !!self.regionCannotBeRenderedText);
|
|
7
7
|
const { offsetPx } = getContainingView(self);
|
|
8
|
-
return (
|
|
9
|
-
React.createElement("g", null, await superRenderSvg(opts)),
|
|
10
|
-
React.createElement("g", { transform: `translate(${Math.max(-offsetPx, 0)})` },
|
|
11
|
-
React.createElement(LegendBar, { model: self, orientation: "left", exportSVG: true }))));
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx("g", { children: await superRenderSvg(opts) }), _jsx("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: _jsx(LegendBar, { model: self, orientation: "left", exportSVG: true }) })] }));
|
|
12
9
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MultiLinearVariantMatrixDisplayModel } from '../model';
|
|
2
|
+
declare const Crosshair: ({ mouseX, mouseY, model, }: {
|
|
3
|
+
mouseX: number;
|
|
4
|
+
mouseY: number;
|
|
5
|
+
model: MultiLinearVariantMatrixDisplayModel;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default Crosshair;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
import MultiVariantTooltip from '../../shared/MultiVariantTooltip';
|
|
6
|
+
const useStyles = makeStyles()({
|
|
7
|
+
cursor: {
|
|
8
|
+
pointerEvents: 'none',
|
|
9
|
+
zIndex: 1000,
|
|
10
|
+
position: 'relative',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const Crosshair = observer(function ({ mouseX, mouseY, model, }) {
|
|
14
|
+
const { classes } = useStyles();
|
|
15
|
+
const { hoveredGenotype, lineZoneHeight, totalHeight, rowHeight, sources } = model;
|
|
16
|
+
const { width } = getContainingView(model);
|
|
17
|
+
const source = sources === null || sources === void 0 ? void 0 : sources[Math.floor((mouseY - lineZoneHeight) / rowHeight)];
|
|
18
|
+
const yoff = mouseY - lineZoneHeight;
|
|
19
|
+
return source ? (_jsxs(_Fragment, { children: [_jsxs("svg", { className: classes.cursor, width: width, height: totalHeight, style: {
|
|
20
|
+
top: lineZoneHeight,
|
|
21
|
+
}, children: [_jsx("line", { x1: 0, x2: width, y1: yoff, y2: yoff, stroke: "black" }), _jsx("line", { x1: mouseX, x2: mouseX, y1: 0, y2: totalHeight, stroke: "black" })] }), _jsx(MultiVariantTooltip, { source: { ...source, hoveredGenotype } })] })) : null;
|
|
22
|
+
});
|
|
23
|
+
export default Crosshair;
|
package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { MultiLinearVariantMatrixDisplayModel } from '../model';
|
|
3
2
|
declare const LinesConnectingMatrixToGenomicPosition: ({ model, exportSVG, }: {
|
|
4
3
|
model: MultiLinearVariantMatrixDisplayModel;
|
|
5
4
|
exportSVG?: boolean;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default LinesConnectingMatrixToGenomicPosition;
|
package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
const Wrapper = observer(function ({ children, model, exportSVG, }) {
|
|
5
5
|
const { height } = model;
|
|
6
6
|
const { width, offsetPx } = getContainingView(model);
|
|
7
7
|
const left = Math.max(0, -offsetPx);
|
|
8
|
-
return exportSVG ? (
|
|
8
|
+
return exportSVG ? (_jsx("g", { transform: `translate(${left})`, children: children })) : (_jsx("svg", { style: {
|
|
9
9
|
position: 'absolute',
|
|
10
10
|
top: 0,
|
|
11
11
|
left,
|
|
12
12
|
pointerEvents: 'none',
|
|
13
13
|
height,
|
|
14
14
|
width,
|
|
15
|
-
}
|
|
15
|
+
}, children: children }));
|
|
16
16
|
});
|
|
17
17
|
const LinesConnectingMatrixToGenomicPosition = observer(function ({ model, exportSVG, }) {
|
|
18
18
|
var _a;
|
|
19
19
|
const { assemblyManager } = getSession(model);
|
|
20
20
|
const view = getContainingView(model);
|
|
21
|
-
const { featuresVolatile } = model;
|
|
21
|
+
const { lineZoneHeight, featuresVolatile } = model;
|
|
22
22
|
const { offsetPx, assemblyNames, dynamicBlocks } = view;
|
|
23
23
|
const assembly = assemblyManager.get(assemblyNames[0]);
|
|
24
24
|
const b0 = ((_a = dynamicBlocks.contentBlocks[0]) === null || _a === void 0 ? void 0 : _a.widthPx) || 0;
|
|
25
25
|
const w = b0 / ((featuresVolatile === null || featuresVolatile === void 0 ? void 0 : featuresVolatile.length) || 1);
|
|
26
26
|
const l = Math.max(offsetPx, 0);
|
|
27
|
-
return assembly && featuresVolatile ? (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
return assembly && featuresVolatile ? (_jsx(Wrapper, { exportSVG: exportSVG, model: model, children: featuresVolatile.map((f, i) => {
|
|
28
|
+
var _a;
|
|
29
|
+
const ref = f.get('refName');
|
|
30
|
+
const c = (((_a = view.bpToPx({
|
|
31
|
+
refName: assembly.getCanonicalRefName(ref) || ref,
|
|
32
|
+
coord: f.get('start'),
|
|
33
|
+
})) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - l;
|
|
34
|
+
return (_jsx("line", { stroke: "#0004", x1: i * w + w / 2, x2: c, y1: lineZoneHeight, y2: 0 }, f.id()));
|
|
35
|
+
}) })) : null;
|
|
36
36
|
});
|
|
37
37
|
export default LinesConnectingMatrixToGenomicPosition;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { MultiLinearVariantMatrixDisplayModel } from '../model';
|
|
3
2
|
declare const MultiLinearVariantMatrixDisplayComponent: (props: {
|
|
4
3
|
model: MultiLinearVariantMatrixDisplayModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default MultiLinearVariantMatrixDisplayComponent;
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
4
|
-
import { getContainingView } from '@jbrowse/core/util';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
5
3
|
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
6
4
|
import { observer } from 'mobx-react';
|
|
7
|
-
import
|
|
5
|
+
import Crosshair from './Crosshair';
|
|
8
6
|
import LinesConnectingMatrixToGenomicPosition from './LinesConnectingMatrixToGenomicPosition';
|
|
9
7
|
import LegendBar from '../../shared/LegendBar';
|
|
10
|
-
const useStyles = makeStyles()({
|
|
11
|
-
cursor: {
|
|
12
|
-
pointerEvents: 'none',
|
|
13
|
-
zIndex: 1000,
|
|
14
|
-
position: 'relative',
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
8
|
const MultiLinearVariantMatrixDisplayComponent = observer(function (props) {
|
|
18
|
-
const { classes } = useStyles();
|
|
19
9
|
const { model } = props;
|
|
20
|
-
const {
|
|
10
|
+
const { lineZoneHeight } = model;
|
|
21
11
|
const ref = useRef(null);
|
|
22
12
|
const [mouseY, setMouseY] = useState();
|
|
23
13
|
const [mouseX, setMouseX] = useState();
|
|
24
|
-
|
|
25
|
-
return (React.createElement("div", { ref: ref, onMouseMove: event => {
|
|
14
|
+
return (_jsxs("div", { ref: ref, onMouseMove: event => {
|
|
26
15
|
var _a;
|
|
27
16
|
const rect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
28
17
|
const top = (rect === null || rect === void 0 ? void 0 : rect.top) || 0;
|
|
@@ -32,22 +21,6 @@ const MultiLinearVariantMatrixDisplayComponent = observer(function (props) {
|
|
|
32
21
|
}, onMouseLeave: () => {
|
|
33
22
|
setMouseY(undefined);
|
|
34
23
|
setMouseX(undefined);
|
|
35
|
-
} },
|
|
36
|
-
React.createElement("div", { style: { position: 'relative' } },
|
|
37
|
-
React.createElement(LinesConnectingMatrixToGenomicPosition, { model: model }),
|
|
38
|
-
React.createElement("div", { style: { position: 'absolute', top: 20 } },
|
|
39
|
-
React.createElement(LegendBar, { model: model }),
|
|
40
|
-
React.createElement(BaseLinearDisplayComponent, { ...props }))),
|
|
41
|
-
mouseY &&
|
|
42
|
-
mouseY > 20 &&
|
|
43
|
-
(sources === null || sources === void 0 ? void 0 : sources[Math.floor((mouseY - 20) / rowHeight)]) ? (React.createElement(React.Fragment, null,
|
|
44
|
-
React.createElement("svg", { className: classes.cursor, width: width, height: height },
|
|
45
|
-
React.createElement("line", { x1: 0, x2: width, y1: mouseY, y2: mouseY, stroke: "black" }),
|
|
46
|
-
React.createElement("line", { x1: mouseX, x2: mouseX, y1: 0, y2: height, stroke: "black" })),
|
|
47
|
-
React.createElement(BaseTooltip, null,
|
|
48
|
-
React.createElement(SanitizedHTML, { html: Object.entries(sources[Math.floor((mouseY - 20) / rowHeight)] || {})
|
|
49
|
-
.filter(([key]) => key !== 'color')
|
|
50
|
-
.map(([key, value]) => `${key}:${value}`)
|
|
51
|
-
.join('\n') })))) : null));
|
|
24
|
+
}, children: [_jsxs("div", { style: { position: 'relative' }, children: [_jsx(LinesConnectingMatrixToGenomicPosition, { model: model }), _jsxs("div", { style: { position: 'absolute', top: lineZoneHeight }, children: [_jsx(LegendBar, { model: model }), _jsx(BaseLinearDisplayComponent, { ...props })] })] }), mouseX && mouseY && mouseY > lineZoneHeight ? (_jsx(Crosshair, { mouseX: mouseX, mouseY: mouseY, model: model })) : null] }));
|
|
52
25
|
});
|
|
53
26
|
export default MultiLinearVariantMatrixDisplayComponent;
|