@vitessce/statistical-plots 3.5.12 → 3.6.1
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/deflate-CENZcXCs.js +10 -0
- package/dist/{index-fa429ace.js → index-pAs1WCwy.js} +181500 -152951
- package/dist/index.js +1 -4
- package/dist/{jpeg-affe217d.js → jpeg-CM00LzXt.js} +20 -4
- package/dist/lerc-vsy3sZIv.js +2065 -0
- package/dist/{lzw-fdf7d374.js → lzw-Dv-TvqHY.js} +1 -4
- package/dist/{packbits-530d3977.js → packbits-DlIDTIdL.js} +1 -4
- package/dist/{pako.esm-68f84e2a.js → pako.esm-SxljTded.js} +33 -1839
- package/dist/{raw-5d9364f4.js → raw-C0V1wwX1.js} +1 -4
- package/dist/{webimage-57a383de.js → webimage-JQPK3vx3.js} +1 -4
- package/dist-tsc/CellSetCompositionBarPlotSubscriber.js +1 -1
- package/dist-tsc/CellSetExpressionPlotOptions.d.ts.map +1 -1
- package/dist-tsc/CellSetExpressionPlotOptions.js +7 -6
- package/dist-tsc/CellSetExpressionPlotSubscriber.js +1 -1
- package/dist-tsc/CellSetSizesPlotSubscriber.js +1 -1
- package/dist-tsc/DotPlotSubscriber.js +1 -1
- package/dist-tsc/ExpressionHistogramSubscriber.js +1 -1
- package/dist-tsc/FeatureBarPlotSubscriber.js +1 -1
- package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.js +1 -1
- package/dist-tsc/FeatureStatsTable.d.ts.map +1 -1
- package/dist-tsc/FeatureStatsTable.js +13 -5
- package/dist-tsc/TreemapOptions.js +2 -2
- package/dist-tsc/TreemapSubscriber.js +1 -1
- package/dist-tsc/VolcanoPlotOptions.d.ts.map +1 -1
- package/dist-tsc/VolcanoPlotOptions.js +15 -3
- package/dist-tsc/VolcanoPlotSubscriber.js +1 -1
- package/dist-tsc/styles.d.ts +9 -1
- package/dist-tsc/styles.d.ts.map +1 -1
- package/dist-tsc/styles.js +2 -2
- package/package.json +12 -12
- package/src/CellSetCompositionBarPlotSubscriber.js +1 -1
- package/src/CellSetExpressionPlotOptions.js +7 -6
- package/src/CellSetExpressionPlotSubscriber.js +1 -1
- package/src/CellSetSizesPlotSubscriber.js +1 -1
- package/src/DotPlotSubscriber.js +1 -1
- package/src/ExpressionHistogramSubscriber.js +1 -1
- package/src/FeatureBarPlotSubscriber.js +1 -1
- package/src/FeatureSetEnrichmentBarPlotSubscriber.js +1 -1
- package/src/FeatureStatsTable.js +15 -5
- package/src/TreemapOptions.js +2 -2
- package/src/TreemapSubscriber.js +1 -1
- package/src/VolcanoPlotOptions.js +18 -6
- package/src/VolcanoPlotSubscriber.js +1 -1
- package/src/styles.js +2 -2
- package/dist/deflate-9e272e07.js +0 -13
- package/dist/lerc-eeb05714.js +0 -2014
@@ -9,7 +9,7 @@ import { useStyles } from './styles.js';
|
|
9
9
|
import { useRawSetPaths } from './utils.js';
|
10
10
|
export function CellSetCompositionBarPlotSubscriber(props) {
|
11
11
|
const { coordinationScopes, removeGridComponent, theme, helpText = ViewHelpMapping.OBS_SET_COMPOSITION_BAR_PLOT, } = props;
|
12
|
-
const classes = useStyles();
|
12
|
+
const { classes } = useStyles();
|
13
13
|
const loaders = useLoaders();
|
14
14
|
// Get "props" from the coordination space.
|
15
15
|
const [{ dataset, obsType, sampleType, featureType, featureValueType, obsFilter: cellFilter, obsHighlight: cellHighlight, obsSetSelection, obsSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold, featureValueTransform, featureValueTransformCoefficient, gatingFeatureSelectionX, gatingFeatureSelectionY, featureSelection, sampleSetSelection, sampleSetColor, }, { setObsFilter: setCellFilter, setObsSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold, setFeatureValueTransform, setFeatureValueTransformCoefficient, setGatingFeatureSelectionX, setGatingFeatureSelectionY, setFeatureSelection, setSampleSetSelection, setSampleSetColor, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.OBS_SET_COMPOSITION_BAR_PLOT], coordinationScopes);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetExpressionPlotOptions.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotOptions.js"],"names":[],"mappings":"AAUA,
|
1
|
+
{"version":3,"file":"CellSetExpressionPlotOptions.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotOptions.js"],"names":[],"mappings":"AAUA,8EA0KC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
3
|
import { useId } from 'react-aria';
|
4
|
-
import { TableCell, TableRow, TextField, Slider } from '@
|
4
|
+
import { TableCell, TableRow, TextField, Slider } from '@vitessce/styles';
|
5
5
|
import { usePlotOptionsStyles, OptionsContainer, OptionSelect } from '@vitessce/vit-s';
|
6
6
|
import { GLSL_COLORMAPS } from '@vitessce/gl';
|
7
7
|
import { capitalize } from '@vitessce/utils';
|
@@ -9,7 +9,7 @@ const FEATURE_AGGREGATION_STRATEGIES = ['first', 'last', 'sum', 'mean'];
|
|
9
9
|
export default function CellSetExpressionPlotOptions(props) {
|
10
10
|
const { featureValueTransform, setFeatureValueTransform, featureValueTransformCoefficient, setFeatureValueTransformCoefficient, transformOptions, featureValuePositivityThreshold, setFeatureValuePositivityThreshold, featureValueColormap, setFeatureValueColormap, featureAggregationStrategy, setFeatureAggregationStrategy, } = props;
|
11
11
|
const cellSetExpressionPlotOptionsId = useId();
|
12
|
-
const classes = usePlotOptionsStyles();
|
12
|
+
const { classes } = usePlotOptionsStyles();
|
13
13
|
function handleFeatureValueColormapChange(event) {
|
14
14
|
setFeatureValueColormap(event.target.value);
|
15
15
|
}
|
@@ -41,9 +41,10 @@ export default function CellSetExpressionPlotOptions(props) {
|
|
41
41
|
id: `cellset-expression-feature-value-colormap-${cellSetExpressionPlotOptionsId}`,
|
42
42
|
}, children: GLSL_COLORMAPS.map(cmap => (_jsx("option", { value: cmap, children: cmap }, cmap))) }) })] })) : null, _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`, children: "Transform" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(OptionSelect, { className: classes.select, value: featureValueTransform === null ? '' : featureValueTransform, onChange: handleTransformChange, inputProps: {
|
43
43
|
id: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`,
|
44
|
-
}, children: transformOptions.map(opt => (_jsx("option", { value: opt.value === null ? '' : opt.value, children: opt.name }, opt.name))) }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`, children: "Transform Coefficient" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(TextField, { label: "Transform Coefficient", type: "number", onChange: handleTransformCoefficientChange, value: featureValueTransformCoefficient,
|
45
|
-
shrink: true,
|
46
|
-
}, id: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}` }) })] }), setFeatureAggregationStrategy ? (_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `feature-aggregation-strategy-${cellSetExpressionPlotOptionsId}`, children: "Feature Aggregation Strategy" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(OptionSelect, { className: classes.select, value: featureAggregationStrategy ?? 'first', onChange: handleFeatureAggregationStrategyChange, inputProps: {
|
44
|
+
}, children: transformOptions.map(opt => (_jsx("option", { value: opt.value === null ? '' : opt.value, children: opt.name }, opt.name))) }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`, children: "Transform Coefficient" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(TextField, { label: "Transform Coefficient", type: "number", onChange: handleTransformCoefficientChange, value: featureValueTransformCoefficient, slotProps: { input: { shrink: true } }, id: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}` }) })] }), setFeatureAggregationStrategy ? (_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `feature-aggregation-strategy-${cellSetExpressionPlotOptionsId}`, children: "Feature Aggregation Strategy" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(OptionSelect, { className: classes.select, value: featureAggregationStrategy ?? 'first', onChange: handleFeatureAggregationStrategyChange, inputProps: {
|
47
45
|
id: `feature-aggregation-strategy-${cellSetExpressionPlotOptionsId}`,
|
48
|
-
}, children: FEATURE_AGGREGATION_STRATEGIES.map(opt => (_jsx("option", { value: opt, children: capitalize(opt) }, opt))) }) })] })) : null, setFeatureValuePositivityThreshold ? (_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, children: "Positivity Threshold" }), _jsx(TableCell, { className: classes.inputCell, children: _jsx(Slider, {
|
46
|
+
}, children: FEATURE_AGGREGATION_STRATEGIES.map(opt => (_jsx("option", { value: opt, children: capitalize(opt) }, opt))) }) })] })) : null, setFeatureValuePositivityThreshold ? (_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, children: "Positivity Threshold" }), _jsx(TableCell, { className: classes.inputCell, children: _jsx(Slider, { slotProps: {
|
47
|
+
root: { className: classes.slider },
|
48
|
+
valueLabel: { className: classes.sliderValueLabel },
|
49
|
+
}, value: featureValuePositivityThreshold, onChange: handlePositivityThresholdChange, "aria-labelledby": "pos-threshold-slider", valueLabelDisplay: "auto", step: 1.0, min: 0.0, max: 100.0 }) })] }, "transform-coefficient-option-row")) : null] }));
|
49
50
|
}
|
@@ -90,7 +90,7 @@ function useExpressionByCellSet(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
90
90
|
*/
|
91
91
|
export function CellSetExpressionPlotSubscriber(props) {
|
92
92
|
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title, xAxisTitle, jitter = false, yMin = null, yUnits = null, helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION, } = props;
|
93
|
-
const classes = useStyles();
|
93
|
+
const { classes } = useStyles();
|
94
94
|
const loaders = useLoaders();
|
95
95
|
// Get "props" from the coordination space.
|
96
96
|
const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, sampleType, sampleSetSelection, sampleSetColor, featureAggregationStrategy, }, { setFeatureValueTransform, setFeatureValueTransformCoefficient, setSampleSetColor, setFeatureAggregationStrategy, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
|
@@ -20,7 +20,7 @@ import { useStyles } from './styles.js';
|
|
20
20
|
*/
|
21
21
|
export function CellSetSizesPlotSubscriber(props) {
|
22
22
|
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: titleOverride, helpText = ViewHelpMapping.OBS_SET_SIZES, } = props;
|
23
|
-
const classes = useStyles();
|
23
|
+
const { classes } = useStyles();
|
24
24
|
const loaders = useLoaders();
|
25
25
|
// Get "props" from the coordination space.
|
26
26
|
const [{ dataset, obsType, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, obsSetExpansion: cellSetExpansion, }, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.OBS_SET_SIZES], coordinationScopes);
|
@@ -17,7 +17,7 @@ import { useExpressionSummaries } from './dot-plot-hook.js';
|
|
17
17
|
*/
|
18
18
|
export function DotPlotSubscriber(props) {
|
19
19
|
const { coordinationScopes, removeGridComponent, theme, title = 'Dot Plot', transpose = true, helpText = ViewHelpMapping.DOT_PLOT, } = props;
|
20
|
-
const classes = useStyles();
|
20
|
+
const { classes } = useStyles();
|
21
21
|
const loaders = useLoaders();
|
22
22
|
// Get "props" from the coordination space.
|
23
23
|
const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, featureValuePositivityThreshold: posThreshold, featureValueColormap, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, sampleType, sampleSetSelection, }, { setFeatureValueTransform, setFeatureValueTransformCoefficient, setFeatureValuePositivityThreshold: setPosThreshold, setFeatureValueColormap, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.DOT_PLOT], coordinationScopes);
|
@@ -18,7 +18,7 @@ import { useStyles } from './styles.js';
|
|
18
18
|
*/
|
19
19
|
export function ExpressionHistogramSubscriber(props) {
|
20
20
|
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM, } = props;
|
21
|
-
const classes = useStyles();
|
21
|
+
const { classes } = useStyles();
|
22
22
|
const loaders = useLoaders();
|
23
23
|
// Get "props" from the coordination space.
|
24
24
|
const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, additionalObsSets: additionalCellSets, obsSetColor: cellSetColor, }, { setAdditionalObsSets: setAdditionalCellSets, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setObsSetSelection: setCellSetSelection, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_VALUE_HISTOGRAM], coordinationScopes);
|
@@ -7,7 +7,7 @@ import FeatureBarPlot from './FeatureBarPlot.js';
|
|
7
7
|
import { useStyles } from './styles.js';
|
8
8
|
export function FeatureBarPlotSubscriber(props) {
|
9
9
|
const { coordinationScopes, removeGridComponent, theme, yMin = 0, yUnits = null, helpText = ViewHelpMapping.FEATURE_BAR_PLOT, } = props;
|
10
|
-
const classes = useStyles();
|
10
|
+
const { classes } = useStyles();
|
11
11
|
const loaders = useLoaders();
|
12
12
|
// Get "props" from the coordination space.
|
13
13
|
const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsHighlight: cellHighlight, additionalObsSets: additionalCellSets, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, }, { setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_BAR_PLOT], coordinationScopes);
|
@@ -9,7 +9,7 @@ import { useStyles } from './styles.js';
|
|
9
9
|
import { useRawSetPaths } from './utils.js';
|
10
10
|
export function FeatureSetEnrichmentBarPlotSubscriber(props) {
|
11
11
|
const { coordinationScopes, removeGridComponent, theme, helpText = ViewHelpMapping.FEATURE_SET_ENRICHMENT_BAR_PLOT, } = props;
|
12
|
-
const classes = useStyles();
|
12
|
+
const { classes } = useStyles();
|
13
13
|
const loaders = useLoaders();
|
14
14
|
const transformFeature = useAsyncFunction(AsyncFunctionType.TRANSFORM_FEATURE);
|
15
15
|
// Get "props" from the coordination space.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FeatureStatsTable.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTable.js"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"FeatureStatsTable.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTable.js"],"names":[],"mappings":"AAoBA,mEAyGC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import React, { useMemo, useState, useCallback } from 'react';
|
3
|
-
import { DataGrid } from '@
|
3
|
+
import { DataGrid } from '@vitessce/styles';
|
4
4
|
import { capitalize } from '@vitessce/utils';
|
5
5
|
import { useFilteredVolcanoData } from './utils.js';
|
6
6
|
const ROW_ID_DELIMITER = '___';
|
@@ -8,6 +8,14 @@ const INITIAL_SORT_MODEL = [
|
|
8
8
|
// We initially set the sorting this way
|
9
9
|
{ field: 'logFoldChange', sort: 'desc' },
|
10
10
|
];
|
11
|
+
const initialState = {
|
12
|
+
pagination: {
|
13
|
+
paginationModel: {
|
14
|
+
pageSize: 10,
|
15
|
+
},
|
16
|
+
},
|
17
|
+
};
|
18
|
+
const pageSizeOptions = [10];
|
11
19
|
export default function FeatureStatsTable(props) {
|
12
20
|
const { obsType, featureType, obsSetsColumnNameMappingReversed, sampleSetsColumnNameMappingReversed, sampleSetSelection, data, setFeatureSelection, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, } = props;
|
13
21
|
const [
|
@@ -69,13 +77,13 @@ export default function FeatureStatsTable(props) {
|
|
69
77
|
return result;
|
70
78
|
}, [filteredData, obsSetsColumnNameMappingReversed]);
|
71
79
|
const onSelectionModelChange = useCallback((rowIds) => {
|
72
|
-
const featureIds = rowIds.map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
|
80
|
+
const featureIds = Array.from(rowIds.ids).map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
|
73
81
|
setFeatureSelection(featureIds);
|
74
82
|
}, []);
|
75
|
-
const rowSelectionModel = useMemo(() => [], []);
|
83
|
+
const rowSelectionModel = useMemo(() => ({ ids: new Set([]), type: 'include' }), []);
|
76
84
|
const [sortModel, setSortModel] = useState(INITIAL_SORT_MODEL);
|
77
85
|
const getRowId = useCallback(row => row.id, []);
|
78
|
-
return (_jsx(DataGrid, { density: "compact", rows: rows, columns: columns,
|
86
|
+
return (_jsx(DataGrid, { density: "compact", rows: rows, columns: columns, initialState: initialState, pageSizeOptions: pageSizeOptions,
|
79
87
|
// checkboxSelection // TODO: uncomment to enable multiple-row selection
|
80
|
-
|
88
|
+
onRowSelectionModelChange: onSelectionModelChange, rowSelectionModel: rowSelectionModel, getRowId: getRowId, sortModel: sortModel, onSortModelChange: setSortModel }));
|
81
89
|
}
|
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { useId } from 'react-aria';
|
4
4
|
import { isEqual } from 'lodash-es';
|
5
|
-
import { TableCell, TableRow } from '@
|
5
|
+
import { TableCell, TableRow } from '@vitessce/styles';
|
6
6
|
import { capitalize } from '@vitessce/utils';
|
7
7
|
import { usePlotOptionsStyles, OptionSelect, OptionsContainer, } from '@vitessce/vit-s';
|
8
8
|
export default function TreemapOptions(props) {
|
9
9
|
const { children, obsType, sampleType, hierarchyLevels, setHierarchyLevels, obsColorEncoding, setObsColorEncoding, } = props;
|
10
10
|
const treemapOptionsId = useId();
|
11
|
-
const classes = usePlotOptionsStyles();
|
11
|
+
const { classes } = usePlotOptionsStyles();
|
12
12
|
function handleColorEncodingChange(event) {
|
13
13
|
setObsColorEncoding(event.target.value);
|
14
14
|
}
|
@@ -13,7 +13,7 @@ import TreemapOptions from './TreemapOptions.js';
|
|
13
13
|
const DEFAULT_HIERARCHY_LEVELS = ['obsSet', 'sampleSet'];
|
14
14
|
export function TreemapSubscriber(props) {
|
15
15
|
const { coordinationScopes, removeGridComponent, theme, helpText = ViewHelpMapping.TREEMAP, } = props;
|
16
|
-
const classes = useStyles();
|
16
|
+
const { classes } = useStyles();
|
17
17
|
const loaders = useLoaders();
|
18
18
|
// Get "props" from the coordination space.
|
19
19
|
const [{ dataset, obsType, featureType, featureValueType, obsFilter, obsHighlight, obsSetSelection, obsSetFilter, obsSelection, obsSelectionMode, obsSetHighlight, obsSetColor, obsColorEncoding, additionalObsSets, sampleType, sampleSetSelection, sampleSetFilter, sampleSetColor, sampleSelection, sampleSelectionMode, sampleFilter, sampleFilterMode, sampleHighlight, hierarchyLevels, }, { setObsFilter, setObsSelection, setObsSetFilter, setObsSetSelection, setObsSelectionMode, setObsFilterMode, setObsHighlight, setObsSetColor, setObsColorEncoding, setAdditionalObsSets, setSampleFilter, setSampleSetFilter, setSampleFilterMode, setSampleSelection, setSampleSetSelection, setSampleSelectionMode, setSampleHighlight, setSampleSetColor, setHierarchyLevels, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.TREEMAP], coordinationScopes);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VolcanoPlotOptions.d.ts","sourceRoot":"","sources":["../src/VolcanoPlotOptions.js"],"names":[],"mappings":"AAOA,
|
1
|
+
{"version":3,"file":"VolcanoPlotOptions.d.ts","sourceRoot":"","sources":["../src/VolcanoPlotOptions.js"],"names":[],"mappings":"AAOA,oEA4IC"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
3
|
import { useId } from 'react-aria';
|
4
|
-
import { TableCell, TableRow, Slider } from '@
|
4
|
+
import { TableCell, TableRow, Slider } from '@vitessce/styles';
|
5
5
|
import { usePlotOptionsStyles, OptionsContainer, } from '@vitessce/vit-s';
|
6
6
|
export default function VolcanoPlotOptions(props) {
|
7
7
|
const { children, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold, } = props;
|
8
8
|
const volcanoOptionsId = useId();
|
9
|
-
const classes = usePlotOptionsStyles();
|
9
|
+
const { classes } = usePlotOptionsStyles();
|
10
10
|
function handlePointSignificanceChange(event, value) {
|
11
11
|
setFeaturePointSignificanceThreshold(10 ** -value);
|
12
12
|
}
|
@@ -19,5 +19,17 @@ export default function VolcanoPlotOptions(props) {
|
|
19
19
|
function handleLabelFoldChangeChange(event, value) {
|
20
20
|
setFeatureLabelFoldChangeThreshold(value);
|
21
21
|
}
|
22
|
-
return (_jsxs(OptionsContainer, { children: [children, _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `volcano-label-significance-${volcanoOptionsId}`, children: "Label Significance Threshold" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, {
|
22
|
+
return (_jsxs(OptionsContainer, { children: [children, _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `volcano-label-significance-${volcanoOptionsId}`, children: "Label Significance Threshold" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { slotProps: {
|
23
|
+
root: { className: classes.slider },
|
24
|
+
valueLabel: { className: classes.sliderValueLabel },
|
25
|
+
}, value: -Math.log10(featureLabelSignificanceThreshold), onChange: handleLabelSignificanceChange, "aria-label": "Volcano plot label significance threshold slider", id: `volcano-label-significance-${volcanoOptionsId}`, valueLabelDisplay: "auto", step: 1, min: 0, max: 100 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `volcano-label-fc-${volcanoOptionsId}`, children: "Label Fold-Change Threshold" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { slotProps: {
|
26
|
+
root: { className: classes.slider },
|
27
|
+
valueLabel: { className: classes.sliderValueLabel },
|
28
|
+
}, value: featureLabelFoldChangeThreshold, onChange: handleLabelFoldChangeChange, "aria-label": "Volcano plot label fold-change threshold slider", id: `volcano-label-fc-${volcanoOptionsId}`, valueLabelDisplay: "auto", step: 0.5, min: 0, max: 50 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `volcano-point-significance-${volcanoOptionsId}`, children: "Point Significance Threshold" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { slotProps: {
|
29
|
+
root: { className: classes.slider },
|
30
|
+
valueLabel: { className: classes.sliderValueLabel },
|
31
|
+
}, value: -Math.log10(featurePointSignificanceThreshold), onChange: handlePointSignificanceChange, "aria-label": "Volcano plot point significance threshold slider", id: `volcano-point-significance-${volcanoOptionsId}`, valueLabelDisplay: "auto", step: 1, min: 0, max: 100 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `volcano-point-fc-${volcanoOptionsId}`, children: "Point Fold-Change Threshold" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { slotProps: {
|
32
|
+
root: { className: classes.slider },
|
33
|
+
valueLabel: { className: classes.sliderValueLabel },
|
34
|
+
}, value: featurePointFoldChangeThreshold, onChange: handlePointFoldChangeChange, "aria-label": "Volcano plot point fold-change threshold slider", id: `volcano-point-fc-${volcanoOptionsId}`, valueLabelDisplay: "auto", step: 0.5, min: 0, max: 50 }) })] })] }));
|
23
35
|
}
|
@@ -9,7 +9,7 @@ import VolcanoPlotOptions from './VolcanoPlotOptions.js';
|
|
9
9
|
import { useRawSetPaths } from './utils.js';
|
10
10
|
export function VolcanoPlotSubscriber(props) {
|
11
11
|
const { title = 'Volcano Plot', coordinationScopes, removeGridComponent, theme, helpText = ViewHelpMapping.VOLCANO_PLOT, } = props;
|
12
|
-
const classes = useStyles();
|
12
|
+
const { classes } = useStyles();
|
13
13
|
const loaders = useLoaders();
|
14
14
|
// Get "props" from the coordination space.
|
15
15
|
const [{ dataset, obsType, sampleType, featureType, featureValueType, obsFilter: cellFilter, obsHighlight: cellHighlight, obsSetSelection, obsSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold, featureValueTransform, featureValueTransformCoefficient, gatingFeatureSelectionX, gatingFeatureSelectionY, featureSelection, sampleSetSelection, sampleSetColor, }, { setObsFilter: setCellFilter, setObsSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold, setFeatureValueTransform, setFeatureValueTransformCoefficient, setGatingFeatureSelectionX, setGatingFeatureSelectionY, setFeatureSelection, setSampleSetSelection, setSampleSetColor, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.VOLCANO_PLOT], coordinationScopes);
|
package/dist-tsc/styles.d.ts
CHANGED
@@ -1,2 +1,10 @@
|
|
1
|
-
export const useStyles: (
|
1
|
+
export const useStyles: (params: void, muiStyleOverridesParams?: {
|
2
|
+
props: Record<string, unknown>;
|
3
|
+
ownerState?: Record<string, unknown> | undefined;
|
4
|
+
} | undefined) => {
|
5
|
+
classes: Record<"vegaContainer", string>;
|
6
|
+
theme: import("@mui/material").Theme;
|
7
|
+
css: import("tss-react").Css;
|
8
|
+
cx: import("tss-react").Cx;
|
9
|
+
};
|
2
10
|
//# sourceMappingURL=styles.d.ts.map
|
package/dist-tsc/styles.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAEA,
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAEA;;cAO6hB,CAAC;;;kBAAoH,eAAsB;gBAAyB,WAAU;eAAsB,WAAU;EADvuB"}
|
package/dist-tsc/styles.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.6.1",
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -16,8 +16,6 @@
|
|
16
16
|
"dist-tsc"
|
17
17
|
],
|
18
18
|
"dependencies": {
|
19
|
-
"@material-ui/core": "~4.12.3",
|
20
|
-
"@mui/x-data-grid": "^4.0.2",
|
21
19
|
"d3-array": "^2.4.0",
|
22
20
|
"d3-scale": "^4.0.0",
|
23
21
|
"d3-shape": "^3.2.0",
|
@@ -30,20 +28,22 @@
|
|
30
28
|
"react-aria": "^3.28.0",
|
31
29
|
"internmap": "^2.0.3",
|
32
30
|
"uuid": "^9.0.0",
|
33
|
-
"@vitessce/
|
34
|
-
"@vitessce/
|
35
|
-
"@vitessce/utils": "3.
|
36
|
-
"@vitessce/
|
37
|
-
"@vitessce/
|
38
|
-
"@vitessce/
|
31
|
+
"@vitessce/styles": "3.6.1",
|
32
|
+
"@vitessce/constants-internal": "3.6.1",
|
33
|
+
"@vitessce/sets-utils": "3.6.1",
|
34
|
+
"@vitessce/utils": "3.6.1",
|
35
|
+
"@vitessce/vega": "3.6.1",
|
36
|
+
"@vitessce/vit-s": "3.6.1",
|
37
|
+
"@vitessce/gl": "3.6.1"
|
39
38
|
},
|
40
39
|
"devDependencies": {
|
41
40
|
"react": "^18.0.0",
|
42
|
-
"
|
43
|
-
"
|
41
|
+
"react-dom": "^18.0.0",
|
42
|
+
"vite": "^6.3.5",
|
43
|
+
"vitest": "^3.1.4"
|
44
44
|
},
|
45
45
|
"peerDependencies": {
|
46
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
46
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
47
47
|
},
|
48
48
|
"scripts": {
|
49
49
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
@@ -30,7 +30,7 @@ export function CellSetCompositionBarPlotSubscriber(props) {
|
|
30
30
|
helpText = ViewHelpMapping.OBS_SET_COMPOSITION_BAR_PLOT,
|
31
31
|
} = props;
|
32
32
|
|
33
|
-
const classes = useStyles();
|
33
|
+
const { classes } = useStyles();
|
34
34
|
const loaders = useLoaders();
|
35
35
|
|
36
36
|
// Get "props" from the coordination space.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useId } from 'react-aria';
|
3
|
-
import { TableCell, TableRow, TextField, Slider } from '@
|
3
|
+
import { TableCell, TableRow, TextField, Slider } from '@vitessce/styles';
|
4
4
|
import { usePlotOptionsStyles, OptionsContainer, OptionSelect } from '@vitessce/vit-s';
|
5
5
|
import { GLSL_COLORMAPS } from '@vitessce/gl';
|
6
6
|
import { capitalize } from '@vitessce/utils';
|
@@ -25,7 +25,7 @@ export default function CellSetExpressionPlotOptions(props) {
|
|
25
25
|
|
26
26
|
const cellSetExpressionPlotOptionsId = useId();
|
27
27
|
|
28
|
-
const classes = usePlotOptionsStyles();
|
28
|
+
const { classes } = usePlotOptionsStyles();
|
29
29
|
|
30
30
|
function handleFeatureValueColormapChange(event) {
|
31
31
|
setFeatureValueColormap(event.target.value);
|
@@ -122,9 +122,7 @@ export default function CellSetExpressionPlotOptions(props) {
|
|
122
122
|
type="number"
|
123
123
|
onChange={handleTransformCoefficientChange}
|
124
124
|
value={featureValueTransformCoefficient}
|
125
|
-
|
126
|
-
shrink: true,
|
127
|
-
}}
|
125
|
+
slotProps={{ input: { shrink: true } }}
|
128
126
|
id={`cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`}
|
129
127
|
/>
|
130
128
|
</TableCell>
|
@@ -163,7 +161,10 @@ export default function CellSetExpressionPlotOptions(props) {
|
|
163
161
|
</TableCell>
|
164
162
|
<TableCell className={classes.inputCell}>
|
165
163
|
<Slider
|
166
|
-
|
164
|
+
slotProps={{
|
165
|
+
root: { className: classes.slider },
|
166
|
+
valueLabel: { className: classes.sliderValueLabel },
|
167
|
+
}}
|
167
168
|
value={featureValuePositivityThreshold}
|
168
169
|
onChange={handlePositivityThresholdChange}
|
169
170
|
aria-labelledby="pos-threshold-slider"
|
@@ -145,7 +145,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
145
145
|
helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION,
|
146
146
|
} = props;
|
147
147
|
|
148
|
-
const classes = useStyles();
|
148
|
+
const { classes } = useStyles();
|
149
149
|
const loaders = useLoaders();
|
150
150
|
|
151
151
|
// Get "props" from the coordination space.
|
package/src/DotPlotSubscriber.js
CHANGED
@@ -32,7 +32,7 @@ export function ExpressionHistogramSubscriber(props) {
|
|
32
32
|
helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM,
|
33
33
|
} = props;
|
34
34
|
|
35
|
-
const classes = useStyles();
|
35
|
+
const { classes } = useStyles();
|
36
36
|
const loaders = useLoaders();
|
37
37
|
|
38
38
|
// Get "props" from the coordination space.
|
@@ -26,7 +26,7 @@ export function FeatureBarPlotSubscriber(props) {
|
|
26
26
|
helpText = ViewHelpMapping.FEATURE_BAR_PLOT,
|
27
27
|
} = props;
|
28
28
|
|
29
|
-
const classes = useStyles();
|
29
|
+
const { classes } = useStyles();
|
30
30
|
const loaders = useLoaders();
|
31
31
|
|
32
32
|
// Get "props" from the coordination space.
|
@@ -32,7 +32,7 @@ export function FeatureSetEnrichmentBarPlotSubscriber(props) {
|
|
32
32
|
helpText = ViewHelpMapping.FEATURE_SET_ENRICHMENT_BAR_PLOT,
|
33
33
|
} = props;
|
34
34
|
|
35
|
-
const classes = useStyles();
|
35
|
+
const { classes } = useStyles();
|
36
36
|
const loaders = useLoaders();
|
37
37
|
const transformFeature = useAsyncFunction(AsyncFunctionType.TRANSFORM_FEATURE);
|
38
38
|
|
package/src/FeatureStatsTable.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useMemo, useState, useCallback } from 'react';
|
2
|
-
import { DataGrid } from '@
|
2
|
+
import { DataGrid } from '@vitessce/styles';
|
3
3
|
import { capitalize } from '@vitessce/utils';
|
4
4
|
import { useFilteredVolcanoData } from './utils.js';
|
5
5
|
|
@@ -9,6 +9,15 @@ const INITIAL_SORT_MODEL = [
|
|
9
9
|
{ field: 'logFoldChange', sort: 'desc' },
|
10
10
|
];
|
11
11
|
|
12
|
+
const initialState = {
|
13
|
+
pagination: {
|
14
|
+
paginationModel: {
|
15
|
+
pageSize: 10,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
};
|
19
|
+
const pageSizeOptions = [10];
|
20
|
+
|
12
21
|
export default function FeatureStatsTable(props) {
|
13
22
|
const {
|
14
23
|
obsType,
|
@@ -89,11 +98,11 @@ export default function FeatureStatsTable(props) {
|
|
89
98
|
}, [filteredData, obsSetsColumnNameMappingReversed]);
|
90
99
|
|
91
100
|
const onSelectionModelChange = useCallback((rowIds) => {
|
92
|
-
const featureIds = rowIds.map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
|
101
|
+
const featureIds = Array.from(rowIds.ids).map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
|
93
102
|
setFeatureSelection(featureIds);
|
94
103
|
}, []);
|
95
104
|
|
96
|
-
const rowSelectionModel = useMemo(() => [], []);
|
105
|
+
const rowSelectionModel = useMemo(() => ({ ids: new Set([]), type: 'include' }), []);
|
97
106
|
|
98
107
|
const [sortModel, setSortModel] = useState(INITIAL_SORT_MODEL);
|
99
108
|
|
@@ -104,9 +113,10 @@ export default function FeatureStatsTable(props) {
|
|
104
113
|
density="compact"
|
105
114
|
rows={rows}
|
106
115
|
columns={columns}
|
107
|
-
|
116
|
+
initialState={initialState}
|
117
|
+
pageSizeOptions={pageSizeOptions}
|
108
118
|
// checkboxSelection // TODO: uncomment to enable multiple-row selection
|
109
|
-
|
119
|
+
onRowSelectionModelChange={onSelectionModelChange}
|
110
120
|
rowSelectionModel={rowSelectionModel}
|
111
121
|
getRowId={getRowId}
|
112
122
|
sortModel={sortModel}
|
package/src/TreemapOptions.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useId } from 'react-aria';
|
3
3
|
import { isEqual } from 'lodash-es';
|
4
|
-
import { TableCell, TableRow } from '@
|
4
|
+
import { TableCell, TableRow } from '@vitessce/styles';
|
5
5
|
import { capitalize } from '@vitessce/utils';
|
6
6
|
import {
|
7
7
|
usePlotOptionsStyles, OptionSelect, OptionsContainer,
|
@@ -22,7 +22,7 @@ export default function TreemapOptions(props) {
|
|
22
22
|
} = props;
|
23
23
|
|
24
24
|
const treemapOptionsId = useId();
|
25
|
-
const classes = usePlotOptionsStyles();
|
25
|
+
const { classes } = usePlotOptionsStyles();
|
26
26
|
|
27
27
|
function handleColorEncodingChange(event) {
|
28
28
|
setObsColorEncoding(event.target.value);
|
package/src/TreemapSubscriber.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useId } from 'react-aria';
|
3
|
-
import { TableCell, TableRow, Slider } from '@
|
3
|
+
import { TableCell, TableRow, Slider } from '@vitessce/styles';
|
4
4
|
import {
|
5
5
|
usePlotOptionsStyles, OptionsContainer,
|
6
6
|
} from '@vitessce/vit-s';
|
@@ -21,7 +21,7 @@ export default function VolcanoPlotOptions(props) {
|
|
21
21
|
} = props;
|
22
22
|
|
23
23
|
const volcanoOptionsId = useId();
|
24
|
-
const classes = usePlotOptionsStyles();
|
24
|
+
const { classes } = usePlotOptionsStyles();
|
25
25
|
|
26
26
|
function handlePointSignificanceChange(event, value) {
|
27
27
|
setFeaturePointSignificanceThreshold(10 ** -value);
|
@@ -53,7 +53,10 @@ export default function VolcanoPlotOptions(props) {
|
|
53
53
|
</TableCell>
|
54
54
|
<TableCell className={classes.inputCell} variant="body">
|
55
55
|
<Slider
|
56
|
-
|
56
|
+
slotProps={{
|
57
|
+
root: { className: classes.slider },
|
58
|
+
valueLabel: { className: classes.sliderValueLabel },
|
59
|
+
}}
|
57
60
|
value={-Math.log10(featureLabelSignificanceThreshold)}
|
58
61
|
onChange={handleLabelSignificanceChange}
|
59
62
|
aria-label="Volcano plot label significance threshold slider"
|
@@ -75,7 +78,10 @@ export default function VolcanoPlotOptions(props) {
|
|
75
78
|
</TableCell>
|
76
79
|
<TableCell className={classes.inputCell} variant="body">
|
77
80
|
<Slider
|
78
|
-
|
81
|
+
slotProps={{
|
82
|
+
root: { className: classes.slider },
|
83
|
+
valueLabel: { className: classes.sliderValueLabel },
|
84
|
+
}}
|
79
85
|
value={featureLabelFoldChangeThreshold}
|
80
86
|
onChange={handleLabelFoldChangeChange}
|
81
87
|
aria-label="Volcano plot label fold-change threshold slider"
|
@@ -97,7 +103,10 @@ export default function VolcanoPlotOptions(props) {
|
|
97
103
|
</TableCell>
|
98
104
|
<TableCell className={classes.inputCell} variant="body">
|
99
105
|
<Slider
|
100
|
-
|
106
|
+
slotProps={{
|
107
|
+
root: { className: classes.slider },
|
108
|
+
valueLabel: { className: classes.sliderValueLabel },
|
109
|
+
}}
|
101
110
|
value={-Math.log10(featurePointSignificanceThreshold)}
|
102
111
|
onChange={handlePointSignificanceChange}
|
103
112
|
aria-label="Volcano plot point significance threshold slider"
|
@@ -119,7 +128,10 @@ export default function VolcanoPlotOptions(props) {
|
|
119
128
|
</TableCell>
|
120
129
|
<TableCell className={classes.inputCell} variant="body">
|
121
130
|
<Slider
|
122
|
-
|
131
|
+
slotProps={{
|
132
|
+
root: { className: classes.slider },
|
133
|
+
valueLabel: { className: classes.sliderValueLabel },
|
134
|
+
}}
|
123
135
|
value={featurePointFoldChangeThreshold}
|
124
136
|
onChange={handlePointFoldChangeChange}
|
125
137
|
aria-label="Volcano plot point fold-change threshold slider"
|