@vitessce/statistical-plots 3.4.10 → 3.4.11
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-0e765bf3.js → deflate-49ab3d32.js} +1 -1
- package/dist/{index-ce54e46a.js → index-7aa37ee9.js} +39 -12
- package/dist/index.js +1 -1
- package/dist/{jpeg-0907c241.js → jpeg-ba7bae31.js} +1 -1
- package/dist/{lerc-28ed0c74.js → lerc-2c40d55c.js} +1 -1
- package/dist/{lzw-a4e25d69.js → lzw-d8b09410.js} +1 -1
- package/dist/{packbits-b0989382.js → packbits-937f8889.js} +1 -1
- package/dist/{raw-57e07f3f.js → raw-2c83cfa0.js} +1 -1
- package/dist/{webimage-21c51b36.js → webimage-bffbce5c.js} +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.js +3 -3
- package/dist-tsc/CellSetSizesPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetSizesPlotSubscriber.js +3 -3
- package/dist-tsc/DotPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/DotPlotSubscriber.js +3 -3
- package/dist-tsc/ExpressionHistogramSubscriber.d.ts.map +1 -1
- package/dist-tsc/ExpressionHistogramSubscriber.js +3 -3
- package/dist-tsc/FeatureBarPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureBarPlotSubscriber.js +3 -3
- package/package.json +7 -7
- package/src/CellSetExpressionPlotSubscriber.js +3 -1
- package/src/CellSetSizesPlotSubscriber.js +3 -1
- package/src/DotPlotSubscriber.js +3 -1
- package/src/ExpressionHistogramSubscriber.js +3 -1
- package/src/FeatureBarPlotSubscriber.js +3 -1
@@ -1216,6 +1216,23 @@ const CoordinationType$1 = {
|
|
1216
1216
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
1217
1217
|
CONTOUR_COLOR: "contourColor"
|
1218
1218
|
};
|
1219
|
+
const ViewHelpMapping = {
|
1220
|
+
SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
|
1221
|
+
HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
|
1222
|
+
SPATIAL: "The spatial view displays (potentially layered) spatially-resolved data including RGB or multiplexed images, segmentations of observations (bitmask- or polygon-based), and/or points (e.g., representing FISH transcripts).",
|
1223
|
+
DESCRIPTION: "The description view displays additional information about a dataset. When images are included in a dataset, the description view also includes image metadata (if contained in the image files).",
|
1224
|
+
STATUS: "The status view displays debugging messages, including app-wide error messages when datasets fail to load or when schemas fail to validate. Details about the entity under the mouse cursor (cell, gene, and/or molecule) are displayed during hover interactions.",
|
1225
|
+
LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
|
1226
|
+
GENOMIC_PROFILES: "The genomic profiles view displays genome browser tracks (using the genomic-profiles data type) containing bar plots, where the genome is along the x-axis and the value at each genome position is encoded with a bar along the y-axis.",
|
1227
|
+
GATING: "The gating scatterplot displays expression data for two genes (along the X and Y axes). Users can select two genes, and the scatterplot is dynamically generated using observation-by-feature matrix data. Gating can then be performed by using the lasso or box select tools.",
|
1228
|
+
FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
|
1229
|
+
OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
|
1230
|
+
OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
|
1231
|
+
OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
|
1232
|
+
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
1233
|
+
DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
|
1234
|
+
FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis."
|
1235
|
+
};
|
1219
1236
|
const COMPONENT_COORDINATION_TYPES = {
|
1220
1237
|
[ViewType$1.SCATTERPLOT]: [
|
1221
1238
|
CoordinationType$1.DATASET,
|
@@ -133191,16 +133208,16 @@ function addDecoder(cases2, importFn) {
|
|
133191
133208
|
}
|
133192
133209
|
cases2.forEach((c2) => registry$1.set(c2, importFn));
|
133193
133210
|
}
|
133194
|
-
addDecoder([void 0, 1], () => import("./raw-
|
133195
|
-
addDecoder(5, () => import("./lzw-
|
133211
|
+
addDecoder([void 0, 1], () => import("./raw-2c83cfa0.js").then((m2) => m2.default));
|
133212
|
+
addDecoder(5, () => import("./lzw-d8b09410.js").then((m2) => m2.default));
|
133196
133213
|
addDecoder(6, () => {
|
133197
133214
|
throw new Error("old style JPEG compression is not supported.");
|
133198
133215
|
});
|
133199
|
-
addDecoder(7, () => import("./jpeg-
|
133200
|
-
addDecoder([8, 32946], () => import("./deflate-
|
133201
|
-
addDecoder(32773, () => import("./packbits-
|
133202
|
-
addDecoder(34887, () => import("./lerc-
|
133203
|
-
addDecoder(50001, () => import("./webimage-
|
133216
|
+
addDecoder(7, () => import("./jpeg-ba7bae31.js").then((m2) => m2.default));
|
133217
|
+
addDecoder([8, 32946], () => import("./deflate-49ab3d32.js").then((m2) => m2.default));
|
133218
|
+
addDecoder(32773, () => import("./packbits-937f8889.js").then((m2) => m2.default));
|
133219
|
+
addDecoder(34887, () => import("./lerc-2c40d55c.js").then((m2) => m2.default));
|
133220
|
+
addDecoder(50001, () => import("./webimage-bffbce5c.js").then((m2) => m2.default));
|
133204
133221
|
function decodeRowAcc(row, stride) {
|
133205
133222
|
let length2 = row.length - stride;
|
133206
133223
|
let offset5 = 0;
|
@@ -153889,7 +153906,8 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
153889
153906
|
theme,
|
153890
153907
|
jitter: jitter2 = false,
|
153891
153908
|
yMin = null,
|
153892
|
-
yUnits = null
|
153909
|
+
yUnits = null,
|
153910
|
+
helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION
|
153893
153911
|
} = props;
|
153894
153912
|
const classes = useStyles$1();
|
153895
153913
|
const loaders = useLoaders();
|
@@ -154007,6 +154025,7 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
154007
154025
|
urls,
|
154008
154026
|
theme,
|
154009
154027
|
isReady,
|
154028
|
+
helpText,
|
154010
154029
|
options: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
154011
154030
|
CellSetExpressionPlotOptions,
|
154012
154031
|
{
|
@@ -205748,7 +205767,8 @@ function CellSetSizesPlotSubscriber(props) {
|
|
205748
205767
|
downloadButtonVisible,
|
205749
205768
|
removeGridComponent,
|
205750
205769
|
theme,
|
205751
|
-
title: titleOverride
|
205770
|
+
title: titleOverride,
|
205771
|
+
helpText = ViewHelpMapping.OBS_SET_SIZES
|
205752
205772
|
} = props;
|
205753
205773
|
const classes = useStyles$1();
|
205754
205774
|
const loaders = useLoaders();
|
@@ -205837,6 +205857,7 @@ function CellSetSizesPlotSubscriber(props) {
|
|
205837
205857
|
urls,
|
205838
205858
|
theme,
|
205839
205859
|
isReady,
|
205860
|
+
helpText,
|
205840
205861
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
205841
205862
|
CellSetSizesPlot,
|
205842
205863
|
{
|
@@ -205932,7 +205953,8 @@ function ExpressionHistogramSubscriber(props) {
|
|
205932
205953
|
closeButtonVisible,
|
205933
205954
|
downloadButtonVisible,
|
205934
205955
|
removeGridComponent,
|
205935
|
-
theme
|
205956
|
+
theme,
|
205957
|
+
helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM
|
205936
205958
|
} = props;
|
205937
205959
|
const classes = useStyles$1();
|
205938
205960
|
const loaders = useLoaders();
|
@@ -206034,6 +206056,7 @@ function ExpressionHistogramSubscriber(props) {
|
|
206034
206056
|
urls,
|
206035
206057
|
theme,
|
206036
206058
|
isReady,
|
206059
|
+
helpText,
|
206037
206060
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206038
206061
|
ExpressionHistogram,
|
206039
206062
|
{
|
@@ -206252,7 +206275,8 @@ function DotPlotSubscriber(props) {
|
|
206252
206275
|
removeGridComponent,
|
206253
206276
|
theme,
|
206254
206277
|
title: title2 = "Dot Plot",
|
206255
|
-
transpose: transpose2 = true
|
206278
|
+
transpose: transpose2 = true,
|
206279
|
+
helpText = ViewHelpMapping.DOT_PLOT
|
206256
206280
|
} = props;
|
206257
206281
|
const classes = useStyles$1();
|
206258
206282
|
const loaders = useLoaders();
|
@@ -206370,6 +206394,7 @@ function DotPlotSubscriber(props) {
|
|
206370
206394
|
urls,
|
206371
206395
|
theme,
|
206372
206396
|
isReady,
|
206397
|
+
helpText,
|
206373
206398
|
options: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206374
206399
|
CellSetExpressionPlotOptions,
|
206375
206400
|
{
|
@@ -206554,7 +206579,8 @@ function FeatureBarPlotSubscriber(props) {
|
|
206554
206579
|
removeGridComponent,
|
206555
206580
|
theme,
|
206556
206581
|
yMin = 0,
|
206557
|
-
yUnits = null
|
206582
|
+
yUnits = null,
|
206583
|
+
helpText = ViewHelpMapping.FEATURE_BAR_PLOT
|
206558
206584
|
} = props;
|
206559
206585
|
const classes = useStyles$1();
|
206560
206586
|
const loaders = useLoaders();
|
@@ -206670,6 +206696,7 @@ function FeatureBarPlotSubscriber(props) {
|
|
206670
206696
|
urls,
|
206671
206697
|
theme,
|
206672
206698
|
isReady,
|
206699
|
+
helpText,
|
206673
206700
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: expressionArr ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206674
206701
|
FeatureBarPlot,
|
206675
206702
|
{
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-7aa37ee9.js";
|
3
3
|
import "react";
|
4
4
|
import "@vitessce/vit-s";
|
5
5
|
import "react-dom";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AAkGA;;;;;;;;;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":"AAkGA;;;;;;;;;GASG;AACH,uDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,eA2JA"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React, { useMemo } from 'react';
|
3
3
|
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useFeatureSelection, useObsSetsData, useObsFeatureMatrixIndices, useFeatureLabelsData, useSampleSetsData, useSampleEdgesData, } from '@vitessce/vit-s';
|
4
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
4
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
5
5
|
import { VALUE_TRANSFORM_OPTIONS, capitalize } from '@vitessce/utils';
|
6
6
|
import { treeToSetSizesBySetNames, mergeObsSets, stratifyExpressionData, aggregateStratifiedExpressionData, } from '@vitessce/sets-utils';
|
7
7
|
import CellSetExpressionPlotOptions from './CellSetExpressionPlotOptions.js';
|
@@ -63,7 +63,7 @@ function useExpressionByCellSet(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
63
63
|
* @param {string} props.theme The name of the current Vitessce theme.
|
64
64
|
*/
|
65
65
|
export function CellSetExpressionPlotSubscriber(props) {
|
66
|
-
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, jitter = false, yMin = null, yUnits = null, } = props;
|
66
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, jitter = false, yMin = null, yUnits = null, helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION, } = props;
|
67
67
|
const classes = useStyles();
|
68
68
|
const loaders = useLoaders();
|
69
69
|
// Get "props" from the coordination space.
|
@@ -99,5 +99,5 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
99
99
|
? (featureLabelsMap?.get(geneSelection[0]) || geneSelection[0])
|
100
100
|
: null;
|
101
101
|
const selectedTransformName = transformOptions.find(o => o.value === featureValueTransform)?.name;
|
102
|
-
return (_jsx(TitleInfo, { title: `Expression by ${capitalize(obsType)} Set${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, options: (_jsx(CellSetExpressionPlotOptions, { featureValueTransform: featureValueTransform, setFeatureValueTransform: setFeatureValueTransform, featureValueTransformCoefficient: featureValueTransformCoefficient, setFeatureValueTransformCoefficient: setFeatureValueTransformCoefficient, transformOptions: transformOptions })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: histogramData ? (_jsx(CellSetExpressionPlot, { yMin: yMin, yUnits: yUnits, jitter: jitter, cellSetSelection: cellSetSelection, sampleSetSelection: sampleSetSelection, sampleSetColor: sampleSetColor, colors: setArr, data: histogramData, exprMax: exprMax, theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
102
|
+
return (_jsx(TitleInfo, { title: `Expression by ${capitalize(obsType)} Set${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, 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 })), children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: histogramData ? (_jsx(CellSetExpressionPlot, { yMin: yMin, yUnits: yUnits, jitter: jitter, cellSetSelection: cellSetSelection, sampleSetSelection: sampleSetSelection, sampleSetColor: sampleSetColor, colors: setArr, data: histogramData, exprMax: exprMax, theme: theme, width: width, height: height, obsType: obsType, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
103
103
|
}
|
@@ -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,eAgIA"}
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useMemo, useState } from 'react';
|
3
3
|
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useObsSetsData, } from '@vitessce/vit-s';
|
4
4
|
import { isEqual } from 'lodash-es';
|
5
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
5
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
6
6
|
import { mergeObsSets, treeToSetSizesBySetNames, filterPathsByExpansionAndSelection, findChangedHierarchy, } from '@vitessce/sets-utils';
|
7
7
|
import { capitalize } from '@vitessce/utils';
|
8
8
|
import CellSetSizesPlot from './CellSetSizesPlot.js';
|
@@ -19,7 +19,7 @@ import { useStyles } from './styles.js';
|
|
19
19
|
* @param {string} props.title The component title.
|
20
20
|
*/
|
21
21
|
export function CellSetSizesPlotSubscriber(props) {
|
22
|
-
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: titleOverride, } = props;
|
22
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: titleOverride, helpText = ViewHelpMapping.OBS_SET_SIZES, } = props;
|
23
23
|
const classes = useStyles();
|
24
24
|
const loaders = useLoaders();
|
25
25
|
// Get "props" from the coordination space.
|
@@ -71,5 +71,5 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
71
71
|
setCellSetSelection([...cellSetSelection, setNamePath]);
|
72
72
|
}
|
73
73
|
};
|
74
|
-
return (_jsx(TitleInfo, { title: title, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(CellSetSizesPlot, { data: data, onBarSelect: onBarSelect, theme: theme, width: width, height: height, obsType: obsType }) }) }));
|
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 }) }) }));
|
75
75
|
}
|
@@ -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,eAoJA"}
|
@@ -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 { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useFeatureSelection, useObsSetsData, useObsFeatureMatrixIndices, useFeatureLabelsData, useSampleSetsData, useSampleEdgesData, } from '@vitessce/vit-s';
|
4
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
4
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
5
5
|
import { VALUE_TRANSFORM_OPTIONS } from '@vitessce/utils';
|
6
6
|
import CellSetExpressionPlotOptions from './CellSetExpressionPlotOptions.js';
|
7
7
|
import DotPlot from './DotPlot.js';
|
@@ -16,7 +16,7 @@ import { useExpressionSummaries } from './dot-plot-hook.js';
|
|
16
16
|
* @param {string} props.theme The name of the current Vitessce theme.
|
17
17
|
*/
|
18
18
|
export function DotPlotSubscriber(props) {
|
19
|
-
const { coordinationScopes, removeGridComponent, theme, title = 'Dot Plot', transpose = true, } = props;
|
19
|
+
const { coordinationScopes, removeGridComponent, theme, title = 'Dot Plot', transpose = true, helpText = ViewHelpMapping.DOT_PLOT, } = props;
|
20
20
|
const classes = useStyles();
|
21
21
|
const loaders = useLoaders();
|
22
22
|
// Get "props" from the coordination space.
|
@@ -50,5 +50,5 @@ export function DotPlotSubscriber(props) {
|
|
50
50
|
]);
|
51
51
|
const [resultArr, meanExpressionMax] = useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, posThreshold, featureLabelsMap);
|
52
52
|
const selectedTransformName = transformOptions.find(o => o.value === featureValueTransform)?.name;
|
53
|
-
return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, 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, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, featureValueColormap: featureValueColormap, cellSetSelection: cellSetSelection })) : (_jsxs("span", { children: ["Select at least one ", featureType, "."] })) }) }));
|
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, featureType: featureType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName, featureValueColormap: featureValueColormap, cellSetSelection: cellSetSelection })) : (_jsxs("span", { children: ["Select at least one ", featureType, "."] })) }) }));
|
54
54
|
}
|
@@ -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,eA4HA"}
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useMemo, useCallback, } from 'react';
|
3
3
|
import { sum } from 'd3-array';
|
4
4
|
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useObsFeatureMatrixData, useFeatureSelection, } from '@vitessce/vit-s';
|
5
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
5
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
6
6
|
import { setObsSelection, getObsInfoFromDataWithinRange } from '@vitessce/sets-utils';
|
7
7
|
import ExpressionHistogram from './ExpressionHistogram.js';
|
8
8
|
import { useStyles } from './styles.js';
|
@@ -17,7 +17,7 @@ import { useStyles } from './styles.js';
|
|
17
17
|
* @param {string} props.theme The name of the current Vitessce theme.
|
18
18
|
*/
|
19
19
|
export function ExpressionHistogramSubscriber(props) {
|
20
|
-
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, } = props;
|
20
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM, } = props;
|
21
21
|
const classes = useStyles();
|
22
22
|
const loaders = useLoaders();
|
23
23
|
// Get "props" from the coordination space.
|
@@ -67,5 +67,5 @@ export function ExpressionHistogramSubscriber(props) {
|
|
67
67
|
}, [additionalCellSets, cellSetColor, data, setAdditionalCellSets,
|
68
68
|
setCellColorEncoding, setCellSetColor, setCellSetSelection, firstGeneSelected,
|
69
69
|
]);
|
70
|
-
return (_jsx(TitleInfo, { title: `Histogram${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, 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 }) }) }));
|
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 }) }) }));
|
71
71
|
}
|
@@ -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,kEA4IC"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React, { useMemo, useCallback } from 'react';
|
3
3
|
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, } from '@vitessce/vit-s';
|
4
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
4
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
5
5
|
import { setObsSelection } from '@vitessce/sets-utils';
|
6
6
|
import FeatureBarPlot from './FeatureBarPlot.js';
|
7
7
|
import { useStyles } from './styles.js';
|
8
8
|
export function FeatureBarPlotSubscriber(props) {
|
9
|
-
const { coordinationScopes, removeGridComponent, theme, yMin = 0, yUnits = null, } = props;
|
9
|
+
const { coordinationScopes, removeGridComponent, theme, yMin = 0, yUnits = null, helpText = ViewHelpMapping.FEATURE_BAR_PLOT, } = props;
|
10
10
|
const classes = useStyles();
|
11
11
|
const loaders = useLoaders();
|
12
12
|
// Get "props" from the coordination space.
|
@@ -58,5 +58,5 @@ export function FeatureBarPlotSubscriber(props) {
|
|
58
58
|
featureValueTransform, featureValueTransformCoefficient,
|
59
59
|
firstGeneSelected,
|
60
60
|
]);
|
61
|
-
return (_jsx(TitleInfo, { title: `Feature Values${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, 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, "."] })) }) }));
|
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, "."] })) }) }));
|
62
62
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.4.
|
3
|
+
"version": "3.4.11",
|
4
4
|
"author": "Gehlenborg Lab",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -28,12 +28,12 @@
|
|
28
28
|
"react-aria": "^3.28.0",
|
29
29
|
"internmap": "^2.0.3",
|
30
30
|
"uuid": "^9.0.0",
|
31
|
-
"@vitessce/constants-internal": "3.4.
|
32
|
-
"@vitessce/sets-utils": "3.4.
|
33
|
-
"@vitessce/utils": "3.4.
|
34
|
-
"@vitessce/vega": "3.4.
|
35
|
-
"@vitessce/vit-s": "3.4.
|
36
|
-
"@vitessce/gl": "3.4.
|
31
|
+
"@vitessce/constants-internal": "3.4.11",
|
32
|
+
"@vitessce/sets-utils": "3.4.11",
|
33
|
+
"@vitessce/utils": "3.4.11",
|
34
|
+
"@vitessce/vega": "3.4.11",
|
35
|
+
"@vitessce/vit-s": "3.4.11",
|
36
|
+
"@vitessce/gl": "3.4.11"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"react": "^18.0.0",
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
useSampleSetsData,
|
10
10
|
useSampleEdgesData,
|
11
11
|
} from '@vitessce/vit-s';
|
12
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
12
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
13
13
|
import { VALUE_TRANSFORM_OPTIONS, capitalize } from '@vitessce/utils';
|
14
14
|
import {
|
15
15
|
treeToSetSizesBySetNames,
|
@@ -116,6 +116,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
116
116
|
jitter = false,
|
117
117
|
yMin = null,
|
118
118
|
yUnits = null,
|
119
|
+
helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION,
|
119
120
|
} = props;
|
120
121
|
|
121
122
|
const classes = useStyles();
|
@@ -222,6 +223,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
222
223
|
urls={urls}
|
223
224
|
theme={theme}
|
224
225
|
isReady={isReady}
|
226
|
+
helpText={helpText}
|
225
227
|
options={(
|
226
228
|
<CellSetExpressionPlotOptions
|
227
229
|
featureValueTransform={featureValueTransform}
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
useObsSetsData,
|
7
7
|
} from '@vitessce/vit-s';
|
8
8
|
import { isEqual } from 'lodash-es';
|
9
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
9
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
10
10
|
import {
|
11
11
|
mergeObsSets, treeToSetSizesBySetNames, filterPathsByExpansionAndSelection, findChangedHierarchy,
|
12
12
|
} from '@vitessce/sets-utils';
|
@@ -33,6 +33,7 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
33
33
|
removeGridComponent,
|
34
34
|
theme,
|
35
35
|
title: titleOverride,
|
36
|
+
helpText = ViewHelpMapping.OBS_SET_SIZES,
|
36
37
|
} = props;
|
37
38
|
|
38
39
|
const classes = useStyles();
|
@@ -137,6 +138,7 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
137
138
|
urls={urls}
|
138
139
|
theme={theme}
|
139
140
|
isReady={isReady}
|
141
|
+
helpText={helpText}
|
140
142
|
>
|
141
143
|
<div ref={containerRef} className={classes.vegaContainer}>
|
142
144
|
<CellSetSizesPlot
|
package/src/DotPlotSubscriber.js
CHANGED
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
useSampleSetsData,
|
10
10
|
useSampleEdgesData,
|
11
11
|
} from '@vitessce/vit-s';
|
12
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
12
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
13
13
|
import { VALUE_TRANSFORM_OPTIONS } from '@vitessce/utils';
|
14
14
|
import CellSetExpressionPlotOptions from './CellSetExpressionPlotOptions.js';
|
15
15
|
import DotPlot from './DotPlot.js';
|
@@ -32,6 +32,7 @@ export function DotPlotSubscriber(props) {
|
|
32
32
|
theme,
|
33
33
|
title = 'Dot Plot',
|
34
34
|
transpose = true,
|
35
|
+
helpText = ViewHelpMapping.DOT_PLOT,
|
35
36
|
} = props;
|
36
37
|
|
37
38
|
const classes = useStyles();
|
@@ -133,6 +134,7 @@ export function DotPlotSubscriber(props) {
|
|
133
134
|
urls={urls}
|
134
135
|
theme={theme}
|
135
136
|
isReady={isReady}
|
137
|
+
helpText={helpText}
|
136
138
|
options={(
|
137
139
|
<CellSetExpressionPlotOptions
|
138
140
|
featureValueTransform={featureValueTransform}
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
useUrls, useReady, useGridItemSize,
|
9
9
|
useObsFeatureMatrixData, useFeatureSelection,
|
10
10
|
} from '@vitessce/vit-s';
|
11
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
11
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
12
12
|
import { setObsSelection, getObsInfoFromDataWithinRange } from '@vitessce/sets-utils';
|
13
13
|
import ExpressionHistogram from './ExpressionHistogram.js';
|
14
14
|
import { useStyles } from './styles.js';
|
@@ -29,6 +29,7 @@ export function ExpressionHistogramSubscriber(props) {
|
|
29
29
|
downloadButtonVisible,
|
30
30
|
removeGridComponent,
|
31
31
|
theme,
|
32
|
+
helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM,
|
32
33
|
} = props;
|
33
34
|
|
34
35
|
const classes = useStyles();
|
@@ -127,6 +128,7 @@ export function ExpressionHistogramSubscriber(props) {
|
|
127
128
|
urls={urls}
|
128
129
|
theme={theme}
|
129
130
|
isReady={isReady}
|
131
|
+
helpText={helpText}
|
130
132
|
>
|
131
133
|
<div ref={containerRef} className={classes.vegaContainer}>
|
132
134
|
<ExpressionHistogram
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
useObsFeatureMatrixIndices,
|
11
11
|
useFeatureLabelsData,
|
12
12
|
} from '@vitessce/vit-s';
|
13
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
13
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
14
14
|
import { setObsSelection } from '@vitessce/sets-utils';
|
15
15
|
import FeatureBarPlot from './FeatureBarPlot.js';
|
16
16
|
import { useStyles } from './styles.js';
|
@@ -23,6 +23,7 @@ export function FeatureBarPlotSubscriber(props) {
|
|
23
23
|
theme,
|
24
24
|
yMin = 0,
|
25
25
|
yUnits = null,
|
26
|
+
helpText = ViewHelpMapping.FEATURE_BAR_PLOT,
|
26
27
|
} = props;
|
27
28
|
|
28
29
|
const classes = useStyles();
|
@@ -126,6 +127,7 @@ export function FeatureBarPlotSubscriber(props) {
|
|
126
127
|
urls={urls}
|
127
128
|
theme={theme}
|
128
129
|
isReady={isReady}
|
130
|
+
helpText={helpText}
|
129
131
|
>
|
130
132
|
<div ref={containerRef} className={classes.vegaContainer}>
|
131
133
|
{expressionArr ? (
|