@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,14 @@
|
|
|
1
|
+
import { PrerenderedCanvas } from '@jbrowse/core/ui';
|
|
2
|
+
import LinearVariantMatrixRenderer from './LinearVariantMatrixRenderer';
|
|
3
|
+
import configSchema from './configSchema';
|
|
4
|
+
export default function LinearVariantMatrixRendererF(pluginManager) {
|
|
5
|
+
pluginManager.addRendererType(() => {
|
|
6
|
+
return new LinearVariantMatrixRenderer({
|
|
7
|
+
name: 'LinearVariantMatrixRenderer',
|
|
8
|
+
displayName: 'Linear variant matrix renderer',
|
|
9
|
+
ReactComponent: PrerenderedCanvas,
|
|
10
|
+
configSchema,
|
|
11
|
+
pluginManager,
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
+
import type { Source } from '../util';
|
|
3
|
+
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
+
import type { ThemeOptions } from '@mui/material';
|
|
6
|
+
export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
|
|
7
|
+
bpPerPx: number;
|
|
8
|
+
height: number;
|
|
9
|
+
highResolutionScaling: number;
|
|
10
|
+
themeOptions: ThemeOptions;
|
|
11
|
+
}
|
|
12
|
+
export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
|
|
13
|
+
features: Map<string, Feature>;
|
|
14
|
+
}
|
|
15
|
+
export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
|
|
16
|
+
sources: Source[];
|
|
17
|
+
rowHeight: number;
|
|
18
|
+
scrollTop: number;
|
|
19
|
+
}
|
|
20
|
+
export default class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
21
|
+
supportsSVG: boolean;
|
|
22
|
+
render(renderProps: MultiRenderArgsDeserialized): Promise<{
|
|
23
|
+
features: Map<string, Feature>;
|
|
24
|
+
height: number;
|
|
25
|
+
width: number;
|
|
26
|
+
containsNoTransferables: boolean;
|
|
27
|
+
canvasRecordedData: any;
|
|
28
|
+
reactElement?: import("react").ReactElement;
|
|
29
|
+
html?: string;
|
|
30
|
+
} | {
|
|
31
|
+
features: Map<string, Feature>;
|
|
32
|
+
height: number;
|
|
33
|
+
width: number;
|
|
34
|
+
containsNoTransferables: boolean;
|
|
35
|
+
reactElement: React.JSX.Element;
|
|
36
|
+
html?: string;
|
|
37
|
+
} | {
|
|
38
|
+
features: Map<string, Feature>;
|
|
39
|
+
height: number;
|
|
40
|
+
width: number;
|
|
41
|
+
containsNoTransferables: boolean;
|
|
42
|
+
imageData: any;
|
|
43
|
+
reactElement?: import("react").ReactElement;
|
|
44
|
+
html?: string;
|
|
45
|
+
}>;
|
|
46
|
+
draw(ctx: CanvasRenderingContext2D, props: MultiRenderArgsDeserialized): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export type { RenderArgsSerialized, RenderResults, ResultsDeserialized, ResultsSerialized, } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
+
import { featureSpanPx, renderToAbstractCanvas } from '@jbrowse/core/util';
|
|
3
|
+
import { getCol } from '../util';
|
|
4
|
+
export default class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.supportsSVG = true;
|
|
8
|
+
}
|
|
9
|
+
async render(renderProps) {
|
|
10
|
+
const features = await this.getFeatures(renderProps);
|
|
11
|
+
const { height, regions, bpPerPx } = renderProps;
|
|
12
|
+
const region = regions[0];
|
|
13
|
+
const width = (region.end - region.start) / bpPerPx;
|
|
14
|
+
const rest = await renderToAbstractCanvas(width, height, renderProps, async (ctx) => {
|
|
15
|
+
await this.draw(ctx, {
|
|
16
|
+
...renderProps,
|
|
17
|
+
features,
|
|
18
|
+
});
|
|
19
|
+
return undefined;
|
|
20
|
+
});
|
|
21
|
+
const results = await super.render({
|
|
22
|
+
...renderProps,
|
|
23
|
+
...rest,
|
|
24
|
+
features,
|
|
25
|
+
height,
|
|
26
|
+
width,
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
...results,
|
|
30
|
+
...rest,
|
|
31
|
+
features: new Map(),
|
|
32
|
+
height,
|
|
33
|
+
width,
|
|
34
|
+
containsNoTransferables: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async draw(ctx, props) {
|
|
38
|
+
const { scrollTop, sources, rowHeight, features, regions, bpPerPx } = props;
|
|
39
|
+
const region = regions[0];
|
|
40
|
+
for (const feature of features.values()) {
|
|
41
|
+
if (feature.get('end') - feature.get('start') <= 10) {
|
|
42
|
+
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
43
|
+
const w = Math.max(Math.round(rightPx - leftPx), 2);
|
|
44
|
+
const genotypes = feature.get('genotypes');
|
|
45
|
+
let t = -scrollTop;
|
|
46
|
+
for (const { name } of sources) {
|
|
47
|
+
ctx.fillStyle = getCol(genotypes[name]);
|
|
48
|
+
ctx.fillRect(Math.floor(leftPx), t, w, Math.max(t + rowHeight, 1));
|
|
49
|
+
t += rowHeight;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Source } from '../util';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
import type { Region } from '@jbrowse/core/util/types';
|
|
5
|
+
declare const MultiVariantRendering: (props: {
|
|
6
|
+
regions: Region[];
|
|
7
|
+
features: Map<string, Feature>;
|
|
8
|
+
bpPerPx: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
sources: Source[];
|
|
12
|
+
scrollTop: number;
|
|
13
|
+
totalHeight: number;
|
|
14
|
+
onMouseLeave?: (event: React.MouseEvent) => void;
|
|
15
|
+
onMouseMove?: (event: React.MouseEvent, arg?: Feature) => void;
|
|
16
|
+
onFeatureClick?: (event: React.MouseEvent, arg?: Feature) => void;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default MultiVariantRendering;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { PrerenderedCanvas } from '@jbrowse/core/ui';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const MultiVariantRendering = observer(function (props) {
|
|
5
|
+
const { totalHeight, scrollTop } = props;
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
return (React.createElement("div", { ref: ref, style: {
|
|
8
|
+
overflow: 'visible',
|
|
9
|
+
position: 'relative',
|
|
10
|
+
height: totalHeight,
|
|
11
|
+
} },
|
|
12
|
+
React.createElement(PrerenderedCanvas, { ...props, style: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
left: 0,
|
|
15
|
+
top: scrollTop,
|
|
16
|
+
} })));
|
|
17
|
+
});
|
|
18
|
+
export default MultiVariantRendering;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
color: {
|
|
3
|
+
type: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultValue: string;
|
|
6
|
+
};
|
|
7
|
+
posColor: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
defaultValue: string;
|
|
11
|
+
};
|
|
12
|
+
negColor: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
defaultValue: string;
|
|
16
|
+
};
|
|
17
|
+
clipColor: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
};
|
|
22
|
+
bicolorPivot: {
|
|
23
|
+
type: string;
|
|
24
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
};
|
|
28
|
+
bicolorPivotValue: {
|
|
29
|
+
type: string;
|
|
30
|
+
defaultValue: number;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>, undefined>>;
|
|
34
|
+
export default configSchema;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
+
import baseWiggleRendererConfigSchema from '../configSchema';
|
|
3
|
+
function x() { }
|
|
4
|
+
const configSchema = ConfigurationSchema('MultiVariantRenderer', {}, {
|
|
5
|
+
baseConfiguration: baseWiggleRendererConfigSchema,
|
|
6
|
+
explicitlyTyped: true,
|
|
7
|
+
});
|
|
8
|
+
export default configSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import MultiVariantRenderer from './MultiVariantRenderer';
|
|
2
|
+
import ReactComponent from './MultiVariantRendering';
|
|
3
|
+
import configSchema from './configSchema';
|
|
4
|
+
export default function MultiVariantRendererF(pluginManager) {
|
|
5
|
+
pluginManager.addRendererType(() => {
|
|
6
|
+
return new MultiVariantRenderer({
|
|
7
|
+
name: 'MultiVariantRenderer',
|
|
8
|
+
ReactComponent,
|
|
9
|
+
configSchema,
|
|
10
|
+
pluginManager,
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
+
import type { Source } from './util';
|
|
3
|
+
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
|
+
import type { ThemeOptions } from '@mui/material';
|
|
6
|
+
export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
|
|
7
|
+
bpPerPx: number;
|
|
8
|
+
height: number;
|
|
9
|
+
highResolutionScaling: number;
|
|
10
|
+
themeOptions: ThemeOptions;
|
|
11
|
+
}
|
|
12
|
+
export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
|
|
13
|
+
features: Map<string, Feature>;
|
|
14
|
+
}
|
|
15
|
+
export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
|
|
16
|
+
sources: Source[];
|
|
17
|
+
}
|
|
18
|
+
export default abstract class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
19
|
+
supportsSVG: boolean;
|
|
20
|
+
render(renderProps: RenderArgsDeserialized): Promise<{
|
|
21
|
+
features: Map<string, Feature>;
|
|
22
|
+
height: number;
|
|
23
|
+
width: number;
|
|
24
|
+
containsNoTransferables: boolean;
|
|
25
|
+
canvasRecordedData: any;
|
|
26
|
+
reactElement?: import("react").ReactElement;
|
|
27
|
+
html?: string;
|
|
28
|
+
} | {
|
|
29
|
+
features: Map<string, Feature>;
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
containsNoTransferables: boolean;
|
|
33
|
+
reactElement: React.JSX.Element;
|
|
34
|
+
html?: string;
|
|
35
|
+
} | {
|
|
36
|
+
features: Map<string, Feature>;
|
|
37
|
+
height: number;
|
|
38
|
+
width: number;
|
|
39
|
+
containsNoTransferables: boolean;
|
|
40
|
+
imageData: any;
|
|
41
|
+
reactElement?: import("react").ReactElement;
|
|
42
|
+
html?: string;
|
|
43
|
+
}>;
|
|
44
|
+
abstract draw<T extends RenderArgsDeserializedWithFeatures>(ctx: CanvasRenderingContext2D, props: T): Promise<Record<string, unknown> | undefined>;
|
|
45
|
+
}
|
|
46
|
+
export type { RenderArgsSerialized, RenderResults, ResultsDeserialized, ResultsSerialized, } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
+
import { renderToAbstractCanvas } from '@jbrowse/core/util';
|
|
3
|
+
export default class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.supportsSVG = true;
|
|
7
|
+
}
|
|
8
|
+
async render(renderProps) {
|
|
9
|
+
const features = await this.getFeatures(renderProps);
|
|
10
|
+
const { height, regions, bpPerPx } = renderProps;
|
|
11
|
+
const region = regions[0];
|
|
12
|
+
const width = (region.end - region.start) / bpPerPx;
|
|
13
|
+
const rest = await renderToAbstractCanvas(width, height, renderProps, ctx => this.draw(ctx, {
|
|
14
|
+
...renderProps,
|
|
15
|
+
features,
|
|
16
|
+
}));
|
|
17
|
+
const results = await super.render({
|
|
18
|
+
...renderProps,
|
|
19
|
+
...rest,
|
|
20
|
+
features,
|
|
21
|
+
height,
|
|
22
|
+
width,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
...results,
|
|
26
|
+
...rest,
|
|
27
|
+
features: new Map(),
|
|
28
|
+
height,
|
|
29
|
+
width,
|
|
30
|
+
containsNoTransferables: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
export interface Region {
|
|
5
5
|
end: number;
|
|
6
6
|
start: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { polarToCartesian, getStrokeProps } from '@jbrowse/core/util';
|
|
4
|
-
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
5
2
|
import { parseBreakend } from '@gmod/vcf';
|
|
3
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
|
+
import { getStrokeProps, polarToCartesian } from '@jbrowse/core/util';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
6
|
function bpToRadians(block, pos) {
|
|
7
7
|
const blockStart = block.region.elided ? 0 : block.region.start;
|
|
8
8
|
const blockEnd = block.region.elided ? 0 : block.region.end;
|
|
@@ -12,7 +12,6 @@ function bpToRadians(block, pos) {
|
|
|
12
12
|
const Chord = observer(function Chord({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }) {
|
|
13
13
|
var _a, _b, _c, _d, _e;
|
|
14
14
|
const [hovered, setHovered] = useState(false);
|
|
15
|
-
// find the blocks that our start and end points belong to
|
|
16
15
|
const startBlock = blocksForRefs[feature.get('refName')];
|
|
17
16
|
if (!startBlock) {
|
|
18
17
|
return null;
|
|
@@ -31,28 +30,25 @@ const Chord = observer(function Chord({ feature, blocksForRefs, radius, config,
|
|
|
31
30
|
const bnd = alt && parseBreakend(alt);
|
|
32
31
|
const startPos = feature.get('start');
|
|
33
32
|
if (bnd) {
|
|
34
|
-
// VCF BND
|
|
35
33
|
const matePosition = bnd.MatePosition.split(':');
|
|
36
34
|
endPosition = +matePosition[1];
|
|
37
35
|
endBlock = blocksForRefs[matePosition[0]];
|
|
38
36
|
}
|
|
39
37
|
else if (alt === '<TRA>') {
|
|
40
|
-
// VCF TRA
|
|
41
38
|
const chr2 = (_c = (_b = feature.get('INFO')) === null || _b === void 0 ? void 0 : _b.CHR2) === null || _c === void 0 ? void 0 : _c[0];
|
|
42
39
|
const end = (_e = (_d = feature.get('INFO')) === null || _d === void 0 ? void 0 : _d.END) === null || _e === void 0 ? void 0 : _e[0];
|
|
43
40
|
endPosition = Number.parseInt(end, 10);
|
|
44
41
|
endBlock = blocksForRefs[chr2];
|
|
45
42
|
}
|
|
46
43
|
else if (svType === 'mate') {
|
|
47
|
-
// generic simplefeatures arcs
|
|
48
44
|
const mate = feature.get('mate');
|
|
49
45
|
const chr2 = mate.refName;
|
|
50
46
|
endPosition = mate.start;
|
|
51
47
|
endBlock = blocksForRefs[chr2];
|
|
52
48
|
}
|
|
53
49
|
else {
|
|
54
|
-
|
|
55
|
-
endPosition =
|
|
50
|
+
endBlock = startBlock;
|
|
51
|
+
endPosition = feature.get('end');
|
|
56
52
|
}
|
|
57
53
|
if (endBlock) {
|
|
58
54
|
const startRadians = bpToRadians(startBlock, startPos);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
-
import {
|
|
2
|
+
import type { AnyRegion, Block } from './Chord';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
5
5
|
declare const StructuralVariantChordsReactComponent: ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }: {
|
|
6
6
|
features: Map<string, Feature>;
|
|
7
7
|
radius: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
// locals
|
|
4
3
|
import Chord from './Chord';
|
|
5
4
|
const StructuralVariantChordsReactComponent = observer(function ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }) {
|
|
6
5
|
const { selectedFeatureId } = displayModel || {};
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
strokeColor: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
contextVariable: string[];
|
|
10
7
|
};
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
strokeColorSelected: {
|
|
15
9
|
type: string;
|
|
16
10
|
description: string;
|
|
17
11
|
defaultValue: string;
|
|
18
12
|
contextVariable: string[];
|
|
19
13
|
};
|
|
20
|
-
/**
|
|
21
|
-
* #slot
|
|
22
|
-
*/
|
|
23
14
|
strokeColorHover: {
|
|
24
15
|
type: string;
|
|
25
16
|
description: string;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config StructuralVariantChordRenderer
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const configSchema = ConfigurationSchema('StructuralVariantChordRenderer', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
strokeColor: {
|
|
11
5
|
type: 'color',
|
|
12
6
|
description: 'the line color of each arc',
|
|
13
7
|
defaultValue: 'rgba(255,133,0,0.32)',
|
|
14
8
|
contextVariable: ['feature'],
|
|
15
9
|
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
*/
|
|
19
10
|
strokeColorSelected: {
|
|
20
11
|
type: 'color',
|
|
21
12
|
description: 'the line color of an arc that has been selected',
|
|
22
13
|
defaultValue: 'black',
|
|
23
14
|
contextVariable: ['feature'],
|
|
24
15
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
16
|
strokeColorHover: {
|
|
29
17
|
type: 'color',
|
|
30
18
|
description: 'the line color of an arc that is being hovered over with the mouse',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function StructuralVariantChordRendererF(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
|
-
import configSchema from './configSchema';
|
|
3
2
|
import ReactComponent from './ReactComponent';
|
|
3
|
+
import configSchema from './configSchema';
|
|
4
4
|
export default function StructuralVariantChordRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new ChordRendererType({
|
|
6
6
|
name: 'StructuralVariantChordRenderer',
|
package/esm/Tooltip.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
type Coord = [number, number];
|
|
4
|
+
export type TooltipContentsComponent = React.ForwardRefExoticComponent<{
|
|
5
|
+
feature: Feature;
|
|
6
|
+
model: any;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const Tooltip: ({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }: {
|
|
9
|
+
model: {
|
|
10
|
+
featureUnderMouse?: Feature;
|
|
11
|
+
};
|
|
12
|
+
useClientY?: boolean;
|
|
13
|
+
height: number;
|
|
14
|
+
clientMouseCoord: Coord;
|
|
15
|
+
offsetMouseCoord: Coord;
|
|
16
|
+
clientRect?: DOMRect;
|
|
17
|
+
TooltipContents: TooltipContentsComponent;
|
|
18
|
+
}) => React.JSX.Element | null;
|
|
19
|
+
export default Tooltip;
|
package/esm/Tooltip.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
|
+
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
const useStyles = makeStyles()({
|
|
6
|
+
hoverVertical: {
|
|
7
|
+
background: '#333',
|
|
8
|
+
border: 'none',
|
|
9
|
+
width: 1,
|
|
10
|
+
height: '100%',
|
|
11
|
+
cursor: 'default',
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
pointerEvents: 'none',
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }) {
|
|
17
|
+
const { featureUnderMouse } = model;
|
|
18
|
+
const { classes } = useStyles();
|
|
19
|
+
const x = clientMouseCoord[0] + 5;
|
|
20
|
+
const y = useClientY ? clientMouseCoord[1] : (clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0;
|
|
21
|
+
return featureUnderMouse ? (React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement(Suspense, { fallback: null },
|
|
23
|
+
React.createElement(BaseTooltip, { clientPoint: { x, y } },
|
|
24
|
+
React.createElement(TooltipContents, { model: model, feature: featureUnderMouse }))),
|
|
25
|
+
React.createElement("div", { className: classes.hoverVertical, style: {
|
|
26
|
+
left: offsetMouseCoord[0],
|
|
27
|
+
height: height,
|
|
28
|
+
} }))) : null;
|
|
29
|
+
});
|
|
30
|
+
export default Tooltip;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GridColDef, GridValidRowModel } from '@mui/x-data-grid';
|
|
2
|
+
import type { GridColDef, GridValidRowModel } from '@mui/x-data-grid';
|
|
3
3
|
export default function VariantAnnotPanel({ rows, columns, }: {
|
|
4
4
|
rows: GridValidRowModel[];
|
|
5
5
|
columns: GridColDef[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { DataGrid, GridToolbar, } from '@mui/x-data-grid';
|
|
3
|
-
import { Checkbox, FormControlLabel, Typography } from '@mui/material';
|
|
4
2
|
import { measureGridWidth } from '@jbrowse/core/util';
|
|
3
|
+
import { Checkbox, FormControlLabel, Typography } from '@mui/material';
|
|
4
|
+
import { DataGrid, GridToolbar } from '@mui/x-data-grid';
|
|
5
5
|
export default function VariantAnnotPanel({ rows, columns, }) {
|
|
6
6
|
const [checked, setChecked] = useState(false);
|
|
7
7
|
const widths = columns.map(e => measureGridWidth(rows.map(r => r[e.field])));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
3
|
+
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
4
4
|
export default function BreakendPanel(props: {
|
|
5
5
|
locStrings: string[];
|
|
6
6
|
model: VariantFeatureWidgetModel;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React, { lazy } from 'react';
|
|
2
|
-
import { Link, Typography } from '@mui/material';
|
|
3
|
-
import { getEnv, getSession, SimpleFeature, } from '@jbrowse/core/util';
|
|
4
2
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
5
|
-
|
|
3
|
+
import { SimpleFeature, getEnv, getSession } from '@jbrowse/core/util';
|
|
4
|
+
import { Link, Typography } from '@mui/material';
|
|
6
5
|
const BreakendMultiLevelOptionDialog = lazy(() => import('./BreakendMultiLevelOptionDialog'));
|
|
7
6
|
const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
|
|
8
7
|
function LocStringList({ locStrings, model, }) {
|
|
9
8
|
const session = getSession(model);
|
|
10
9
|
return (React.createElement("div", null,
|
|
11
10
|
React.createElement(Typography, null, "Navigate to breakend endpoint in linear view:"),
|
|
12
|
-
React.createElement("ul", null, locStrings.map((locString, index) => (
|
|
13
|
-
/* biome-ignore lint/suspicious/noArrayIndexKey: */
|
|
14
|
-
React.createElement("li", { key: `${locString}-${index}` },
|
|
11
|
+
React.createElement("ul", null, locStrings.map((locString, index) => (React.createElement("li", { key: `${locString}-${index}` },
|
|
15
12
|
locString,
|
|
16
13
|
' ',
|
|
17
14
|
React.createElement(Link, { href: "#", onClick: event => {
|
|
@@ -32,9 +29,11 @@ function LocStringList({ locStrings, model, }) {
|
|
|
32
29
|
}
|
|
33
30
|
} }, "(LGV)")))))));
|
|
34
31
|
}
|
|
35
|
-
function LaunchBreakpointSplitViewPanel({ locStrings, model, feature,
|
|
32
|
+
function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, }) {
|
|
33
|
+
var _a, _b;
|
|
36
34
|
const session = getSession(model);
|
|
37
35
|
const simpleFeature = new SimpleFeature(feature);
|
|
36
|
+
const assemblyName = (_b = (_a = model.view) === null || _a === void 0 ? void 0 : _a.displayedRegions[0]) === null || _b === void 0 ? void 0 : _b.assemblyName;
|
|
38
37
|
return (React.createElement("div", null,
|
|
39
38
|
React.createElement(Typography, null, "Launch split view"),
|
|
40
39
|
React.createElement("ul", null, locStrings.map(locString => (React.createElement("li", { key: JSON.stringify(locString) },
|
|
@@ -46,12 +45,11 @@ function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, viewType,
|
|
|
46
45
|
BreakendMultiLevelOptionDialog,
|
|
47
46
|
{
|
|
48
47
|
handleClose,
|
|
49
|
-
|
|
48
|
+
session,
|
|
50
49
|
feature: simpleFeature,
|
|
51
|
-
|
|
52
|
-
viewType,
|
|
50
|
+
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_multilevel`,
|
|
53
51
|
view: model.view,
|
|
54
|
-
assemblyName
|
|
52
|
+
assemblyName,
|
|
55
53
|
},
|
|
56
54
|
]);
|
|
57
55
|
} }, "(top/bottom)"),
|
|
@@ -62,12 +60,11 @@ function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, viewType,
|
|
|
62
60
|
BreakendSingleLevelOptionDialog,
|
|
63
61
|
{
|
|
64
62
|
handleClose,
|
|
65
|
-
|
|
63
|
+
session,
|
|
66
64
|
feature: simpleFeature,
|
|
67
|
-
|
|
68
|
-
viewType,
|
|
65
|
+
stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_singlelevel`,
|
|
69
66
|
view: model.view,
|
|
70
|
-
assemblyName
|
|
67
|
+
assemblyName,
|
|
71
68
|
},
|
|
72
69
|
]);
|
|
73
70
|
} }, "(single row)")))))));
|
|
@@ -76,14 +73,13 @@ export default function BreakendPanel(props) {
|
|
|
76
73
|
const { model, locStrings, feature } = props;
|
|
77
74
|
const session = getSession(model);
|
|
78
75
|
const { pluginManager } = getEnv(session);
|
|
79
|
-
let
|
|
76
|
+
let hasBreakpointSplitView = false;
|
|
80
77
|
try {
|
|
81
|
-
|
|
78
|
+
hasBreakpointSplitView = !!pluginManager.getViewType('BreakpointSplitView');
|
|
82
79
|
}
|
|
83
80
|
catch (e) {
|
|
84
|
-
// ignore
|
|
85
81
|
}
|
|
86
82
|
return (React.createElement(BaseCard, { ...props, title: "Breakends" },
|
|
87
83
|
React.createElement(LocStringList, { model: model, locStrings: locStrings }),
|
|
88
|
-
|
|
84
|
+
hasBreakpointSplitView ? (React.createElement(LaunchBreakpointSplitViewPanel, { model: model, locStrings: locStrings, feature: feature })) : null));
|
|
89
85
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import AnnotGrid from './AnnotGrid';
|
|
3
2
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
3
|
+
import AnnotGrid from './AnnotGrid';
|
|
4
4
|
export default function VariantAnnotationTable({ data, fields, title, }) {
|
|
5
5
|
return data.length ? (React.createElement(BaseCard, { title: title },
|
|
6
6
|
React.createElement(AnnotGrid, { rows: data.map((elt, id) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
2
|
+
import type { VariantFeatureWidgetModel } from './stateModelFactory';
|
|
3
3
|
declare const VariantFeatureWidget: (props: {
|
|
4
4
|
model: VariantFeatureWidgetModel;
|
|
5
5
|
}) => React.JSX.Element;
|