@jbrowse/plugin-variants 2.18.0 → 3.0.1
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 +99 -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 +96 -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 +12 -13
- 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,6 +1,4 @@
|
|
|
1
|
-
import type { Source } from '../util';
|
|
2
1
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
4
2
|
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
5
3
|
import type { Instance } from 'mobx-state-tree';
|
|
6
4
|
export default function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
@@ -23,7 +21,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
23
21
|
stopToken: string | undefined;
|
|
24
22
|
filled: boolean;
|
|
25
23
|
reactElement: React.ReactElement | undefined;
|
|
26
|
-
features: Map<string, Feature> | undefined;
|
|
24
|
+
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
27
25
|
layout: any;
|
|
28
26
|
status: string;
|
|
29
27
|
error: unknown;
|
|
@@ -38,7 +36,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
38
36
|
status?: string;
|
|
39
37
|
reactElement?: React.ReactElement;
|
|
40
38
|
};
|
|
41
|
-
}) => import("react").JSX.Element | undefined;
|
|
39
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
42
40
|
renderProps: any;
|
|
43
41
|
} & {
|
|
44
42
|
doReload(): void;
|
|
@@ -84,10 +82,16 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
84
82
|
configuration: AnyConfigurationSchemaType;
|
|
85
83
|
} & {
|
|
86
84
|
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
87
|
-
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
|
|
85
|
+
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../types").Source[], import("../types").Source[], import("../types").Source[]>, [undefined]>;
|
|
88
86
|
configuration: AnyConfigurationSchemaType;
|
|
89
|
-
|
|
87
|
+
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
90
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>;
|
|
92
|
+
} & {
|
|
93
|
+
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
94
|
+
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
91
95
|
}, {
|
|
92
96
|
rendererTypeName: string;
|
|
93
97
|
error: unknown;
|
|
@@ -179,32 +183,32 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
179
183
|
} & {
|
|
180
184
|
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
181
185
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
182
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
186
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
183
187
|
} & {
|
|
184
188
|
featureIdUnderMouse: undefined | string;
|
|
185
|
-
contextMenuFeature: undefined | Feature;
|
|
189
|
+
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
186
190
|
} & {
|
|
187
|
-
readonly DisplayMessageComponent:
|
|
188
|
-
readonly blockType: "
|
|
191
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
192
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
189
193
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
190
194
|
} & {
|
|
191
195
|
readonly renderDelay: number;
|
|
192
196
|
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
193
197
|
readonly selectedFeatureId: string | undefined;
|
|
194
198
|
} & {
|
|
195
|
-
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
196
|
-
readonly featureUnderMouse: Feature | undefined;
|
|
199
|
+
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
200
|
+
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
197
201
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
198
202
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
199
203
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
200
204
|
} & {
|
|
201
205
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
202
206
|
deleteBlock(key: string): void;
|
|
203
|
-
selectFeature(feature: Feature): void;
|
|
204
|
-
navToFeature(feature: Feature): void;
|
|
207
|
+
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
208
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
205
209
|
clearFeatureSelection(): void;
|
|
206
210
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
207
|
-
setContextMenuFeature(feature?: Feature): void;
|
|
211
|
+
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature): void;
|
|
208
212
|
} & {
|
|
209
213
|
reload(): Promise<void>;
|
|
210
214
|
} & {
|
|
@@ -212,7 +216,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
212
216
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
213
217
|
renderProps(): any;
|
|
214
218
|
} & {
|
|
215
|
-
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
219
|
+
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
216
220
|
afterAttach(): void;
|
|
217
221
|
} & {
|
|
218
222
|
readonly rendererConfig: {
|
|
@@ -231,35 +235,113 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
231
235
|
renderProps(): any;
|
|
232
236
|
} & {
|
|
233
237
|
sourcesLoadingStopToken: string | undefined;
|
|
234
|
-
featureUnderMouseVolatile: Feature | undefined;
|
|
235
|
-
sourcesVolatile: Source[] | undefined;
|
|
236
|
-
featuresVolatile: Feature[] | undefined;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
239
|
+
sourcesVolatile: import("../types").Source[] | undefined;
|
|
240
|
+
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
241
|
+
hasPhased: boolean;
|
|
242
|
+
sampleInfo: undefined | Record<string, import("../types").SampleInfo>;
|
|
243
|
+
hoveredGenotype: string | undefined;
|
|
244
|
+
} & {
|
|
245
|
+
setRowHeight(arg: number): void;
|
|
246
|
+
setHoveredGenotype(arg: string): void;
|
|
247
|
+
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
248
|
+
setLayout(layout: import("../types").Source[]): void;
|
|
241
249
|
clearLayout(): void;
|
|
242
250
|
setSourcesLoading(str: string): void;
|
|
243
|
-
setSources(sources: Source[]): void;
|
|
251
|
+
setSources(sources: import("../types").Source[]): void;
|
|
244
252
|
setMafFilter(arg: number): void;
|
|
245
253
|
setShowSidebarLabels(arg: boolean): void;
|
|
254
|
+
setPhasedMode(arg: string): void;
|
|
255
|
+
setAutoHeight(arg: boolean): void;
|
|
256
|
+
setHasPhased(arg: boolean): void;
|
|
257
|
+
setSampleInfo(arg: Record<string, import("../types").SampleInfo>): void;
|
|
246
258
|
} & {
|
|
247
|
-
readonly preSources: Source[] | undefined;
|
|
259
|
+
readonly preSources: import("../types").Source[] | undefined;
|
|
248
260
|
readonly sources: {
|
|
249
|
-
|
|
261
|
+
label: string;
|
|
262
|
+
id: string;
|
|
250
263
|
baseUri?: string;
|
|
251
264
|
name: string;
|
|
265
|
+
color?: string;
|
|
252
266
|
group?: string;
|
|
267
|
+
HP?: number;
|
|
253
268
|
}[] | undefined;
|
|
254
269
|
} & {
|
|
270
|
+
readonly rowHeight: number;
|
|
255
271
|
adapterProps(): any;
|
|
256
272
|
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 | {
|
|
257
273
|
label: string;
|
|
274
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
275
|
+
muiName: string;
|
|
276
|
+
};
|
|
258
277
|
type: string;
|
|
259
278
|
checked: boolean;
|
|
260
279
|
onClick: () => void;
|
|
280
|
+
subMenu?: undefined;
|
|
281
|
+
} | {
|
|
282
|
+
label: string;
|
|
283
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
284
|
+
muiName: string;
|
|
285
|
+
};
|
|
286
|
+
subMenu: ({
|
|
287
|
+
label: string;
|
|
288
|
+
disabled: boolean;
|
|
289
|
+
onClick: () => void;
|
|
290
|
+
type?: undefined;
|
|
291
|
+
checked?: undefined;
|
|
292
|
+
} | {
|
|
293
|
+
label: string;
|
|
294
|
+
type: string;
|
|
295
|
+
checked: boolean;
|
|
296
|
+
onClick: () => void;
|
|
297
|
+
disabled?: undefined;
|
|
298
|
+
})[];
|
|
299
|
+
type?: undefined;
|
|
300
|
+
checked?: undefined;
|
|
301
|
+
onClick?: undefined;
|
|
302
|
+
} | {
|
|
303
|
+
label: string;
|
|
304
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
305
|
+
muiName: string;
|
|
306
|
+
};
|
|
307
|
+
subMenu: ({
|
|
308
|
+
label: string;
|
|
309
|
+
type: string;
|
|
310
|
+
checked: boolean;
|
|
311
|
+
onClick: () => void;
|
|
312
|
+
disabled?: undefined;
|
|
313
|
+
} | {
|
|
314
|
+
label: string;
|
|
315
|
+
disabled: boolean;
|
|
316
|
+
checked: boolean;
|
|
317
|
+
type: string;
|
|
318
|
+
onClick: () => void;
|
|
319
|
+
})[];
|
|
320
|
+
type?: undefined;
|
|
321
|
+
checked?: undefined;
|
|
322
|
+
onClick?: undefined;
|
|
323
|
+
} | {
|
|
324
|
+
label: string;
|
|
325
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
326
|
+
muiName: string;
|
|
327
|
+
};
|
|
328
|
+
subMenu: {
|
|
329
|
+
label: string;
|
|
330
|
+
onClick: () => void;
|
|
331
|
+
}[];
|
|
332
|
+
type?: undefined;
|
|
333
|
+
checked?: undefined;
|
|
334
|
+
onClick?: undefined;
|
|
261
335
|
})[];
|
|
262
336
|
} & {
|
|
337
|
+
readonly canDisplayLabels: boolean;
|
|
338
|
+
readonly totalHeight: number;
|
|
339
|
+
} & {
|
|
340
|
+
renderProps(): any;
|
|
341
|
+
} & {
|
|
342
|
+
lineZoneHeight: number;
|
|
343
|
+
} & {
|
|
344
|
+
readonly nrow: number;
|
|
263
345
|
readonly blockType: string;
|
|
264
346
|
readonly totalHeight: number;
|
|
265
347
|
readonly rowHeight: number;
|
|
@@ -268,7 +350,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
268
350
|
readonly canDisplayLabels: boolean;
|
|
269
351
|
} & {
|
|
270
352
|
afterAttach(): void;
|
|
271
|
-
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
353
|
+
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
272
354
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
273
355
|
export type MultiLinearVariantMatrixDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
274
356
|
export type MultiLinearVariantMatrixDisplayModel = Instance<MultiLinearVariantMatrixDisplayStateModel>;
|
|
@@ -15,163 +15,57 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.default = stateModelFactory;
|
|
30
|
-
const react_1 = require("react");
|
|
31
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
32
|
-
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
33
40
|
const util_1 = require("@jbrowse/core/util");
|
|
34
|
-
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
35
|
-
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
36
|
-
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
37
41
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
38
|
-
const
|
|
39
|
-
const SetColorDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/SetColorDialog'))));
|
|
40
|
-
const MAFFilterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/MAFFilterDialog'))));
|
|
41
|
-
const ClusterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/ClusterDialog'))));
|
|
42
|
+
const MultiVariantBaseModel_1 = __importDefault(require("../shared/MultiVariantBaseModel"));
|
|
42
43
|
function stateModelFactory(configSchema) {
|
|
43
44
|
return mobx_state_tree_1.types
|
|
44
|
-
.compose('LinearVariantMatrixDisplay', (0,
|
|
45
|
+
.compose('LinearVariantMatrixDisplay', (0, MultiVariantBaseModel_1.default)(configSchema), mobx_state_tree_1.types.model({
|
|
45
46
|
type: mobx_state_tree_1.types.literal('LinearVariantMatrixDisplay'),
|
|
46
|
-
|
|
47
|
-
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
48
|
-
mafFilter: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0.1),
|
|
49
|
-
showSidebarLabelsSetting: true,
|
|
47
|
+
rowHeightSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 1),
|
|
50
48
|
}))
|
|
51
49
|
.volatile(() => ({
|
|
52
|
-
sourcesLoadingStopToken: undefined,
|
|
53
|
-
featureUnderMouseVolatile: undefined,
|
|
54
|
-
sourcesVolatile: undefined,
|
|
55
|
-
featuresVolatile: undefined,
|
|
56
50
|
lineZoneHeight: 20,
|
|
57
|
-
}))
|
|
58
|
-
.actions(self => ({
|
|
59
|
-
setFeatures(f) {
|
|
60
|
-
self.featuresVolatile = f;
|
|
61
|
-
},
|
|
62
|
-
setLayout(layout) {
|
|
63
|
-
self.layout = layout;
|
|
64
|
-
},
|
|
65
|
-
clearLayout() {
|
|
66
|
-
self.layout = [];
|
|
67
|
-
},
|
|
68
|
-
setSourcesLoading(str) {
|
|
69
|
-
if (self.sourcesLoadingStopToken) {
|
|
70
|
-
(0, stopToken_1.stopStopToken)(self.sourcesLoadingStopToken);
|
|
71
|
-
}
|
|
72
|
-
self.sourcesLoadingStopToken = str;
|
|
73
|
-
},
|
|
74
|
-
setSources(sources) {
|
|
75
|
-
if (!(0, fast_deep_equal_1.default)(sources, self.sourcesVolatile)) {
|
|
76
|
-
self.sourcesVolatile = sources;
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
setMafFilter(arg) {
|
|
80
|
-
self.mafFilter = arg;
|
|
81
|
-
},
|
|
82
|
-
setShowSidebarLabels(arg) {
|
|
83
|
-
self.showSidebarLabelsSetting = arg;
|
|
84
|
-
},
|
|
85
51
|
}))
|
|
86
52
|
.views(self => ({
|
|
87
|
-
get
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
get sources() {
|
|
91
|
-
var _a, _b;
|
|
92
|
-
const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
|
|
93
|
-
return (_b = this.preSources) === null || _b === void 0 ? void 0 : _b.map(s => ({
|
|
94
|
-
...sources[s.name],
|
|
95
|
-
...s,
|
|
96
|
-
})).map((s, i) => ({
|
|
97
|
-
...s,
|
|
98
|
-
color: s.color || colors_1.set1[i] || (0, util_2.randomColor)(s.name),
|
|
99
|
-
}));
|
|
53
|
+
get nrow() {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1;
|
|
100
56
|
},
|
|
101
|
-
}))
|
|
102
|
-
.views(self => {
|
|
103
|
-
const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
|
|
104
|
-
return {
|
|
105
|
-
adapterProps() {
|
|
106
|
-
const superProps = superRenderProps();
|
|
107
|
-
return {
|
|
108
|
-
...superProps,
|
|
109
|
-
rpcDriverName: self.rpcDriverName,
|
|
110
|
-
displayModel: self,
|
|
111
|
-
config: self.rendererConfig,
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
trackMenuItems() {
|
|
115
|
-
return [
|
|
116
|
-
...superTrackMenuItems(),
|
|
117
|
-
{
|
|
118
|
-
label: 'Show sidebar labels',
|
|
119
|
-
type: 'checkbox',
|
|
120
|
-
checked: self.showSidebarLabelsSetting,
|
|
121
|
-
onClick: () => {
|
|
122
|
-
self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
label: 'Minimum allele frequency',
|
|
127
|
-
onClick: () => {
|
|
128
|
-
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
129
|
-
MAFFilterDialog,
|
|
130
|
-
{
|
|
131
|
-
model: self,
|
|
132
|
-
handleClose,
|
|
133
|
-
},
|
|
134
|
-
]);
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
label: 'Cluster by genotype',
|
|
139
|
-
onClick: () => {
|
|
140
|
-
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
141
|
-
ClusterDialog,
|
|
142
|
-
{
|
|
143
|
-
model: self,
|
|
144
|
-
handleClose,
|
|
145
|
-
},
|
|
146
|
-
]);
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
label: 'Edit colors/arrangement...',
|
|
151
|
-
onClick: () => {
|
|
152
|
-
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
153
|
-
SetColorDialog,
|
|
154
|
-
{
|
|
155
|
-
model: self,
|
|
156
|
-
handleClose,
|
|
157
|
-
},
|
|
158
|
-
]);
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
];
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
})
|
|
165
|
-
.views(self => ({
|
|
166
57
|
get blockType() {
|
|
167
58
|
return 'dynamicBlocks';
|
|
168
59
|
},
|
|
169
60
|
get totalHeight() {
|
|
170
|
-
return self.
|
|
61
|
+
return self.autoHeight
|
|
62
|
+
? self.height - self.lineZoneHeight
|
|
63
|
+
: this.nrow * self.rowHeightSetting;
|
|
171
64
|
},
|
|
172
65
|
get rowHeight() {
|
|
173
|
-
|
|
174
|
-
|
|
66
|
+
return self.autoHeight
|
|
67
|
+
? self.totalHeight / this.nrow
|
|
68
|
+
: self.rowHeightSetting;
|
|
175
69
|
},
|
|
176
70
|
}))
|
|
177
71
|
.views(self => ({
|
|
@@ -180,7 +74,8 @@ function stateModelFactory(configSchema) {
|
|
|
180
74
|
return {
|
|
181
75
|
...superProps,
|
|
182
76
|
notReady: superProps.notReady || !self.sources || !self.featuresVolatile,
|
|
183
|
-
|
|
77
|
+
renderingMode: self.renderingMode,
|
|
78
|
+
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
184
79
|
height: self.totalHeight,
|
|
185
80
|
sources: self.sources,
|
|
186
81
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { MultiLinearVariantMatrixDisplayModel } from './model';
|
|
3
2
|
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
-
export declare function renderSvg(model: MultiLinearVariantMatrixDisplayModel, opts: ExportSvgDisplayOptions, superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>): Promise<
|
|
3
|
+
export declare function renderSvg(model: MultiLinearVariantMatrixDisplayModel, opts: ExportSvgDisplayOptions, superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.renderSvg = renderSvg;
|
|
7
|
-
const
|
|
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
10
|
const LegendBar_1 = __importDefault(require("../shared/LegendBar"));
|
|
@@ -12,10 +12,6 @@ const LinesConnectingMatrixToGenomicPosition_1 = __importDefault(require("./comp
|
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
react_1.default.createElement(LinesConnectingMatrixToGenomicPosition_1.default, { exportSVG: true, model: model }),
|
|
18
|
-
react_1.default.createElement("g", { transform: `translate(0,${model.lineZoneHeight})` },
|
|
19
|
-
react_1.default.createElement("g", null, await superRenderSvg(opts)),
|
|
20
|
-
react_1.default.createElement(LegendBar_1.default, { model: model, orientation: "left", exportSVG: true })))));
|
|
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)(LegendBar_1.default, { model: model, orientation: "left", exportSVG: true })] })] }) }));
|
|
21
17
|
}
|
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
import BoxRendererType from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
2
|
-
import type {
|
|
3
|
-
import type { RenderArgsDeserialized as BoxRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
2
|
+
import type { RenderArgsDeserialized } from './types';
|
|
4
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
-
export interface SortParams {
|
|
6
|
-
type: string;
|
|
7
|
-
pos: number;
|
|
8
|
-
refName: string;
|
|
9
|
-
assemblyName: string;
|
|
10
|
-
tag?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface RenderArgsDeserialized extends BoxRenderArgsDeserialized {
|
|
13
|
-
sources: {
|
|
14
|
-
name: string;
|
|
15
|
-
}[];
|
|
16
|
-
mafFilter: number;
|
|
17
|
-
highResolutionScaling: number;
|
|
18
|
-
height: number;
|
|
19
|
-
}
|
|
20
|
-
export interface RenderArgsDeserializedWithFeaturesAndLayout extends RenderArgsDeserialized {
|
|
21
|
-
sources: Source[];
|
|
22
|
-
features: Map<string, Feature>;
|
|
23
|
-
}
|
|
24
4
|
export default class LinearVariantMatrixRenderer extends BoxRendererType {
|
|
25
5
|
supportsSVG: boolean;
|
|
26
|
-
makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }: {
|
|
27
|
-
ctx: CanvasRenderingContext2D;
|
|
28
|
-
canvasWidth: number;
|
|
29
|
-
canvasHeight: number;
|
|
30
|
-
renderArgs: RenderArgsDeserializedWithFeaturesAndLayout;
|
|
31
|
-
}): {
|
|
32
|
-
mafs: Feature[];
|
|
33
|
-
};
|
|
34
6
|
render(renderProps: RenderArgsDeserialized): Promise<{
|
|
35
7
|
features: Map<any, any>;
|
|
36
8
|
simplifiedFeatures: any;
|
|
@@ -38,14 +10,14 @@ export default class LinearVariantMatrixRenderer extends BoxRendererType {
|
|
|
38
10
|
width: number;
|
|
39
11
|
canvasRecordedData: any;
|
|
40
12
|
layout: import("@jbrowse/core/util/layouts").BaseLayout<Feature>;
|
|
41
|
-
reactElement?:
|
|
13
|
+
reactElement?: React.ReactElement;
|
|
42
14
|
html?: string;
|
|
43
15
|
} | {
|
|
44
16
|
features: Map<any, any>;
|
|
45
17
|
simplifiedFeatures: any;
|
|
46
18
|
height: number;
|
|
47
19
|
width: number;
|
|
48
|
-
reactElement:
|
|
20
|
+
reactElement: import("react/jsx-runtime").JSX.Element;
|
|
49
21
|
layout: import("@jbrowse/core/util/layouts").BaseLayout<Feature>;
|
|
50
22
|
html?: string;
|
|
51
23
|
} | {
|
|
@@ -55,7 +27,7 @@ export default class LinearVariantMatrixRenderer extends BoxRendererType {
|
|
|
55
27
|
width: number;
|
|
56
28
|
imageData: any;
|
|
57
29
|
layout: import("@jbrowse/core/util/layouts").BaseLayout<Feature>;
|
|
58
|
-
reactElement?:
|
|
30
|
+
reactElement?: React.ReactElement;
|
|
59
31
|
html?: string;
|
|
60
32
|
}>;
|
|
61
33
|
}
|
|
@@ -1,84 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
const BoxRendererType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType"));
|
|
7
40
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const util_2 = require("../util");
|
|
9
|
-
const fudgeFactor = 0.6;
|
|
10
|
-
const f2 = fudgeFactor / 2;
|
|
11
41
|
class LinearVariantMatrixRenderer extends BoxRendererType_1.default {
|
|
12
42
|
constructor() {
|
|
13
43
|
super(...arguments);
|
|
14
44
|
this.supportsSVG = true;
|
|
15
45
|
}
|
|
16
|
-
makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }) {
|
|
17
|
-
const { mafFilter, sources, features } = renderArgs;
|
|
18
|
-
const feats = [...features.values()];
|
|
19
|
-
const h = canvasHeight / sources.length;
|
|
20
|
-
const mafs = [];
|
|
21
|
-
for (const feat of feats) {
|
|
22
|
-
let c = 0;
|
|
23
|
-
let c2 = 0;
|
|
24
|
-
const samp = feat.get('genotypes');
|
|
25
|
-
if (feat.get('end') - feat.get('start') <= 10) {
|
|
26
|
-
for (const { name } of sources) {
|
|
27
|
-
const s = samp[name];
|
|
28
|
-
if (s === '0|0' || s === './.') {
|
|
29
|
-
c2++;
|
|
30
|
-
}
|
|
31
|
-
else if (s === '1|0' || s === '0|1') {
|
|
32
|
-
c++;
|
|
33
|
-
}
|
|
34
|
-
else if (s === '1|1') {
|
|
35
|
-
c++;
|
|
36
|
-
c2++;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
c++;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (c / sources.length > mafFilter &&
|
|
43
|
-
c2 / sources.length < 1 - mafFilter) {
|
|
44
|
-
mafs.push(feat);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const w = canvasWidth / mafs.length;
|
|
49
|
-
for (let i = 0; i < mafs.length; i++) {
|
|
50
|
-
const f = mafs[i];
|
|
51
|
-
if (f.get('end') - f.get('start') <= 10) {
|
|
52
|
-
const samp = f.get('genotypes');
|
|
53
|
-
const x = (i / mafs.length) * canvasWidth;
|
|
54
|
-
for (let j = 0; j < sources.length; j++) {
|
|
55
|
-
const y = (j / sources.length) * canvasHeight;
|
|
56
|
-
const { name } = sources[j];
|
|
57
|
-
ctx.fillStyle = (0, util_2.getCol)(samp[name]);
|
|
58
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return { mafs };
|
|
63
|
-
}
|
|
64
46
|
async render(renderProps) {
|
|
65
47
|
const features = await this.getFeatures(renderProps);
|
|
66
48
|
const { height, sources, regions, bpPerPx } = renderProps;
|
|
67
49
|
const region = regions[0];
|
|
68
50
|
const { end, start } = region;
|
|
69
51
|
const width = (end - start) / bpPerPx;
|
|
70
|
-
const {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
52
|
+
const { makeImageData } = await Promise.resolve().then(() => __importStar(require('./makeImageData')));
|
|
53
|
+
const { mafs, ...res } = await (0, util_1.renderToAbstractCanvas)(width, height, renderProps, ctx => makeImageData({
|
|
54
|
+
ctx,
|
|
55
|
+
canvasWidth: width,
|
|
56
|
+
canvasHeight: height,
|
|
57
|
+
renderArgs: {
|
|
58
|
+
...renderProps,
|
|
59
|
+
features,
|
|
60
|
+
sources,
|
|
61
|
+
},
|
|
62
|
+
}));
|
|
82
63
|
const results = await super.render({
|
|
83
64
|
...renderProps,
|
|
84
65
|
...res,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const LinearVariantMatrixRendering: (props: {
|
|
3
2
|
width: number;
|
|
4
3
|
height: number;
|
|
5
|
-
|
|
4
|
+
displayModel: any;
|
|
5
|
+
arr: string[];
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default LinearVariantMatrixRendering;
|