@jbrowse/plugin-variants 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +8 -38
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +73 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +47 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/dist/MultiLinearVariantDisplay/model.js +235 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +18 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +42 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +81 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +218 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +21 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +106 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +12 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +60 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +43 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +13 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/Chord.js +5 -9
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +58 -0
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +4 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +9 -13
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +1 -1
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +67 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +63 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/dist/VcfAdapter/VcfAdapter.js +3 -5
- package/dist/VcfAdapter/configSchema.d.ts +0 -3
- package/dist/VcfAdapter/configSchema.js +1 -7
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +35 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +0 -12
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +10 -5
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/dist/VcfTabixAdapter/configSchema.js +2 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/configSchema.d.ts +34 -0
- package/dist/configSchema.js +44 -0
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/dist/getMultiVariantFeaturesAutorun.js +40 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +6 -0
- package/dist/shared/BulkEditPanel.js +103 -0
- package/dist/shared/ClusterDialog.d.ts +12 -0
- package/dist/shared/ClusterDialog.js +150 -0
- package/dist/shared/ColorLegend.d.ts +11 -0
- package/dist/shared/ColorLegend.js +24 -0
- package/dist/shared/DraggableDialog.d.ts +6 -0
- package/dist/shared/DraggableDialog.js +62 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +38 -0
- package/dist/shared/MAFFilterDialog.d.ts +9 -0
- package/dist/shared/MAFFilterDialog.js +56 -0
- package/dist/shared/RectBg.d.ts +9 -0
- package/dist/shared/RectBg.js +12 -0
- package/dist/shared/RowPalettizer.d.ts +6 -0
- package/dist/shared/RowPalettizer.js +38 -0
- package/dist/shared/SetColorDialog.d.ts +12 -0
- package/dist/shared/SetColorDialog.js +94 -0
- package/dist/shared/SetMinMaxDialog.d.ts +11 -0
- package/dist/shared/SetMinMaxDialog.js +56 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesGrid.d.ts +8 -0
- package/dist/shared/SourcesGrid.js +143 -0
- package/dist/shared/Tooltip.d.ts +18 -0
- package/dist/shared/Tooltip.js +38 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +53 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +8 -38
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +45 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/esm/MultiLinearVariantDisplay/model.js +206 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +12 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +53 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +189 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +100 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +54 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +18 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/Chord.js +5 -9
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +30 -0
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +5 -7
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +10 -14
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +2 -2
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +60 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +56 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/esm/VcfAdapter/VcfAdapter.js +4 -6
- package/esm/VcfAdapter/configSchema.d.ts +0 -3
- package/esm/VcfAdapter/configSchema.js +1 -7
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +35 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +0 -12
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +11 -6
- package/esm/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/esm/VcfTabixAdapter/configSchema.js +2 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/configSchema.d.ts +34 -0
- package/esm/configSchema.js +42 -0
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +1 -1
- package/esm/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/esm/getMultiVariantFeaturesAutorun.js +37 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +6 -0
- package/esm/shared/BulkEditPanel.js +77 -0
- package/esm/shared/ClusterDialog.d.ts +12 -0
- package/esm/shared/ClusterDialog.js +121 -0
- package/esm/shared/ColorLegend.d.ts +11 -0
- package/esm/shared/ColorLegend.js +19 -0
- package/esm/shared/DraggableDialog.d.ts +6 -0
- package/esm/shared/DraggableDialog.js +34 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +32 -0
- package/esm/shared/MAFFilterDialog.d.ts +9 -0
- package/esm/shared/MAFFilterDialog.js +31 -0
- package/esm/shared/RectBg.d.ts +9 -0
- package/esm/shared/RectBg.js +7 -0
- package/esm/shared/RowPalettizer.d.ts +6 -0
- package/esm/shared/RowPalettizer.js +32 -0
- package/esm/shared/SetColorDialog.d.ts +12 -0
- package/esm/shared/SetColorDialog.js +65 -0
- package/esm/shared/SetMinMaxDialog.d.ts +11 -0
- package/esm/shared/SetMinMaxDialog.js +30 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesGrid.d.ts +8 -0
- package/esm/shared/SourcesGrid.js +115 -0
- package/esm/shared/Tooltip.d.ts +18 -0
- package/esm/shared/Tooltip.js +33 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/util.d.ts +11 -0
- package/esm/util.js +47 -0
- package/package.json +4 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { clamp, getContainingView, measureText } from '@jbrowse/core/util';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import ColorLegend from './ColorLegend';
|
|
5
|
+
const Wrapper = observer(function ({ children, model, exportSVG, }) {
|
|
6
|
+
const { id, scrollTop, height } = model;
|
|
7
|
+
const clipid = `legend-${id}`;
|
|
8
|
+
return exportSVG ? (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement("defs", null,
|
|
10
|
+
React.createElement("clipPath", { id: clipid },
|
|
11
|
+
React.createElement("rect", { x: 0, y: 0, width: 1000, height: height }))),
|
|
12
|
+
React.createElement("g", { clipPath: `url(#${clipid})` },
|
|
13
|
+
React.createElement("g", { transform: `translate(0,${-scrollTop})` }, children)))) : (React.createElement("svg", { style: {
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
zIndex: 100,
|
|
18
|
+
pointerEvents: 'none',
|
|
19
|
+
height: model.totalHeight,
|
|
20
|
+
width: getContainingView(model).width,
|
|
21
|
+
} }, children));
|
|
22
|
+
});
|
|
23
|
+
export const LegendBar = observer(function (props) {
|
|
24
|
+
const { model } = props;
|
|
25
|
+
const { canDisplayLabels, rowHeight, sources } = model;
|
|
26
|
+
const svgFontSize = clamp(rowHeight, 8, 12);
|
|
27
|
+
return sources ? (React.createElement(Wrapper, { ...props },
|
|
28
|
+
React.createElement(ColorLegend, { model: model, labelWidth: Math.max(...sources
|
|
29
|
+
.map(s => measureText(s.name, svgFontSize) + 10)
|
|
30
|
+
.map(width => (canDisplayLabels ? width : 20))) }))) : null;
|
|
31
|
+
});
|
|
32
|
+
export default LegendBar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Dialog, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
const useStyles = makeStyles()({
|
|
6
|
+
root: {
|
|
7
|
+
width: 500,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
const MAFFilterDialog = observer(function ({ model, handleClose, }) {
|
|
11
|
+
const { mafFilter = '' } = model;
|
|
12
|
+
const { classes } = useStyles();
|
|
13
|
+
const [maf, setMaf] = useState(`${mafFilter}`);
|
|
14
|
+
return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Set minor allele frequency (MAF)" },
|
|
15
|
+
React.createElement(DialogContent, { className: classes.root },
|
|
16
|
+
React.createElement(Typography, null, "Set minor allele frequency cutoff track. This will filter out rare variants that might not contribute to meaningful large scale patterns"),
|
|
17
|
+
React.createElement(TextField, { value: maf, autoFocus: true, placeholder: "Enter MAF", onChange: event => {
|
|
18
|
+
setMaf(event.target.value);
|
|
19
|
+
} }),
|
|
20
|
+
React.createElement(DialogActions, null,
|
|
21
|
+
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, onClick: () => {
|
|
22
|
+
if (!Number.isNaN(+maf)) {
|
|
23
|
+
model.setMafFilter(+maf);
|
|
24
|
+
}
|
|
25
|
+
handleClose();
|
|
26
|
+
} }, "Submit"),
|
|
27
|
+
React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
28
|
+
handleClose();
|
|
29
|
+
} }, "Cancel")))));
|
|
30
|
+
});
|
|
31
|
+
export default MAFFilterDialog;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getFillProps } from '@jbrowse/core/util';
|
|
3
|
+
const RectBg = (props) => {
|
|
4
|
+
const { color = 'rgb(255,255,255)' } = props;
|
|
5
|
+
return React.createElement("rect", { pointerEvents: "auto", ...props, ...getFillProps(color) });
|
|
6
|
+
};
|
|
7
|
+
export default RectBg;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { set1 } from '@jbrowse/core/ui/colors';
|
|
3
|
+
import { Button } from '@mui/material';
|
|
4
|
+
import { randomColor } from '../util';
|
|
5
|
+
export default function RowPalettizer({ setCurrLayout, currLayout, }) {
|
|
6
|
+
var _a;
|
|
7
|
+
return (React.createElement("div", null, Object.keys((_a = currLayout[0]) !== null && _a !== void 0 ? _a : [])
|
|
8
|
+
.filter(f => f !== 'name' && f !== 'color')
|
|
9
|
+
.map(r => {
|
|
10
|
+
return (React.createElement(Button, { key: r, onClick: () => {
|
|
11
|
+
const map = new Map();
|
|
12
|
+
for (const row of currLayout) {
|
|
13
|
+
const val = map.get(row[r]);
|
|
14
|
+
if (!val) {
|
|
15
|
+
map.set(row[r], 1);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
map.set(row[r], val + 1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const ret = Object.fromEntries([...map.entries()]
|
|
22
|
+
.sort((a, b) => a[1] - b[1])
|
|
23
|
+
.map((r, idx) => [r[0], set1[idx] || randomColor(r[0])]));
|
|
24
|
+
setCurrLayout(currLayout.map(row => ({
|
|
25
|
+
...row,
|
|
26
|
+
color: ret[row[r]],
|
|
27
|
+
})));
|
|
28
|
+
} },
|
|
29
|
+
"Palettize ",
|
|
30
|
+
r));
|
|
31
|
+
})));
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Source } from '../util';
|
|
3
|
+
interface ReducedModel {
|
|
4
|
+
sources?: Source[];
|
|
5
|
+
setLayout: (s: Source[]) => void;
|
|
6
|
+
clearLayout: () => void;
|
|
7
|
+
}
|
|
8
|
+
export default function SetColorDialog({ model, handleClose, }: {
|
|
9
|
+
model: ReducedModel;
|
|
10
|
+
handleClose: () => void;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useLocalStorage } from '@jbrowse/core/util';
|
|
3
|
+
import { Button, DialogActions, DialogContent } from '@mui/material';
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
import DraggableDialog from './DraggableDialog';
|
|
6
|
+
import SourcesGrid from './SourcesGrid';
|
|
7
|
+
import BulkEditPanel from './BulkEditPanel';
|
|
8
|
+
import RowPalettizer from './RowPalettizer';
|
|
9
|
+
const useStyles = makeStyles()({
|
|
10
|
+
content: {
|
|
11
|
+
minWidth: 800,
|
|
12
|
+
},
|
|
13
|
+
fr: {
|
|
14
|
+
float: 'right',
|
|
15
|
+
},
|
|
16
|
+
textAreaFont: {
|
|
17
|
+
fontFamily: 'Courier New',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export default function SetColorDialog({ model, handleClose, }) {
|
|
21
|
+
const { classes } = useStyles();
|
|
22
|
+
const { sources } = model;
|
|
23
|
+
const [showBulkEditor, setShowBulkEditor] = useState(false);
|
|
24
|
+
const [currLayout, setCurrLayout] = useState(sources || []);
|
|
25
|
+
const [showTips, setShowTips] = useLocalStorage('multivariant-showTips', false);
|
|
26
|
+
return (React.createElement(DraggableDialog, { open: true, onClose: handleClose, maxWidth: "xl", title: "Multi-variant color/arrangement editor" },
|
|
27
|
+
React.createElement(DialogContent, { className: classes.content },
|
|
28
|
+
React.createElement("div", { className: classes.fr },
|
|
29
|
+
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
30
|
+
setShowTips(!showTips);
|
|
31
|
+
} }, showTips ? 'Hide tips' : 'Show tips'),
|
|
32
|
+
React.createElement(Button, { color: "secondary", variant: "contained", onClick: () => {
|
|
33
|
+
setShowBulkEditor(!showBulkEditor);
|
|
34
|
+
} }, showBulkEditor ? 'Hide bulk row editor' : 'Show Bulk row editor')),
|
|
35
|
+
React.createElement("br", null),
|
|
36
|
+
showTips ? React.createElement(HelpfulTips, null) : null,
|
|
37
|
+
showBulkEditor ? (React.createElement(BulkEditPanel, { currLayout: currLayout, setCurrLayout: setCurrLayout })) : null,
|
|
38
|
+
React.createElement(RowPalettizer, { currLayout: currLayout, setCurrLayout: setCurrLayout }),
|
|
39
|
+
React.createElement(SourcesGrid, { rows: currLayout, onChange: setCurrLayout, showTips: showTips })),
|
|
40
|
+
React.createElement(DialogActions, null,
|
|
41
|
+
React.createElement(Button, { variant: "contained", type: "submit", color: "inherit", onClick: () => {
|
|
42
|
+
model.clearLayout();
|
|
43
|
+
setCurrLayout(model.sources || []);
|
|
44
|
+
} }, "Clear custom settings"),
|
|
45
|
+
React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
46
|
+
handleClose();
|
|
47
|
+
setCurrLayout([...(model.sources || [])]);
|
|
48
|
+
} }, "Cancel"),
|
|
49
|
+
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", onClick: () => {
|
|
50
|
+
model.setLayout(currLayout);
|
|
51
|
+
handleClose();
|
|
52
|
+
} }, "Submit"))));
|
|
53
|
+
}
|
|
54
|
+
function HelpfulTips() {
|
|
55
|
+
return (React.createElement(React.Fragment, null,
|
|
56
|
+
"Helpful tips",
|
|
57
|
+
React.createElement("ul", null,
|
|
58
|
+
React.createElement("li", null, "You can select rows in the table with the checkboxes"),
|
|
59
|
+
React.createElement("li", null, "Multi-select is enabled with shift-click and control-click"),
|
|
60
|
+
React.createElement("li", null, "The \"Move selected items up/down\" can re-arrange subtracks"),
|
|
61
|
+
React.createElement("li", null, "Sorting the data grid itself can also re-arrange subtracks"),
|
|
62
|
+
React.createElement("li", null, "Changes are applied when you hit Submit"),
|
|
63
|
+
React.createElement("li", null, "You can click and drag the dialog box to move it on the screen"),
|
|
64
|
+
React.createElement("li", null, "Columns in the table can be hidden using a vertical '...' menu on the right side of each column"))));
|
|
65
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function SetMinMaxDialog(props: {
|
|
3
|
+
model: {
|
|
4
|
+
minScore: number;
|
|
5
|
+
maxScore: number;
|
|
6
|
+
scaleType: string;
|
|
7
|
+
setMinScore: (arg?: number) => void;
|
|
8
|
+
setMaxScore: (arg?: number) => void;
|
|
9
|
+
};
|
|
10
|
+
handleClose: () => void;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
4
|
+
export default function SetMinMaxDialog(props) {
|
|
5
|
+
const { model, handleClose } = props;
|
|
6
|
+
const { minScore, maxScore, scaleType } = model;
|
|
7
|
+
const [min, setMin] = useState(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
8
|
+
const [max, setMax] = useState(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
9
|
+
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
10
|
+
? +max > +min
|
|
11
|
+
: true;
|
|
12
|
+
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
13
|
+
return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Set min/max score for track" },
|
|
14
|
+
React.createElement(DialogContent, null,
|
|
15
|
+
React.createElement(Typography, null, "Enter min/max score: "),
|
|
16
|
+
!ok ? (React.createElement(Typography, { color: "error" }, "Max is greater than or equal to min")) : null,
|
|
17
|
+
!logOk ? (React.createElement(Typography, { color: "error" }, "Min score should be greater than 0 for log scale")) : null,
|
|
18
|
+
React.createElement(TextField, { value: min, onChange: event => {
|
|
19
|
+
setMin(event.target.value);
|
|
20
|
+
}, placeholder: "Enter min score" }),
|
|
21
|
+
React.createElement(TextField, { value: max, onChange: event => {
|
|
22
|
+
setMax(event.target.value);
|
|
23
|
+
}, placeholder: "Enter max score" })),
|
|
24
|
+
React.createElement(DialogActions, null,
|
|
25
|
+
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
26
|
+
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
27
|
+
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
28
|
+
handleClose();
|
|
29
|
+
} }, "Submit"))));
|
|
30
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default function sharedVariantConfigFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
autoscale: {
|
|
3
|
+
type: string;
|
|
4
|
+
defaultValue: string;
|
|
5
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
minimalTicks: {
|
|
9
|
+
type: string;
|
|
10
|
+
defaultValue: boolean;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
minScore: {
|
|
14
|
+
type: string;
|
|
15
|
+
defaultValue: number;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
maxScore: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
defaultValue: number;
|
|
22
|
+
};
|
|
23
|
+
numStdDev: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: number;
|
|
27
|
+
};
|
|
28
|
+
scaleType: {
|
|
29
|
+
type: string;
|
|
30
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
31
|
+
description: string;
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
};
|
|
34
|
+
inverted: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
defaultValue: boolean;
|
|
38
|
+
};
|
|
39
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
40
|
+
maxFeatureScreenDensity: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
defaultValue: number;
|
|
44
|
+
};
|
|
45
|
+
fetchSizeLimit: {
|
|
46
|
+
type: string;
|
|
47
|
+
defaultValue: number;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
height: {
|
|
51
|
+
type: string;
|
|
52
|
+
defaultValue: number;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
mouseover: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
defaultValue: string;
|
|
59
|
+
contextVariable: string[];
|
|
60
|
+
};
|
|
61
|
+
jexlFilters: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
defaultValue: never[];
|
|
65
|
+
};
|
|
66
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
+
import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
4
|
+
export default function sharedVariantConfigFactory() {
|
|
5
|
+
return ConfigurationSchema('SharedVariantDisplay', {
|
|
6
|
+
autoscale: {
|
|
7
|
+
type: 'stringEnum',
|
|
8
|
+
defaultValue: 'local',
|
|
9
|
+
model: types.enumeration('Autoscale type', [
|
|
10
|
+
'global',
|
|
11
|
+
'local',
|
|
12
|
+
'globalsd',
|
|
13
|
+
'localsd',
|
|
14
|
+
'zscore',
|
|
15
|
+
]),
|
|
16
|
+
description: 'global/local using their min/max values or w/ standard deviations (globalsd/localsd)',
|
|
17
|
+
},
|
|
18
|
+
minimalTicks: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
defaultValue: false,
|
|
21
|
+
description: 'use the minimal amount of ticks',
|
|
22
|
+
},
|
|
23
|
+
minScore: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
defaultValue: Number.MIN_VALUE,
|
|
26
|
+
description: 'minimum value for the y-scale',
|
|
27
|
+
},
|
|
28
|
+
maxScore: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'maximum value for the y-scale',
|
|
31
|
+
defaultValue: Number.MAX_VALUE,
|
|
32
|
+
},
|
|
33
|
+
numStdDev: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
description: 'number of standard deviations to use for autoscale types globalsd or localsd',
|
|
36
|
+
defaultValue: 3,
|
|
37
|
+
},
|
|
38
|
+
scaleType: {
|
|
39
|
+
type: 'stringEnum',
|
|
40
|
+
model: types.enumeration('Scale type', ['linear', 'log']),
|
|
41
|
+
description: 'The type of scale to use',
|
|
42
|
+
defaultValue: 'linear',
|
|
43
|
+
},
|
|
44
|
+
inverted: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'draw upside down',
|
|
47
|
+
defaultValue: false,
|
|
48
|
+
},
|
|
49
|
+
}, {
|
|
50
|
+
baseConfiguration: baseLinearDisplayConfigSchema,
|
|
51
|
+
explicitlyTyped: true,
|
|
52
|
+
});
|
|
53
|
+
}
|