@jbrowse/plugin-variants 4.0.4 → 4.1.3
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/esm/LDDisplay/SharedLDConfigSchema.d.ts +102 -0
- package/esm/LDDisplay/SharedLDConfigSchema.js +83 -0
- package/esm/LDDisplay/afterAttach.d.ts +2 -0
- package/esm/LDDisplay/afterAttach.js +123 -0
- package/esm/LDDisplay/components/BaseDisplayComponent.d.ts +15 -0
- package/esm/LDDisplay/components/BaseDisplayComponent.js +39 -0
- package/esm/LDDisplay/components/LDColorLegend.d.ts +15 -0
- package/esm/LDDisplay/components/LDColorLegend.js +75 -0
- package/esm/LDDisplay/components/LDDisplayComponent.d.ts +5 -0
- package/esm/LDDisplay/components/LDDisplayComponent.js +203 -0
- package/esm/LDDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +16 -0
- package/esm/LDDisplay/components/LinesConnectingMatrixToGenomicPosition.js +109 -0
- package/esm/LDDisplay/configSchema1.d.ts +115 -0
- package/esm/LDDisplay/configSchema1.js +16 -0
- package/esm/LDDisplay/configSchema2.d.ts +115 -0
- package/esm/LDDisplay/configSchema2.js +16 -0
- package/esm/LDDisplay/index.d.ts +2 -0
- package/esm/LDDisplay/index.js +35 -0
- package/esm/LDDisplay/renderSvg.d.ts +3 -0
- package/esm/LDDisplay/renderSvg.js +36 -0
- package/esm/LDDisplay/shared.d.ts +367 -0
- package/esm/LDDisplay/shared.js +467 -0
- package/esm/LDDisplay/stateModel1.d.ts +365 -0
- package/esm/LDDisplay/stateModel1.js +10 -0
- package/esm/LDDisplay/stateModel2.d.ts +365 -0
- package/esm/LDDisplay/stateModel2.js +10 -0
- package/esm/LDRenderer/LDRenderer.d.ts +30 -0
- package/esm/LDRenderer/LDRenderer.js +109 -0
- package/esm/LDRenderer/components/LDRendering.d.ts +2 -0
- package/esm/LDRenderer/components/LDRendering.js +4 -0
- package/esm/LDRenderer/configSchema.d.ts +8 -0
- package/esm/LDRenderer/configSchema.js +10 -0
- package/esm/LDRenderer/index.d.ts +2 -0
- package/esm/LDRenderer/index.js +11 -0
- package/esm/LDRenderer/makeImageData.d.ts +20 -0
- package/esm/LDRenderer/makeImageData.js +157 -0
- package/esm/LDRenderer/types.d.ts +8 -0
- package/esm/LDRenderer/types.js +1 -0
- package/esm/LDTrack/configSchema.d.ts +85 -0
- package/esm/LDTrack/configSchema.js +7 -0
- package/esm/LDTrack/index.d.ts +2 -0
- package/esm/LDTrack/index.js +14 -0
- package/esm/LinearVariantDisplay/model.d.ts +126 -42
- package/esm/LinearVariantDisplay/model.js +46 -8
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +27 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +2635 -31
- package/esm/MultiLinearVariantDisplay/model.js +6 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +10 -2
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +25 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +26 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +2636 -32
- package/esm/MultiLinearVariantMatrixDisplay/model.js +6 -0
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +2 -2
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +11 -9
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +14 -2
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +8 -11
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +2 -2
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +4 -3
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +4 -0
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +23 -2
- package/esm/MultiLinearVariantRenderer/makeImageData.js +12 -12
- package/esm/PlinkLDAdapter/PlinkLDAdapter.d.ts +25 -0
- package/esm/PlinkLDAdapter/PlinkLDAdapter.js +147 -0
- package/esm/PlinkLDAdapter/PlinkLDTabixAdapter.d.ts +24 -0
- package/esm/PlinkLDAdapter/PlinkLDTabixAdapter.js +156 -0
- package/esm/PlinkLDAdapter/configSchema.d.ts +10 -0
- package/esm/PlinkLDAdapter/configSchema.js +25 -0
- package/esm/PlinkLDAdapter/configSchemaTabix.d.ts +24 -0
- package/esm/PlinkLDAdapter/configSchemaTabix.js +46 -0
- package/esm/PlinkLDAdapter/index.d.ts +2 -0
- package/esm/PlinkLDAdapter/index.js +25 -0
- package/esm/PlinkLDAdapter/types.d.ts +29 -0
- package/esm/PlinkLDAdapter/types.js +1 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +1 -1
- package/esm/VariantRPC/MultiVariantGetFeatureDetails.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetFeatureDetails.js +15 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +4 -1
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +3 -3
- package/esm/VariantRPC/executeClusterGenotypeMatrix.js +6 -3
- package/esm/VariantRPC/getGenotypeMatrix.d.ts +2 -3
- package/esm/VariantRPC/getGenotypeMatrix.js +4 -5
- package/esm/VariantRPC/getLDMatrix.d.ts +47 -0
- package/esm/VariantRPC/getLDMatrix.js +387 -0
- package/esm/VariantRPC/getLDMatrixFromPlink.d.ts +16 -0
- package/esm/VariantRPC/getLDMatrixFromPlink.js +105 -0
- package/esm/VariantRPC/getPhasedGenotypeMatrix.d.ts +2 -3
- package/esm/VariantRPC/getPhasedGenotypeMatrix.js +4 -5
- package/esm/VariantRPC/types.d.ts +3 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.js +1 -2
- package/esm/VcfExtensionPoints/index.js +29 -3
- package/esm/VcfFeature/index.d.ts +2 -1
- package/esm/VcfFeature/index.js +4 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.js +23 -0
- package/esm/shared/MultiVariantBaseModel.d.ts +2626 -26
- package/esm/shared/MultiVariantBaseModel.js +88 -39
- package/esm/shared/SharedVariantConfigSchema.d.ts +27 -1
- package/esm/shared/SharedVariantConfigSchema.js +28 -1
- package/esm/shared/VariantFeatureCache.d.ts +27 -0
- package/esm/shared/VariantFeatureCache.js +48 -0
- package/esm/shared/VariantRendererType.d.ts +23 -0
- package/esm/shared/VariantRendererType.js +15 -0
- package/esm/shared/applyColorPalette.d.ts +9 -0
- package/esm/shared/applyColorPalette.js +23 -0
- package/esm/shared/colorByAutorun.d.ts +10 -0
- package/esm/shared/colorByAutorun.js +39 -0
- package/esm/shared/components/AddFiltersDialog.d.ts +3 -3
- package/esm/shared/components/AddFiltersDialog.js +29 -22
- package/esm/shared/components/LDFilterDialog.d.ts +13 -0
- package/esm/shared/components/LDFilterDialog.js +102 -0
- package/esm/shared/components/MAFFilterDialog.js +23 -16
- package/esm/shared/components/RecombinationTrack.d.ts +21 -0
- package/esm/shared/components/RecombinationTrack.js +54 -0
- package/esm/shared/components/RecombinationYScaleBar.d.ts +7 -0
- package/esm/shared/components/RecombinationYScaleBar.js +34 -0
- package/esm/shared/components/SetColorDialogRowPalettizer.d.ts +3 -8
- package/esm/shared/components/SetColorDialogRowPalettizer.js +2 -14
- package/esm/shared/drawAlleleCount.js +9 -0
- package/esm/shared/drawPhased.d.ts +1 -1
- package/esm/shared/drawPhased.js +31 -2
- package/esm/shared/mafFilterUtils.d.ts +5 -0
- package/esm/shared/mafFilterUtils.js +17 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +4 -2
- package/esm/shared/minorAlleleFrequencyUtils.js +261 -19
- package/esm/shared/setupMultiVariantAutoruns.js +2 -0
- package/package.json +11 -10
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import Flatbush from '@jbrowse/core/util/flatbush';
|
|
2
|
+
import { checkStopToken2 } from '@jbrowse/core/util/stopToken';
|
|
3
|
+
import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
|
|
4
|
+
import { scaleSequential } from '@mui/x-charts-vendor/d3-scale';
|
|
5
|
+
const colorSchemes = {
|
|
6
|
+
r2: interpolateRgbBasis([
|
|
7
|
+
'rgb(255, 255, 255)',
|
|
8
|
+
'rgb(255, 224, 224)',
|
|
9
|
+
'rgb(255, 192, 192)',
|
|
10
|
+
'rgb(255, 128, 128)',
|
|
11
|
+
'rgb(255, 64, 64)',
|
|
12
|
+
'rgb(255, 0, 0)',
|
|
13
|
+
'rgb(208, 0, 0)',
|
|
14
|
+
'rgb(160, 0, 0)',
|
|
15
|
+
]),
|
|
16
|
+
dprime: interpolateRgbBasis([
|
|
17
|
+
'rgb(255, 255, 255)',
|
|
18
|
+
'rgb(224, 224, 255)',
|
|
19
|
+
'rgb(192, 192, 255)',
|
|
20
|
+
'rgb(128, 128, 255)',
|
|
21
|
+
'rgb(64, 64, 255)',
|
|
22
|
+
'rgb(0, 0, 255)',
|
|
23
|
+
'rgb(0, 0, 208)',
|
|
24
|
+
'rgb(0, 0, 160)',
|
|
25
|
+
]),
|
|
26
|
+
rSigned: interpolateRgbBasis([
|
|
27
|
+
'rgb(0, 0, 160)',
|
|
28
|
+
'rgb(0, 0, 208)',
|
|
29
|
+
'rgb(0, 0, 255)',
|
|
30
|
+
'rgb(64, 64, 255)',
|
|
31
|
+
'rgb(128, 128, 255)',
|
|
32
|
+
'rgb(192, 192, 255)',
|
|
33
|
+
'rgb(224, 224, 255)',
|
|
34
|
+
'rgb(255, 255, 255)',
|
|
35
|
+
'rgb(255, 224, 224)',
|
|
36
|
+
'rgb(255, 192, 192)',
|
|
37
|
+
'rgb(255, 128, 128)',
|
|
38
|
+
'rgb(255, 64, 64)',
|
|
39
|
+
'rgb(255, 0, 0)',
|
|
40
|
+
'rgb(208, 0, 0)',
|
|
41
|
+
'rgb(160, 0, 0)',
|
|
42
|
+
]),
|
|
43
|
+
dprimeSigned: interpolateRgbBasis([
|
|
44
|
+
'rgb(0, 100, 0)',
|
|
45
|
+
'rgb(0, 128, 0)',
|
|
46
|
+
'rgb(0, 160, 0)',
|
|
47
|
+
'rgb(64, 192, 64)',
|
|
48
|
+
'rgb(128, 224, 128)',
|
|
49
|
+
'rgb(192, 240, 192)',
|
|
50
|
+
'rgb(224, 248, 224)',
|
|
51
|
+
'rgb(255, 255, 255)',
|
|
52
|
+
'rgb(224, 224, 255)',
|
|
53
|
+
'rgb(192, 192, 255)',
|
|
54
|
+
'rgb(128, 128, 255)',
|
|
55
|
+
'rgb(64, 64, 255)',
|
|
56
|
+
'rgb(0, 0, 255)',
|
|
57
|
+
'rgb(0, 0, 208)',
|
|
58
|
+
'rgb(0, 0, 160)',
|
|
59
|
+
]),
|
|
60
|
+
};
|
|
61
|
+
export function makeImageData(ctx, props) {
|
|
62
|
+
const { ldData, regions, bpPerPx, stopTokenCheck, yScalar, useGenomicPositions = false, signedLD = false, } = props;
|
|
63
|
+
const { snps, ldValues, metric } = ldData;
|
|
64
|
+
const n = snps.length;
|
|
65
|
+
if (n === 0) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
checkStopToken2(stopTokenCheck);
|
|
69
|
+
const region = regions[0];
|
|
70
|
+
if (!region) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
let colorInterpolator;
|
|
74
|
+
if (signedLD) {
|
|
75
|
+
colorInterpolator =
|
|
76
|
+
metric === 'dprime' ? colorSchemes.dprimeSigned : colorSchemes.rSigned;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
colorInterpolator =
|
|
80
|
+
metric === 'dprime' ? colorSchemes.dprime : colorSchemes.r2;
|
|
81
|
+
}
|
|
82
|
+
const scale = scaleSequential(colorInterpolator).domain(signedLD ? [-1, 1] : [0, 1]);
|
|
83
|
+
const viewWidthPx = (region.end - region.start) / bpPerPx;
|
|
84
|
+
const sqrt2 = Math.sqrt(2);
|
|
85
|
+
const uniformW = viewWidthPx / (n * sqrt2);
|
|
86
|
+
const boundaries = [];
|
|
87
|
+
if (useGenomicPositions) {
|
|
88
|
+
for (let i = 0; i < n; i++) {
|
|
89
|
+
const snpPos = snps[i].start;
|
|
90
|
+
const prevPos = i > 0 ? snps[i - 1].start : region.start;
|
|
91
|
+
const boundaryPos = (prevPos + snpPos) / 2;
|
|
92
|
+
const pixelPos = (boundaryPos - region.start) / bpPerPx / sqrt2;
|
|
93
|
+
boundaries.push(pixelPos);
|
|
94
|
+
}
|
|
95
|
+
const lastSnpPos = snps[n - 1].start;
|
|
96
|
+
const finalBoundary = lastSnpPos + 50 * bpPerPx;
|
|
97
|
+
boundaries.push((finalBoundary - region.start) / bpPerPx / sqrt2);
|
|
98
|
+
}
|
|
99
|
+
if (yScalar) {
|
|
100
|
+
ctx.scale(1, yScalar);
|
|
101
|
+
}
|
|
102
|
+
ctx.save();
|
|
103
|
+
ctx.rotate(-Math.PI / 4);
|
|
104
|
+
const coords = [];
|
|
105
|
+
const items = [];
|
|
106
|
+
let ldIdx = 0;
|
|
107
|
+
for (let i = 1; i < n; i++) {
|
|
108
|
+
for (let j = 0; j < i; j++) {
|
|
109
|
+
const ldVal = ldValues[ldIdx] ?? 0;
|
|
110
|
+
ctx.fillStyle = scale(ldVal);
|
|
111
|
+
let x;
|
|
112
|
+
let y;
|
|
113
|
+
let cellW;
|
|
114
|
+
let cellH;
|
|
115
|
+
if (useGenomicPositions) {
|
|
116
|
+
x = boundaries[j];
|
|
117
|
+
y = boundaries[i];
|
|
118
|
+
cellW = boundaries[j + 1] - x;
|
|
119
|
+
cellH = boundaries[i + 1] - y;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
x = j * uniformW;
|
|
123
|
+
y = i * uniformW;
|
|
124
|
+
cellW = uniformW;
|
|
125
|
+
cellH = uniformW;
|
|
126
|
+
}
|
|
127
|
+
ctx.fillRect(x, y, cellW, cellH);
|
|
128
|
+
coords.push(x, y, x + cellW, y + cellH);
|
|
129
|
+
items.push({
|
|
130
|
+
i,
|
|
131
|
+
j,
|
|
132
|
+
ldValue: ldVal,
|
|
133
|
+
snp1: snps[i],
|
|
134
|
+
snp2: snps[j],
|
|
135
|
+
});
|
|
136
|
+
ldIdx++;
|
|
137
|
+
checkStopToken2(stopTokenCheck);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
ctx.restore();
|
|
141
|
+
const flatbush = new Flatbush(Math.max(items.length, 1));
|
|
142
|
+
if (coords.length) {
|
|
143
|
+
for (let k = 0; k < coords.length; k += 4) {
|
|
144
|
+
flatbush.add(coords[k], coords[k + 1], coords[k + 2], coords[k + 3]);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
flatbush.add(0, 0, 0, 0);
|
|
149
|
+
}
|
|
150
|
+
flatbush.finish();
|
|
151
|
+
return {
|
|
152
|
+
flatbush: flatbush.data,
|
|
153
|
+
items,
|
|
154
|
+
maxScore: signedLD ? 1 : 1,
|
|
155
|
+
w: uniformW,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
declare const configSchema: (pluginManager: PluginManager) => import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
+
name: {
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
defaultValue: string;
|
|
7
|
+
};
|
|
8
|
+
assemblyNames: {
|
|
9
|
+
description: string;
|
|
10
|
+
type: string;
|
|
11
|
+
defaultValue: string[];
|
|
12
|
+
};
|
|
13
|
+
description: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
defaultValue: string;
|
|
17
|
+
};
|
|
18
|
+
category: {
|
|
19
|
+
description: string;
|
|
20
|
+
type: string;
|
|
21
|
+
defaultValue: never[];
|
|
22
|
+
};
|
|
23
|
+
metadata: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: {};
|
|
27
|
+
};
|
|
28
|
+
rpcDriverName: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
};
|
|
33
|
+
adapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
|
|
34
|
+
textSearching: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
35
|
+
indexingAttributes: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
defaultValue: string[];
|
|
39
|
+
};
|
|
40
|
+
indexingFeatureTypesToExclude: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
defaultValue: string[];
|
|
44
|
+
};
|
|
45
|
+
textSearchAdapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
|
|
46
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
47
|
+
displays: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
48
|
+
formatDetails: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
49
|
+
feature: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
defaultValue: {};
|
|
53
|
+
contextVariable: string[];
|
|
54
|
+
};
|
|
55
|
+
subfeatures: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
defaultValue: {};
|
|
59
|
+
contextVariable: string[];
|
|
60
|
+
};
|
|
61
|
+
depth: {
|
|
62
|
+
type: string;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
maxDepth: {
|
|
67
|
+
type: string;
|
|
68
|
+
defaultValue: number;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
72
|
+
formatAbout: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
73
|
+
config: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
defaultValue: {};
|
|
77
|
+
contextVariable: string[];
|
|
78
|
+
};
|
|
79
|
+
hideUris: {
|
|
80
|
+
type: string;
|
|
81
|
+
defaultValue: boolean;
|
|
82
|
+
};
|
|
83
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
84
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
85
|
+
export default configSchema;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
+
import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes';
|
|
3
|
+
function x() { }
|
|
4
|
+
const configSchema = (pluginManager) => ConfigurationSchema('LDTrack', {}, {
|
|
5
|
+
baseConfiguration: createBaseTrackConfig(pluginManager),
|
|
6
|
+
});
|
|
7
|
+
export default configSchema;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
2
|
+
import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
+
import configSchemaF from "./configSchema.js";
|
|
4
|
+
export default function LDTrackF(pm) {
|
|
5
|
+
pm.addTrackType(() => {
|
|
6
|
+
const configSchema = configSchemaF(pm);
|
|
7
|
+
return new TrackType({
|
|
8
|
+
name: 'LDTrack',
|
|
9
|
+
displayName: 'LD track',
|
|
10
|
+
configSchema,
|
|
11
|
+
stateModel: createBaseTrackModel(pm, 'LDTrack', configSchema),
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -45,7 +45,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
45
45
|
setStatusMessage(message: string): void;
|
|
46
46
|
setLoading(newStopToken: import("@jbrowse/core/util").StopToken): void;
|
|
47
47
|
setMessage(messageText: string): void;
|
|
48
|
-
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
48
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts").RenderedProps | undefined): void;
|
|
49
49
|
setError(error: unknown): void;
|
|
50
50
|
reload(): void;
|
|
51
51
|
setCachedDisplay(display: import("@jbrowse/core/util").AbstractDisplayModel): void;
|
|
@@ -55,7 +55,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
55
55
|
} & {
|
|
56
56
|
afterAttach(): void;
|
|
57
57
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
58
|
-
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
58
|
+
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
59
59
|
maxFeatureScreenDensity: {
|
|
60
60
|
type: string;
|
|
61
61
|
description: string;
|
|
@@ -82,7 +82,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
82
82
|
description: string;
|
|
83
83
|
defaultValue: never[];
|
|
84
84
|
};
|
|
85
|
-
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
85
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
86
86
|
showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
87
87
|
showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
88
88
|
} & {
|
|
@@ -92,10 +92,11 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
92
92
|
trackDisplayMode: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
93
93
|
trackMaxHeight: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
94
94
|
configuration: AnyConfigurationSchemaType;
|
|
95
|
-
|
|
95
|
+
jexlFiltersSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>>;
|
|
96
96
|
} & {
|
|
97
97
|
type: import("@jbrowse/mobx-state-tree").ISimpleType<"LinearVariantDisplay">;
|
|
98
98
|
configuration: AnyConfigurationSchemaType;
|
|
99
|
+
minorAlleleFrequencyFilterSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
99
100
|
}, {
|
|
100
101
|
rendererTypeName: string;
|
|
101
102
|
error: unknown;
|
|
@@ -327,11 +328,11 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
327
328
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
328
329
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
329
330
|
getFeatureById(featureId: string, parentFeatureId?: string): import("@jbrowse/core/util").Feature | undefined;
|
|
330
|
-
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord>;
|
|
331
|
+
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord>;
|
|
331
332
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
332
|
-
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
333
|
-
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
334
|
-
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util").FeatureLabelData>;
|
|
333
|
+
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
334
|
+
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
335
|
+
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util.ts").FeatureLabelData>;
|
|
335
336
|
} & {
|
|
336
337
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
337
338
|
deleteBlock(key: string): void;
|
|
@@ -395,7 +396,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
395
396
|
setStatusMessage(message: string): void;
|
|
396
397
|
setLoading(newStopToken: import("@jbrowse/core/util").StopToken): void;
|
|
397
398
|
setMessage(messageText: string): void;
|
|
398
|
-
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
399
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts").RenderedProps | undefined): void;
|
|
399
400
|
setError(error: unknown): void;
|
|
400
401
|
reload(): void;
|
|
401
402
|
setCachedDisplay(display: import("@jbrowse/core/util").AbstractDisplayModel): void;
|
|
@@ -439,7 +440,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
439
440
|
setStatusMessage(message: string): void;
|
|
440
441
|
setLoading(newStopToken: import("@jbrowse/core/util").StopToken): void;
|
|
441
442
|
setMessage(messageText: string): void;
|
|
442
|
-
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
443
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts").RenderedProps | undefined): void;
|
|
443
444
|
setError(error: unknown): void;
|
|
444
445
|
reload(): void;
|
|
445
446
|
setCachedDisplay(display: import("@jbrowse/core/util").AbstractDisplayModel): void;
|
|
@@ -459,7 +460,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
459
460
|
[x: string]: any;
|
|
460
461
|
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
461
462
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
462
|
-
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
463
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
463
464
|
maxFeatureScreenDensity: {
|
|
464
465
|
type: string;
|
|
465
466
|
description: string;
|
|
@@ -486,7 +487,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
486
487
|
description: string;
|
|
487
488
|
defaultValue: never[];
|
|
488
489
|
};
|
|
489
|
-
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>>;
|
|
490
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>>;
|
|
490
491
|
showLegend: boolean | undefined;
|
|
491
492
|
showTooltips: boolean | undefined;
|
|
492
493
|
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -720,11 +721,11 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
720
721
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
721
722
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
722
723
|
getFeatureById(featureId: string, parentFeatureId?: string): import("@jbrowse/core/util").Feature | undefined;
|
|
723
|
-
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord>;
|
|
724
|
+
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord>;
|
|
724
725
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
725
|
-
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
726
|
-
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
727
|
-
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util").FeatureLabelData>;
|
|
726
|
+
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
727
|
+
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
728
|
+
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util.ts").FeatureLabelData>;
|
|
728
729
|
} & {
|
|
729
730
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
730
731
|
deleteBlock(key: string): void;
|
|
@@ -787,7 +788,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
787
788
|
setStatusMessage(message: string): void;
|
|
788
789
|
setLoading(newStopToken: import("@jbrowse/core/util").StopToken): void;
|
|
789
790
|
setMessage(messageText: string): void;
|
|
790
|
-
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
791
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts").RenderedProps | undefined): void;
|
|
791
792
|
setError(error: unknown): void;
|
|
792
793
|
reload(): void;
|
|
793
794
|
setCachedDisplay(display: import("@jbrowse/core/util").AbstractDisplayModel): void;
|
|
@@ -797,7 +798,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
797
798
|
} & {
|
|
798
799
|
afterAttach(): void;
|
|
799
800
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
800
|
-
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
801
|
+
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
801
802
|
maxFeatureScreenDensity: {
|
|
802
803
|
type: string;
|
|
803
804
|
description: string;
|
|
@@ -824,7 +825,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
824
825
|
description: string;
|
|
825
826
|
defaultValue: never[];
|
|
826
827
|
};
|
|
827
|
-
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
828
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
828
829
|
showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
829
830
|
showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
830
831
|
}, {
|
|
@@ -1058,11 +1059,11 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
1058
1059
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
1059
1060
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
1060
1061
|
getFeatureById(featureId: string, parentFeatureId?: string): import("@jbrowse/core/util").Feature | undefined;
|
|
1061
|
-
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord>;
|
|
1062
|
+
readonly layoutFeatures: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord>;
|
|
1062
1063
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
1063
|
-
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
1064
|
-
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types").LayoutRecord | undefined;
|
|
1065
|
-
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util").FeatureLabelData>;
|
|
1064
|
+
getFeatureByID(blockKey: string, id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
1065
|
+
searchFeatureByID(id: string): import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/types.ts").LayoutRecord | undefined;
|
|
1066
|
+
readonly floatingLabelData: Map<string, import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/components/util.ts").FeatureLabelData>;
|
|
1066
1067
|
} & {
|
|
1067
1068
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
1068
1069
|
deleteBlock(key: string): void;
|
|
@@ -1092,7 +1093,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
1092
1093
|
} & {
|
|
1093
1094
|
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
1094
1095
|
} & {
|
|
1095
|
-
|
|
1096
|
+
activeFilters(): string[];
|
|
1096
1097
|
readonly rendererTypeName: any;
|
|
1097
1098
|
readonly sequenceAdapter: any;
|
|
1098
1099
|
readonly showLabels: any;
|
|
@@ -1239,36 +1240,119 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
1239
1240
|
readonly effectiveRpcDriverName: any;
|
|
1240
1241
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
1241
1242
|
};
|
|
1243
|
+
filterMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
1244
|
+
} & {
|
|
1242
1245
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
1243
1246
|
} & {
|
|
1244
1247
|
afterAttach(): void;
|
|
1248
|
+
} & {
|
|
1249
|
+
readonly minorAlleleFrequencyFilter: any;
|
|
1250
|
+
} & {
|
|
1251
|
+
setMafFilter(value: number): void;
|
|
1245
1252
|
} & {
|
|
1246
1253
|
readonly featureWidgetType: {
|
|
1247
1254
|
type: string;
|
|
1248
1255
|
id: string;
|
|
1249
1256
|
};
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1257
|
+
activeFilters(): string[];
|
|
1258
|
+
filterMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
1259
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
1260
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1261
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
1262
|
+
rpcDriverName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1263
|
+
} & {
|
|
1264
|
+
heightPreConfig: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1265
|
+
} & {
|
|
1266
|
+
userBpPerPxLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1267
|
+
userByteSizeLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1268
|
+
} & {
|
|
1269
|
+
blockState: import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
1258
1270
|
key: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
1259
1271
|
region: import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
1260
1272
|
reloadFlag: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
|
|
1261
1273
|
isLeftEndOfDisplayedRegion: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
1262
1274
|
isRightEndOfDisplayedRegion: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1275
|
+
}, {
|
|
1276
|
+
stopToken: import("@jbrowse/core/util").StopToken | undefined;
|
|
1277
|
+
filled: boolean;
|
|
1278
|
+
reactElement: React.ReactElement | undefined;
|
|
1279
|
+
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
1280
|
+
layout: any;
|
|
1281
|
+
blockStatusMessage: string;
|
|
1282
|
+
error: unknown;
|
|
1283
|
+
message: string | undefined;
|
|
1284
|
+
maxHeightReached: boolean;
|
|
1285
|
+
ReactComponent: ({ model, }: {
|
|
1286
|
+
model: {
|
|
1287
|
+
error?: unknown;
|
|
1288
|
+
reload: () => void;
|
|
1289
|
+
message?: React.ReactNode;
|
|
1290
|
+
statusMessage?: string;
|
|
1291
|
+
reactElement?: React.ReactElement;
|
|
1292
|
+
isRenderingPending?: boolean;
|
|
1293
|
+
};
|
|
1294
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
1295
|
+
renderProps: any;
|
|
1296
|
+
renderArgs: Record<string, unknown> | undefined;
|
|
1297
|
+
isRenderingPending: boolean;
|
|
1298
|
+
cachedDisplay: import("@jbrowse/core/util").AbstractDisplayModel | undefined;
|
|
1299
|
+
} & {
|
|
1300
|
+
doReload(): void;
|
|
1301
|
+
setStatusMessage(message: string): void;
|
|
1302
|
+
setLoading(newStopToken: import("@jbrowse/core/util").StopToken): void;
|
|
1303
|
+
setMessage(messageText: string): void;
|
|
1304
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts").RenderedProps | undefined): void;
|
|
1305
|
+
setError(error: unknown): void;
|
|
1306
|
+
reload(): void;
|
|
1307
|
+
setCachedDisplay(display: import("@jbrowse/core/util").AbstractDisplayModel): void;
|
|
1308
|
+
beforeDestroy(): void;
|
|
1309
|
+
} & {
|
|
1310
|
+
readonly statusMessage: any;
|
|
1311
|
+
} & {
|
|
1312
|
+
afterAttach(): void;
|
|
1313
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
1314
|
+
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
1315
|
+
maxFeatureScreenDensity: {
|
|
1316
|
+
type: string;
|
|
1317
|
+
description: string;
|
|
1318
|
+
defaultValue: number;
|
|
1319
|
+
};
|
|
1320
|
+
fetchSizeLimit: {
|
|
1321
|
+
type: string;
|
|
1322
|
+
defaultValue: number;
|
|
1323
|
+
description: string;
|
|
1324
|
+
};
|
|
1325
|
+
height: {
|
|
1326
|
+
type: string;
|
|
1327
|
+
defaultValue: number;
|
|
1328
|
+
description: string;
|
|
1329
|
+
};
|
|
1330
|
+
mouseover: {
|
|
1331
|
+
type: string;
|
|
1332
|
+
description: string;
|
|
1333
|
+
defaultValue: string;
|
|
1334
|
+
contextVariable: string[];
|
|
1335
|
+
};
|
|
1336
|
+
jexlFilters: {
|
|
1337
|
+
type: string;
|
|
1338
|
+
description: string;
|
|
1339
|
+
defaultValue: never[];
|
|
1340
|
+
};
|
|
1341
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
1342
|
+
showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
1343
|
+
showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
1344
|
+
} & {
|
|
1345
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<"LinearFeatureDisplay">;
|
|
1346
|
+
trackShowLabels: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
1347
|
+
trackShowDescriptions: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
|
|
1348
|
+
trackDisplayMode: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1349
|
+
trackMaxHeight: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1350
|
+
configuration: AnyConfigurationSchemaType;
|
|
1351
|
+
jexlFiltersSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>>;
|
|
1352
|
+
} & {
|
|
1353
|
+
type: import("@jbrowse/mobx-state-tree").ISimpleType<"LinearVariantDisplay">;
|
|
1354
|
+
configuration: AnyConfigurationSchemaType;
|
|
1355
|
+
minorAlleleFrequencyFilterSetting: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
1356
|
+
}>>;
|
|
1273
1357
|
export type LinearVariantDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
1274
1358
|
export type LinearVariantDisplayModel = Instance<LinearVariantDisplayStateModel>;
|
|
@@ -1,18 +1,56 @@
|
|
|
1
|
-
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
1
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
2
2
|
import { types } from '@jbrowse/mobx-state-tree';
|
|
3
3
|
import { linearFeatureDisplayModelFactory } from '@jbrowse/plugin-linear-genome-view';
|
|
4
|
+
import { createMAFFilterMenuItem } from "../shared/mafFilterUtils.js";
|
|
4
5
|
export default function stateModelFactory(configSchema) {
|
|
5
6
|
return types
|
|
6
7
|
.compose('LinearVariantDisplay', linearFeatureDisplayModelFactory(configSchema), types.model({
|
|
7
8
|
type: types.literal('LinearVariantDisplay'),
|
|
8
9
|
configuration: ConfigurationReference(configSchema),
|
|
10
|
+
minorAlleleFrequencyFilterSetting: types.maybe(types.number),
|
|
9
11
|
}))
|
|
10
|
-
.views(
|
|
11
|
-
get
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
id: 'variantFeature',
|
|
15
|
-
};
|
|
12
|
+
.views(self => ({
|
|
13
|
+
get minorAlleleFrequencyFilter() {
|
|
14
|
+
return (self.minorAlleleFrequencyFilterSetting ??
|
|
15
|
+
getConf(self, 'minorAlleleFrequencyFilter'));
|
|
16
16
|
},
|
|
17
|
-
}))
|
|
17
|
+
}))
|
|
18
|
+
.actions(self => ({
|
|
19
|
+
setMafFilter(value) {
|
|
20
|
+
self.minorAlleleFrequencyFilterSetting = value;
|
|
21
|
+
},
|
|
22
|
+
}))
|
|
23
|
+
.views(self => {
|
|
24
|
+
const { activeFilters: superActiveFilters, filterMenuItems: superFilterMenuItems, } = self;
|
|
25
|
+
return {
|
|
26
|
+
get featureWidgetType() {
|
|
27
|
+
return {
|
|
28
|
+
type: 'VariantFeatureWidget',
|
|
29
|
+
id: 'variantFeature',
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
activeFilters() {
|
|
33
|
+
const filters = [...superActiveFilters()];
|
|
34
|
+
if (self.minorAlleleFrequencyFilter > 0) {
|
|
35
|
+
filters.push(`jexl:maf(feature) >= ${self.minorAlleleFrequencyFilter}`);
|
|
36
|
+
}
|
|
37
|
+
return filters;
|
|
38
|
+
},
|
|
39
|
+
filterMenuItems() {
|
|
40
|
+
return [...superFilterMenuItems(), createMAFFilterMenuItem(self)];
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
})
|
|
44
|
+
.postProcessSnapshot(snap => {
|
|
45
|
+
if (!snap) {
|
|
46
|
+
return snap;
|
|
47
|
+
}
|
|
48
|
+
const { minorAlleleFrequencyFilterSetting, ...rest } = snap;
|
|
49
|
+
return {
|
|
50
|
+
...rest,
|
|
51
|
+
...(minorAlleleFrequencyFilterSetting
|
|
52
|
+
? { minorAlleleFrequencyFilterSetting }
|
|
53
|
+
: {}),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
18
56
|
}
|