@jbrowse/plugin-variants 3.0.0 → 3.0.2
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/MultiLinearVariantDisplay/components/Crosshair.js +1 -1
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +1 -1
- package/dist/MultiLinearVariantDisplay/model.d.ts +7 -7
- package/dist/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +7 -7
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +5 -5
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +6 -3
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +58 -68
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +2 -1
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +1 -1
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.d.ts +22 -0
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.js +52 -0
- package/dist/MultiLinearVariantRenderer/index.js +1 -1
- package/dist/MultiLinearVariantRenderer/makeImageData.js +13 -21
- package/dist/MultiLinearVariantRenderer/types.d.ts +1 -1
- package/dist/MultiVariantBaseRenderer.d.ts +5 -5
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +4 -4
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +1 -1
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +9 -9
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +6 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +13 -13
- package/dist/getMultiVariantFeaturesAutorun.d.ts +1 -1
- package/dist/getMultiVariantSourcesAutorun.d.ts +1 -1
- package/dist/shared/MultiVariantBaseModel.d.ts +1 -1
- package/dist/shared/MultiVariantBaseModel.js +4 -4
- package/dist/shared/{SourcesGridHeader.js → components/SourcesGridHeader.js} +5 -5
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.js +5 -0
- package/dist/shared/drawAlleleCount.d.ts +1 -0
- package/dist/shared/{multiVariantColor.js → drawAlleleCount.js} +7 -14
- package/dist/shared/drawPhased.d.ts +1 -0
- package/dist/shared/drawPhased.js +21 -0
- package/dist/shared/findSecondLargestNumber.d.ts +0 -0
- package/dist/shared/findSecondLargestNumber.js +1 -0
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +11 -0
- package/dist/shared/minorAlleleFrequencyUtils.js +62 -0
- package/dist/shared/sourcesGridUtils.d.ts +10 -0
- package/dist/shared/sourcesGridUtils.js +32 -0
- package/dist/shared/util.d.ts +3 -10
- package/dist/shared/util.js +23 -26
- package/dist/util.d.ts +0 -8
- package/dist/util.js +0 -85
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +1 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +7 -7
- package/esm/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +7 -7
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +5 -5
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +6 -3
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +56 -66
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -1
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +1 -1
- package/esm/MultiLinearVariantRenderer/components/MultiVariantRendering.d.ts +22 -0
- package/esm/MultiLinearVariantRenderer/components/MultiVariantRendering.js +47 -0
- package/esm/MultiLinearVariantRenderer/index.js +1 -1
- package/esm/MultiLinearVariantRenderer/makeImageData.js +6 -14
- package/esm/MultiLinearVariantRenderer/types.d.ts +1 -1
- package/esm/MultiVariantBaseRenderer.d.ts +5 -5
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +3 -3
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +1 -1
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +8 -8
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +6 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +13 -13
- package/esm/getMultiVariantFeaturesAutorun.d.ts +1 -1
- package/esm/getMultiVariantSourcesAutorun.d.ts +1 -1
- package/esm/shared/MultiVariantBaseModel.d.ts +1 -1
- package/esm/shared/MultiVariantBaseModel.js +4 -4
- package/esm/shared/{SourcesGridHeader.js → components/SourcesGridHeader.js} +1 -1
- package/esm/shared/constants.d.ts +2 -0
- package/esm/shared/constants.js +2 -0
- package/esm/shared/drawAlleleCount.d.ts +1 -0
- package/esm/shared/{multiVariantColor.js → drawAlleleCount.js} +6 -11
- package/esm/shared/drawPhased.d.ts +1 -0
- package/esm/shared/drawPhased.js +18 -0
- package/esm/shared/findSecondLargestNumber.d.ts +0 -0
- package/esm/shared/findSecondLargestNumber.js +1 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +11 -0
- package/esm/shared/minorAlleleFrequencyUtils.js +56 -0
- package/esm/shared/sourcesGridUtils.d.ts +10 -0
- package/esm/shared/sourcesGridUtils.js +28 -0
- package/esm/shared/util.d.ts +3 -10
- package/esm/shared/util.js +20 -24
- package/esm/util.d.ts +0 -8
- package/esm/util.js +1 -77
- package/package.json +11 -11
- package/dist/shared/multiVariantColor.d.ts +0 -3
- package/esm/shared/multiVariantColor.d.ts +0 -3
- /package/dist/shared/{BulkEditPanel.d.ts → components/BulkEditPanel.d.ts} +0 -0
- /package/dist/shared/{BulkEditPanel.js → components/BulkEditPanel.js} +0 -0
- /package/dist/shared/{ClusterDialog.d.ts → components/ClusterDialog.d.ts} +0 -0
- /package/dist/shared/{ClusterDialog.js → components/ClusterDialog.js} +0 -0
- /package/dist/shared/{ColorLegend.d.ts → components/ColorLegend.d.ts} +0 -0
- /package/dist/shared/{ColorLegend.js → components/ColorLegend.js} +0 -0
- /package/dist/shared/{HelpfulTips.d.ts → components/HelpfulTips.d.ts} +0 -0
- /package/dist/shared/{HelpfulTips.js → components/HelpfulTips.js} +0 -0
- /package/dist/shared/{LegendBar.d.ts → components/LegendBar.d.ts} +0 -0
- /package/dist/shared/{LegendBar.js → components/LegendBar.js} +0 -0
- /package/dist/shared/{MAFFilterDialog.d.ts → components/MAFFilterDialog.d.ts} +0 -0
- /package/dist/shared/{MAFFilterDialog.js → components/MAFFilterDialog.js} +0 -0
- /package/dist/shared/{MultiVariantTooltip.d.ts → components/MultiVariantTooltip.d.ts} +0 -0
- /package/dist/shared/{MultiVariantTooltip.js → components/MultiVariantTooltip.js} +0 -0
- /package/dist/shared/{RectBg.d.ts → components/RectBg.d.ts} +0 -0
- /package/dist/shared/{RectBg.js → components/RectBg.js} +0 -0
- /package/dist/shared/{RowPalettizer.d.ts → components/RowPalettizer.d.ts} +0 -0
- /package/dist/shared/{RowPalettizer.js → components/RowPalettizer.js} +0 -0
- /package/dist/shared/{SetColorDialog.d.ts → components/SetColorDialog.d.ts} +0 -0
- /package/dist/shared/{SetColorDialog.js → components/SetColorDialog.js} +0 -0
- /package/dist/shared/{SetMinMaxDialog.d.ts → components/SetMinMaxDialog.d.ts} +0 -0
- /package/dist/shared/{SetMinMaxDialog.js → components/SetMinMaxDialog.js} +0 -0
- /package/dist/shared/{SetRowHeightDialog.d.ts → components/SetRowHeightDialog.d.ts} +0 -0
- /package/dist/shared/{SetRowHeightDialog.js → components/SetRowHeightDialog.js} +0 -0
- /package/dist/shared/{SourcesDataGrid.d.ts → components/SourcesDataGrid.d.ts} +0 -0
- /package/dist/shared/{SourcesDataGrid.js → components/SourcesDataGrid.js} +0 -0
- /package/dist/shared/{SourcesGrid.d.ts → components/SourcesGrid.d.ts} +0 -0
- /package/dist/shared/{SourcesGrid.js → components/SourcesGrid.js} +0 -0
- /package/dist/shared/{SourcesGridHeader.d.ts → components/SourcesGridHeader.d.ts} +0 -0
- /package/dist/{types.d.ts → shared/types.d.ts} +0 -0
- /package/dist/{types.js → shared/types.js} +0 -0
- /package/esm/shared/{BulkEditPanel.d.ts → components/BulkEditPanel.d.ts} +0 -0
- /package/esm/shared/{BulkEditPanel.js → components/BulkEditPanel.js} +0 -0
- /package/esm/shared/{ClusterDialog.d.ts → components/ClusterDialog.d.ts} +0 -0
- /package/esm/shared/{ClusterDialog.js → components/ClusterDialog.js} +0 -0
- /package/esm/shared/{ColorLegend.d.ts → components/ColorLegend.d.ts} +0 -0
- /package/esm/shared/{ColorLegend.js → components/ColorLegend.js} +0 -0
- /package/esm/shared/{HelpfulTips.d.ts → components/HelpfulTips.d.ts} +0 -0
- /package/esm/shared/{HelpfulTips.js → components/HelpfulTips.js} +0 -0
- /package/esm/shared/{LegendBar.d.ts → components/LegendBar.d.ts} +0 -0
- /package/esm/shared/{LegendBar.js → components/LegendBar.js} +0 -0
- /package/esm/shared/{MAFFilterDialog.d.ts → components/MAFFilterDialog.d.ts} +0 -0
- /package/esm/shared/{MAFFilterDialog.js → components/MAFFilterDialog.js} +0 -0
- /package/esm/shared/{MultiVariantTooltip.d.ts → components/MultiVariantTooltip.d.ts} +0 -0
- /package/esm/shared/{MultiVariantTooltip.js → components/MultiVariantTooltip.js} +0 -0
- /package/esm/shared/{RectBg.d.ts → components/RectBg.d.ts} +0 -0
- /package/esm/shared/{RectBg.js → components/RectBg.js} +0 -0
- /package/esm/shared/{RowPalettizer.d.ts → components/RowPalettizer.d.ts} +0 -0
- /package/esm/shared/{RowPalettizer.js → components/RowPalettizer.js} +0 -0
- /package/esm/shared/{SetColorDialog.d.ts → components/SetColorDialog.d.ts} +0 -0
- /package/esm/shared/{SetColorDialog.js → components/SetColorDialog.js} +0 -0
- /package/esm/shared/{SetMinMaxDialog.d.ts → components/SetMinMaxDialog.d.ts} +0 -0
- /package/esm/shared/{SetMinMaxDialog.js → components/SetMinMaxDialog.js} +0 -0
- /package/esm/shared/{SetRowHeightDialog.d.ts → components/SetRowHeightDialog.d.ts} +0 -0
- /package/esm/shared/{SetRowHeightDialog.js → components/SetRowHeightDialog.js} +0 -0
- /package/esm/shared/{SourcesDataGrid.d.ts → components/SourcesDataGrid.d.ts} +0 -0
- /package/esm/shared/{SourcesDataGrid.js → components/SourcesDataGrid.js} +0 -0
- /package/esm/shared/{SourcesGrid.d.ts → components/SourcesGrid.d.ts} +0 -0
- /package/esm/shared/{SourcesGrid.js → components/SourcesGrid.js} +0 -0
- /package/esm/shared/{SourcesGridHeader.d.ts → components/SourcesGridHeader.d.ts} +0 -0
- /package/esm/{types.d.ts → shared/types.d.ts} +0 -0
- /package/esm/{types.js → shared/types.js} +0 -0
|
@@ -82,7 +82,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
82
82
|
configuration: AnyConfigurationSchemaType;
|
|
83
83
|
} & {
|
|
84
84
|
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
85
|
-
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../types").Source[], import("../types").Source[], import("../types").Source[]>, [undefined]>;
|
|
85
|
+
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../shared/types").Source[], import("../shared/types").Source[], import("../shared/types").Source[]>, [undefined]>;
|
|
86
86
|
configuration: AnyConfigurationSchemaType;
|
|
87
87
|
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
88
88
|
showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -236,27 +236,27 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
236
236
|
} & {
|
|
237
237
|
sourcesLoadingStopToken: string | undefined;
|
|
238
238
|
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
239
|
-
sourcesVolatile: import("../types").Source[] | undefined;
|
|
239
|
+
sourcesVolatile: import("../shared/types").Source[] | undefined;
|
|
240
240
|
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
241
241
|
hasPhased: boolean;
|
|
242
|
-
sampleInfo: undefined | Record<string, import("../types").SampleInfo>;
|
|
242
|
+
sampleInfo: undefined | Record<string, import("../shared/types").SampleInfo>;
|
|
243
243
|
hoveredGenotype: string | undefined;
|
|
244
244
|
} & {
|
|
245
245
|
setRowHeight(arg: number): void;
|
|
246
246
|
setHoveredGenotype(arg: string): void;
|
|
247
247
|
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
248
|
-
setLayout(layout: import("../types").Source[]): void;
|
|
248
|
+
setLayout(layout: import("../shared/types").Source[]): void;
|
|
249
249
|
clearLayout(): void;
|
|
250
250
|
setSourcesLoading(str: string): void;
|
|
251
|
-
setSources(sources: import("../types").Source[]): void;
|
|
251
|
+
setSources(sources: import("../shared/types").Source[]): void;
|
|
252
252
|
setMafFilter(arg: number): void;
|
|
253
253
|
setShowSidebarLabels(arg: boolean): void;
|
|
254
254
|
setPhasedMode(arg: string): void;
|
|
255
255
|
setAutoHeight(arg: boolean): void;
|
|
256
256
|
setHasPhased(arg: boolean): void;
|
|
257
|
-
setSampleInfo(arg: Record<string, import("../types").SampleInfo>): void;
|
|
257
|
+
setSampleInfo(arg: Record<string, import("../shared/types").SampleInfo>): void;
|
|
258
258
|
} & {
|
|
259
|
-
readonly preSources: import("../types").Source[] | undefined;
|
|
259
|
+
readonly preSources: import("../shared/types").Source[] | undefined;
|
|
260
260
|
readonly sources: {
|
|
261
261
|
label: string;
|
|
262
262
|
id: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { when } from 'mobx';
|
|
4
|
-
import LegendBar from '../shared/LegendBar';
|
|
5
4
|
import LinesConnectingMatrixToGenomicPosition from './components/LinesConnectingMatrixToGenomicPosition';
|
|
5
|
+
import LegendBar from '../shared/components/LegendBar';
|
|
6
6
|
export async function renderSvg(model, opts, superRenderSvg) {
|
|
7
7
|
await when(() => !!model.regionCannotBeRenderedText);
|
|
8
8
|
const { offsetPx } = getContainingView(model);
|
|
@@ -33,12 +33,12 @@ export default class LinearVariantMatrixRenderer extends BoxRendererType {
|
|
|
33
33
|
...results,
|
|
34
34
|
...res,
|
|
35
35
|
features: new Map(),
|
|
36
|
-
simplifiedFeatures: mafs.map((
|
|
37
|
-
id:
|
|
36
|
+
simplifiedFeatures: mafs.map(({ feature }) => new SimpleFeature({
|
|
37
|
+
id: feature.id(),
|
|
38
38
|
data: {
|
|
39
|
-
start:
|
|
40
|
-
end:
|
|
41
|
-
refName:
|
|
39
|
+
start: feature.get('start'),
|
|
40
|
+
end: feature.get('end'),
|
|
41
|
+
refName: feature.get('refName'),
|
|
42
42
|
},
|
|
43
43
|
})),
|
|
44
44
|
height,
|
|
@@ -4,7 +4,10 @@ export declare function makeImageData({ ctx, canvasWidth, canvasHeight, renderAr
|
|
|
4
4
|
canvasWidth: number;
|
|
5
5
|
canvasHeight: number;
|
|
6
6
|
renderArgs: RenderArgsDeserializedWithFeaturesAndLayout;
|
|
7
|
-
}): {
|
|
8
|
-
mafs:
|
|
7
|
+
}): Promise<{
|
|
8
|
+
mafs: {
|
|
9
|
+
feature: import("@jbrowse/core/util").Feature;
|
|
10
|
+
mostFrequentAlt: string;
|
|
11
|
+
}[];
|
|
9
12
|
arr: string[][];
|
|
10
|
-
}
|
|
13
|
+
}>;
|
|
@@ -1,50 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
8
|
-
}
|
|
9
|
-
function drawPhased(alleles, ctx, x, y, w, h, HP, PS) {
|
|
10
|
-
ctx.fillStyle =
|
|
11
|
-
PS !== undefined
|
|
12
|
-
? getColorPhasedWithPhaseSet(alleles, HP, PS)
|
|
13
|
-
: getColorPhased(alleles, HP);
|
|
14
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
15
|
-
}
|
|
16
|
-
export function makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }) {
|
|
17
|
-
var _a, _b;
|
|
1
|
+
import { updateStatus } from '@jbrowse/core/util';
|
|
2
|
+
import { f2 } from '../shared/constants';
|
|
3
|
+
import { drawColorAlleleCount } from '../shared/drawAlleleCount';
|
|
4
|
+
import { drawPhased } from '../shared/drawPhased';
|
|
5
|
+
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../shared/minorAlleleFrequencyUtils';
|
|
6
|
+
export async function makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }) {
|
|
18
7
|
const { renderingMode: renderingMode, minorAlleleFrequencyFilter, sources, features, } = renderArgs;
|
|
19
8
|
const { statusCallback = () => { } } = renderArgs;
|
|
20
|
-
statusCallback('Drawing variant matrix');
|
|
21
9
|
const h = canvasHeight / sources.length;
|
|
22
10
|
const mafs = getFeaturesThatPassMinorAlleleFrequencyFilter(features.values(), minorAlleleFrequencyFilter);
|
|
23
11
|
const arr = [];
|
|
24
12
|
const m = mafs.length;
|
|
25
13
|
const w = canvasWidth / m;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
14
|
+
await updateStatus('Drawing variant matrix', statusCallback, () => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
for (let i = 0; i < m; i++) {
|
|
17
|
+
const arr2 = [];
|
|
18
|
+
const { feature, mostFrequentAlt } = mafs[i];
|
|
19
|
+
const hasPhaseSet = feature.get('format').includes('PS');
|
|
20
|
+
if (hasPhaseSet) {
|
|
21
|
+
const samp = feature.get('samples');
|
|
22
|
+
const x = (i / mafs.length) * canvasWidth;
|
|
23
|
+
const sln = sources.length;
|
|
24
|
+
for (let j = 0; j < sln; j++) {
|
|
25
|
+
const y = (j / sln) * canvasHeight;
|
|
26
|
+
const { name, HP } = sources[j];
|
|
27
|
+
const s = samp[name];
|
|
28
|
+
if (s) {
|
|
29
|
+
const genotype = (_a = s.GT) === null || _a === void 0 ? void 0 : _a[0];
|
|
30
|
+
if (genotype) {
|
|
31
|
+
arr2.push(genotype);
|
|
32
|
+
const isPhased = genotype.includes('|');
|
|
33
|
+
if (renderingMode === 'phased') {
|
|
34
|
+
if (isPhased) {
|
|
35
|
+
const PS = (_b = s.PS) === null || _b === void 0 ? void 0 : _b[0];
|
|
36
|
+
const alleles = genotype.split('|');
|
|
37
|
+
drawPhased(alleles, ctx, x, y, w, h, HP, PS);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
ctx.fillStyle = 'black';
|
|
41
|
+
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const alleles = genotype.split(/[/|]/);
|
|
46
|
+
drawColorAlleleCount(alleles, ctx, x, y, w, h, mostFrequentAlt);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const samp = feature.get('genotypes');
|
|
54
|
+
const x = (i / mafs.length) * canvasWidth;
|
|
55
|
+
const sln = sources.length;
|
|
56
|
+
for (let j = 0; j < sln; j++) {
|
|
57
|
+
const y = (j / sln) * canvasHeight;
|
|
58
|
+
const { name, HP } = sources[j];
|
|
59
|
+
const genotype = samp[name];
|
|
40
60
|
if (genotype) {
|
|
41
61
|
arr2.push(genotype);
|
|
42
62
|
const isPhased = genotype.includes('|');
|
|
43
63
|
if (renderingMode === 'phased') {
|
|
44
64
|
if (isPhased) {
|
|
45
|
-
const PS = (_b = s.PS) === null || _b === void 0 ? void 0 : _b[0];
|
|
46
65
|
const alleles = genotype.split('|');
|
|
47
|
-
drawPhased(alleles, ctx, x, y, w, h, HP
|
|
66
|
+
drawPhased(alleles, ctx, x, y, w, h, HP);
|
|
48
67
|
}
|
|
49
68
|
else {
|
|
50
69
|
ctx.fillStyle = 'black';
|
|
@@ -53,43 +72,14 @@ export function makeImageData({ ctx, canvasWidth, canvasHeight, renderArgs, }) {
|
|
|
53
72
|
}
|
|
54
73
|
else {
|
|
55
74
|
const alleles = genotype.split(/[/|]/);
|
|
56
|
-
drawColorAlleleCount(alleles, ctx, x, y, w, h);
|
|
75
|
+
drawColorAlleleCount(alleles, ctx, x, y, w, h, mostFrequentAlt);
|
|
57
76
|
}
|
|
58
77
|
}
|
|
59
78
|
}
|
|
60
79
|
}
|
|
80
|
+
arr.push(arr2);
|
|
61
81
|
}
|
|
62
|
-
|
|
63
|
-
const samp = f.get('genotypes');
|
|
64
|
-
const x = (i / mafs.length) * canvasWidth;
|
|
65
|
-
const sln = sources.length;
|
|
66
|
-
const arr2 = [];
|
|
67
|
-
for (let j = 0; j < sln; j++) {
|
|
68
|
-
const y = (j / sln) * canvasHeight;
|
|
69
|
-
const { name, HP } = sources[j];
|
|
70
|
-
const genotype = samp[name];
|
|
71
|
-
if (genotype) {
|
|
72
|
-
arr2.push(genotype);
|
|
73
|
-
const isPhased = genotype.includes('|');
|
|
74
|
-
if (renderingMode === 'phased') {
|
|
75
|
-
if (isPhased) {
|
|
76
|
-
const alleles = genotype.split('|');
|
|
77
|
-
drawPhased(alleles, ctx, x, y, w, h, HP);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
ctx.fillStyle = 'black';
|
|
81
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
const alleles = genotype.split(/[/|]/);
|
|
86
|
-
drawColorAlleleCount(alleles, ctx, x, y, w, h);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
arr.push(arr2);
|
|
92
|
-
}
|
|
82
|
+
});
|
|
93
83
|
return {
|
|
94
84
|
mafs,
|
|
95
85
|
arr,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Source } from '../types';
|
|
1
|
+
import type { Source } from '../shared/types';
|
|
2
2
|
import type { RenderArgsDeserialized as BoxRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
export interface RenderArgsDeserialized extends BoxRenderArgsDeserialized {
|
|
@@ -12,4 +12,5 @@ export interface RenderArgsDeserializedWithFeaturesAndLayout extends RenderArgsD
|
|
|
12
12
|
sources: Source[];
|
|
13
13
|
features: Map<string, Feature>;
|
|
14
14
|
renderingMode: string;
|
|
15
|
+
statusCallback?: (arg: string) => void;
|
|
15
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import RBush from 'rbush';
|
|
2
|
-
import type { Source } from '../types';
|
|
2
|
+
import type { Source } from '../shared/types';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import type { Region } from '@jbrowse/core/util/types';
|
|
5
5
|
declare const MultiVariantRendering: (props: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import RBush from 'rbush';
|
|
2
|
+
import type { Source } from '../../shared/types';
|
|
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
|
+
rbush: RBush<{
|
|
15
|
+
genotype: string;
|
|
16
|
+
}>;
|
|
17
|
+
displayModel: any;
|
|
18
|
+
onMouseLeave?: (event: React.MouseEvent) => void;
|
|
19
|
+
onMouseMove?: (event: React.MouseEvent, arg?: Feature) => void;
|
|
20
|
+
onFeatureClick?: (event: React.MouseEvent, arg?: Feature) => void;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default MultiVariantRendering;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useRef } from 'react';
|
|
3
|
+
import { PrerenderedCanvas } from '@jbrowse/core/ui';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import RBush from 'rbush';
|
|
6
|
+
const MultiVariantRendering = observer(function (props) {
|
|
7
|
+
const { totalHeight, scrollTop } = props;
|
|
8
|
+
const { rbush, displayModel } = props;
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
const rbush2 = useMemo(() => new RBush().fromJSON(rbush), [rbush]);
|
|
11
|
+
function getFeatureUnderMouse(eventClientX, eventClientY) {
|
|
12
|
+
var _a;
|
|
13
|
+
let offsetX = 0;
|
|
14
|
+
let offsetY = 0;
|
|
15
|
+
if (ref.current) {
|
|
16
|
+
const r = ref.current.getBoundingClientRect();
|
|
17
|
+
offsetX = eventClientX - r.left;
|
|
18
|
+
offsetY = eventClientY - r.top;
|
|
19
|
+
}
|
|
20
|
+
const ret = rbush2.search({
|
|
21
|
+
minX: offsetX,
|
|
22
|
+
maxX: offsetX + 3,
|
|
23
|
+
minY: offsetY,
|
|
24
|
+
maxY: offsetY + 3,
|
|
25
|
+
});
|
|
26
|
+
return (_a = ret[0]) === null || _a === void 0 ? void 0 : _a.genotype;
|
|
27
|
+
}
|
|
28
|
+
return (_jsx("div", { ref: ref, onMouseMove: e => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = displayModel.setHoveredGenotype) === null || _a === void 0 ? void 0 : _a.call(displayModel, getFeatureUnderMouse(e.clientX, e.clientY));
|
|
31
|
+
}, onMouseLeave: () => {
|
|
32
|
+
var _a;
|
|
33
|
+
(_a = displayModel.setHoveredGenotype) === null || _a === void 0 ? void 0 : _a.call(displayModel, undefined);
|
|
34
|
+
}, onMouseOut: () => {
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = displayModel.setHoveredGenotype) === null || _a === void 0 ? void 0 : _a.call(displayModel, undefined);
|
|
37
|
+
}, style: {
|
|
38
|
+
overflow: 'visible',
|
|
39
|
+
position: 'relative',
|
|
40
|
+
height: totalHeight,
|
|
41
|
+
}, children: _jsx(PrerenderedCanvas, { ...props, style: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
left: 0,
|
|
44
|
+
top: scrollTop,
|
|
45
|
+
} }) }));
|
|
46
|
+
});
|
|
47
|
+
export default MultiVariantRendering;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MultiVariantRenderer from './MultiVariantRenderer';
|
|
2
|
-
import ReactComponent from './MultiVariantRendering';
|
|
2
|
+
import ReactComponent from './components/MultiVariantRendering';
|
|
3
3
|
import configSchema from './configSchema';
|
|
4
4
|
export default function MultiVariantRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => {
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { featureSpanPx } from '@jbrowse/core/util';
|
|
2
2
|
import RBush from 'rbush';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function drawColorAlleleCount(alleles, ctx, x, y, w, h) {
|
|
8
|
-
ctx.fillStyle = getColorAlleleCount(alleles);
|
|
9
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
10
|
-
}
|
|
11
|
-
function drawPhased(alleles, ctx, x, y, w, h, HP) {
|
|
12
|
-
ctx.fillStyle = getColorPhased(alleles, HP);
|
|
13
|
-
ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
|
|
14
|
-
}
|
|
3
|
+
import { f2 } from '../shared/constants';
|
|
4
|
+
import { drawColorAlleleCount } from '../shared/drawAlleleCount';
|
|
5
|
+
import { drawPhased } from '../shared/drawPhased';
|
|
6
|
+
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../shared/minorAlleleFrequencyUtils';
|
|
15
7
|
export async function makeImageData(ctx, props) {
|
|
16
8
|
const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, features, regions, bpPerPx, renderingMode, } = props;
|
|
17
9
|
const region = regions[0];
|
|
18
10
|
const mafs = getFeaturesThatPassMinorAlleleFrequencyFilter(features.values(), minorAlleleFrequencyFilter);
|
|
19
11
|
const rbush = new RBush();
|
|
20
|
-
for (const feature of mafs) {
|
|
12
|
+
for (const { mostFrequentAlt, feature } of mafs) {
|
|
21
13
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
22
14
|
const w = Math.max(Math.round(rightPx - leftPx), 2);
|
|
23
15
|
const samp = feature.get('genotypes');
|
|
@@ -49,7 +41,7 @@ export async function makeImageData(ctx, props) {
|
|
|
49
41
|
}
|
|
50
42
|
else {
|
|
51
43
|
const alleles = genotype.split(/[/|]/);
|
|
52
|
-
drawColorAlleleCount(alleles, ctx, x, y, w, h);
|
|
44
|
+
drawColorAlleleCount(alleles, ctx, x, y, w, h, mostFrequentAlt);
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
47
|
y += rowHeight;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Source } from '../types';
|
|
1
|
+
import type { Source } from '../shared/types';
|
|
2
2
|
import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import type { ThemeOptions } from '@mui/material';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
2
|
-
import type { Source } from './types';
|
|
3
|
-
import type { RenderArgsDeserialized
|
|
2
|
+
import type { Source } from './shared/types';
|
|
3
|
+
import type { RenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
|
|
4
4
|
import type { Feature } from '@jbrowse/core/util';
|
|
5
5
|
import type { ThemeOptions } from '@mui/material';
|
|
6
|
-
export interface
|
|
6
|
+
export interface RenderArgs extends RenderArgsDeserialized {
|
|
7
7
|
bpPerPx: number;
|
|
8
8
|
height: number;
|
|
9
9
|
highResolutionScaling: number;
|
|
10
10
|
themeOptions: ThemeOptions;
|
|
11
11
|
}
|
|
12
|
-
export interface RenderArgsDeserializedWithFeatures extends
|
|
12
|
+
export interface RenderArgsDeserializedWithFeatures extends RenderArgs {
|
|
13
13
|
features: Map<string, Feature>;
|
|
14
14
|
}
|
|
15
15
|
export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
|
|
@@ -17,7 +17,7 @@ export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithF
|
|
|
17
17
|
}
|
|
18
18
|
export default abstract class MultiVariantBaseRenderer extends FeatureRendererType {
|
|
19
19
|
supportsSVG: boolean;
|
|
20
|
-
render(renderProps:
|
|
20
|
+
render(renderProps: RenderArgs): Promise<{
|
|
21
21
|
features: Map<string, Feature>;
|
|
22
22
|
height: number;
|
|
23
23
|
width: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
2
2
|
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
3
3
|
import { firstValueFrom, toArray } from 'rxjs';
|
|
4
|
-
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../
|
|
4
|
+
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../shared/minorAlleleFrequencyUtils';
|
|
5
5
|
export class MultiVariantGetGenotypeMatrix extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -26,8 +26,8 @@ export class MultiVariantGetGenotypeMatrix extends RpcMethodTypeWithFiltersAndRe
|
|
|
26
26
|
}
|
|
27
27
|
const genotypeFactorMap = Object.fromEntries([...genotypeFactor].map((type, idx) => [type, idx]));
|
|
28
28
|
const rows = {};
|
|
29
|
-
for (const
|
|
30
|
-
const samp =
|
|
29
|
+
for (const { feature } of mafs) {
|
|
30
|
+
const samp = feature.get('genotypes');
|
|
31
31
|
for (const { name } of sources) {
|
|
32
32
|
if (!rows[name]) {
|
|
33
33
|
rows[name] = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
2
|
-
import type { SampleInfo } from '../types';
|
|
2
|
+
import type { SampleInfo } from '../shared/types';
|
|
3
3
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
4
|
import type { Region } from '@jbrowse/core/util';
|
|
5
5
|
export declare class MultiVariantGetSimplifiedFeatures extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
2
2
|
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
3
3
|
import { firstValueFrom, toArray } from 'rxjs';
|
|
4
|
-
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../
|
|
4
|
+
import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../shared/minorAlleleFrequencyUtils';
|
|
5
5
|
export class MultiVariantGetSimplifiedFeatures extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -19,8 +19,8 @@ export class MultiVariantGetSimplifiedFeatures extends RpcMethodTypeWithFiltersA
|
|
|
19
19
|
const features = getFeaturesThatPassMinorAlleleFrequencyFilter(feats, minorAlleleFrequencyFilter);
|
|
20
20
|
const sampleInfo = {};
|
|
21
21
|
let hasPhased = false;
|
|
22
|
-
for (const
|
|
23
|
-
const samp =
|
|
22
|
+
for (const { feature } of features) {
|
|
23
|
+
const samp = feature.get('genotypes');
|
|
24
24
|
for (const [key, val] of Object.entries(samp)) {
|
|
25
25
|
const isPhased = val.includes('|');
|
|
26
26
|
hasPhased || (hasPhased = isPhased);
|
|
@@ -33,12 +33,12 @@ export class MultiVariantGetSimplifiedFeatures extends RpcMethodTypeWithFiltersA
|
|
|
33
33
|
return {
|
|
34
34
|
hasPhased,
|
|
35
35
|
sampleInfo,
|
|
36
|
-
features: features.map(
|
|
37
|
-
id:
|
|
36
|
+
features: features.map(({ feature }) => ({
|
|
37
|
+
id: feature.id(),
|
|
38
38
|
data: {
|
|
39
|
-
start:
|
|
40
|
-
end:
|
|
41
|
-
refName:
|
|
39
|
+
start: feature.get('start'),
|
|
40
|
+
end: feature.get('end'),
|
|
41
|
+
refName: feature.get('refName'),
|
|
42
42
|
},
|
|
43
43
|
})),
|
|
44
44
|
};
|
|
@@ -7,13 +7,16 @@ import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
|
7
7
|
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
8
8
|
private configured?;
|
|
9
9
|
private configurePre;
|
|
10
|
-
protected
|
|
10
|
+
protected configurePre2(): Promise<{
|
|
11
|
+
vcf: TabixIndexedFile;
|
|
12
|
+
parser: VcfParser;
|
|
13
|
+
}>;
|
|
14
|
+
configure(opts?: BaseOptions): Promise<{
|
|
11
15
|
vcf: TabixIndexedFile;
|
|
12
16
|
parser: VcfParser;
|
|
13
17
|
}>;
|
|
14
18
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
15
|
-
getHeader(): Promise<string>;
|
|
16
|
-
getMetadata(): Promise<any>;
|
|
19
|
+
getHeader(opts?: BaseOptions): Promise<string>;
|
|
17
20
|
getFeatures(query: NoAssemblyRegion, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
18
21
|
getSources(): Promise<{
|
|
19
22
|
name: string;
|
|
@@ -6,8 +6,7 @@ import { openLocation } from '@jbrowse/core/util/io';
|
|
|
6
6
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
7
7
|
import VcfFeature from '../VcfFeature';
|
|
8
8
|
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
9
|
-
async configurePre(
|
|
10
|
-
const { statusCallback = () => { } } = opts || {};
|
|
9
|
+
async configurePre(_opts) {
|
|
11
10
|
const vcfGzLocation = this.getConf('vcfGzLocation');
|
|
12
11
|
const location = this.getConf(['index', 'location']);
|
|
13
12
|
const indexType = this.getConf(['index', 'indexType']);
|
|
@@ -23,13 +22,14 @@ export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
23
22
|
: undefined,
|
|
24
23
|
chunkCacheSize: 50 * 2 ** 20,
|
|
25
24
|
});
|
|
26
|
-
const header = await updateStatus('Downloading index', statusCallback, () => vcf.getHeader());
|
|
27
25
|
return {
|
|
28
26
|
vcf,
|
|
29
|
-
parser: new VcfParser({
|
|
27
|
+
parser: new VcfParser({
|
|
28
|
+
header: await vcf.getHeader(),
|
|
29
|
+
}),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
async
|
|
32
|
+
async configurePre2() {
|
|
33
33
|
if (!this.configured) {
|
|
34
34
|
this.configured = this.configurePre().catch((e) => {
|
|
35
35
|
this.configured = undefined;
|
|
@@ -38,23 +38,23 @@ export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
38
38
|
}
|
|
39
39
|
return this.configured;
|
|
40
40
|
}
|
|
41
|
+
async configure(opts) {
|
|
42
|
+
const { statusCallback = () => { } } = opts || {};
|
|
43
|
+
return updateStatus('Downloading index', statusCallback, () => this.configurePre2());
|
|
44
|
+
}
|
|
41
45
|
async getRefNames(opts = {}) {
|
|
42
|
-
const { vcf } = await this.configure();
|
|
46
|
+
const { vcf } = await this.configure(opts);
|
|
43
47
|
return vcf.getReferenceSequenceNames(opts);
|
|
44
48
|
}
|
|
45
|
-
async getHeader() {
|
|
46
|
-
const { vcf } = await this.configure();
|
|
49
|
+
async getHeader(opts) {
|
|
50
|
+
const { vcf } = await this.configure(opts);
|
|
47
51
|
return vcf.getHeader();
|
|
48
52
|
}
|
|
49
|
-
async getMetadata() {
|
|
50
|
-
const { parser } = await this.configure();
|
|
51
|
-
return parser.getMetadata();
|
|
52
|
-
}
|
|
53
53
|
getFeatures(query, opts = {}) {
|
|
54
54
|
return ObservableCreate(async (observer) => {
|
|
55
55
|
const { refName, start, end } = query;
|
|
56
56
|
const { statusCallback = () => { } } = opts;
|
|
57
|
-
const { vcf, parser } = await this.configure();
|
|
57
|
+
const { vcf, parser } = await this.configure(opts);
|
|
58
58
|
await updateStatus('Downloading variants', statusCallback, () => vcf.getLines(refName, start, end, {
|
|
59
59
|
lineCallback: (line, fileOffset) => {
|
|
60
60
|
observer.next(new VcfFeature({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from './types';
|
|
1
|
+
import type { SampleInfo, Source } from './shared/types';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
export declare function getMultiVariantFeaturesAutorun(self: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from '../types';
|
|
1
|
+
import type { SampleInfo, Source } from '../shared/types';
|
|
2
2
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import type { Instance } from 'mobx-state-tree';
|
|
@@ -9,10 +9,10 @@ import SplitscreenIcon from '@mui/icons-material/Splitscreen';
|
|
|
9
9
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
10
10
|
import deepEqual from 'fast-deep-equal';
|
|
11
11
|
import { types } from 'mobx-state-tree';
|
|
12
|
-
const SetColorDialog = lazy(() => import('
|
|
13
|
-
const MAFFilterDialog = lazy(() => import('
|
|
14
|
-
const ClusterDialog = lazy(() => import('
|
|
15
|
-
const SetRowHeightDialog = lazy(() => import('
|
|
12
|
+
const SetColorDialog = lazy(() => import('./components/SetColorDialog'));
|
|
13
|
+
const MAFFilterDialog = lazy(() => import('./components/MAFFilterDialog'));
|
|
14
|
+
const ClusterDialog = lazy(() => import('./components/ClusterDialog'));
|
|
15
|
+
const SetRowHeightDialog = lazy(() => import('./components/SetRowHeightDialog'));
|
|
16
16
|
export default function MultiVariantBaseModelF(configSchema) {
|
|
17
17
|
return types
|
|
18
18
|
.compose('LinearVariantMatrixDisplay', linearBareDisplayStateModelFactory(configSchema), types.model({
|
|
@@ -6,7 +6,7 @@ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
|
6
6
|
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
7
7
|
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
8
8
|
import { Button } from '@mui/material';
|
|
9
|
-
import { moveDown, moveUp } from '
|
|
9
|
+
import { moveDown, moveUp } from '../sourcesGridUtils';
|
|
10
10
|
export default function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
|
|
11
11
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
12
12
|
const [widgetColor, setWidgetColor] = useState('blue');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function drawColorAlleleCount(alleles: string[], ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, mostFrequentAlt: string): void;
|