@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
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import type { SampleInfo, Source } from '../types';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
import type { Instance } from 'mobx-state-tree';
|
|
5
|
+
export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
6
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
9
|
+
} & {
|
|
10
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
11
|
+
} & {
|
|
12
|
+
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
13
|
+
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
14
|
+
} & {
|
|
15
|
+
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
16
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
17
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
18
|
+
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
19
|
+
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
20
|
+
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
21
|
+
}, {
|
|
22
|
+
stopToken: string | undefined;
|
|
23
|
+
filled: boolean;
|
|
24
|
+
reactElement: React.ReactElement | undefined;
|
|
25
|
+
features: Map<string, Feature> | undefined;
|
|
26
|
+
layout: any;
|
|
27
|
+
status: string;
|
|
28
|
+
error: unknown;
|
|
29
|
+
message: string | undefined;
|
|
30
|
+
maxHeightReached: boolean;
|
|
31
|
+
ReactComponent: ({ model, }: {
|
|
32
|
+
model: {
|
|
33
|
+
error?: unknown;
|
|
34
|
+
reload: () => void;
|
|
35
|
+
message: React.ReactNode;
|
|
36
|
+
filled?: boolean;
|
|
37
|
+
status?: string;
|
|
38
|
+
reactElement?: React.ReactElement;
|
|
39
|
+
};
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
41
|
+
renderProps: any;
|
|
42
|
+
} & {
|
|
43
|
+
doReload(): void;
|
|
44
|
+
afterAttach(): void;
|
|
45
|
+
setStatus(message: string): void;
|
|
46
|
+
setLoading(newStopToken: string): void;
|
|
47
|
+
setMessage(messageText: string): void;
|
|
48
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
49
|
+
setError(error: unknown): void;
|
|
50
|
+
reload(): void;
|
|
51
|
+
beforeDestroy(): void;
|
|
52
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
53
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
54
|
+
maxFeatureScreenDensity: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
defaultValue: number;
|
|
58
|
+
};
|
|
59
|
+
fetchSizeLimit: {
|
|
60
|
+
type: string;
|
|
61
|
+
defaultValue: number;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
height: {
|
|
65
|
+
type: string;
|
|
66
|
+
defaultValue: number;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
mouseover: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
defaultValue: string;
|
|
73
|
+
contextVariable: string[];
|
|
74
|
+
};
|
|
75
|
+
jexlFilters: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
defaultValue: never[];
|
|
79
|
+
};
|
|
80
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
81
|
+
} & {
|
|
82
|
+
type: import("mobx-state-tree").ISimpleType<"LinearBareDisplay">;
|
|
83
|
+
configuration: AnyConfigurationSchemaType;
|
|
84
|
+
} & {
|
|
85
|
+
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
86
|
+
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
|
|
87
|
+
configuration: AnyConfigurationSchemaType;
|
|
88
|
+
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
89
|
+
showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
90
|
+
renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
91
|
+
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
92
|
+
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
93
|
+
}, {
|
|
94
|
+
rendererTypeName: string;
|
|
95
|
+
error: unknown;
|
|
96
|
+
message: string | undefined;
|
|
97
|
+
} & {
|
|
98
|
+
readonly RenderingComponent: React.FC<{
|
|
99
|
+
model: {
|
|
100
|
+
id: string;
|
|
101
|
+
type: string;
|
|
102
|
+
rpcDriverName: string | undefined;
|
|
103
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
104
|
+
rendererTypeName: string;
|
|
105
|
+
error: unknown;
|
|
106
|
+
message: string | undefined;
|
|
107
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
108
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
109
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
110
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
111
|
+
}, {
|
|
112
|
+
rendererTypeName: string;
|
|
113
|
+
error: unknown;
|
|
114
|
+
message: string | undefined;
|
|
115
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
116
|
+
onHorizontalScroll?: () => void;
|
|
117
|
+
blockState?: Record<string, any>;
|
|
118
|
+
}>;
|
|
119
|
+
readonly DisplayBlurb: React.FC<{
|
|
120
|
+
model: {
|
|
121
|
+
id: string;
|
|
122
|
+
type: string;
|
|
123
|
+
rpcDriverName: string | undefined;
|
|
124
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
125
|
+
rendererTypeName: string;
|
|
126
|
+
error: unknown;
|
|
127
|
+
message: string | undefined;
|
|
128
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
129
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
130
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
131
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
132
|
+
}, {
|
|
133
|
+
rendererTypeName: string;
|
|
134
|
+
error: unknown;
|
|
135
|
+
message: string | undefined;
|
|
136
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
137
|
+
}> | null;
|
|
138
|
+
readonly adapterConfig: any;
|
|
139
|
+
readonly parentTrack: any;
|
|
140
|
+
renderProps(): any;
|
|
141
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
142
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
143
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
144
|
+
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
145
|
+
regionCannotBeRendered(): null;
|
|
146
|
+
} & {
|
|
147
|
+
setMessage(arg?: string): void;
|
|
148
|
+
setError(error?: unknown): void;
|
|
149
|
+
setRpcDriverName(rpcDriverName: string): void;
|
|
150
|
+
reload(): void;
|
|
151
|
+
} & {
|
|
152
|
+
scrollTop: number;
|
|
153
|
+
} & {
|
|
154
|
+
readonly height: number;
|
|
155
|
+
} & {
|
|
156
|
+
setScrollTop(scrollTop: number): void;
|
|
157
|
+
setHeight(displayHeight: number): number;
|
|
158
|
+
resizeHeight(distance: number): number;
|
|
159
|
+
} & {
|
|
160
|
+
featureDensityStatsP: undefined | Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
161
|
+
featureDensityStats: undefined | import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats;
|
|
162
|
+
currStatsBpPerPx: number;
|
|
163
|
+
} & {
|
|
164
|
+
readonly currentBytesRequested: number;
|
|
165
|
+
readonly currentFeatureScreenDensity: number;
|
|
166
|
+
readonly maxFeatureScreenDensity: any;
|
|
167
|
+
readonly featureDensityStatsReady: boolean;
|
|
168
|
+
readonly maxAllowableBytes: number;
|
|
169
|
+
} & {
|
|
170
|
+
afterAttach(): void;
|
|
171
|
+
} & {
|
|
172
|
+
setCurrStatsBpPerPx(n: number): void;
|
|
173
|
+
setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
|
|
174
|
+
getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
175
|
+
setFeatureDensityStatsP(arg: any): void;
|
|
176
|
+
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
|
|
177
|
+
clearFeatureDensityStats(): void;
|
|
178
|
+
} & {
|
|
179
|
+
readonly regionTooLarge: boolean;
|
|
180
|
+
readonly regionTooLargeReason: string;
|
|
181
|
+
} & {
|
|
182
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
183
|
+
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
184
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
185
|
+
} & {
|
|
186
|
+
featureIdUnderMouse: undefined | string;
|
|
187
|
+
contextMenuFeature: undefined | Feature;
|
|
188
|
+
} & {
|
|
189
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
190
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
191
|
+
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
192
|
+
} & {
|
|
193
|
+
readonly renderDelay: number;
|
|
194
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
195
|
+
readonly selectedFeatureId: string | undefined;
|
|
196
|
+
} & {
|
|
197
|
+
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
198
|
+
readonly featureUnderMouse: Feature | undefined;
|
|
199
|
+
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
200
|
+
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
201
|
+
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
202
|
+
} & {
|
|
203
|
+
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
204
|
+
deleteBlock(key: string): void;
|
|
205
|
+
selectFeature(feature: Feature): void;
|
|
206
|
+
navToFeature(feature: Feature): void;
|
|
207
|
+
clearFeatureSelection(): void;
|
|
208
|
+
setFeatureIdUnderMouse(feature?: string): void;
|
|
209
|
+
setContextMenuFeature(feature?: Feature): void;
|
|
210
|
+
} & {
|
|
211
|
+
reload(): Promise<void>;
|
|
212
|
+
} & {
|
|
213
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
214
|
+
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
215
|
+
renderProps(): any;
|
|
216
|
+
} & {
|
|
217
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
218
|
+
afterAttach(): void;
|
|
219
|
+
} & {
|
|
220
|
+
readonly rendererConfig: {
|
|
221
|
+
[x: string]: any;
|
|
222
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
223
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
224
|
+
[x: string]: any;
|
|
225
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
226
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
227
|
+
[x: string]: any;
|
|
228
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
229
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
230
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
231
|
+
readonly rendererTypeName: any;
|
|
232
|
+
} & {
|
|
233
|
+
renderProps(): any;
|
|
234
|
+
} & {
|
|
235
|
+
sourcesLoadingStopToken: string | undefined;
|
|
236
|
+
featureUnderMouseVolatile: Feature | undefined;
|
|
237
|
+
sourcesVolatile: Source[] | undefined;
|
|
238
|
+
featuresVolatile: Feature[] | undefined;
|
|
239
|
+
hasPhased: boolean;
|
|
240
|
+
sampleInfo: undefined | Record<string, SampleInfo>;
|
|
241
|
+
hoveredGenotype: string | undefined;
|
|
242
|
+
} & {
|
|
243
|
+
setRowHeight(arg: number): void;
|
|
244
|
+
setHoveredGenotype(arg: string): void;
|
|
245
|
+
setFeatures(f: Feature[]): void;
|
|
246
|
+
setLayout(layout: Source[]): void;
|
|
247
|
+
clearLayout(): void;
|
|
248
|
+
setSourcesLoading(str: string): void;
|
|
249
|
+
setSources(sources: Source[]): void;
|
|
250
|
+
setMafFilter(arg: number): void;
|
|
251
|
+
setShowSidebarLabels(arg: boolean): void;
|
|
252
|
+
setPhasedMode(arg: string): void;
|
|
253
|
+
setAutoHeight(arg: boolean): void;
|
|
254
|
+
setHasPhased(arg: boolean): void;
|
|
255
|
+
setSampleInfo(arg: Record<string, SampleInfo>): void;
|
|
256
|
+
} & {
|
|
257
|
+
readonly preSources: Source[] | undefined;
|
|
258
|
+
readonly sources: {
|
|
259
|
+
label: string;
|
|
260
|
+
id: string;
|
|
261
|
+
baseUri?: string;
|
|
262
|
+
name: string;
|
|
263
|
+
color?: string;
|
|
264
|
+
group?: string;
|
|
265
|
+
HP?: number;
|
|
266
|
+
}[] | undefined;
|
|
267
|
+
} & {
|
|
268
|
+
readonly rowHeight: number;
|
|
269
|
+
adapterProps(): any;
|
|
270
|
+
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 | {
|
|
271
|
+
label: string;
|
|
272
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
273
|
+
muiName: string;
|
|
274
|
+
};
|
|
275
|
+
type: string;
|
|
276
|
+
checked: boolean;
|
|
277
|
+
onClick: () => void;
|
|
278
|
+
subMenu?: undefined;
|
|
279
|
+
} | {
|
|
280
|
+
label: string;
|
|
281
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
282
|
+
muiName: string;
|
|
283
|
+
};
|
|
284
|
+
subMenu: ({
|
|
285
|
+
label: string;
|
|
286
|
+
disabled: boolean;
|
|
287
|
+
onClick: () => void;
|
|
288
|
+
type?: undefined;
|
|
289
|
+
checked?: undefined;
|
|
290
|
+
} | {
|
|
291
|
+
label: string;
|
|
292
|
+
type: string;
|
|
293
|
+
checked: boolean;
|
|
294
|
+
onClick: () => void;
|
|
295
|
+
disabled?: undefined;
|
|
296
|
+
})[];
|
|
297
|
+
type?: undefined;
|
|
298
|
+
checked?: undefined;
|
|
299
|
+
onClick?: undefined;
|
|
300
|
+
} | {
|
|
301
|
+
label: string;
|
|
302
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
303
|
+
muiName: string;
|
|
304
|
+
};
|
|
305
|
+
subMenu: ({
|
|
306
|
+
label: string;
|
|
307
|
+
type: string;
|
|
308
|
+
checked: boolean;
|
|
309
|
+
onClick: () => void;
|
|
310
|
+
disabled?: undefined;
|
|
311
|
+
} | {
|
|
312
|
+
label: string;
|
|
313
|
+
disabled: boolean;
|
|
314
|
+
checked: boolean;
|
|
315
|
+
type: string;
|
|
316
|
+
onClick: () => void;
|
|
317
|
+
})[];
|
|
318
|
+
type?: undefined;
|
|
319
|
+
checked?: undefined;
|
|
320
|
+
onClick?: undefined;
|
|
321
|
+
} | {
|
|
322
|
+
label: string;
|
|
323
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
324
|
+
muiName: string;
|
|
325
|
+
};
|
|
326
|
+
subMenu: {
|
|
327
|
+
label: string;
|
|
328
|
+
onClick: () => void;
|
|
329
|
+
}[];
|
|
330
|
+
type?: undefined;
|
|
331
|
+
checked?: undefined;
|
|
332
|
+
onClick?: undefined;
|
|
333
|
+
})[];
|
|
334
|
+
} & {
|
|
335
|
+
readonly canDisplayLabels: boolean;
|
|
336
|
+
readonly totalHeight: number;
|
|
337
|
+
} & {
|
|
338
|
+
renderProps(): any;
|
|
339
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
340
|
+
export type MultiVariantBaseStateModel = ReturnType<typeof MultiVariantBaseModelF>;
|
|
341
|
+
export type MultiVariantBaseModel = Instance<MultiVariantBaseStateModel>;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
2
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
3
|
+
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 FilterListIcon from '@mui/icons-material/FilterList';
|
|
7
|
+
import HeightIcon from '@mui/icons-material/Height';
|
|
8
|
+
import SplitscreenIcon from '@mui/icons-material/Splitscreen';
|
|
9
|
+
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
10
|
+
import deepEqual from 'fast-deep-equal';
|
|
11
|
+
import { types } from 'mobx-state-tree';
|
|
12
|
+
const SetColorDialog = lazy(() => import('../shared/SetColorDialog'));
|
|
13
|
+
const MAFFilterDialog = lazy(() => import('../shared/MAFFilterDialog'));
|
|
14
|
+
const ClusterDialog = lazy(() => import('../shared/ClusterDialog'));
|
|
15
|
+
const SetRowHeightDialog = lazy(() => import('../shared/SetRowHeightDialog'));
|
|
16
|
+
export default function MultiVariantBaseModelF(configSchema) {
|
|
17
|
+
return types
|
|
18
|
+
.compose('LinearVariantMatrixDisplay', linearBareDisplayStateModelFactory(configSchema), types.model({
|
|
19
|
+
type: types.literal('LinearVariantMatrixDisplay'),
|
|
20
|
+
layout: types.optional(types.frozen(), []),
|
|
21
|
+
configuration: ConfigurationReference(configSchema),
|
|
22
|
+
minorAlleleFrequencyFilter: types.optional(types.number, 0.1),
|
|
23
|
+
showSidebarLabelsSetting: true,
|
|
24
|
+
renderingMode: types.optional(types.string, 'alleleCount'),
|
|
25
|
+
rowHeightSetting: types.optional(types.number, 8),
|
|
26
|
+
autoHeight: true,
|
|
27
|
+
}))
|
|
28
|
+
.volatile(() => ({
|
|
29
|
+
sourcesLoadingStopToken: undefined,
|
|
30
|
+
featureUnderMouseVolatile: undefined,
|
|
31
|
+
sourcesVolatile: undefined,
|
|
32
|
+
featuresVolatile: undefined,
|
|
33
|
+
hasPhased: false,
|
|
34
|
+
sampleInfo: undefined,
|
|
35
|
+
hoveredGenotype: undefined,
|
|
36
|
+
}))
|
|
37
|
+
.actions(self => ({
|
|
38
|
+
setRowHeight(arg) {
|
|
39
|
+
self.rowHeightSetting = arg;
|
|
40
|
+
},
|
|
41
|
+
setHoveredGenotype(arg) {
|
|
42
|
+
self.hoveredGenotype = arg;
|
|
43
|
+
},
|
|
44
|
+
setFeatures(f) {
|
|
45
|
+
self.featuresVolatile = f;
|
|
46
|
+
},
|
|
47
|
+
setLayout(layout) {
|
|
48
|
+
self.layout = layout;
|
|
49
|
+
},
|
|
50
|
+
clearLayout() {
|
|
51
|
+
self.layout = [];
|
|
52
|
+
},
|
|
53
|
+
setSourcesLoading(str) {
|
|
54
|
+
if (self.sourcesLoadingStopToken) {
|
|
55
|
+
stopStopToken(self.sourcesLoadingStopToken);
|
|
56
|
+
}
|
|
57
|
+
self.sourcesLoadingStopToken = str;
|
|
58
|
+
},
|
|
59
|
+
setSources(sources) {
|
|
60
|
+
if (!deepEqual(sources, self.sourcesVolatile)) {
|
|
61
|
+
self.sourcesVolatile = sources;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
setMafFilter(arg) {
|
|
65
|
+
self.minorAlleleFrequencyFilter = arg;
|
|
66
|
+
},
|
|
67
|
+
setShowSidebarLabels(arg) {
|
|
68
|
+
self.showSidebarLabelsSetting = arg;
|
|
69
|
+
},
|
|
70
|
+
setPhasedMode(arg) {
|
|
71
|
+
self.renderingMode = arg;
|
|
72
|
+
},
|
|
73
|
+
setAutoHeight(arg) {
|
|
74
|
+
self.autoHeight = arg;
|
|
75
|
+
},
|
|
76
|
+
setHasPhased(arg) {
|
|
77
|
+
self.hasPhased = arg;
|
|
78
|
+
},
|
|
79
|
+
setSampleInfo(arg) {
|
|
80
|
+
if (!deepEqual(arg, self.sampleInfo)) {
|
|
81
|
+
self.sampleInfo = arg;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
}))
|
|
85
|
+
.views(self => ({
|
|
86
|
+
get preSources() {
|
|
87
|
+
return self.layout.length ? self.layout : self.sourcesVolatile;
|
|
88
|
+
},
|
|
89
|
+
get sources() {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
if (this.preSources) {
|
|
92
|
+
const rows = [];
|
|
93
|
+
const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
|
|
94
|
+
for (const row of this.preSources) {
|
|
95
|
+
if (self.renderingMode === 'phased') {
|
|
96
|
+
const info = (_b = self.sampleInfo) === null || _b === void 0 ? void 0 : _b[row.name];
|
|
97
|
+
if (info === null || info === void 0 ? void 0 : info.isPhased) {
|
|
98
|
+
const ploidy = info.maxPloidy;
|
|
99
|
+
for (let i = 0; i < ploidy; i++) {
|
|
100
|
+
const id = `${row.name} HP${i}`;
|
|
101
|
+
rows.push({
|
|
102
|
+
...sources[row.name],
|
|
103
|
+
...row,
|
|
104
|
+
label: id,
|
|
105
|
+
HP: i,
|
|
106
|
+
id: id,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
rows.push({
|
|
113
|
+
...sources[row.name],
|
|
114
|
+
...row,
|
|
115
|
+
label: row.name,
|
|
116
|
+
id: row.name,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return rows;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
},
|
|
124
|
+
}))
|
|
125
|
+
.views(self => {
|
|
126
|
+
const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
|
|
127
|
+
return {
|
|
128
|
+
get rowHeight() {
|
|
129
|
+
const { sources, autoHeight, rowHeightSetting, height } = self;
|
|
130
|
+
return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
|
|
131
|
+
},
|
|
132
|
+
adapterProps() {
|
|
133
|
+
const superProps = superRenderProps();
|
|
134
|
+
return {
|
|
135
|
+
...superProps,
|
|
136
|
+
rpcDriverName: self.rpcDriverName,
|
|
137
|
+
displayModel: self,
|
|
138
|
+
config: self.rendererConfig,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
trackMenuItems() {
|
|
142
|
+
return [
|
|
143
|
+
...superTrackMenuItems(),
|
|
144
|
+
{
|
|
145
|
+
label: 'Show sidebar labels',
|
|
146
|
+
icon: VisibilityIcon,
|
|
147
|
+
type: 'checkbox',
|
|
148
|
+
checked: self.showSidebarLabelsSetting,
|
|
149
|
+
onClick: () => {
|
|
150
|
+
self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: 'Row height',
|
|
155
|
+
icon: HeightIcon,
|
|
156
|
+
subMenu: [
|
|
157
|
+
{
|
|
158
|
+
label: 'Manually set row height',
|
|
159
|
+
disabled: self.autoHeight,
|
|
160
|
+
onClick: () => {
|
|
161
|
+
getSession(self).queueDialog(handleClose => [
|
|
162
|
+
SetRowHeightDialog,
|
|
163
|
+
{
|
|
164
|
+
model: self,
|
|
165
|
+
handleClose,
|
|
166
|
+
},
|
|
167
|
+
]);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: 'Auto-adjust to display height',
|
|
172
|
+
type: 'checkbox',
|
|
173
|
+
checked: self.autoHeight,
|
|
174
|
+
onClick: () => {
|
|
175
|
+
self.setAutoHeight(!self.autoHeight);
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: 'Rendering mode',
|
|
182
|
+
icon: SplitscreenIcon,
|
|
183
|
+
subMenu: [
|
|
184
|
+
{
|
|
185
|
+
label: 'Allele count',
|
|
186
|
+
type: 'radio',
|
|
187
|
+
checked: self.renderingMode === 'alleleCount',
|
|
188
|
+
onClick: () => {
|
|
189
|
+
self.setPhasedMode('alleleCount');
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: 'Phased' +
|
|
194
|
+
(!self.hasPhased
|
|
195
|
+
? ' (disabled, no phased variants found)'
|
|
196
|
+
: ''),
|
|
197
|
+
disabled: !self.hasPhased,
|
|
198
|
+
checked: self.renderingMode === 'phased',
|
|
199
|
+
type: 'radio',
|
|
200
|
+
onClick: () => {
|
|
201
|
+
self.setPhasedMode('phased');
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'Filter by',
|
|
208
|
+
icon: FilterListIcon,
|
|
209
|
+
subMenu: [
|
|
210
|
+
{
|
|
211
|
+
label: 'Minor allele frequency',
|
|
212
|
+
onClick: () => {
|
|
213
|
+
getSession(self).queueDialog(handleClose => [
|
|
214
|
+
MAFFilterDialog,
|
|
215
|
+
{
|
|
216
|
+
model: self,
|
|
217
|
+
handleClose,
|
|
218
|
+
},
|
|
219
|
+
]);
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: 'Cluster by genotype',
|
|
226
|
+
onClick: () => {
|
|
227
|
+
getSession(self).queueDialog(handleClose => [
|
|
228
|
+
ClusterDialog,
|
|
229
|
+
{
|
|
230
|
+
model: self,
|
|
231
|
+
handleClose,
|
|
232
|
+
},
|
|
233
|
+
]);
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: 'Edit group colors/arrangement...',
|
|
238
|
+
onClick: () => {
|
|
239
|
+
getSession(self).queueDialog(handleClose => [
|
|
240
|
+
SetColorDialog,
|
|
241
|
+
{
|
|
242
|
+
model: self,
|
|
243
|
+
handleClose,
|
|
244
|
+
},
|
|
245
|
+
]);
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
})
|
|
252
|
+
.views(self => ({
|
|
253
|
+
get canDisplayLabels() {
|
|
254
|
+
return self.rowHeight > 8 && self.showSidebarLabelsSetting;
|
|
255
|
+
},
|
|
256
|
+
get totalHeight() {
|
|
257
|
+
var _a;
|
|
258
|
+
return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
|
|
259
|
+
},
|
|
260
|
+
}))
|
|
261
|
+
.views(self => ({
|
|
262
|
+
renderProps() {
|
|
263
|
+
const superProps = self.adapterProps();
|
|
264
|
+
return {
|
|
265
|
+
...superProps,
|
|
266
|
+
notReady: superProps.notReady || !self.sources || !self.featuresVolatile,
|
|
267
|
+
height: self.height,
|
|
268
|
+
totalHeight: self.totalHeight,
|
|
269
|
+
renderingMode: self.renderingMode,
|
|
270
|
+
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
271
|
+
rowHeight: self.rowHeight,
|
|
272
|
+
sources: self.sources,
|
|
273
|
+
scrollTop: self.scrollTop,
|
|
274
|
+
};
|
|
275
|
+
},
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
3
|
+
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
4
|
+
export default function MultiVariantTooltip({ source, }) {
|
|
5
|
+
return (_jsxs(BaseTooltip, { children: [source.color ? (_jsx("div", { style: {
|
|
6
|
+
width: 10,
|
|
7
|
+
height: 10,
|
|
8
|
+
backgroundColor: source.color,
|
|
9
|
+
} })) : null, _jsx(SanitizedHTML, { html: Object.entries(source)
|
|
10
|
+
.filter(([key, val]) => key !== 'color' &&
|
|
11
|
+
key !== 'name' &&
|
|
12
|
+
key !== 'HP' &&
|
|
13
|
+
key !== 'id' &&
|
|
14
|
+
val !== undefined)
|
|
15
|
+
.map(([key, value]) => `${key}:${value}`)
|
|
16
|
+
.join('<br/>') })] }));
|
|
17
|
+
}
|
package/esm/shared/RectBg.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
declare const RectBg: (props: {
|
|
1
|
+
declare const RectBg: ({ x, y, width, height, color, }: {
|
|
3
2
|
x: number;
|
|
4
3
|
y: number;
|
|
5
4
|
width: number;
|
|
6
5
|
height: number;
|
|
7
6
|
color?: string;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default RectBg;
|
package/esm/shared/RectBg.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getFillProps } from '@jbrowse/core/util';
|
|
3
|
-
const RectBg = (
|
|
4
|
-
|
|
5
|
-
return React.createElement("rect", { pointerEvents: "auto", ...props, ...getFillProps(color) });
|
|
3
|
+
const RectBg = ({ x, y, width, height, color = 'rgba(255,255,255,0.5)', }) => {
|
|
4
|
+
return (_jsx("rect", { pointerEvents: "auto", x: x, y: y, width: width, height: height, ...getFillProps(color) }));
|
|
6
5
|
};
|
|
7
6
|
export default RectBg;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type Source } from '../util';
|
|
1
|
+
import type { Source } from '../types';
|
|
3
2
|
export default function RowPalettizer({ setCurrLayout, currLayout, }: {
|
|
4
3
|
currLayout: Source[];
|
|
5
4
|
setCurrLayout: (arg: Source[]) => void;
|
|
6
|
-
}):
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|