@vitessce/statistical-plots 3.4.10 → 3.4.12
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-eda0aad4.js} +1 -1
- package/dist/{index-ce54e46a.js → index-65c79335.js} +42 -14
- package/dist/index.js +1 -1
- package/dist/{jpeg-0907c241.js → jpeg-7970799f.js} +1 -1
- package/dist/{lerc-28ed0c74.js → lerc-8d94d4f9.js} +1 -1
- package/dist/{lzw-a4e25d69.js → lzw-f0fcb4b1.js} +1 -1
- package/dist/{packbits-b0989382.js → packbits-4fa7d5d8.js} +1 -1
- package/dist/{raw-57e07f3f.js → raw-d637b4c6.js} +1 -1
- package/dist/{webimage-21c51b36.js → webimage-9a9c8587.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
@@ -1102,6 +1102,7 @@ const CoordinationType$1 = {
|
|
1102
1102
|
FEATURE_TYPE: "featureType",
|
1103
1103
|
FEATURE_VALUE_TYPE: "featureValueType",
|
1104
1104
|
OBS_LABELS_TYPE: "obsLabelsType",
|
1105
|
+
FEATURE_LABELS_TYPE: "featureLabelsType",
|
1105
1106
|
// Other types
|
1106
1107
|
EMBEDDING_TYPE: "embeddingType",
|
1107
1108
|
EMBEDDING_ZOOM: "embeddingZoom",
|
@@ -1216,6 +1217,23 @@ const CoordinationType$1 = {
|
|
1216
1217
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
1217
1218
|
CONTOUR_COLOR: "contourColor"
|
1218
1219
|
};
|
1220
|
+
const ViewHelpMapping = {
|
1221
|
+
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).",
|
1222
|
+
HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
|
1223
|
+
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).",
|
1224
|
+
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).",
|
1225
|
+
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.",
|
1226
|
+
LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
|
1227
|
+
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.",
|
1228
|
+
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.",
|
1229
|
+
FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
|
1230
|
+
OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
|
1231
|
+
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.",
|
1232
|
+
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).",
|
1233
|
+
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
1234
|
+
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).",
|
1235
|
+
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."
|
1236
|
+
};
|
1219
1237
|
const COMPONENT_COORDINATION_TYPES = {
|
1220
1238
|
[ViewType$1.SCATTERPLOT]: [
|
1221
1239
|
CoordinationType$1.DATASET,
|
@@ -11878,7 +11896,7 @@ const annDataObsSetsArr = z.array(z.object({
|
|
11878
11896
|
]),
|
11879
11897
|
scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
|
11880
11898
|
}));
|
11881
|
-
|
11899
|
+
z.object({
|
11882
11900
|
obsSets: annDataObsSetsArr
|
11883
11901
|
});
|
11884
11902
|
const annDataObsFeatureColumnsArr = z.array(z.object({
|
@@ -11940,7 +11958,7 @@ const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
11940
11958
|
const obsSetsSpatialdataSchema = z.object({
|
11941
11959
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
11942
11960
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
11943
|
-
obsSets:
|
11961
|
+
obsSets: annDataObsSetsArr
|
11944
11962
|
});
|
11945
11963
|
z.object({
|
11946
11964
|
targetX: z.number(),
|
@@ -133191,16 +133209,16 @@ function addDecoder(cases2, importFn) {
|
|
133191
133209
|
}
|
133192
133210
|
cases2.forEach((c2) => registry$1.set(c2, importFn));
|
133193
133211
|
}
|
133194
|
-
addDecoder([void 0, 1], () => import("./raw-
|
133195
|
-
addDecoder(5, () => import("./lzw-
|
133212
|
+
addDecoder([void 0, 1], () => import("./raw-d637b4c6.js").then((m2) => m2.default));
|
133213
|
+
addDecoder(5, () => import("./lzw-f0fcb4b1.js").then((m2) => m2.default));
|
133196
133214
|
addDecoder(6, () => {
|
133197
133215
|
throw new Error("old style JPEG compression is not supported.");
|
133198
133216
|
});
|
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-
|
133217
|
+
addDecoder(7, () => import("./jpeg-7970799f.js").then((m2) => m2.default));
|
133218
|
+
addDecoder([8, 32946], () => import("./deflate-eda0aad4.js").then((m2) => m2.default));
|
133219
|
+
addDecoder(32773, () => import("./packbits-4fa7d5d8.js").then((m2) => m2.default));
|
133220
|
+
addDecoder(34887, () => import("./lerc-8d94d4f9.js").then((m2) => m2.default));
|
133221
|
+
addDecoder(50001, () => import("./webimage-9a9c8587.js").then((m2) => m2.default));
|
133204
133222
|
function decodeRowAcc(row, stride) {
|
133205
133223
|
let length2 = row.length - stride;
|
133206
133224
|
let offset5 = 0;
|
@@ -153889,7 +153907,8 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
153889
153907
|
theme,
|
153890
153908
|
jitter: jitter2 = false,
|
153891
153909
|
yMin = null,
|
153892
|
-
yUnits = null
|
153910
|
+
yUnits = null,
|
153911
|
+
helpText = ViewHelpMapping.OBS_SET_FEATURE_VALUE_DISTRIBUTION
|
153893
153912
|
} = props;
|
153894
153913
|
const classes = useStyles$1();
|
153895
153914
|
const loaders = useLoaders();
|
@@ -154007,6 +154026,7 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
154007
154026
|
urls,
|
154008
154027
|
theme,
|
154009
154028
|
isReady,
|
154029
|
+
helpText,
|
154010
154030
|
options: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
154011
154031
|
CellSetExpressionPlotOptions,
|
154012
154032
|
{
|
@@ -205748,7 +205768,8 @@ function CellSetSizesPlotSubscriber(props) {
|
|
205748
205768
|
downloadButtonVisible,
|
205749
205769
|
removeGridComponent,
|
205750
205770
|
theme,
|
205751
|
-
title: titleOverride
|
205771
|
+
title: titleOverride,
|
205772
|
+
helpText = ViewHelpMapping.OBS_SET_SIZES
|
205752
205773
|
} = props;
|
205753
205774
|
const classes = useStyles$1();
|
205754
205775
|
const loaders = useLoaders();
|
@@ -205837,6 +205858,7 @@ function CellSetSizesPlotSubscriber(props) {
|
|
205837
205858
|
urls,
|
205838
205859
|
theme,
|
205839
205860
|
isReady,
|
205861
|
+
helpText,
|
205840
205862
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
205841
205863
|
CellSetSizesPlot,
|
205842
205864
|
{
|
@@ -205932,7 +205954,8 @@ function ExpressionHistogramSubscriber(props) {
|
|
205932
205954
|
closeButtonVisible,
|
205933
205955
|
downloadButtonVisible,
|
205934
205956
|
removeGridComponent,
|
205935
|
-
theme
|
205957
|
+
theme,
|
205958
|
+
helpText = ViewHelpMapping.FEATURE_VALUE_HISTOGRAM
|
205936
205959
|
} = props;
|
205937
205960
|
const classes = useStyles$1();
|
205938
205961
|
const loaders = useLoaders();
|
@@ -206034,6 +206057,7 @@ function ExpressionHistogramSubscriber(props) {
|
|
206034
206057
|
urls,
|
206035
206058
|
theme,
|
206036
206059
|
isReady,
|
206060
|
+
helpText,
|
206037
206061
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206038
206062
|
ExpressionHistogram,
|
206039
206063
|
{
|
@@ -206252,7 +206276,8 @@ function DotPlotSubscriber(props) {
|
|
206252
206276
|
removeGridComponent,
|
206253
206277
|
theme,
|
206254
206278
|
title: title2 = "Dot Plot",
|
206255
|
-
transpose: transpose2 = true
|
206279
|
+
transpose: transpose2 = true,
|
206280
|
+
helpText = ViewHelpMapping.DOT_PLOT
|
206256
206281
|
} = props;
|
206257
206282
|
const classes = useStyles$1();
|
206258
206283
|
const loaders = useLoaders();
|
@@ -206370,6 +206395,7 @@ function DotPlotSubscriber(props) {
|
|
206370
206395
|
urls,
|
206371
206396
|
theme,
|
206372
206397
|
isReady,
|
206398
|
+
helpText,
|
206373
206399
|
options: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206374
206400
|
CellSetExpressionPlotOptions,
|
206375
206401
|
{
|
@@ -206554,7 +206580,8 @@ function FeatureBarPlotSubscriber(props) {
|
|
206554
206580
|
removeGridComponent,
|
206555
206581
|
theme,
|
206556
206582
|
yMin = 0,
|
206557
|
-
yUnits = null
|
206583
|
+
yUnits = null,
|
206584
|
+
helpText = ViewHelpMapping.FEATURE_BAR_PLOT
|
206558
206585
|
} = props;
|
206559
206586
|
const classes = useStyles$1();
|
206560
206587
|
const loaders = useLoaders();
|
@@ -206670,6 +206697,7 @@ function FeatureBarPlotSubscriber(props) {
|
|
206670
206697
|
urls,
|
206671
206698
|
theme,
|
206672
206699
|
isReady,
|
206700
|
+
helpText,
|
206673
206701
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: expressionArr ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
206674
206702
|
FeatureBarPlot,
|
206675
206703
|
{
|
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-65c79335.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.12",
|
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.12",
|
32
|
+
"@vitessce/sets-utils": "3.4.12",
|
33
|
+
"@vitessce/utils": "3.4.12",
|
34
|
+
"@vitessce/vega": "3.4.12",
|
35
|
+
"@vitessce/vit-s": "3.4.12",
|
36
|
+
"@vitessce/gl": "3.4.12"
|
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 ? (
|