@vitessce/statistical-plots 3.3.1 → 3.3.3
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/index.js +46 -5
- package/dist-tsc/CellSetExpressionPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.js +2 -2
- package/dist-tsc/CellSetSizesPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetSizesPlotSubscriber.js +2 -2
- package/dist-tsc/ExpressionHistogramSubscriber.d.ts.map +1 -1
- package/dist-tsc/ExpressionHistogramSubscriber.js +2 -2
- package/package.json +6 -6
- package/src/CellSetExpressionPlotSubscriber.js +4 -0
- package/src/CellSetSizesPlotSubscriber.js +4 -0
- package/src/ExpressionHistogramSubscriber.js +4 -0
package/dist/index.js
CHANGED
@@ -967,7 +967,9 @@ const FileType$1 = {
|
|
967
967
|
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
968
968
|
OBS_SETS_CSV: "obsSets.csv",
|
969
969
|
OBS_SETS_JSON: "obsSets.json",
|
970
|
+
// OME-Zarr
|
970
971
|
IMAGE_OME_ZARR: "image.ome-zarr",
|
972
|
+
OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
|
971
973
|
// AnnData
|
972
974
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
973
975
|
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
@@ -1451,7 +1453,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
1451
1453
|
CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
|
1452
1454
|
CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
|
1453
1455
|
CoordinationType$1.IMAGE_CHANNEL,
|
1456
|
+
CoordinationType$1.IMAGE_LAYER,
|
1454
1457
|
CoordinationType$1.SEGMENTATION_CHANNEL,
|
1458
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
1455
1459
|
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
1456
1460
|
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
1457
1461
|
CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
|
@@ -1469,6 +1473,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
1469
1473
|
CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
|
1470
1474
|
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
1471
1475
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
1476
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
1477
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
1478
|
+
CoordinationType$1.FEATURE_SELECTION,
|
1472
1479
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
1473
1480
|
CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
|
1474
1481
|
CoordinationType$1.LEGEND_VISIBLE,
|
@@ -10660,30 +10667,39 @@ const omeCoordinateTransformations = z.array(z.union([
|
|
10660
10667
|
scale: z.array(z.number())
|
10661
10668
|
})
|
10662
10669
|
]));
|
10663
|
-
z.object({
|
10670
|
+
const imageOmeTiffSchema = z.object({
|
10664
10671
|
offsetsUrl: z.string().optional(),
|
10665
10672
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
10666
10673
|
});
|
10674
|
+
imageOmeTiffSchema.extend({
|
10675
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
10676
|
+
});
|
10667
10677
|
const imageOmeZarrSchema = z.object({
|
10668
10678
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
10669
10679
|
});
|
10670
10680
|
imageOmeZarrSchema.extend({
|
10681
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
10682
|
+
});
|
10683
|
+
const imageSpatialdataSchema = imageOmeZarrSchema.extend({
|
10671
10684
|
path: z.string()
|
10672
10685
|
});
|
10673
|
-
z.object({
|
10686
|
+
const obsSegmentationsSpatialdataSchema = z.object({
|
10687
|
+
// TODO: should this also extend the imageOmeZarrSchema?
|
10688
|
+
// TODO: should this be renamed labelsSpatialdataSchema?
|
10689
|
+
// TODO: support obsTypesFromChannelNames?
|
10674
10690
|
path: z.string()
|
10675
10691
|
});
|
10676
10692
|
z.object({
|
10677
10693
|
path: z.string()
|
10678
10694
|
});
|
10679
|
-
z.object({
|
10695
|
+
const obsSpotsSpatialdataSchema = z.object({
|
10680
10696
|
path: z.string(),
|
10681
10697
|
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
10682
10698
|
});
|
10683
|
-
annDataObsFeatureMatrix.extend({
|
10699
|
+
const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
10684
10700
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
10685
10701
|
});
|
10686
|
-
z.object({
|
10702
|
+
const obsSetsSpatialdataSchema = z.object({
|
10687
10703
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
10688
10704
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
10689
10705
|
obsSets: annDataObsSets
|
@@ -10746,6 +10762,19 @@ z.object({
|
|
10746
10762
|
z.array(annDataConvenienceObsEmbeddingItem)
|
10747
10763
|
])
|
10748
10764
|
}).partial();
|
10765
|
+
z.object({
|
10766
|
+
// TODO: should `image` be a special schema
|
10767
|
+
// to allow specifying fileUid (like for embeddingType)?
|
10768
|
+
image: imageSpatialdataSchema,
|
10769
|
+
// TODO: should this be a special schema
|
10770
|
+
// to allow specifying fileUid (like for embeddingType)?
|
10771
|
+
labels: obsSegmentationsSpatialdataSchema,
|
10772
|
+
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
10773
|
+
obsSpots: obsSpotsSpatialdataSchema,
|
10774
|
+
// TODO: obsPoints
|
10775
|
+
// TODO: obsLocations
|
10776
|
+
obsSets: obsSetsSpatialdataSchema
|
10777
|
+
}).partial();
|
10749
10778
|
z.object({
|
10750
10779
|
obsLabelsTypes: z.array(z.string()).optional(),
|
10751
10780
|
embeddingTypes: z.array(z.string()).optional()
|
@@ -86157,6 +86186,8 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
86157
86186
|
var _a;
|
86158
86187
|
const {
|
86159
86188
|
coordinationScopes,
|
86189
|
+
closeButtonVisible,
|
86190
|
+
downloadButtonVisible,
|
86160
86191
|
removeGridComponent,
|
86161
86192
|
theme
|
86162
86193
|
} = props;
|
@@ -86242,6 +86273,8 @@ function CellSetExpressionPlotSubscriber(props) {
|
|
86242
86273
|
TitleInfo,
|
86243
86274
|
{
|
86244
86275
|
title: `Expression by ${capitalize$2(obsType)} Set${firstGeneSelected ? ` (${firstGeneSelected})` : ""}`,
|
86276
|
+
closeButtonVisible,
|
86277
|
+
downloadButtonVisible,
|
86245
86278
|
removeGridComponent,
|
86246
86279
|
urls,
|
86247
86280
|
theme,
|
@@ -86415,6 +86448,8 @@ function CellSetSizesPlot(props) {
|
|
86415
86448
|
function CellSetSizesPlotSubscriber(props) {
|
86416
86449
|
const {
|
86417
86450
|
coordinationScopes,
|
86451
|
+
closeButtonVisible,
|
86452
|
+
downloadButtonVisible,
|
86418
86453
|
removeGridComponent,
|
86419
86454
|
theme,
|
86420
86455
|
title: titleOverride
|
@@ -86500,6 +86535,8 @@ function CellSetSizesPlotSubscriber(props) {
|
|
86500
86535
|
TitleInfo,
|
86501
86536
|
{
|
86502
86537
|
title: title2,
|
86538
|
+
closeButtonVisible,
|
86539
|
+
downloadButtonVisible,
|
86503
86540
|
removeGridComponent,
|
86504
86541
|
urls,
|
86505
86542
|
theme,
|
@@ -86592,6 +86629,8 @@ function ExpressionHistogram(props) {
|
|
86592
86629
|
function ExpressionHistogramSubscriber(props) {
|
86593
86630
|
const {
|
86594
86631
|
coordinationScopes,
|
86632
|
+
closeButtonVisible,
|
86633
|
+
downloadButtonVisible,
|
86595
86634
|
removeGridComponent,
|
86596
86635
|
theme
|
86597
86636
|
} = props;
|
@@ -86690,6 +86729,8 @@ function ExpressionHistogramSubscriber(props) {
|
|
86690
86729
|
TitleInfo,
|
86691
86730
|
{
|
86692
86731
|
title: `Expression Histogram${firstGeneSelected ? ` (${firstGeneSelected})` : ""}`,
|
86732
|
+
closeButtonVisible,
|
86733
|
+
downloadButtonVisible,
|
86693
86734
|
removeGridComponent,
|
86694
86735
|
urls,
|
86695
86736
|
theme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AAiGA;;;;;;;;;GASG;AACH;IAL2B,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;
|
1
|
+
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AAiGA;;;;;;;;;GASG;AACH;IAL2B,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;gBA0HhB"}
|
@@ -77,7 +77,7 @@ function useExpressionByCellSet(expressionData, obsIndex, cellSets, additionalCe
|
|
77
77
|
* @param {string} props.theme The name of the current Vitessce theme.
|
78
78
|
*/
|
79
79
|
export function CellSetExpressionPlotSubscriber(props) {
|
80
|
-
const { coordinationScopes, removeGridComponent, theme, } = props;
|
80
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, } = props;
|
81
81
|
const classes = useStyles();
|
82
82
|
const loaders = useLoaders();
|
83
83
|
// Get "props" from the coordination space.
|
@@ -107,5 +107,5 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
107
107
|
? (featureLabelsMap?.get(geneSelection[0]) || geneSelection[0])
|
108
108
|
: null;
|
109
109
|
const selectedTransformName = transformOptions.find(o => o.value === featureValueTransform)?.name;
|
110
|
-
return (_jsx(TitleInfo, { title: `Expression by ${capitalize(obsType)} Set${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, 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: expressionArr ? (_jsx(CellSetExpressionPlot, { domainMax: expressionMax, colors: setArr, data: expressionArr, theme: theme, width: width, height: height, obsType: obsType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
110
|
+
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: expressionArr ? (_jsx(CellSetExpressionPlot, { domainMax: expressionMax, colors: setArr, data: expressionArr, theme: theme, width: width, height: height, obsType: obsType, featureValueType: featureValueType, featureValueTransformName: selectedTransformName })) : (_jsxs("span", { children: ["Select a ", featureType, "."] })) }) }));
|
111
111
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellSetSizesPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetSizesPlotSubscriber.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;GAUG;AACH;IAN2B,mBAAmB;IACnB,OAAO;IAET,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;
|
1
|
+
{"version":3,"file":"CellSetSizesPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetSizesPlotSubscriber.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;GAUG;AACH;IAN2B,mBAAmB;IACnB,OAAO;IAET,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;gBA+HhB"}
|
@@ -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, removeGridComponent, theme, title: titleOverride, } = props;
|
22
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: titleOverride, } = 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, 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, 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":"ExpressionHistogramSubscriber.d.ts","sourceRoot":"","sources":["../src/ExpressionHistogramSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH;IAL2B,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;
|
1
|
+
{"version":3,"file":"ExpressionHistogramSubscriber.d.ts","sourceRoot":"","sources":["../src/ExpressionHistogramSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH;IAL2B,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;gBAyHhB"}
|
@@ -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, removeGridComponent, theme, } = props;
|
20
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, } = props;
|
21
21
|
const classes = useStyles();
|
22
22
|
const loaders = useLoaders();
|
23
23
|
// Get "props" from the coordination space.
|
@@ -68,5 +68,5 @@ export function ExpressionHistogramSubscriber(props) {
|
|
68
68
|
}, [additionalCellSets, cellSetColor, data, setAdditionalCellSets,
|
69
69
|
setCellColorEncoding, setCellSetColor, setCellSetSelection, firstGeneSelected,
|
70
70
|
]);
|
71
|
-
return (_jsx(TitleInfo, { title: `Expression Histogram${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, children: _jsx("div", { ref: containerRef, className: classes.vegaContainer, children: _jsx(ExpressionHistogram, { geneSelection: geneSelection, onSelect: onSelect, data: data, theme: theme, width: width, height: height }) }) }));
|
71
|
+
return (_jsx(TitleInfo, { title: `Expression 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, onSelect: onSelect, data: data, theme: theme, width: width, height: height }) }) }));
|
72
72
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.3",
|
4
4
|
"author": "Gehlenborg Lab",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -20,11 +20,11 @@
|
|
20
20
|
"d3-array": "^2.4.0",
|
21
21
|
"lodash-es": "^4.17.21",
|
22
22
|
"react-aria": "^3.28.0",
|
23
|
-
"@vitessce/constants-internal": "3.3.
|
24
|
-
"@vitessce/sets-utils": "3.3.
|
25
|
-
"@vitessce/utils": "3.3.
|
26
|
-
"@vitessce/vega": "3.3.
|
27
|
-
"@vitessce/vit-s": "3.3.
|
23
|
+
"@vitessce/constants-internal": "3.3.3",
|
24
|
+
"@vitessce/sets-utils": "3.3.3",
|
25
|
+
"@vitessce/utils": "3.3.3",
|
26
|
+
"@vitessce/vega": "3.3.3",
|
27
|
+
"@vitessce/vit-s": "3.3.3"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"react": "^18.0.0",
|
@@ -108,6 +108,8 @@ function useExpressionByCellSet(
|
|
108
108
|
export function CellSetExpressionPlotSubscriber(props) {
|
109
109
|
const {
|
110
110
|
coordinationScopes,
|
111
|
+
closeButtonVisible,
|
112
|
+
downloadButtonVisible,
|
111
113
|
removeGridComponent,
|
112
114
|
theme,
|
113
115
|
} = props;
|
@@ -188,6 +190,8 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
188
190
|
return (
|
189
191
|
<TitleInfo
|
190
192
|
title={`Expression by ${capitalize(obsType)} Set${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`}
|
193
|
+
closeButtonVisible={closeButtonVisible}
|
194
|
+
downloadButtonVisible={downloadButtonVisible}
|
191
195
|
removeGridComponent={removeGridComponent}
|
192
196
|
urls={urls}
|
193
197
|
theme={theme}
|
@@ -28,6 +28,8 @@ import { useStyles } from './styles.js';
|
|
28
28
|
export function CellSetSizesPlotSubscriber(props) {
|
29
29
|
const {
|
30
30
|
coordinationScopes,
|
31
|
+
closeButtonVisible,
|
32
|
+
downloadButtonVisible,
|
31
33
|
removeGridComponent,
|
32
34
|
theme,
|
33
35
|
title: titleOverride,
|
@@ -129,6 +131,8 @@ export function CellSetSizesPlotSubscriber(props) {
|
|
129
131
|
return (
|
130
132
|
<TitleInfo
|
131
133
|
title={title}
|
134
|
+
closeButtonVisible={closeButtonVisible}
|
135
|
+
downloadButtonVisible={downloadButtonVisible}
|
132
136
|
removeGridComponent={removeGridComponent}
|
133
137
|
urls={urls}
|
134
138
|
theme={theme}
|
@@ -25,6 +25,8 @@ import { useStyles } from './styles.js';
|
|
25
25
|
export function ExpressionHistogramSubscriber(props) {
|
26
26
|
const {
|
27
27
|
coordinationScopes,
|
28
|
+
closeButtonVisible,
|
29
|
+
downloadButtonVisible,
|
28
30
|
removeGridComponent,
|
29
31
|
theme,
|
30
32
|
} = props;
|
@@ -120,6 +122,8 @@ export function ExpressionHistogramSubscriber(props) {
|
|
120
122
|
return (
|
121
123
|
<TitleInfo
|
122
124
|
title={`Expression Histogram${(firstGeneSelected ? ` (${firstGeneSelected})` : '')}`}
|
125
|
+
closeButtonVisible={closeButtonVisible}
|
126
|
+
downloadButtonVisible={downloadButtonVisible}
|
123
127
|
removeGridComponent={removeGridComponent}
|
124
128
|
urls={urls}
|
125
129
|
theme={theme}
|