@vitessce/statistical-plots 3.6.6 → 3.6.8
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-CIQ8HfQ4.js → deflate-DFg7j2aM.js} +1 -1
- package/dist/{index-DKYKw8DX.js → index-Dhdy8_KV.js} +860 -638
- package/dist/index.js +1 -1
- package/dist/{jpeg-L5T74jDu.js → jpeg-BAsU3Uj1.js} +1 -1
- package/dist/{lerc-xXmKz_nL.js → lerc-Bs40GmLw.js} +1 -1
- package/dist/{lzw-D-d5b3_9.js → lzw--6K-CH9V.js} +1 -1
- package/dist/{packbits-EdeFNk-p.js → packbits-DIcMoiDr.js} +1 -1
- package/dist/{raw-B0E5tGhb.js → raw-TJbs5T8I.js} +1 -1
- package/dist/{webimage-Dr7tpGET.js → webimage-DcmYEYr-.js} +1 -1
- package/dist-tsc/CellSetCompositionBarPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetCompositionBarPlotSubscriber.js +6 -3
- package/dist-tsc/CellSetExpressionPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.js +16 -8
- package/dist-tsc/CellSetSizesPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetSizesPlotSubscriber.js +5 -2
- package/dist-tsc/DotPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/DotPlotSubscriber.js +17 -7
- package/dist-tsc/ExpressionHistogramSubscriber.d.ts.map +1 -1
- package/dist-tsc/ExpressionHistogramSubscriber.js +9 -3
- package/dist-tsc/FeatureBarPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureBarPlotSubscriber.js +11 -4
- package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.js +5 -2
- package/dist-tsc/FeatureStatsTableSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureStatsTableSubscriber.js +5 -2
- package/dist-tsc/TreemapSubscriber.d.ts.map +1 -1
- package/dist-tsc/TreemapSubscriber.js +11 -5
- package/dist-tsc/VolcanoPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/VolcanoPlotSubscriber.js +7 -2
- package/package.json +8 -8
- package/src/CellSetCompositionBarPlotSubscriber.js +9 -2
- package/src/CellSetExpressionPlotSubscriber.js +30 -8
- package/src/CellSetSizesPlotSubscriber.js +5 -1
- package/src/DotPlotSubscriber.js +30 -7
- package/src/ExpressionHistogramSubscriber.js +13 -3
- package/src/FeatureBarPlotSubscriber.js +15 -4
- package/src/FeatureSetEnrichmentBarPlotSubscriber.js +8 -1
- package/src/FeatureStatsTableSubscriber.js +8 -1
- package/src/TreemapSubscriber.js +18 -4
- package/src/VolcanoPlotSubscriber.js +12 -1
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-Dhdy8_KV.js";
|
3
3
|
const LercParameters = {
|
4
4
|
AddCompression: 1
|
5
5
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetCompositionBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetCompositionBarPlotSubscriber.js"],"names":[],"mappings":"AAwBA,
|
1
|
+
{"version":3,"file":"CellSetCompositionBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetCompositionBarPlotSubscriber.js"],"names":[],"mappings":"AAwBA,6EAqIC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
/* eslint-disable no-unused-vars */
|
3
|
-
import React, {
|
3
|
+
import React, { useCallback } from 'react';
|
4
4
|
import { TitleInfo, useCoordination, useLoaders, useReady, useGridItemSize, useObsSetStatsData, useMatchingLoader, useColumnNameMapping, } from '@vitessce/vit-s';
|
5
5
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping, DataType, } from '@vitessce/constants-internal';
|
6
6
|
import { capitalize } from '@vitessce/utils';
|
@@ -22,9 +22,12 @@ export function CellSetCompositionBarPlotSubscriber(props) {
|
|
22
22
|
const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
|
23
23
|
const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
|
24
24
|
const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
|
25
|
-
const [{ obsSetStats }, obsSetStatsStatus] = useObsSetStatsData(loaders, dataset, false, { obsType, sampleType },
|
25
|
+
const [{ obsSetStats }, obsSetStatsStatus, obsSetStatsUrls, obsSetStatsError,] = useObsSetStatsData(loaders, dataset, false, { obsType, sampleType },
|
26
26
|
// These volcanoOptions are passed to ObsSetStatsAnndataLoader.loadMulti():
|
27
27
|
{ sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection });
|
28
|
+
const errors = [
|
29
|
+
obsSetStatsError,
|
30
|
+
];
|
28
31
|
const isReady = useReady([
|
29
32
|
obsSetStatsStatus,
|
30
33
|
]);
|
@@ -36,5 +39,5 @@ export function CellSetCompositionBarPlotSubscriber(props) {
|
|
36
39
|
// TODO: support the following options
|
37
40
|
// - Use logFoldChange vs. intercept+effect for the bar y-value.
|
38
41
|
// - Boolean flag to allow hiding non-significant bars.
|
39
|
-
return (_jsx(TitleInfo, { title: `${capitalize(obsType)} Set Composition Analysis Plot`, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: obsSetStats ? (_jsx(CellSetCompositionBarPlot, { theme: theme, width: width, height: height, obsType: obsType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: obsSetStats, onBarSelect: onBarSelect })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set and a pair of ", sampleType, " sets."] })) }) }));
|
42
|
+
return (_jsx(TitleInfo, { title: `${capitalize(obsType)} Set Composition Analysis Plot`, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: obsSetStats ? (_jsx(CellSetCompositionBarPlot, { theme: theme, width: width, height: height, obsType: obsType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: obsSetStats, onBarSelect: onBarSelect })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set and a pair of ", sampleType, " sets."] })) }) }));
|
40
43
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AA0HA;;;;;;;;;GASG;AACH,uDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,
|
1
|
+
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AA0HA;;;;;;;;;GASG;AACH,uDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,eA8MA"}
|
@@ -97,16 +97,24 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
97
97
|
const [width, height, containerRef] = useGridItemSize();
|
98
98
|
const transformOptions = VALUE_TRANSFORM_OPTIONS;
|
99
99
|
// Get data from loaders using the data hooks.
|
100
|
+
const [
|
100
101
|
// eslint-disable-next-line no-unused-vars
|
101
|
-
|
102
|
+
expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
102
103
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
103
|
-
|
104
|
-
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
104
|
+
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
105
105
|
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
|
106
|
-
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
107
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
108
|
-
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset, false, { setSampleSetColor }, { sampleSetColor }, { sampleType });
|
109
|
-
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
|
106
|
+
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
107
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
108
|
+
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls, sampleSetsError,] = useSampleSetsData(loaders, dataset, false, { setSampleSetColor }, { sampleSetColor }, { sampleType });
|
109
|
+
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls, sampleEdgesError,] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
|
110
|
+
const errors = [
|
111
|
+
...featureSelectionErrors,
|
112
|
+
featureLabelsError,
|
113
|
+
matrixIndicesError,
|
114
|
+
obsSetsError,
|
115
|
+
sampleSetsError,
|
116
|
+
sampleEdgesError,
|
117
|
+
];
|
110
118
|
const isReady = useReady([
|
111
119
|
featureSelectionStatus,
|
112
120
|
matrixIndicesStatus,
|
@@ -139,5 +147,5 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
139
147
|
// Use empty string when firstGeneSelected is null
|
140
148
|
const titleSuffix = featureSuffix ? ` (${featureSuffix})` : '';
|
141
149
|
return (_jsx(TitleInfo, { title: title ? `${title}${titleSuffix}`
|
142
|
-
: `${capitalize(featureValueType)} by ${capitalize(obsType)} Set${titleSuffix}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, options: (_jsx(CellSetExpressionPlotOptions, { featureValueTransform: featureValueTransform, setFeatureValueTransform: setFeatureValueTransform, featureValueTransformCoefficient: featureValueTransformCoefficient, setFeatureValueTransformCoefficient: setFeatureValueTransformCoefficient, transformOptions: transformOptions, featureAggregationStrategy: featureAggregationStrategy, setFeatureAggregationStrategy: setFeatureAggregationStrategy })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: histogramData ? (_jsx(CellSetExpressionPlot, { yMin: yMin, yUnits: yUnits, jitter: jitter, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, sampleSetSelection: sampleSetSelection, sampleSetColor: sampleSetColor, colors: setArr, data: histogramData, exprMax: exprMax, theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, xAxisTitle: xAxisTitle })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
150
|
+
: `${capitalize(featureValueType)} by ${capitalize(obsType)} Set${titleSuffix}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, options: (_jsx(CellSetExpressionPlotOptions, { featureValueTransform: featureValueTransform, setFeatureValueTransform: setFeatureValueTransform, featureValueTransformCoefficient: featureValueTransformCoefficient, setFeatureValueTransformCoefficient: setFeatureValueTransformCoefficient, transformOptions: transformOptions, featureAggregationStrategy: featureAggregationStrategy, setFeatureAggregationStrategy: setFeatureAggregationStrategy })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: histogramData ? (_jsx(CellSetExpressionPlot, { yMin: yMin, yUnits: yUnits, jitter: jitter, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, sampleSetSelection: sampleSetSelection, sampleSetColor: sampleSetColor, colors: setArr, data: histogramData, exprMax: exprMax, theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, xAxisTitle: xAxisTitle })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
143
151
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetSizesPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetSizesPlotSubscriber.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;GAUG;AACH,kDANG;IAAwB,mBAAmB;IACnB,OAAO;IAET,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;CAChB,
|
1
|
+
{"version":3,"file":"CellSetSizesPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetSizesPlotSubscriber.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;GAUG;AACH,kDANG;IAAwB,mBAAmB;IACnB,OAAO;IAET,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;CAChB,eAoIA"}
|
@@ -31,7 +31,10 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
31
31
|
// the previous cell set that was selected
|
32
32
|
const [prevCellSetSelection, setPrevCellSetSelection] = useState([]);
|
33
33
|
// Get data from loaders using the data hooks.
|
34
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
|
34
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(loaders, dataset, true, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
|
35
|
+
const errors = [
|
36
|
+
obsSetsError,
|
37
|
+
];
|
35
38
|
const isReady = useReady([obsSetsStatus]);
|
36
39
|
const urls = useUrls([obsSetsUrls]);
|
37
40
|
const mergedCellSets = useMemo(() => mergeObsSets(cellSets, additionalCellSets), [cellSets, additionalCellSets]);
|
@@ -71,5 +74,5 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
71
74
|
setCellSetSelection([...cellSetSelection, setNamePath]);
|
72
75
|
}
|
73
76
|
};
|
74
|
-
return (_jsx(TitleInfo, { title: title, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(CellSetSizesPlot, { data: data, onBarSelect: onBarSelect, theme: theme, width: width, height: height, obsType: obsType }) }) }));
|
77
|
+
return (_jsx(TitleInfo, { title: title, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(CellSetSizesPlot, { data: data, onBarSelect: onBarSelect, theme: theme, width: width, height: height, obsType: obsType }) }) }));
|
75
78
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DotPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/DotPlotSubscriber.js"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,yCALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,
|
1
|
+
{"version":3,"file":"DotPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/DotPlotSubscriber.js"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,yCALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,eA6KA"}
|
@@ -25,14 +25,24 @@ export function DotPlotSubscriber(props) {
|
|
25
25
|
const transformOptions = VALUE_TRANSFORM_OPTIONS;
|
26
26
|
const isStratified = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 1;
|
27
27
|
// Get data from loaders using the data hooks.
|
28
|
+
const [
|
28
29
|
// eslint-disable-next-line no-unused-vars
|
29
|
-
|
30
|
+
expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
30
31
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
31
|
-
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrl] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
32
|
-
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrl] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
33
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrl] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
34
|
-
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
|
35
|
-
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
|
32
|
+
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrl, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
33
|
+
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrl, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
34
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrl, obsSetsError,] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
35
|
+
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl, sampleSetsError,] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
|
36
|
+
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl, sampleEdgesError,] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
|
37
|
+
// Consolidate error values from data hooks.
|
38
|
+
const errors = [
|
39
|
+
...featureSelectionErrors,
|
40
|
+
featureLabelsError,
|
41
|
+
matrixIndicesError,
|
42
|
+
obsSetsError,
|
43
|
+
sampleSetsError,
|
44
|
+
sampleEdgesError,
|
45
|
+
];
|
36
46
|
const isReady = useReady([
|
37
47
|
featureSelectionStatus,
|
38
48
|
matrixIndicesStatus,
|
@@ -50,5 +60,5 @@ export function DotPlotSubscriber(props) {
|
|
50
60
|
]);
|
51
61
|
const [resultArr, meanExpressionMax] = useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, posThreshold, featureLabelsMap);
|
52
62
|
const selectedTransformName = transformOptions.find(o => o.value === featureValueTransform)?.name;
|
53
|
-
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, options: (_jsx(CellSetExpressionPlotOptions, { featureValueTransform: featureValueTransform, setFeatureValueTransform: setFeatureValueTransform, featureValueTransformCoefficient: featureValueTransformCoefficient, setFeatureValueTransformCoefficient: setFeatureValueTransformCoefficient, transformOptions: transformOptions, featureValuePositivityThreshold: posThreshold, setFeatureValuePositivityThreshold: setPosThreshold, featureValueColormap: featureValueColormap, setFeatureValueColormap: setFeatureValueColormap })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: resultArr ? (_jsx(DotPlot, { isStratified: isStratified, transpose: transpose, domainMax: meanExpressionMax, data: resultArr, theme: theme, width: width, height: height, obsType: obsType, sampleType: sampleType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, featureValueColormap: featureValueColormap, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor })) : (_jsxs("span", { children: ["Select at least one ", featureType, "."] })) }) }));
|
63
|
+
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, options: (_jsx(CellSetExpressionPlotOptions, { featureValueTransform: featureValueTransform, setFeatureValueTransform: setFeatureValueTransform, featureValueTransformCoefficient: featureValueTransformCoefficient, setFeatureValueTransformCoefficient: setFeatureValueTransformCoefficient, transformOptions: transformOptions, featureValuePositivityThreshold: posThreshold, setFeatureValuePositivityThreshold: setPosThreshold, featureValueColormap: featureValueColormap, setFeatureValueColormap: setFeatureValueColormap })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: resultArr ? (_jsx(DotPlot, { isStratified: isStratified, transpose: transpose, domainMax: meanExpressionMax, data: resultArr, theme: theme, width: width, height: height, obsType: obsType, sampleType: sampleType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, featureValueColormap: featureValueColormap, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor })) : (_jsxs("span", { children: ["Select at least one ", featureType, "."] })) }) }));
|
54
64
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExpressionHistogramSubscriber.d.ts","sourceRoot":"","sources":["../src/ExpressionHistogramSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,qDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,
|
1
|
+
{"version":3,"file":"ExpressionHistogramSubscriber.d.ts","sourceRoot":"","sources":["../src/ExpressionHistogramSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,qDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,eAsIA"}
|
@@ -24,9 +24,15 @@ export function ExpressionHistogramSubscriber(props) {
|
|
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);
|
25
25
|
const [width, height, containerRef] = useGridItemSize();
|
26
26
|
// Get data from loaders using the data hooks.
|
27
|
-
const [{ obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls,] = useObsFeatureMatrixData(loaders, dataset, true, {}, {}, { obsType, featureType, featureValueType });
|
27
|
+
const [{ obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls, matrixError,] = useObsFeatureMatrixData(loaders, dataset, true, {}, {}, { obsType, featureType, featureValueType });
|
28
|
+
const [
|
28
29
|
// eslint-disable-next-line no-unused-vars
|
29
|
-
|
30
|
+
expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
31
|
+
// Consolidate error values from data hooks.
|
32
|
+
const errors = [
|
33
|
+
matrixError,
|
34
|
+
...featureSelectionErrors,
|
35
|
+
];
|
30
36
|
const isReady = useReady([
|
31
37
|
matrixStatus,
|
32
38
|
featureSelectionStatus,
|
@@ -67,5 +73,5 @@ export function ExpressionHistogramSubscriber(props) {
|
|
67
73
|
}, [additionalCellSets, cellSetColor, data, setAdditionalCellSets,
|
68
74
|
setCellColorEncoding, setCellSetColor, setCellSetSelection, firstGeneSelected,
|
69
75
|
]);
|
70
|
-
return (_jsx(TitleInfo, { title: `Histogram${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(ExpressionHistogram, { geneSelection: geneSelection, obsType: obsType, featureType: featureType, featureValueType: featureValueType, onSelect: onSelect, data: data, theme: theme, width: width, height: height }) }) }));
|
76
|
+
return (_jsx(TitleInfo, { title: `Histogram${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(ExpressionHistogram, { geneSelection: geneSelection, obsType: obsType, featureType: featureType, featureValueType: featureValueType, onSelect: onSelect, data: data, theme: theme, width: width, height: height }) }) }));
|
71
77
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FeatureBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureBarPlotSubscriber.js"],"names":[],"mappings":"AAkBA,
|
1
|
+
{"version":3,"file":"FeatureBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureBarPlotSubscriber.js"],"names":[],"mappings":"AAkBA,kEAuJC"}
|
@@ -14,11 +14,18 @@ export function FeatureBarPlotSubscriber(props) {
|
|
14
14
|
// console.log("BarPlot: " + cellHighlight)
|
15
15
|
const [width, height, containerRef] = useGridItemSize();
|
16
16
|
// Get data from loaders using the data hooks.
|
17
|
+
const [
|
17
18
|
// eslint-disable-next-line no-unused-vars
|
18
|
-
|
19
|
+
expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
19
20
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
20
|
-
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
21
|
-
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
21
|
+
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
22
|
+
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
23
|
+
// Consolidate error values from data hooks.
|
24
|
+
const errors = [
|
25
|
+
...featureSelectionErrors,
|
26
|
+
featureLabelsError,
|
27
|
+
matrixIndicesError,
|
28
|
+
];
|
22
29
|
const isReady = useReady([
|
23
30
|
featureSelectionStatus,
|
24
31
|
matrixIndicesStatus,
|
@@ -58,5 +65,5 @@ export function FeatureBarPlotSubscriber(props) {
|
|
58
65
|
featureValueTransform, featureValueTransformCoefficient,
|
59
66
|
firstGeneSelected,
|
60
67
|
]);
|
61
|
-
return (_jsx(TitleInfo, { title: `Feature Values${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: expressionArr ? (_jsx(FeatureBarPlot, { yMin: yMin, yMax: expressionMax, yUnits: yUnits, data: expressionArr, theme: theme, width: width, height: height, obsType: obsType, cellHighlight: cellHighlight, cellSetSelection: cellSetSelection, additionalCellSets: additionalCellSets, cellSetColor: cellSetColor, featureType: featureType, featureValueType: featureValueType, featureName: firstGeneSelected, onBarSelect: onBarSelect, onBarHighlight: onBarHighlight })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
68
|
+
return (_jsx(TitleInfo, { title: `Feature Values${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: expressionArr ? (_jsx(FeatureBarPlot, { yMin: yMin, yMax: expressionMax, yUnits: yUnits, data: expressionArr, theme: theme, width: width, height: height, obsType: obsType, cellHighlight: cellHighlight, cellSetSelection: cellSetSelection, additionalCellSets: additionalCellSets, cellSetColor: cellSetColor, featureType: featureType, featureValueType: featureValueType, featureName: firstGeneSelected, onBarSelect: onBarSelect, onBarHighlight: onBarHighlight })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
62
69
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FeatureSetEnrichmentBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureSetEnrichmentBarPlotSubscriber.js"],"names":[],"mappings":"AA0BA,+
|
1
|
+
{"version":3,"file":"FeatureSetEnrichmentBarPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureSetEnrichmentBarPlotSubscriber.js"],"names":[],"mappings":"AA0BA,+EAqJC"}
|
@@ -23,9 +23,12 @@ export function FeatureSetEnrichmentBarPlotSubscriber(props) {
|
|
23
23
|
const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
|
24
24
|
const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
|
25
25
|
const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
|
26
|
-
const [{ featureSetStats }, featureSetStatsStatus] = useFeatureSetStatsData(loaders, dataset, false, { obsType, featureType, sampleType },
|
26
|
+
const [{ featureSetStats }, featureSetStatsStatus, featureSetStatsUrls, featureSetStatsError,] = useFeatureSetStatsData(loaders, dataset, false, { obsType, featureType, sampleType },
|
27
27
|
// These volcanoOptions are passed to ObsSetStatsAnndataLoader.loadMulti():
|
28
28
|
{ sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection });
|
29
|
+
const errors = [
|
30
|
+
featureSetStatsError,
|
31
|
+
];
|
29
32
|
const isReady = useReady([
|
30
33
|
featureSetStatsStatus,
|
31
34
|
]);
|
@@ -50,5 +53,5 @@ export function FeatureSetEnrichmentBarPlotSubscriber(props) {
|
|
50
53
|
// - max number of bars to show
|
51
54
|
// - Boolean flag: should same pathway which appears multiple times
|
52
55
|
// be de-duplicated (one bar per pathway, using most-significant result)?
|
53
|
-
return (_jsx(TitleInfo, { title: `${capitalize(featureType)} Set Enrichment Plot`, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureSetStats ? (_jsx(FeatureSetEnrichmentBarPlot, { theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureSetStats, onBarSelect: onBarSelect, pValueThreshold: 0.01 })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set."] })) }) }));
|
56
|
+
return (_jsx(TitleInfo, { title: `${capitalize(featureType)} Set Enrichment Plot`, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureSetStats ? (_jsx(FeatureSetEnrichmentBarPlot, { theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureSetStats, onBarSelect: onBarSelect, pValueThreshold: 0.01 })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set."] })) }) }));
|
54
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FeatureStatsTableSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTableSubscriber.js"],"names":[],"mappings":"AAoBA,
|
1
|
+
{"version":3,"file":"FeatureStatsTableSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTableSubscriber.js"],"names":[],"mappings":"AAoBA,qEAuHC"}
|
@@ -18,11 +18,14 @@ export function FeatureStatsTableSubscriber(props) {
|
|
18
18
|
const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
|
19
19
|
const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
|
20
20
|
const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
|
21
|
-
const [{ featureStats }, featureStatsStatus] = useFeatureStatsData(loaders, dataset, false, { obsType, featureType, sampleType },
|
21
|
+
const [{ featureStats }, featureStatsStatus, featureStatsUrls, featureStatsError,] = useFeatureStatsData(loaders, dataset, false, { obsType, featureType, sampleType },
|
22
22
|
// These volcanoOptions are passed to FeatureStatsAnndataLoader.loadMulti():
|
23
23
|
{ sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection });
|
24
|
+
const errors = [
|
25
|
+
featureStatsError,
|
26
|
+
];
|
24
27
|
const isReady = useReady([
|
25
28
|
featureStatsStatus,
|
26
29
|
]);
|
27
|
-
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, withPadding: false, children: featureStats ? (_jsx(FeatureStatsTable, { theme: theme, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, featureSelection: featureSelection, setFeatureSelection: setFeatureSelection, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold })) : (_jsxs("p", { style: { padding: '12px' }, children: ["Select at least one ", obsType, " set."] })) }));
|
30
|
+
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, withPadding: false, children: featureStats ? (_jsx(FeatureStatsTable, { theme: theme, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, featureSelection: featureSelection, setFeatureSelection: setFeatureSelection, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold })) : (_jsxs("p", { style: { padding: '12px' }, children: ["Select at least one ", obsType, " set."] })) }));
|
28
31
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TreemapSubscriber.d.ts","sourceRoot":"","sources":["../src/TreemapSubscriber.js"],"names":[],"mappings":"AAyBA,
|
1
|
+
{"version":3,"file":"TreemapSubscriber.d.ts","sourceRoot":"","sources":["../src/TreemapSubscriber.js"],"names":[],"mappings":"AAyBA,2DA8QC"}
|
@@ -19,16 +19,22 @@ export function TreemapSubscriber(props) {
|
|
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);
|
20
20
|
const [width, height, containerRef] = useGridItemSize();
|
21
21
|
// TODO: how to deal with multimodal cases (multiple obsIndex, one per modality)?
|
22
|
-
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
23
|
-
const [{ obsSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
24
|
-
const [{ sampleIndex, sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset,
|
22
|
+
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
23
|
+
const [{ obsSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
24
|
+
const [{ sampleIndex, sampleSets }, sampleSetsStatus, sampleSetsUrls, sampleSetsError,] = useSampleSetsData(loaders, dataset,
|
25
25
|
// TODO: support `false`, i.e., configurations in which
|
26
26
|
// there are no sampleSets
|
27
27
|
true, { setSampleSetColor }, { sampleSetColor }, { sampleType });
|
28
|
-
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(loaders, dataset,
|
28
|
+
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls, sampleEdgesError,] = useSampleEdgesData(loaders, dataset,
|
29
29
|
// TODO: support `false`, i.e., configurations in which
|
30
30
|
// there are no sampleEdges
|
31
31
|
true, {}, {}, { obsType, sampleType });
|
32
|
+
const errors = [
|
33
|
+
matrixIndicesError,
|
34
|
+
obsSetsError,
|
35
|
+
sampleSetsError,
|
36
|
+
sampleEdgesError,
|
37
|
+
];
|
32
38
|
const isReady = useReady([
|
33
39
|
matrixIndicesStatus,
|
34
40
|
obsSetsStatus,
|
@@ -108,5 +114,5 @@ export function TreemapSubscriber(props) {
|
|
108
114
|
const onNodeClick = useCallback((obsSetPath) => {
|
109
115
|
setObsSetSelection([obsSetPath]);
|
110
116
|
}, [setObsSetSelection]);
|
111
|
-
return (_jsxs(TitleInfo, { title: `Treemap of ${capitalize(plur(obsType, 2))}`, info: `${commaNumber(selectedObsCount)} ${plur(obsType, selectedObsCount)} from ${commaNumber(selectedSampleCount)} ${plur(sampleType, selectedSampleCount)}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, withPadding: false, options: (_jsx(TreemapOptions, { obsType: obsType, sampleType: sampleType, obsColorEncoding: obsColorEncoding, setObsColorEncoding: setObsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, setHierarchyLevels: setHierarchyLevels })), children: [_jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(Treemap, { obsCounts: obsCounts, sampleCounts: sampleCounts, obsColorEncoding: obsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, theme: theme, width: width, height: Math.max(height * (selectedObsCount / totalObsCount), 40), obsType: obsType, sampleType: sampleType, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, obsSetSelection: obsSetSelection, sampleSetSelection: sampleSetSelection, onNodeClick: onNodeClick }) }), _jsx("div", { style: { position: 'absolute', right: '2px', bottom: '2px', fontSize: '10px' }, children: unselectedObsCount > 0 ? (_jsx("span", { children: `${commaNumber(unselectedObsCount)} ${plur(obsType, unselectedObsCount)} from ${commaNumber(unselectedSampleCount)} ${plur(sampleType, unselectedSampleCount)} currently omitted` })) : null })] }));
|
117
|
+
return (_jsxs(TitleInfo, { title: `Treemap of ${capitalize(plur(obsType, 2))}`, info: `${commaNumber(selectedObsCount)} ${plur(obsType, selectedObsCount)} from ${commaNumber(selectedSampleCount)} ${plur(sampleType, selectedSampleCount)}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, withPadding: false, options: (_jsx(TreemapOptions, { obsType: obsType, sampleType: sampleType, obsColorEncoding: obsColorEncoding, setObsColorEncoding: setObsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, setHierarchyLevels: setHierarchyLevels })), children: [_jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(Treemap, { obsCounts: obsCounts, sampleCounts: sampleCounts, obsColorEncoding: obsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, theme: theme, width: width, height: Math.max(height * (selectedObsCount / totalObsCount), 40), obsType: obsType, sampleType: sampleType, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, obsSetSelection: obsSetSelection, sampleSetSelection: sampleSetSelection, onNodeClick: onNodeClick }) }), _jsx("div", { style: { position: 'absolute', right: '2px', bottom: '2px', fontSize: '10px' }, children: unselectedObsCount > 0 ? (_jsx("span", { children: `${commaNumber(unselectedObsCount)} ${plur(obsType, unselectedObsCount)} from ${commaNumber(unselectedSampleCount)} ${plur(sampleType, unselectedSampleCount)} currently omitted` })) : null })] }));
|
112
118
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VolcanoPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/VolcanoPlotSubscriber.js"],"names":[],"mappings":"AAuBA,+
|
1
|
+
{"version":3,"file":"VolcanoPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/VolcanoPlotSubscriber.js"],"names":[],"mappings":"AAuBA,+DA0JC"}
|
@@ -22,14 +22,19 @@ export function VolcanoPlotSubscriber(props) {
|
|
22
22
|
const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
|
23
23
|
const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
|
24
24
|
const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
|
25
|
-
|
25
|
+
// Get data from loaders using the data hooks.
|
26
|
+
const [{ featureStats }, featureStatsStatus, featureStatsUrls, featureStatsError,] = useFeatureStatsData(loaders, dataset, false, { obsType, featureType, sampleType },
|
26
27
|
// These volcanoOptions are passed to FeatureStatsAnndataLoader.loadMulti():
|
27
28
|
{ sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection });
|
29
|
+
// Consolidate error values from data hooks.
|
30
|
+
const errors = [
|
31
|
+
featureStatsError,
|
32
|
+
];
|
28
33
|
const isReady = useReady([
|
29
34
|
featureStatsStatus,
|
30
35
|
]);
|
31
36
|
const onFeatureClick = useCallback((featureId) => {
|
32
37
|
setFeatureSelection([featureId]);
|
33
38
|
}, [setFeatureSelection]);
|
34
|
-
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, options: (_jsx(VolcanoPlotOptions, { obsType: obsType, featureType: featureType, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold, featureLabelSignificanceThreshold: featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold: featureLabelFoldChangeThreshold, setFeaturePointSignificanceThreshold: setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold: setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold: setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold: setFeatureLabelFoldChangeThreshold })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureStats ? (_jsx(VolcanoPlot, { theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, onFeatureClick: onFeatureClick, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold, featureLabelSignificanceThreshold: featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold: featureLabelFoldChangeThreshold })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set."] })) }) }));
|
39
|
+
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, options: (_jsx(VolcanoPlotOptions, { obsType: obsType, featureType: featureType, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold, featureLabelSignificanceThreshold: featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold: featureLabelFoldChangeThreshold, setFeaturePointSignificanceThreshold: setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold: setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold: setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold: setFeatureLabelFoldChangeThreshold })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureStats ? (_jsx(VolcanoPlot, { theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, onFeatureClick: onFeatureClick, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold, featureLabelSignificanceThreshold: featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold: featureLabelFoldChangeThreshold })) : (_jsxs("span", { children: ["Select at least one ", obsType, " set."] })) }) }));
|
35
40
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.6.
|
3
|
+
"version": "3.6.8",
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -28,13 +28,13 @@
|
|
28
28
|
"react-aria": "^3.28.0",
|
29
29
|
"internmap": "^2.0.3",
|
30
30
|
"uuid": "^9.0.0",
|
31
|
-
"@vitessce/styles": "3.6.
|
32
|
-
"@vitessce/constants-internal": "3.6.
|
33
|
-
"@vitessce/sets-utils": "3.6.
|
34
|
-
"@vitessce/utils": "3.6.
|
35
|
-
"@vitessce/vega": "3.6.
|
36
|
-
"@vitessce/vit-s": "3.6.
|
37
|
-
"@vitessce/gl": "3.6.
|
31
|
+
"@vitessce/styles": "3.6.8",
|
32
|
+
"@vitessce/constants-internal": "3.6.8",
|
33
|
+
"@vitessce/sets-utils": "3.6.8",
|
34
|
+
"@vitessce/utils": "3.6.8",
|
35
|
+
"@vitessce/vega": "3.6.8",
|
36
|
+
"@vitessce/vit-s": "3.6.8",
|
37
|
+
"@vitessce/gl": "3.6.8"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"react": "^18.0.0",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
2
|
-
import React, {
|
2
|
+
import React, { useCallback } from 'react';
|
3
3
|
import {
|
4
4
|
TitleInfo,
|
5
5
|
useCoordination,
|
@@ -95,13 +95,19 @@ export function CellSetCompositionBarPlotSubscriber(props) {
|
|
95
95
|
const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
|
96
96
|
const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
|
97
97
|
|
98
|
-
const [
|
98
|
+
const [
|
99
|
+
{ obsSetStats }, obsSetStatsStatus, obsSetStatsUrls, obsSetStatsError,
|
100
|
+
] = useObsSetStatsData(
|
99
101
|
loaders, dataset, false,
|
100
102
|
{ obsType, sampleType },
|
101
103
|
// These volcanoOptions are passed to ObsSetStatsAnndataLoader.loadMulti():
|
102
104
|
{ sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection },
|
103
105
|
);
|
104
106
|
|
107
|
+
const errors = [
|
108
|
+
obsSetStatsError,
|
109
|
+
];
|
110
|
+
|
105
111
|
const isReady = useReady([
|
106
112
|
obsSetStatsStatus,
|
107
113
|
]);
|
@@ -123,6 +129,7 @@ export function CellSetCompositionBarPlotSubscriber(props) {
|
|
123
129
|
theme={theme}
|
124
130
|
isReady={isReady}
|
125
131
|
helpText={helpText}
|
132
|
+
errors={errors}
|
126
133
|
>
|
127
134
|
<div ref={containerRef} className={classes.vegaContainer}>
|
128
135
|
{obsSetStats ? (
|
@@ -179,41 +179,62 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
179
179
|
const transformOptions = VALUE_TRANSFORM_OPTIONS;
|
180
180
|
|
181
181
|
// Get data from loaders using the data hooks.
|
182
|
-
|
183
|
-
|
182
|
+
const [
|
183
|
+
// eslint-disable-next-line no-unused-vars
|
184
|
+
expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,
|
185
|
+
] = useFeatureSelection(
|
184
186
|
loaders, dataset, false, geneSelection,
|
185
187
|
{ obsType, featureType, featureValueType },
|
186
188
|
);
|
187
189
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
188
|
-
|
189
|
-
|
190
|
+
const [
|
191
|
+
{ featureLabelsMap: featureLabelsMapOrig },
|
192
|
+
featureLabelsStatus,
|
193
|
+
featureLabelsUrls,
|
194
|
+
featureLabelsError,
|
195
|
+
] = useFeatureLabelsData(
|
190
196
|
loaders, dataset, false, {}, {},
|
191
197
|
{ featureType },
|
192
198
|
);
|
193
199
|
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
194
200
|
featureType, featureLabelsMapOrig, { stripCuriePrefixes: true },
|
195
201
|
);
|
196
|
-
const [
|
202
|
+
const [
|
203
|
+
{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,
|
204
|
+
] = useObsFeatureMatrixIndices(
|
197
205
|
loaders, dataset, false,
|
198
206
|
{ obsType, featureType, featureValueType },
|
199
207
|
);
|
200
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
208
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(
|
201
209
|
loaders, dataset, true, {}, {},
|
202
210
|
{ obsType },
|
203
211
|
);
|
204
212
|
|
205
|
-
const [
|
213
|
+
const [
|
214
|
+
{ sampleSets }, sampleSetsStatus, sampleSetsUrls, sampleSetsError,
|
215
|
+
] = useSampleSetsData(
|
206
216
|
loaders, dataset, false,
|
207
217
|
{ setSampleSetColor },
|
208
218
|
{ sampleSetColor },
|
209
219
|
{ sampleType },
|
210
220
|
);
|
211
221
|
|
212
|
-
const [
|
222
|
+
const [
|
223
|
+
{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls, sampleEdgesError,
|
224
|
+
] = useSampleEdgesData(
|
213
225
|
loaders, dataset, false, {}, {},
|
214
226
|
{ obsType, sampleType },
|
215
227
|
);
|
216
228
|
|
229
|
+
const errors = [
|
230
|
+
...featureSelectionErrors,
|
231
|
+
featureLabelsError,
|
232
|
+
matrixIndicesError,
|
233
|
+
obsSetsError,
|
234
|
+
sampleSetsError,
|
235
|
+
sampleEdgesError,
|
236
|
+
];
|
237
|
+
|
217
238
|
const isReady = useReady([
|
218
239
|
featureSelectionStatus,
|
219
240
|
matrixIndicesStatus,
|
@@ -273,6 +294,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
273
294
|
theme={theme}
|
274
295
|
isReady={isReady}
|
275
296
|
helpText={helpText}
|
297
|
+
errors={errors}
|
276
298
|
options={(
|
277
299
|
<CellSetExpressionPlotOptions
|
278
300
|
featureValueTransform={featureValueTransform}
|
@@ -63,12 +63,15 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
63
63
|
const [prevCellSetSelection, setPrevCellSetSelection] = useState([]);
|
64
64
|
|
65
65
|
// Get data from loaders using the data hooks.
|
66
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
66
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(
|
67
67
|
loaders, dataset, true,
|
68
68
|
{ setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
|
69
69
|
{ obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
|
70
70
|
{ obsType },
|
71
71
|
);
|
72
|
+
const errors = [
|
73
|
+
obsSetsError,
|
74
|
+
];
|
72
75
|
const isReady = useReady([obsSetsStatus]);
|
73
76
|
const urls = useUrls([obsSetsUrls]);
|
74
77
|
|
@@ -139,6 +142,7 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
139
142
|
theme={theme}
|
140
143
|
isReady={isReady}
|
141
144
|
helpText={helpText}
|
145
|
+
errors={errors}
|
142
146
|
>
|
143
147
|
<div ref={containerRef} className={classes.vegaContainer}>
|
144
148
|
<CellSetSizesPlot
|