@jbrowse/plugin-variants 3.2.0 → 3.4.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/LinearVariantDisplay/model.d.ts +1 -1
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +3 -3
- package/dist/MultiLinearVariantDisplay/index.js +1 -1
- package/dist/MultiLinearVariantDisplay/model.d.ts +40 -4
- package/dist/MultiLinearVariantDisplay/model.js +0 -1
- package/dist/MultiLinearVariantDisplay/renderSvg.js +2 -2
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +3 -3
- package/dist/MultiLinearVariantMatrixDisplay/index.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +40 -3
- package/dist/MultiLinearVariantMatrixDisplay/model.js +1 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +2 -2
- package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +14 -11
- package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +3 -3
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +41 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +3 -3
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +71 -17
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +34 -5
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +13 -7
- package/dist/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
- package/dist/MultiLinearVariantRenderer/{MultiVariantRendering.js → components/MultiLinearVariantRendering.js} +25 -7
- package/dist/MultiLinearVariantRenderer/components/util.d.ts +1 -0
- package/dist/MultiLinearVariantRenderer/components/util.js +15 -0
- package/dist/MultiLinearVariantRenderer/index.js +2 -2
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
- package/dist/MultiLinearVariantRenderer/makeImageData.js +104 -41
- package/dist/MultiLinearVariantRenderer/types.d.ts +2 -0
- package/dist/MultiVariantBaseRenderer.d.ts +4 -4
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -1
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -1
- package/dist/SplitVcfTabixAdapter/configSchema.js +4 -2
- package/dist/VariantFeatureWidget/AltFormatter.d.ts +4 -0
- package/dist/VariantFeatureWidget/AltFormatter.js +13 -0
- package/dist/VariantFeatureWidget/Checkbox2.js +1 -8
- package/dist/VariantFeatureWidget/Formatter.d.ts +3 -0
- package/dist/VariantFeatureWidget/Formatter.js +23 -0
- package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +3 -5
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +16 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +80 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +41 -20
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +14 -0
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +9 -6
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -16
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +4 -7
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -15
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -13
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +14 -8
- package/dist/VariantRPC/getGenotypeMatrix.js +20 -7
- package/dist/VariantRPC/types.d.ts +23 -0
- package/dist/VcfAdapter/VcfAdapter.d.ts +0 -1
- package/dist/VcfAdapter/VcfAdapter.js +0 -1
- package/dist/VcfFeature/index.js +0 -1
- package/dist/VcfFeature/util.d.ts +2 -0
- package/dist/VcfFeature/util.js +123 -25
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -1
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +12 -8
- package/dist/getMultiVariantFeaturesAutorun.d.ts +2 -0
- package/dist/getMultiVariantFeaturesAutorun.js +9 -2
- package/dist/getMultiVariantSourcesAutorun.js +3 -2
- package/dist/shared/MultiVariantBaseModel.d.ts +41 -4
- package/dist/shared/MultiVariantBaseModel.js +69 -3
- package/dist/shared/SharedVariantMixin.d.ts +1 -1
- package/dist/shared/components/AddFiltersDialog.d.ts +9 -0
- package/dist/shared/components/AddFiltersDialog.js +61 -0
- package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
- package/dist/shared/components/MultiVariantBaseDisplayComponent.js +29 -0
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.js +2 -2
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.js +8 -3
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.js +29 -28
- package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/types.d.ts +1 -0
- package/dist/shared/components/MultiVariantClusterDialog/types.js +2 -0
- package/{esm/shared/components/ColorLegend.d.ts → dist/shared/components/MultiVariantColorLegend.d.ts} +2 -2
- package/dist/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +5 -3
- package/dist/shared/components/MultiVariantCrosshairs.d.ts +7 -0
- package/dist/shared/components/MultiVariantCrosshairs.js +40 -0
- package/dist/shared/components/MultiVariantLegendBar.d.ts +7 -0
- package/dist/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +2 -2
- package/dist/shared/components/MultiVariantTooltip.d.ts +4 -0
- package/dist/shared/components/MultiVariantTooltip.js +3 -2
- package/dist/shared/components/RectBg.js +4 -2
- package/dist/shared/components/SetColorDialog.js +1 -1
- package/dist/shared/components/SourcesDataGrid.d.ts +2 -1
- package/dist/shared/components/SourcesDataGrid.js +40 -47
- package/dist/shared/components/SourcesGrid.js +1 -1
- package/dist/shared/components/SourcesGridHeader.d.ts +2 -1
- package/dist/shared/drawAlleleCount.d.ts +2 -1
- package/dist/shared/drawAlleleCount.js +26 -24
- package/dist/shared/drawPhased.d.ts +1 -1
- package/dist/shared/drawPhased.js +14 -10
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +9 -4
- package/dist/shared/minorAlleleFrequencyUtils.js +19 -14
- package/dist/shared/sourcesGridUtils.d.ts +3 -2
- package/esm/LinearVariantDisplay/model.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +2 -2
- package/esm/MultiLinearVariantDisplay/index.js +1 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +40 -4
- package/esm/MultiLinearVariantDisplay/model.js +0 -1
- package/esm/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -8
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +2 -2
- package/esm/MultiLinearVariantMatrixDisplay/index.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +40 -3
- package/esm/MultiLinearVariantMatrixDisplay/model.js +1 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +14 -11
- package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +39 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +73 -19
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +34 -5
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +13 -7
- package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
- package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.js → MultiLinearVariantRendering.js} +25 -7
- package/esm/MultiLinearVariantRenderer/components/util.d.ts +1 -0
- package/esm/MultiLinearVariantRenderer/components/util.js +12 -0
- package/esm/MultiLinearVariantRenderer/index.js +1 -1
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
- package/esm/MultiLinearVariantRenderer/makeImageData.js +106 -43
- package/esm/MultiLinearVariantRenderer/types.d.ts +2 -0
- package/esm/MultiVariantBaseRenderer.d.ts +4 -4
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -1
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -1
- package/esm/SplitVcfTabixAdapter/configSchema.js +4 -2
- package/esm/VariantFeatureWidget/AltFormatter.d.ts +4 -0
- package/esm/VariantFeatureWidget/AltFormatter.js +10 -0
- package/esm/VariantFeatureWidget/Checkbox2.js +2 -9
- package/esm/VariantFeatureWidget/Formatter.d.ts +3 -0
- package/esm/VariantFeatureWidget/Formatter.js +17 -0
- package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +4 -6
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -6
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +74 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +43 -22
- package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +11 -0
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +9 -6
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -16
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +4 -7
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -15
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -13
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +14 -8
- package/esm/VariantRPC/getGenotypeMatrix.js +20 -7
- package/esm/VariantRPC/types.d.ts +23 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +0 -1
- package/esm/VcfAdapter/VcfAdapter.js +0 -1
- package/esm/VcfFeature/index.js +0 -1
- package/esm/VcfFeature/util.d.ts +2 -0
- package/esm/VcfFeature/util.js +121 -25
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -1
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +13 -9
- package/esm/getMultiVariantFeaturesAutorun.d.ts +2 -0
- package/esm/getMultiVariantFeaturesAutorun.js +9 -2
- package/esm/getMultiVariantSourcesAutorun.js +3 -2
- package/esm/shared/MultiVariantBaseModel.d.ts +41 -4
- package/esm/shared/MultiVariantBaseModel.js +71 -5
- package/esm/shared/SharedVariantMixin.d.ts +1 -1
- package/esm/shared/components/AddFiltersDialog.d.ts +9 -0
- package/esm/shared/components/AddFiltersDialog.js +59 -0
- package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
- package/esm/shared/components/MultiVariantBaseDisplayComponent.js +24 -0
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.js +2 -2
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.js +9 -4
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.js +29 -28
- package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/types.d.ts +1 -0
- package/esm/shared/components/MultiVariantClusterDialog/types.js +1 -0
- package/{dist/shared/components/ColorLegend.d.ts → esm/shared/components/MultiVariantColorLegend.d.ts} +2 -2
- package/esm/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +6 -4
- package/esm/shared/components/MultiVariantCrosshairs.d.ts +7 -0
- package/esm/shared/components/MultiVariantCrosshairs.js +35 -0
- package/esm/shared/components/MultiVariantLegendBar.d.ts +7 -0
- package/esm/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +1 -1
- package/esm/shared/components/MultiVariantTooltip.d.ts +4 -0
- package/esm/shared/components/MultiVariantTooltip.js +3 -2
- package/esm/shared/components/RectBg.js +4 -2
- package/esm/shared/components/SetColorDialog.js +1 -1
- package/esm/shared/components/SourcesDataGrid.d.ts +2 -1
- package/esm/shared/components/SourcesDataGrid.js +40 -47
- package/esm/shared/components/SourcesGrid.js +1 -1
- package/esm/shared/components/SourcesGridHeader.d.ts +2 -1
- package/esm/shared/drawAlleleCount.d.ts +2 -1
- package/esm/shared/drawAlleleCount.js +25 -24
- package/esm/shared/drawPhased.d.ts +1 -1
- package/esm/shared/drawPhased.js +14 -10
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +9 -4
- package/esm/shared/minorAlleleFrequencyUtils.js +20 -15
- package/esm/shared/sourcesGridUtils.d.ts +3 -2
- package/package.json +12 -11
- package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
- package/dist/MultiLinearVariantDisplay/components/Crosshair.js +0 -35
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -28
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -38
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.js +0 -52
- package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequencePanel.js +0 -15
- package/dist/VariantRPC/cluster.d.ts +0 -17
- package/dist/VariantRPC/cluster.js +0 -84
- package/dist/shared/components/LegendBar.d.ts +0 -18
- package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +0 -30
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -23
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -36
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +0 -47
- package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
- package/esm/VariantFeatureWidget/VariantConsequencePanel.js +0 -9
- package/esm/VariantRPC/cluster.d.ts +0 -17
- package/esm/VariantRPC/cluster.js +0 -79
- package/esm/shared/components/LegendBar.d.ts +0 -18
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
- /package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
- /package/dist/{shared/components/ClusterDialog → VariantFeatureWidget/VariantSampleGrid}/types.js +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.d.ts +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.d.ts +0 -0
- /package/dist/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.d.ts +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
- /package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
- /package/esm/{shared/components/ClusterDialog → VariantFeatureWidget/VariantSampleGrid}/types.js +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialog.d.ts +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogAuto.d.ts +0 -0
- /package/esm/shared/components/{ClusterDialog → MultiVariantClusterDialog}/ClusterDialogManual.d.ts +0 -0
|
@@ -10,4 +10,27 @@ export interface GetGenotypeMatrixArgs {
|
|
|
10
10
|
headers?: Record<string, string>;
|
|
11
11
|
regions: Region[];
|
|
12
12
|
bpPerPx: number;
|
|
13
|
+
lengthCutoffFilter: number;
|
|
14
|
+
}
|
|
15
|
+
export interface GetSimplifiedFeaturesArgs {
|
|
16
|
+
adapterConfig: AnyConfigurationModel;
|
|
17
|
+
stopToken?: string;
|
|
18
|
+
sessionId: string;
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
regions: Region[];
|
|
21
|
+
bpPerPx: number;
|
|
22
|
+
minorAlleleFrequencyFilter: number;
|
|
23
|
+
lengthCutoffFilter: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ClusterGenotypeMatrixArgs {
|
|
26
|
+
adapterConfig: AnyConfigurationModel;
|
|
27
|
+
stopToken?: string;
|
|
28
|
+
statusCallback: (arg: string) => void;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
regions: Region[];
|
|
32
|
+
bpPerPx: number;
|
|
33
|
+
sources: Source[];
|
|
34
|
+
minorAlleleFrequencyFilter: number;
|
|
35
|
+
lengthCutoffFilter: number;
|
|
13
36
|
}
|
package/dist/VcfFeature/index.js
CHANGED
|
@@ -2,3 +2,5 @@ import type VCF from '@gmod/vcf';
|
|
|
2
2
|
export declare function getSOTermAndDescription(ref: string, alt: string[] | undefined, parser: VCF): string[];
|
|
3
3
|
export declare function getSOAndDescFromAltDefs(alt: string, parser: VCF): string[];
|
|
4
4
|
export declare function getSOAndDescByExamination(ref: string, alt: string): string[];
|
|
5
|
+
export declare function getMinimalDesc(ref: string, alt: string): string;
|
|
6
|
+
export declare function makeSimpleAltString(genotype: string, ref: string, alt: string[]): string;
|
package/dist/VcfFeature/util.js
CHANGED
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSOTermAndDescription = getSOTermAndDescription;
|
|
4
4
|
exports.getSOAndDescFromAltDefs = getSOAndDescFromAltDefs;
|
|
5
5
|
exports.getSOAndDescByExamination = getSOAndDescByExamination;
|
|
6
|
+
exports.getMinimalDesc = getMinimalDesc;
|
|
7
|
+
exports.makeSimpleAltString = makeSimpleAltString;
|
|
6
8
|
const vcf_1 = require("@gmod/vcf");
|
|
9
|
+
const util_1 = require("@jbrowse/core/util");
|
|
7
10
|
const altTypeToSO = {
|
|
8
11
|
DEL: 'deletion',
|
|
9
12
|
INS: 'insertion',
|
|
@@ -67,63 +70,158 @@ function getSOAndDescFromAltDefs(alt, parser) {
|
|
|
67
70
|
return [soTerm, alt];
|
|
68
71
|
}
|
|
69
72
|
const modAlt = alt.split(':');
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return [];
|
|
73
|
+
return modAlt.length > 1
|
|
74
|
+
? getSOAndDescFromAltDefs(`<${modAlt.slice(0, -1).join(':')}>`, parser)
|
|
75
|
+
: [];
|
|
74
76
|
}
|
|
75
77
|
function getSOAndDescByExamination(ref, alt) {
|
|
76
78
|
const bnd = (0, vcf_1.parseBreakend)(alt);
|
|
77
79
|
if (bnd) {
|
|
78
80
|
return ['breakend', alt];
|
|
79
81
|
}
|
|
80
|
-
if (ref.length === 1 && alt.length === 1) {
|
|
82
|
+
else if (ref.length === 1 && alt.length === 1) {
|
|
81
83
|
return ['SNV', makeDescriptionString('SNV', ref, alt)];
|
|
82
84
|
}
|
|
83
|
-
if (alt === '<INS>') {
|
|
85
|
+
else if (alt === '<INS>') {
|
|
84
86
|
return ['insertion', alt];
|
|
85
87
|
}
|
|
86
|
-
if (alt === '<DEL>') {
|
|
88
|
+
else if (alt === '<DEL>') {
|
|
87
89
|
return ['deletion', alt];
|
|
88
90
|
}
|
|
89
|
-
if (alt === '<DUP>') {
|
|
91
|
+
else if (alt === '<DUP>') {
|
|
90
92
|
return ['duplication', alt];
|
|
91
93
|
}
|
|
92
|
-
if (alt === '<CNV>') {
|
|
94
|
+
else if (alt === '<CNV>') {
|
|
93
95
|
return ['cnv', alt];
|
|
94
96
|
}
|
|
95
|
-
if (alt === '<INV>') {
|
|
97
|
+
else if (alt === '<INV>') {
|
|
96
98
|
return ['inversion', alt];
|
|
97
99
|
}
|
|
98
|
-
if (alt === '<TRA>') {
|
|
100
|
+
else if (alt === '<TRA>') {
|
|
99
101
|
return ['translocation', alt];
|
|
100
102
|
}
|
|
101
|
-
if (alt.includes('<')) {
|
|
103
|
+
else if (alt.includes('<')) {
|
|
102
104
|
return ['sv', alt];
|
|
103
105
|
}
|
|
104
|
-
if (ref.length === alt.length) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
else if (ref.length === alt.length) {
|
|
107
|
+
const lenRef = ref.length;
|
|
108
|
+
const lenAlt = alt.length;
|
|
109
|
+
if (lenRef > 5 || lenAlt > 5) {
|
|
110
|
+
const lena = (0, util_1.getBpDisplayStr)(lenRef);
|
|
111
|
+
const lenb = (0, util_1.getBpDisplayStr)(lenAlt);
|
|
112
|
+
return ref.split('').reverse().join('') === alt
|
|
113
|
+
? ['inverson', makeDescriptionString('inv', lena, lenb)]
|
|
114
|
+
: ['substitution', makeDescriptionString('substitution', lena, lenb)];
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
return ref.split('').reverse().join('') === alt
|
|
118
|
+
? ['inversion', makeDescriptionString('inv', ref, alt)]
|
|
119
|
+
: ['substitution', makeDescriptionString('substitution', ref, alt)];
|
|
120
|
+
}
|
|
108
121
|
}
|
|
109
|
-
if (ref.length <= alt.length) {
|
|
122
|
+
else if (ref.length <= alt.length) {
|
|
110
123
|
const len = alt.length - ref.length;
|
|
111
|
-
const
|
|
124
|
+
const lenAlt = alt.length;
|
|
125
|
+
const lenRef = ref.length;
|
|
126
|
+
const lena = (0, util_1.getBpDisplayStr)(len);
|
|
112
127
|
return [
|
|
113
128
|
'insertion',
|
|
114
|
-
|
|
129
|
+
lenRef > 5 || lenAlt > 5
|
|
130
|
+
? `${lena} INS`
|
|
131
|
+
: makeDescriptionString('insertion', len > 5 ? lena : ref, alt),
|
|
115
132
|
];
|
|
116
133
|
}
|
|
117
|
-
if (ref.length > alt.length) {
|
|
118
|
-
const
|
|
119
|
-
const
|
|
134
|
+
else if (ref.length > alt.length) {
|
|
135
|
+
const lenRef = ref.length;
|
|
136
|
+
const lenAlt = alt.length;
|
|
137
|
+
const lena = (0, util_1.getBpDisplayStr)(lenRef - lenAlt);
|
|
120
138
|
return [
|
|
121
139
|
'deletion',
|
|
122
|
-
|
|
140
|
+
lenRef > 5 || lenAlt > 5
|
|
141
|
+
? `${lena} DEL`
|
|
142
|
+
: makeDescriptionString('deletion', ref, alt),
|
|
123
143
|
];
|
|
124
144
|
}
|
|
125
|
-
|
|
145
|
+
else {
|
|
146
|
+
return ['indel', makeDescriptionString('indel', ref, alt)];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function getMinimalDesc(ref, alt) {
|
|
150
|
+
const bnd = (0, vcf_1.parseBreakend)(alt);
|
|
151
|
+
if (bnd) {
|
|
152
|
+
return alt;
|
|
153
|
+
}
|
|
154
|
+
else if (ref.length === 1 && alt.length === 1) {
|
|
155
|
+
return alt;
|
|
156
|
+
}
|
|
157
|
+
else if (alt === '<INS>') {
|
|
158
|
+
return alt;
|
|
159
|
+
}
|
|
160
|
+
else if (alt === '<DEL>') {
|
|
161
|
+
return alt;
|
|
162
|
+
}
|
|
163
|
+
else if (alt === '<DUP>') {
|
|
164
|
+
return alt;
|
|
165
|
+
}
|
|
166
|
+
else if (alt === '<CNV>') {
|
|
167
|
+
return alt;
|
|
168
|
+
}
|
|
169
|
+
else if (alt === '<INV>') {
|
|
170
|
+
return alt;
|
|
171
|
+
}
|
|
172
|
+
else if (alt === '<TRA>') {
|
|
173
|
+
return alt;
|
|
174
|
+
}
|
|
175
|
+
else if (alt.includes('<')) {
|
|
176
|
+
return alt;
|
|
177
|
+
}
|
|
178
|
+
else if (ref.length === alt.length) {
|
|
179
|
+
const lenRef = ref.length;
|
|
180
|
+
const lenAlt = alt.length;
|
|
181
|
+
if (lenRef > 5 || lenAlt > 5) {
|
|
182
|
+
const lena = (0, util_1.getBpDisplayStr)(lenRef);
|
|
183
|
+
const lenb = (0, util_1.getBpDisplayStr)(lenAlt);
|
|
184
|
+
return ref.split('').reverse().join('') === alt
|
|
185
|
+
? makeDescriptionString('inv', lena, lenb)
|
|
186
|
+
: makeDescriptionString('substitution', lena, lenb);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return ref.split('').reverse().join('') === alt
|
|
190
|
+
? makeDescriptionString('inv', ref, alt)
|
|
191
|
+
: makeDescriptionString('substitution', ref, alt);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else if (ref.length <= alt.length) {
|
|
195
|
+
const len = alt.length - ref.length;
|
|
196
|
+
const lenAlt = alt.length;
|
|
197
|
+
const lenRef = ref.length;
|
|
198
|
+
const lena = (0, util_1.getBpDisplayStr)(len);
|
|
199
|
+
return lenRef > 5 || lenAlt > 5
|
|
200
|
+
? `${lena} INS`
|
|
201
|
+
: makeDescriptionString('insertion', len > 5 ? lena : ref, alt);
|
|
202
|
+
}
|
|
203
|
+
else if (ref.length > alt.length) {
|
|
204
|
+
const lenRef = ref.length;
|
|
205
|
+
const lenAlt = alt.length;
|
|
206
|
+
const lena = (0, util_1.getBpDisplayStr)(lenRef - lenAlt);
|
|
207
|
+
return lenRef > 5 || lenAlt > 5
|
|
208
|
+
? `${lena} DEL`
|
|
209
|
+
: makeDescriptionString('deletion', ref, alt);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
return makeDescriptionString('indel', ref, alt);
|
|
213
|
+
}
|
|
126
214
|
}
|
|
127
215
|
function makeDescriptionString(soTerm, ref, alt) {
|
|
128
|
-
return `${soTerm} ${ref
|
|
216
|
+
return `${soTerm} ${[ref, alt].join(' -> ')}`;
|
|
217
|
+
}
|
|
218
|
+
function makeSimpleAltString(genotype, ref, alt) {
|
|
219
|
+
return genotype
|
|
220
|
+
.split(/[/|]/)
|
|
221
|
+
.map(r => r === '.'
|
|
222
|
+
? '.'
|
|
223
|
+
: +r === 0
|
|
224
|
+
? `ref(${ref.length < 10 ? ref : (0, util_1.getBpDisplayStr)(ref.length)})`
|
|
225
|
+
: getMinimalDesc(ref, alt[+r - 1] || ''))
|
|
226
|
+
.join(genotype.includes('|') ? '|' : '/');
|
|
129
227
|
}
|
|
@@ -90,24 +90,28 @@ class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
90
90
|
const lines = txt.split(/\n|\r\n|\r/);
|
|
91
91
|
const header = lines[0].split('\t');
|
|
92
92
|
const { parser } = await this.configure();
|
|
93
|
-
const
|
|
94
|
-
const ret = lines
|
|
93
|
+
const metadataLines = lines
|
|
95
94
|
.slice(1)
|
|
96
95
|
.filter(f => !!f)
|
|
97
96
|
.map(line => {
|
|
98
97
|
const [name, ...rest] = line.split('\t');
|
|
99
98
|
return {
|
|
100
|
-
...Object.fromEntries(
|
|
99
|
+
...Object.fromEntries(header.slice(1).map((c, idx) => [c, rest[idx] || ''])),
|
|
101
100
|
name: name,
|
|
102
101
|
};
|
|
103
102
|
});
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
const vcfSampleSet = new Set(parser.samples);
|
|
104
|
+
const metadataSet = new Set(metadataLines.map(r => r.name));
|
|
105
|
+
const metadataNotInVcfSamples = [...metadataSet].filter(f => !vcfSampleSet.has(f));
|
|
106
|
+
const vcfSamplesNotInMetadata = [...vcfSampleSet].filter(f => !metadataSet.has(f));
|
|
107
|
+
if (metadataNotInVcfSamples.length) {
|
|
108
|
+
console.warn(`There are ${metadataNotInVcfSamples.length} samples in metadata file (${metadataLines.length} lines) not in VCF (${parser.samples.length} samples):`, (0, util_1.shorten2)(metadataNotInVcfSamples.join(',')));
|
|
107
109
|
}
|
|
108
|
-
|
|
110
|
+
if (vcfSamplesNotInMetadata.length) {
|
|
111
|
+
console.warn(`There are ${vcfSamplesNotInMetadata.length} samples in VCF file (${parser.samples.length} samples) not in metadata file (${metadataLines.length} lines):`, (0, util_1.shorten2)(vcfSamplesNotInMetadata.map(m => m).join(',')));
|
|
112
|
+
}
|
|
113
|
+
return metadataLines.filter(f => vcfSampleSet.has(f.name));
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
|
-
freeResources() { }
|
|
112
116
|
}
|
|
113
117
|
exports.default = VcfTabixAdapter;
|
|
@@ -6,6 +6,7 @@ export declare function getMultiVariantFeaturesAutorun(self: {
|
|
|
6
6
|
adapterConfig: AnyConfigurationModel;
|
|
7
7
|
sources?: Source[];
|
|
8
8
|
minorAlleleFrequencyFilter: number;
|
|
9
|
+
lengthCutoffFilter: number;
|
|
9
10
|
statsReadyAndRegionNotTooLarge: boolean;
|
|
10
11
|
adapterProps: () => Record<string, unknown>;
|
|
11
12
|
setError: (error: unknown) => void;
|
|
@@ -13,4 +14,5 @@ export declare function getMultiVariantFeaturesAutorun(self: {
|
|
|
13
14
|
setMessage: (str: string) => void;
|
|
14
15
|
setHasPhased: (arg: boolean) => void;
|
|
15
16
|
setSampleInfo: (arg: Record<string, SampleInfo>) => void;
|
|
17
|
+
setSimplifiedFeaturesLoading: (arg: string) => void;
|
|
16
18
|
}): void;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getMultiVariantFeaturesAutorun = getMultiVariantFeaturesAutorun;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const aborting_1 = require("@jbrowse/core/util/aborting");
|
|
6
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
6
7
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
7
8
|
const mobx_1 = require("mobx");
|
|
8
9
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
@@ -13,16 +14,20 @@ function getMultiVariantFeaturesAutorun(self) {
|
|
|
13
14
|
if (!view.initialized || !self.statsReadyAndRegionNotTooLarge) {
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
17
|
+
const stopToken = (0, stopToken_1.createStopToken)();
|
|
18
|
+
self.setSimplifiedFeaturesLoading(stopToken);
|
|
16
19
|
const { rpcManager } = (0, util_1.getSession)(self);
|
|
17
|
-
const { sources, minorAlleleFrequencyFilter, adapterConfig } = self;
|
|
20
|
+
const { lengthCutoffFilter, sources, minorAlleleFrequencyFilter, adapterConfig, } = self;
|
|
18
21
|
if (sources) {
|
|
19
22
|
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
20
23
|
const { sampleInfo, hasPhased, features } = (await rpcManager.call(sessionId, 'MultiVariantGetSimplifiedFeatures', {
|
|
21
24
|
regions: view.dynamicBlocks.contentBlocks,
|
|
22
25
|
sources,
|
|
23
26
|
minorAlleleFrequencyFilter,
|
|
27
|
+
lengthCutoffFilter,
|
|
24
28
|
sessionId,
|
|
25
29
|
adapterConfig,
|
|
30
|
+
stopToken,
|
|
26
31
|
}));
|
|
27
32
|
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
28
33
|
self.setHasPhased(hasPhased);
|
|
@@ -37,5 +42,7 @@ function getMultiVariantFeaturesAutorun(self) {
|
|
|
37
42
|
(0, util_1.getSession)(self).notifyError(`${e}`, e);
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
|
-
}, {
|
|
45
|
+
}, {
|
|
46
|
+
delay: 1000,
|
|
47
|
+
}));
|
|
41
48
|
}
|
|
@@ -16,12 +16,13 @@ function getMultiVariantSourcesAutorun(self) {
|
|
|
16
16
|
}
|
|
17
17
|
const { rpcManager } = (0, util_1.getSession)(self);
|
|
18
18
|
const { adapterConfig } = self;
|
|
19
|
-
const
|
|
20
|
-
self.setSourcesLoading(
|
|
19
|
+
const stopToken = (0, stopToken_1.createStopToken)();
|
|
20
|
+
self.setSourcesLoading(stopToken);
|
|
21
21
|
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
22
22
|
const sources = (await rpcManager.call(sessionId, 'MultiVariantGetSources', {
|
|
23
23
|
sessionId,
|
|
24
24
|
adapterConfig,
|
|
25
|
+
stopToken,
|
|
25
26
|
}));
|
|
26
27
|
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
27
28
|
self.setSources(sources);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from '
|
|
1
|
+
import type { SampleInfo, Source } from './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';
|
|
@@ -90,6 +90,9 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
90
90
|
renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
91
91
|
rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
92
92
|
autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
93
|
+
lengthCutoffFilter: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
94
|
+
jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
95
|
+
referenceDrawingMode: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
93
96
|
}, {
|
|
94
97
|
rendererTypeName: string;
|
|
95
98
|
error: unknown;
|
|
@@ -202,7 +205,7 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
202
205
|
} & {
|
|
203
206
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
204
207
|
deleteBlock(key: string): void;
|
|
205
|
-
selectFeature(feature: Feature): void
|
|
208
|
+
selectFeature(feature: Feature): Promise<void>;
|
|
206
209
|
navToFeature(feature: Feature): void;
|
|
207
210
|
clearFeatureSelection(): void;
|
|
208
211
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
@@ -233,19 +236,28 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
233
236
|
renderProps(): any;
|
|
234
237
|
} & {
|
|
235
238
|
sourcesLoadingStopToken: string | undefined;
|
|
239
|
+
simplifiedFeaturesStopToken: string | undefined;
|
|
236
240
|
featureUnderMouseVolatile: Feature | undefined;
|
|
237
241
|
sourcesVolatile: Source[] | undefined;
|
|
238
242
|
featuresVolatile: Feature[] | undefined;
|
|
239
243
|
hasPhased: boolean;
|
|
240
244
|
sampleInfo: undefined | Record<string, SampleInfo>;
|
|
241
|
-
hoveredGenotype:
|
|
245
|
+
hoveredGenotype: {
|
|
246
|
+
genotype: string;
|
|
247
|
+
name: string;
|
|
248
|
+
} | undefined;
|
|
242
249
|
} & {
|
|
250
|
+
setJexlFilters(f?: string[]): void;
|
|
243
251
|
setRowHeight(arg: number): void;
|
|
244
|
-
setHoveredGenotype(arg
|
|
252
|
+
setHoveredGenotype(arg?: {
|
|
253
|
+
genotype: string;
|
|
254
|
+
name: string;
|
|
255
|
+
}): void;
|
|
245
256
|
setFeatures(f: Feature[]): void;
|
|
246
257
|
setLayout(layout: Source[]): void;
|
|
247
258
|
clearLayout(): void;
|
|
248
259
|
setSourcesLoading(str: string): void;
|
|
260
|
+
setSimplifiedFeaturesLoading(str: string): void;
|
|
249
261
|
setSources(sources: Source[]): void;
|
|
250
262
|
setMafFilter(arg: number): void;
|
|
251
263
|
setShowSidebarLabels(arg: boolean): void;
|
|
@@ -253,7 +265,9 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
253
265
|
setAutoHeight(arg: boolean): void;
|
|
254
266
|
setHasPhased(arg: boolean): void;
|
|
255
267
|
setSampleInfo(arg: Record<string, SampleInfo>): void;
|
|
268
|
+
setReferenceDrawingMode(arg: string): void;
|
|
256
269
|
} & {
|
|
270
|
+
readonly activeFilters: any;
|
|
257
271
|
readonly preSources: Source[] | undefined;
|
|
258
272
|
readonly sourcesWithoutLayout: {
|
|
259
273
|
label: string;
|
|
@@ -274,6 +288,17 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
274
288
|
HP?: number;
|
|
275
289
|
}[] | undefined;
|
|
276
290
|
} & {
|
|
291
|
+
readonly sourceMap: {
|
|
292
|
+
[k: string]: {
|
|
293
|
+
label: string;
|
|
294
|
+
id: string;
|
|
295
|
+
baseUri?: string;
|
|
296
|
+
name: string;
|
|
297
|
+
color?: string;
|
|
298
|
+
group?: string;
|
|
299
|
+
HP?: number;
|
|
300
|
+
};
|
|
301
|
+
} | undefined;
|
|
277
302
|
readonly rowHeight: number;
|
|
278
303
|
adapterProps(): any;
|
|
279
304
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
@@ -327,6 +352,18 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
|
|
|
327
352
|
type?: undefined;
|
|
328
353
|
checked?: undefined;
|
|
329
354
|
onClick?: undefined;
|
|
355
|
+
} | {
|
|
356
|
+
label: string;
|
|
357
|
+
type: string;
|
|
358
|
+
subMenu: {
|
|
359
|
+
label: string;
|
|
360
|
+
type: string;
|
|
361
|
+
checked: boolean;
|
|
362
|
+
onClick: () => void;
|
|
363
|
+
}[];
|
|
364
|
+
icon?: undefined;
|
|
365
|
+
checked?: undefined;
|
|
366
|
+
onClick?: undefined;
|
|
330
367
|
} | {
|
|
331
368
|
label: string;
|
|
332
369
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.default = MultiVariantBaseModelF;
|
|
40
40
|
const react_1 = require("react");
|
|
41
41
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
42
|
+
const serializableFilterChain_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain"));
|
|
42
43
|
const util_1 = require("@jbrowse/core/util");
|
|
43
44
|
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
44
45
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
@@ -52,7 +53,8 @@ const mobx_state_tree_1 = require("mobx-state-tree");
|
|
|
52
53
|
const getSources_1 = require("./getSources");
|
|
53
54
|
const SetColorDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetColorDialog'))));
|
|
54
55
|
const MAFFilterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/MAFFilterDialog'))));
|
|
55
|
-
const
|
|
56
|
+
const AddFiltersDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/AddFiltersDialog'))));
|
|
57
|
+
const ClusterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/MultiVariantClusterDialog/ClusterDialog'))));
|
|
56
58
|
const SetRowHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetRowHeightDialog'))));
|
|
57
59
|
function MultiVariantBaseModelF(configSchema) {
|
|
58
60
|
return mobx_state_tree_1.types
|
|
@@ -60,14 +62,18 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
60
62
|
type: mobx_state_tree_1.types.literal('LinearVariantMatrixDisplay'),
|
|
61
63
|
layout: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.frozen(), []),
|
|
62
64
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
63
|
-
minorAlleleFrequencyFilter: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0
|
|
65
|
+
minorAlleleFrequencyFilter: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
|
|
64
66
|
showSidebarLabelsSetting: true,
|
|
65
67
|
renderingMode: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, 'alleleCount'),
|
|
66
68
|
rowHeightSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 8),
|
|
67
69
|
autoHeight: true,
|
|
70
|
+
lengthCutoffFilter: Number.MAX_SAFE_INTEGER,
|
|
71
|
+
jexlFilters: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.array(mobx_state_tree_1.types.string)),
|
|
72
|
+
referenceDrawingMode: 'skip',
|
|
68
73
|
}))
|
|
69
74
|
.volatile(() => ({
|
|
70
75
|
sourcesLoadingStopToken: undefined,
|
|
76
|
+
simplifiedFeaturesStopToken: undefined,
|
|
71
77
|
featureUnderMouseVolatile: undefined,
|
|
72
78
|
sourcesVolatile: undefined,
|
|
73
79
|
featuresVolatile: undefined,
|
|
@@ -76,6 +82,9 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
76
82
|
hoveredGenotype: undefined,
|
|
77
83
|
}))
|
|
78
84
|
.actions(self => ({
|
|
85
|
+
setJexlFilters(f) {
|
|
86
|
+
self.jexlFilters = (0, mobx_state_tree_1.cast)(f);
|
|
87
|
+
},
|
|
79
88
|
setRowHeight(arg) {
|
|
80
89
|
self.rowHeightSetting = arg;
|
|
81
90
|
},
|
|
@@ -97,6 +106,12 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
97
106
|
}
|
|
98
107
|
self.sourcesLoadingStopToken = str;
|
|
99
108
|
},
|
|
109
|
+
setSimplifiedFeaturesLoading(str) {
|
|
110
|
+
if (self.simplifiedFeaturesStopToken) {
|
|
111
|
+
(0, stopToken_1.stopStopToken)(self.simplifiedFeaturesStopToken);
|
|
112
|
+
}
|
|
113
|
+
self.simplifiedFeaturesStopToken = str;
|
|
114
|
+
},
|
|
100
115
|
setSources(sources) {
|
|
101
116
|
if (!(0, fast_deep_equal_1.default)(sources, self.sourcesVolatile)) {
|
|
102
117
|
self.sourcesVolatile = sources;
|
|
@@ -122,8 +137,15 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
122
137
|
self.sampleInfo = arg;
|
|
123
138
|
}
|
|
124
139
|
},
|
|
140
|
+
setReferenceDrawingMode(arg) {
|
|
141
|
+
self.referenceDrawingMode = arg;
|
|
142
|
+
},
|
|
125
143
|
}))
|
|
126
144
|
.views(self => ({
|
|
145
|
+
get activeFilters() {
|
|
146
|
+
var _a;
|
|
147
|
+
return ((_a = self.jexlFilters) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, 'jexlFilters').map((r) => `jexl:${r}`));
|
|
148
|
+
},
|
|
127
149
|
get preSources() {
|
|
128
150
|
return self.layout.length ? self.layout : self.sourcesVolatile;
|
|
129
151
|
},
|
|
@@ -152,6 +174,11 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
152
174
|
.views(self => {
|
|
153
175
|
const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
|
|
154
176
|
return {
|
|
177
|
+
get sourceMap() {
|
|
178
|
+
return self.sources
|
|
179
|
+
? Object.fromEntries(self.sources.map(source => [source.name, source]))
|
|
180
|
+
: undefined;
|
|
181
|
+
},
|
|
155
182
|
get rowHeight() {
|
|
156
183
|
const { sources, autoHeight, rowHeightSetting, height } = self;
|
|
157
184
|
return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
|
|
@@ -229,6 +256,28 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
229
256
|
},
|
|
230
257
|
],
|
|
231
258
|
},
|
|
259
|
+
{
|
|
260
|
+
label: 'Reference mode',
|
|
261
|
+
type: 'subMenu',
|
|
262
|
+
subMenu: [
|
|
263
|
+
{
|
|
264
|
+
label: 'Fill background grey, skip reference allele mouseovers (helps with large overlapping SVs)',
|
|
265
|
+
type: 'radio',
|
|
266
|
+
checked: self.referenceDrawingMode === 'skip',
|
|
267
|
+
onClick: () => {
|
|
268
|
+
self.setReferenceDrawingMode('skip');
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
label: "Don't fill background grey, only draw actual reference alleles as grey",
|
|
273
|
+
type: 'radio',
|
|
274
|
+
checked: self.referenceDrawingMode === 'draw',
|
|
275
|
+
onClick: () => {
|
|
276
|
+
self.setReferenceDrawingMode('draw');
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
232
281
|
{
|
|
233
282
|
label: 'Filter by',
|
|
234
283
|
icon: FilterList_1.default,
|
|
@@ -245,6 +294,18 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
245
294
|
]);
|
|
246
295
|
},
|
|
247
296
|
},
|
|
297
|
+
{
|
|
298
|
+
label: 'Edit filters',
|
|
299
|
+
onClick: () => {
|
|
300
|
+
(0, util_1.getSession)(self).queueDialog(handleClose => [
|
|
301
|
+
AddFiltersDialog,
|
|
302
|
+
{
|
|
303
|
+
model: self,
|
|
304
|
+
handleClose,
|
|
305
|
+
},
|
|
306
|
+
]);
|
|
307
|
+
},
|
|
308
|
+
},
|
|
248
309
|
],
|
|
249
310
|
},
|
|
250
311
|
{
|
|
@@ -278,7 +339,7 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
278
339
|
})
|
|
279
340
|
.views(self => ({
|
|
280
341
|
get canDisplayLabels() {
|
|
281
|
-
return self.rowHeight
|
|
342
|
+
return self.rowHeight >= 8 && self.showSidebarLabelsSetting;
|
|
282
343
|
},
|
|
283
344
|
get totalHeight() {
|
|
284
345
|
var _a;
|
|
@@ -298,9 +359,14 @@ function MultiVariantBaseModelF(configSchema) {
|
|
|
298
359
|
totalHeight: self.totalHeight,
|
|
299
360
|
renderingMode: self.renderingMode,
|
|
300
361
|
minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
|
|
362
|
+
lengthCutoffFilter: self.lengthCutoffFilter,
|
|
301
363
|
rowHeight: self.rowHeight,
|
|
302
364
|
sources: self.sources,
|
|
303
365
|
scrollTop: self.scrollTop,
|
|
366
|
+
referenceDrawingMode: self.referenceDrawingMode,
|
|
367
|
+
filters: new serializableFilterChain_1.default({
|
|
368
|
+
filters: self.activeFilters,
|
|
369
|
+
}),
|
|
304
370
|
};
|
|
305
371
|
},
|
|
306
372
|
}));
|
|
@@ -193,7 +193,7 @@ export default function SharedVariantMixin(configSchema: AnyConfigurationSchemaT
|
|
|
193
193
|
} & {
|
|
194
194
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
195
195
|
deleteBlock(key: string): void;
|
|
196
|
-
selectFeature(feature: Feature): void
|
|
196
|
+
selectFeature(feature: Feature): Promise<void>;
|
|
197
197
|
navToFeature(feature: Feature): void;
|
|
198
198
|
clearFeatureSelection(): void;
|
|
199
199
|
setFeatureIdUnderMouse(feature?: string): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const AddFiltersDialog: ({ model, handleClose, }: {
|
|
2
|
+
model: {
|
|
3
|
+
jexlFilters?: string[];
|
|
4
|
+
activeFilters: string[];
|
|
5
|
+
setJexlFilters: (arg?: string[]) => void;
|
|
6
|
+
};
|
|
7
|
+
handleClose: () => void;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default AddFiltersDialog;
|