@jbrowse/plugin-variants 2.16.1 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +8 -38
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +73 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +47 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/dist/MultiLinearVariantDisplay/model.js +235 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +18 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +42 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +81 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +218 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +21 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +106 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +12 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +60 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +43 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +13 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/Chord.js +5 -9
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +58 -0
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +4 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +9 -13
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +1 -1
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +67 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +63 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/dist/VcfAdapter/VcfAdapter.js +7 -12
- package/dist/VcfAdapter/configSchema.d.ts +0 -3
- package/dist/VcfAdapter/configSchema.js +1 -7
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +35 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +0 -12
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +10 -5
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/dist/VcfTabixAdapter/configSchema.js +2 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/configSchema.d.ts +34 -0
- package/dist/configSchema.js +44 -0
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/dist/getMultiVariantFeaturesAutorun.js +40 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +6 -0
- package/dist/shared/BulkEditPanel.js +103 -0
- package/dist/shared/ClusterDialog.d.ts +12 -0
- package/dist/shared/ClusterDialog.js +150 -0
- package/dist/shared/ColorLegend.d.ts +11 -0
- package/dist/shared/ColorLegend.js +24 -0
- package/dist/shared/DraggableDialog.d.ts +6 -0
- package/dist/shared/DraggableDialog.js +62 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +38 -0
- package/dist/shared/MAFFilterDialog.d.ts +9 -0
- package/dist/shared/MAFFilterDialog.js +56 -0
- package/dist/shared/RectBg.d.ts +9 -0
- package/dist/shared/RectBg.js +12 -0
- package/dist/shared/RowPalettizer.d.ts +6 -0
- package/dist/shared/RowPalettizer.js +38 -0
- package/dist/shared/SetColorDialog.d.ts +12 -0
- package/dist/shared/SetColorDialog.js +94 -0
- package/dist/shared/SetMinMaxDialog.d.ts +11 -0
- package/dist/shared/SetMinMaxDialog.js +56 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesGrid.d.ts +8 -0
- package/dist/shared/SourcesGrid.js +143 -0
- package/dist/shared/Tooltip.d.ts +18 -0
- package/dist/shared/Tooltip.js +38 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +53 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +8 -38
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +45 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/esm/MultiLinearVariantDisplay/model.js +206 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +12 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +53 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +189 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +100 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +54 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +18 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/Chord.js +5 -9
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +30 -0
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +5 -7
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +10 -14
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +60 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +56 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/esm/VcfAdapter/VcfAdapter.js +9 -14
- package/esm/VcfAdapter/configSchema.d.ts +0 -3
- package/esm/VcfAdapter/configSchema.js +1 -7
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +35 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +0 -12
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +11 -6
- package/esm/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/esm/VcfTabixAdapter/configSchema.js +2 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/configSchema.d.ts +34 -0
- package/esm/configSchema.js +42 -0
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +1 -1
- package/esm/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/esm/getMultiVariantFeaturesAutorun.js +37 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +6 -0
- package/esm/shared/BulkEditPanel.js +77 -0
- package/esm/shared/ClusterDialog.d.ts +12 -0
- package/esm/shared/ClusterDialog.js +121 -0
- package/esm/shared/ColorLegend.d.ts +11 -0
- package/esm/shared/ColorLegend.js +19 -0
- package/esm/shared/DraggableDialog.d.ts +6 -0
- package/esm/shared/DraggableDialog.js +34 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +32 -0
- package/esm/shared/MAFFilterDialog.d.ts +9 -0
- package/esm/shared/MAFFilterDialog.js +31 -0
- package/esm/shared/RectBg.d.ts +9 -0
- package/esm/shared/RectBg.js +7 -0
- package/esm/shared/RowPalettizer.d.ts +6 -0
- package/esm/shared/RowPalettizer.js +32 -0
- package/esm/shared/SetColorDialog.d.ts +12 -0
- package/esm/shared/SetColorDialog.js +65 -0
- package/esm/shared/SetMinMaxDialog.d.ts +11 -0
- package/esm/shared/SetMinMaxDialog.js +30 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesGrid.d.ts +8 -0
- package/esm/shared/SourcesGrid.js +115 -0
- package/esm/shared/Tooltip.d.ts +18 -0
- package/esm/shared/Tooltip.js +33 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/util.d.ts +11 -0
- package/esm/util.js +47 -0
- package/package.json +4 -4
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
export default function SharedVariantMixin(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
4
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
7
|
+
} & {
|
|
8
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
9
|
+
} & {
|
|
10
|
+
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
11
|
+
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
12
|
+
} & {
|
|
13
|
+
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
14
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
15
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
16
|
+
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
17
|
+
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
18
|
+
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
19
|
+
}, {
|
|
20
|
+
stopToken: string | undefined;
|
|
21
|
+
filled: boolean;
|
|
22
|
+
reactElement: React.ReactElement | undefined;
|
|
23
|
+
features: Map<string, Feature> | undefined;
|
|
24
|
+
layout: any;
|
|
25
|
+
status: string;
|
|
26
|
+
error: unknown;
|
|
27
|
+
message: string | undefined;
|
|
28
|
+
maxHeightReached: boolean;
|
|
29
|
+
ReactComponent: ({ model, }: {
|
|
30
|
+
model: {
|
|
31
|
+
error?: unknown;
|
|
32
|
+
reload: () => void;
|
|
33
|
+
message: React.ReactNode;
|
|
34
|
+
filled?: boolean;
|
|
35
|
+
status?: string;
|
|
36
|
+
reactElement?: React.ReactElement;
|
|
37
|
+
};
|
|
38
|
+
}) => import("react").JSX.Element | undefined;
|
|
39
|
+
renderProps: any;
|
|
40
|
+
} & {
|
|
41
|
+
doReload(): void;
|
|
42
|
+
afterAttach(): void;
|
|
43
|
+
setStatus(message: string): void;
|
|
44
|
+
setLoading(newStopToken: string): void;
|
|
45
|
+
setMessage(messageText: string): void;
|
|
46
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
47
|
+
setError(error: unknown): void;
|
|
48
|
+
reload(): void;
|
|
49
|
+
beforeDestroy(): void;
|
|
50
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
51
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
52
|
+
maxFeatureScreenDensity: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
defaultValue: number;
|
|
56
|
+
};
|
|
57
|
+
fetchSizeLimit: {
|
|
58
|
+
type: string;
|
|
59
|
+
defaultValue: number;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
height: {
|
|
63
|
+
type: string;
|
|
64
|
+
defaultValue: number;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
mouseover: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
defaultValue: string;
|
|
71
|
+
contextVariable: string[];
|
|
72
|
+
};
|
|
73
|
+
jexlFilters: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
defaultValue: never[];
|
|
77
|
+
};
|
|
78
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
79
|
+
} & {
|
|
80
|
+
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
81
|
+
summaryScoreMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
82
|
+
rendererTypeNameState: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
83
|
+
configuration: AnyConfigurationSchemaType;
|
|
84
|
+
}, {
|
|
85
|
+
rendererTypeName: string;
|
|
86
|
+
error: unknown;
|
|
87
|
+
message: string | undefined;
|
|
88
|
+
} & {
|
|
89
|
+
readonly RenderingComponent: React.FC<{
|
|
90
|
+
model: {
|
|
91
|
+
id: string;
|
|
92
|
+
type: string;
|
|
93
|
+
rpcDriverName: string | undefined;
|
|
94
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
95
|
+
rendererTypeName: string;
|
|
96
|
+
error: unknown;
|
|
97
|
+
message: string | undefined;
|
|
98
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
99
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
100
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
101
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
102
|
+
}, {
|
|
103
|
+
rendererTypeName: string;
|
|
104
|
+
error: unknown;
|
|
105
|
+
message: string | undefined;
|
|
106
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
107
|
+
onHorizontalScroll?: () => void;
|
|
108
|
+
blockState?: Record<string, any>;
|
|
109
|
+
}>;
|
|
110
|
+
readonly DisplayBlurb: React.FC<{
|
|
111
|
+
model: {
|
|
112
|
+
id: string;
|
|
113
|
+
type: string;
|
|
114
|
+
rpcDriverName: string | undefined;
|
|
115
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
116
|
+
rendererTypeName: string;
|
|
117
|
+
error: unknown;
|
|
118
|
+
message: string | undefined;
|
|
119
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
120
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
121
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
122
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
123
|
+
}, {
|
|
124
|
+
rendererTypeName: string;
|
|
125
|
+
error: unknown;
|
|
126
|
+
message: string | undefined;
|
|
127
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
128
|
+
}> | null;
|
|
129
|
+
readonly adapterConfig: any;
|
|
130
|
+
readonly parentTrack: any;
|
|
131
|
+
renderProps(): any;
|
|
132
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
133
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
134
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
135
|
+
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
136
|
+
regionCannotBeRendered(): null;
|
|
137
|
+
} & {
|
|
138
|
+
setMessage(arg?: string): void;
|
|
139
|
+
setError(error?: unknown): void;
|
|
140
|
+
setRpcDriverName(rpcDriverName: string): void;
|
|
141
|
+
reload(): void;
|
|
142
|
+
} & {
|
|
143
|
+
scrollTop: number;
|
|
144
|
+
} & {
|
|
145
|
+
readonly height: number;
|
|
146
|
+
} & {
|
|
147
|
+
setScrollTop(scrollTop: number): void;
|
|
148
|
+
setHeight(displayHeight: number): number;
|
|
149
|
+
resizeHeight(distance: number): number;
|
|
150
|
+
} & {
|
|
151
|
+
featureDensityStatsP: undefined | Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
152
|
+
featureDensityStats: undefined | import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats;
|
|
153
|
+
currStatsBpPerPx: number;
|
|
154
|
+
} & {
|
|
155
|
+
readonly currentBytesRequested: number;
|
|
156
|
+
readonly currentFeatureScreenDensity: number;
|
|
157
|
+
readonly maxFeatureScreenDensity: any;
|
|
158
|
+
readonly featureDensityStatsReady: boolean;
|
|
159
|
+
readonly maxAllowableBytes: number;
|
|
160
|
+
} & {
|
|
161
|
+
afterAttach(): void;
|
|
162
|
+
} & {
|
|
163
|
+
setCurrStatsBpPerPx(n: number): void;
|
|
164
|
+
setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
|
|
165
|
+
getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
166
|
+
setFeatureDensityStatsP(arg: any): void;
|
|
167
|
+
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
|
|
168
|
+
clearFeatureDensityStats(): void;
|
|
169
|
+
} & {
|
|
170
|
+
readonly regionTooLarge: boolean;
|
|
171
|
+
readonly regionTooLargeReason: string;
|
|
172
|
+
} & {
|
|
173
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
174
|
+
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
175
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
176
|
+
} & {
|
|
177
|
+
featureIdUnderMouse: undefined | string;
|
|
178
|
+
contextMenuFeature: undefined | Feature;
|
|
179
|
+
} & {
|
|
180
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
181
|
+
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
182
|
+
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
183
|
+
} & {
|
|
184
|
+
readonly renderDelay: number;
|
|
185
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
186
|
+
readonly selectedFeatureId: string | undefined;
|
|
187
|
+
} & {
|
|
188
|
+
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
189
|
+
readonly featureUnderMouse: Feature | undefined;
|
|
190
|
+
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
191
|
+
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
192
|
+
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
193
|
+
} & {
|
|
194
|
+
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
195
|
+
deleteBlock(key: string): void;
|
|
196
|
+
selectFeature(feature: Feature): void;
|
|
197
|
+
navToFeature(feature: Feature): void;
|
|
198
|
+
clearFeatureSelection(): void;
|
|
199
|
+
setFeatureIdUnderMouse(feature?: string): void;
|
|
200
|
+
setContextMenuFeature(feature?: Feature): void;
|
|
201
|
+
} & {
|
|
202
|
+
reload(): Promise<void>;
|
|
203
|
+
} & {
|
|
204
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
205
|
+
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
206
|
+
renderProps(): any;
|
|
207
|
+
} & {
|
|
208
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
209
|
+
afterAttach(): void;
|
|
210
|
+
} & {
|
|
211
|
+
message: undefined | string;
|
|
212
|
+
} & {
|
|
213
|
+
selectFeature(feature: Feature): void;
|
|
214
|
+
setRendererType(val: string): void;
|
|
215
|
+
} & {
|
|
216
|
+
readonly adapterTypeName: any;
|
|
217
|
+
readonly rendererTypeNameSimple: any;
|
|
218
|
+
readonly filters: undefined;
|
|
219
|
+
} & {
|
|
220
|
+
readonly adapterCapabilities: string[];
|
|
221
|
+
} & {
|
|
222
|
+
reload(): Promise<void>;
|
|
223
|
+
}, {
|
|
224
|
+
type: string;
|
|
225
|
+
} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
226
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
227
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
228
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
229
|
+
} & {
|
|
230
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
231
|
+
} & {
|
|
232
|
+
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
233
|
+
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
234
|
+
} & {
|
|
235
|
+
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
236
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
237
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
238
|
+
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
239
|
+
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
240
|
+
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
241
|
+
}, {
|
|
242
|
+
stopToken: string | undefined;
|
|
243
|
+
filled: boolean;
|
|
244
|
+
reactElement: React.ReactElement | undefined;
|
|
245
|
+
features: Map<string, Feature> | undefined;
|
|
246
|
+
layout: any;
|
|
247
|
+
status: string;
|
|
248
|
+
error: unknown;
|
|
249
|
+
message: string | undefined;
|
|
250
|
+
maxHeightReached: boolean;
|
|
251
|
+
ReactComponent: ({ model, }: {
|
|
252
|
+
model: {
|
|
253
|
+
error?: unknown;
|
|
254
|
+
reload: () => void;
|
|
255
|
+
message: React.ReactNode;
|
|
256
|
+
filled?: boolean;
|
|
257
|
+
status?: string;
|
|
258
|
+
reactElement?: React.ReactElement;
|
|
259
|
+
};
|
|
260
|
+
}) => import("react").JSX.Element | undefined;
|
|
261
|
+
renderProps: any;
|
|
262
|
+
} & {
|
|
263
|
+
doReload(): void;
|
|
264
|
+
afterAttach(): void;
|
|
265
|
+
setStatus(message: string): void;
|
|
266
|
+
setLoading(newStopToken: string): void;
|
|
267
|
+
setMessage(messageText: string): void;
|
|
268
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
269
|
+
setError(error: unknown): void;
|
|
270
|
+
reload(): void;
|
|
271
|
+
beforeDestroy(): void;
|
|
272
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
273
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
274
|
+
maxFeatureScreenDensity: {
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
defaultValue: number;
|
|
278
|
+
};
|
|
279
|
+
fetchSizeLimit: {
|
|
280
|
+
type: string;
|
|
281
|
+
defaultValue: number;
|
|
282
|
+
description: string;
|
|
283
|
+
};
|
|
284
|
+
height: {
|
|
285
|
+
type: string;
|
|
286
|
+
defaultValue: number;
|
|
287
|
+
description: string;
|
|
288
|
+
};
|
|
289
|
+
mouseover: {
|
|
290
|
+
type: string;
|
|
291
|
+
description: string;
|
|
292
|
+
defaultValue: string;
|
|
293
|
+
contextVariable: string[];
|
|
294
|
+
};
|
|
295
|
+
jexlFilters: {
|
|
296
|
+
type: string;
|
|
297
|
+
description: string;
|
|
298
|
+
defaultValue: never[];
|
|
299
|
+
};
|
|
300
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
301
|
+
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
302
|
+
type: string;
|
|
303
|
+
id: string;
|
|
304
|
+
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
305
|
+
rpcDriverName: string | undefined;
|
|
306
|
+
heightPreConfig: number | undefined;
|
|
307
|
+
userBpPerPxLimit: number | undefined;
|
|
308
|
+
userByteSizeLimit: number | undefined;
|
|
309
|
+
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
2
|
+
import { getEnv, getSession, isSelectionContainer } from '@jbrowse/core/util';
|
|
3
|
+
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
+
import { types } from 'mobx-state-tree';
|
|
5
|
+
export default function SharedVariantMixin(configSchema) {
|
|
6
|
+
return types
|
|
7
|
+
.compose(BaseLinearDisplay, types.model({
|
|
8
|
+
selectedRendering: types.optional(types.string, ''),
|
|
9
|
+
summaryScoreMode: types.maybe(types.string),
|
|
10
|
+
rendererTypeNameState: types.maybe(types.string),
|
|
11
|
+
configuration: ConfigurationReference(configSchema),
|
|
12
|
+
}))
|
|
13
|
+
.volatile(() => ({
|
|
14
|
+
message: undefined,
|
|
15
|
+
}))
|
|
16
|
+
.actions(self => ({
|
|
17
|
+
selectFeature(feature) {
|
|
18
|
+
const session = getSession(self);
|
|
19
|
+
if (isSelectionContainer(session)) {
|
|
20
|
+
session.setSelection(feature);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setRendererType(val) {
|
|
24
|
+
self.rendererTypeNameState = val;
|
|
25
|
+
},
|
|
26
|
+
}))
|
|
27
|
+
.views(self => ({
|
|
28
|
+
get adapterTypeName() {
|
|
29
|
+
return self.adapterConfig.type;
|
|
30
|
+
},
|
|
31
|
+
get rendererTypeNameSimple() {
|
|
32
|
+
var _a;
|
|
33
|
+
return (_a = self.rendererTypeNameState) !== null && _a !== void 0 ? _a : getConf(self, 'defaultRendering');
|
|
34
|
+
},
|
|
35
|
+
get filters() {
|
|
36
|
+
return undefined;
|
|
37
|
+
},
|
|
38
|
+
}))
|
|
39
|
+
.views(self => ({
|
|
40
|
+
get adapterCapabilities() {
|
|
41
|
+
const type = self.adapterTypeName;
|
|
42
|
+
const { pluginManager } = getEnv(self);
|
|
43
|
+
return pluginManager.getAdapterType(type).adapterCapabilities;
|
|
44
|
+
},
|
|
45
|
+
}))
|
|
46
|
+
.actions(self => {
|
|
47
|
+
const { reload: superReload } = self;
|
|
48
|
+
return {
|
|
49
|
+
async reload() {
|
|
50
|
+
self.setError();
|
|
51
|
+
superReload();
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
3
|
+
import ColorPicker, { ColorPopover } from '@jbrowse/core/ui/ColorPicker';
|
|
4
|
+
import { getStr, measureGridWidth } from '@jbrowse/core/util';
|
|
5
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
6
|
+
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
7
|
+
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
8
|
+
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
9
|
+
import { Button } from '@mui/material';
|
|
10
|
+
import { DataGrid } from '@mui/x-data-grid';
|
|
11
|
+
import { makeStyles } from 'tss-react/mui';
|
|
12
|
+
import { moveDown, moveUp } from './util';
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
cell: {
|
|
15
|
+
whiteSpace: 'nowrap',
|
|
16
|
+
overflow: 'hidden',
|
|
17
|
+
textOverflow: 'ellipsis',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
function SourcesGrid({ rows, onChange, showTips, }) {
|
|
21
|
+
const { classes } = useStyles();
|
|
22
|
+
const [selected, setSelected] = useState([]);
|
|
23
|
+
const { name: _name, color: _color, baseUri: _baseUri, ...rest } = rows[0];
|
|
24
|
+
const [currSort, setCurrSort] = useState({
|
|
25
|
+
idx: 0,
|
|
26
|
+
field: null,
|
|
27
|
+
});
|
|
28
|
+
return (React.createElement("div", null,
|
|
29
|
+
React.createElement(GridHeader, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }),
|
|
30
|
+
React.createElement("div", { style: { height: 400, width: '100%' } },
|
|
31
|
+
React.createElement(DataGrid, { getRowId: row => row.name, checkboxSelection: true, disableRowSelectionOnClick: true, onRowSelectionModelChange: arg => {
|
|
32
|
+
setSelected(arg);
|
|
33
|
+
}, rows: rows, rowHeight: 25, columnHeaderHeight: 33, columns: [
|
|
34
|
+
{
|
|
35
|
+
field: 'color',
|
|
36
|
+
headerName: 'Color',
|
|
37
|
+
renderCell: params => {
|
|
38
|
+
const { value, id } = params;
|
|
39
|
+
return (React.createElement(ColorPicker, { color: value || 'blue', onChange: c => {
|
|
40
|
+
const elt = rows.find(f => f.name === id);
|
|
41
|
+
if (elt) {
|
|
42
|
+
elt.color = c;
|
|
43
|
+
}
|
|
44
|
+
onChange([...rows]);
|
|
45
|
+
} }));
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
field: 'name',
|
|
50
|
+
headerName: 'Name',
|
|
51
|
+
width: measureGridWidth(rows.map(r => r.name)),
|
|
52
|
+
},
|
|
53
|
+
...Object.keys(rest).map(val => ({
|
|
54
|
+
field: val,
|
|
55
|
+
renderCell: ({ value }) => (React.createElement("div", { className: classes.cell },
|
|
56
|
+
React.createElement(SanitizedHTML, { html: getStr(value) }))),
|
|
57
|
+
width: measureGridWidth(rows.map(r => `${r[val]}`)),
|
|
58
|
+
})),
|
|
59
|
+
], sortModel: [], onSortModelChange: args => {
|
|
60
|
+
const sort = args[0];
|
|
61
|
+
const idx = (currSort.idx + 1) % 2;
|
|
62
|
+
const field = sort.field || currSort.field;
|
|
63
|
+
setCurrSort({ idx, field });
|
|
64
|
+
onChange(field
|
|
65
|
+
? [...rows].sort((a, b) => {
|
|
66
|
+
const aa = getStr(a[field]);
|
|
67
|
+
const bb = getStr(b[field]);
|
|
68
|
+
return idx === 1
|
|
69
|
+
? aa.localeCompare(bb)
|
|
70
|
+
: bb.localeCompare(aa);
|
|
71
|
+
})
|
|
72
|
+
: rows);
|
|
73
|
+
} }))));
|
|
74
|
+
}
|
|
75
|
+
function GridHeader({ selected, onChange, rows, showTips, }) {
|
|
76
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
77
|
+
const [widgetColor, setWidgetColor] = useState('blue');
|
|
78
|
+
return (React.createElement(React.Fragment, null,
|
|
79
|
+
React.createElement(Button, { disabled: !selected.length, onClick: event => {
|
|
80
|
+
setAnchorEl(event.currentTarget);
|
|
81
|
+
} }, "Change color of selected items"),
|
|
82
|
+
React.createElement(Button, { onClick: () => {
|
|
83
|
+
onChange(moveUp([...rows], selected));
|
|
84
|
+
}, disabled: !selected.length },
|
|
85
|
+
React.createElement(KeyboardArrowUpIcon, null),
|
|
86
|
+
showTips ? 'Move selected items up' : null),
|
|
87
|
+
React.createElement(Button, { onClick: () => {
|
|
88
|
+
onChange(moveDown([...rows], selected));
|
|
89
|
+
}, disabled: !selected.length },
|
|
90
|
+
React.createElement(KeyboardArrowDownIcon, null),
|
|
91
|
+
showTips ? 'Move selected items down' : null),
|
|
92
|
+
React.createElement(Button, { onClick: () => {
|
|
93
|
+
onChange(moveUp([...rows], selected, rows.length));
|
|
94
|
+
}, disabled: !selected.length },
|
|
95
|
+
React.createElement(KeyboardDoubleArrowUpIcon, null),
|
|
96
|
+
showTips ? 'Move selected items to top' : null),
|
|
97
|
+
React.createElement(Button, { onClick: () => {
|
|
98
|
+
onChange(moveDown([...rows], selected, rows.length));
|
|
99
|
+
}, disabled: !selected.length },
|
|
100
|
+
React.createElement(KeyboardDoubleArrowDownIcon, null),
|
|
101
|
+
showTips ? 'Move selected items to bottom' : null),
|
|
102
|
+
React.createElement(ColorPopover, { anchorEl: anchorEl, color: widgetColor, onChange: c => {
|
|
103
|
+
setWidgetColor(c);
|
|
104
|
+
selected.forEach(id => {
|
|
105
|
+
const elt = rows.find(f => f.name === id);
|
|
106
|
+
if (elt) {
|
|
107
|
+
elt.color = c;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
onChange([...rows]);
|
|
111
|
+
}, onClose: () => {
|
|
112
|
+
setAnchorEl(null);
|
|
113
|
+
} })));
|
|
114
|
+
}
|
|
115
|
+
export default SourcesGrid;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TooltipContentsComponent } from '../Tooltip';
|
|
3
|
+
import type { Source } from '../util';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
+
type Coord = [number, number];
|
|
6
|
+
declare const VariantTooltip: (props: {
|
|
7
|
+
model: {
|
|
8
|
+
featureUnderMouse: Feature;
|
|
9
|
+
sources: Source[];
|
|
10
|
+
rowHeight: number;
|
|
11
|
+
};
|
|
12
|
+
height: number;
|
|
13
|
+
offsetMouseCoord: Coord;
|
|
14
|
+
clientMouseCoord: Coord;
|
|
15
|
+
clientRect?: DOMRect;
|
|
16
|
+
TooltipContents?: TooltipContentsComponent;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default VariantTooltip;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
import Tooltip from '../Tooltip';
|
|
4
|
+
const en = (n) => n.toLocaleString('en-US');
|
|
5
|
+
const TooltipContents = React.forwardRef(function TooltipContents2({ model, feature }, ref) {
|
|
6
|
+
const start = feature.get('start');
|
|
7
|
+
const end = feature.get('end');
|
|
8
|
+
const refName = feature.get('refName');
|
|
9
|
+
const coord = start === end ? en(start) : `${en(start)}..${en(end)}`;
|
|
10
|
+
const sources = feature.get('sources');
|
|
11
|
+
const source = feature.get('source');
|
|
12
|
+
const obj = Object.fromEntries(model.sources.map(ent => [ent.name, ent]));
|
|
13
|
+
return (React.createElement("div", { ref: ref },
|
|
14
|
+
[refName, coord].filter(f => !!f).join(':'),
|
|
15
|
+
React.createElement("br", null),
|
|
16
|
+
sources ? (React.createElement("table", null,
|
|
17
|
+
React.createElement("thead", null,
|
|
18
|
+
React.createElement("tr", null,
|
|
19
|
+
React.createElement("th", null, "color"),
|
|
20
|
+
React.createElement("th", null, "source"),
|
|
21
|
+
React.createElement("th", null, "score"))),
|
|
22
|
+
React.createElement("tbody", null, Object.entries(sources).map(([source, data]) => {
|
|
23
|
+
var _a;
|
|
24
|
+
return (React.createElement("tr", { key: source },
|
|
25
|
+
React.createElement("td", { style: { background: (_a = obj[source]) === null || _a === void 0 ? void 0 : _a.color } }, " "),
|
|
26
|
+
React.createElement("td", null, source),
|
|
27
|
+
React.createElement("td", null, data.score)));
|
|
28
|
+
})))) : (React.createElement("span", null, source))));
|
|
29
|
+
});
|
|
30
|
+
const VariantTooltip = observer((props) => {
|
|
31
|
+
return React.createElement(Tooltip, { useClientY: true, TooltipContents: TooltipContents, ...props });
|
|
32
|
+
});
|
|
33
|
+
export default VariantTooltip;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function moveUp(arr, sel, by = 1) {
|
|
2
|
+
const idxs = sel
|
|
3
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
4
|
+
.sort((a, b) => a - b);
|
|
5
|
+
let lastIdx = 0;
|
|
6
|
+
for (const old of idxs) {
|
|
7
|
+
const idx = Math.max(lastIdx, old - by);
|
|
8
|
+
if (idx >= lastIdx) {
|
|
9
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
10
|
+
}
|
|
11
|
+
lastIdx = lastIdx + 1;
|
|
12
|
+
}
|
|
13
|
+
return arr;
|
|
14
|
+
}
|
|
15
|
+
export function moveDown(arr, sel, by = 1) {
|
|
16
|
+
const idxs = sel
|
|
17
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
18
|
+
.sort((a, b) => b - a);
|
|
19
|
+
let lastIdx = arr.length - 1;
|
|
20
|
+
for (const old of idxs) {
|
|
21
|
+
const idx = Math.min(lastIdx, old + by);
|
|
22
|
+
if (idx <= lastIdx) {
|
|
23
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
24
|
+
}
|
|
25
|
+
lastIdx = lastIdx - 1;
|
|
26
|
+
}
|
|
27
|
+
return arr;
|
|
28
|
+
}
|
package/esm/util.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Source {
|
|
2
|
+
baseUri?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function fillRectCtx(x: number, y: number, width: number, height: number, ctx: CanvasRenderingContext2D, color?: string): void;
|
|
9
|
+
export declare function getCol(gt: string): "#ccc" | "teal" | "blue" | "#CBC3E3";
|
|
10
|
+
export declare const colorPaletteDefault: string[];
|
|
11
|
+
export declare function randomColor(str: string): string;
|
package/esm/util.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export function fillRectCtx(x, y, width, height, ctx, color) {
|
|
2
|
+
if (width < 0) {
|
|
3
|
+
x += width;
|
|
4
|
+
width = -width;
|
|
5
|
+
}
|
|
6
|
+
if (height < 0) {
|
|
7
|
+
y += height;
|
|
8
|
+
height = -height;
|
|
9
|
+
}
|
|
10
|
+
if (color) {
|
|
11
|
+
ctx.fillStyle = color;
|
|
12
|
+
}
|
|
13
|
+
ctx.fillRect(x, y, width, height);
|
|
14
|
+
}
|
|
15
|
+
export function getCol(gt) {
|
|
16
|
+
if (gt === '0|0' || gt === '0/0') {
|
|
17
|
+
return '#ccc';
|
|
18
|
+
}
|
|
19
|
+
else if (gt === '1|0' || gt === '0|1' || gt === '0/1' || gt === '1/0') {
|
|
20
|
+
return 'teal';
|
|
21
|
+
}
|
|
22
|
+
else if (gt === '1|1' || gt === '1/1') {
|
|
23
|
+
return 'blue';
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return '#CBC3E3';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export const colorPaletteDefault = [
|
|
30
|
+
'red',
|
|
31
|
+
'blue',
|
|
32
|
+
'green',
|
|
33
|
+
'orange',
|
|
34
|
+
'purple',
|
|
35
|
+
'cyan',
|
|
36
|
+
'pink',
|
|
37
|
+
'darkblue',
|
|
38
|
+
'darkred',
|
|
39
|
+
'pink',
|
|
40
|
+
];
|
|
41
|
+
export function randomColor(str) {
|
|
42
|
+
let sum = 0;
|
|
43
|
+
for (let i = 0; i < str.length; i++) {
|
|
44
|
+
sum += str.charCodeAt(i);
|
|
45
|
+
}
|
|
46
|
+
return `hsl(${sum * 10}, 20%, 50%)`;
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@flatten-js/interval-tree": "^1.0.15",
|
|
40
40
|
"@gmod/bgzf-filehandle": "^1.4.3",
|
|
41
41
|
"@gmod/tabix": "^1.5.6",
|
|
42
|
-
"@gmod/vcf": "^
|
|
43
|
-
"@jbrowse/sv-core": "^2.
|
|
42
|
+
"@gmod/vcf": "^6.0.0",
|
|
43
|
+
"@jbrowse/sv-core": "^2.18.0",
|
|
44
44
|
"@mui/icons-material": "^6.0.0",
|
|
45
45
|
"@mui/x-data-grid": "^7.0.0",
|
|
46
46
|
"generic-filehandle": "^3.0.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"distModule": "esm/index.js",
|
|
64
64
|
"srcModule": "src/index.ts",
|
|
65
65
|
"module": "esm/index.js",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
|
|
67
67
|
}
|