@vitessce/statistical-plots 3.5.1 → 3.5.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/{deflate-9412420e.js → deflate-69817aa2.js} +1 -1
- package/dist/{index-5a8190d9.js → index-00d0a4a2.js} +1009 -1105
- package/dist/index.js +1 -1
- package/dist/{jpeg-c60720b8.js → jpeg-89e89436.js} +1 -1
- package/dist/{lerc-922b46fe.js → lerc-f5f67eb4.js} +1 -1
- package/dist/{lzw-401bb3ee.js → lzw-202c1994.js} +1 -1
- package/dist/{packbits-3219f1f5.js → packbits-4038eb16.js} +1 -1
- package/dist/{raw-ee5f13d0.js → raw-1068ab16.js} +1 -1
- package/dist/{webimage-9f8ff63a.js → webimage-e7e86b49.js} +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.d.ts.map +1 -1
- package/dist-tsc/CellSetExpressionPlotSubscriber.js +9 -4
- package/package.json +7 -7
- package/src/CellSetExpressionPlotSubscriber.js +13 -3
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-00d0a4a2.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":"
|
1
|
+
{"version":3,"file":"CellSetExpressionPlotSubscriber.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotSubscriber.js"],"names":[],"mappings":"AAmGA;;;;;;;;;GASG;AACH,uDALG;IAAwB,mBAAmB;IACrB,kBAAkB,EAAhC,MAAM;IAEQ,KAAK,EAAnB,MAAM;CAChB,eAoKA"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React, { useMemo } from 'react';
|
3
|
-
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useFeatureSelection, useObsSetsData, useObsFeatureMatrixIndices, useFeatureLabelsData, useSampleSetsData, useSampleEdgesData, } from '@vitessce/vit-s';
|
3
|
+
import { TitleInfo, useCoordination, useLoaders, useUrls, useReady, useGridItemSize, useFeatureSelection, useObsSetsData, useObsFeatureMatrixIndices, useFeatureLabelsData, useSampleSetsData, useSampleEdgesData, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
|
4
4
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
5
|
-
import { VALUE_TRANSFORM_OPTIONS, capitalize } from '@vitessce/utils';
|
5
|
+
import { VALUE_TRANSFORM_OPTIONS, capitalize, cleanFeatureId } from '@vitessce/utils';
|
6
6
|
import { treeToSetSizesBySetNames, mergeObsSets, stratifyExpressionData, aggregateStratifiedExpressionData, } from '@vitessce/sets-utils';
|
7
7
|
import CellSetExpressionPlotOptions from './CellSetExpressionPlotOptions.js';
|
8
8
|
import CellSetExpressionPlot from './CellSetExpressionPlot.js';
|
@@ -74,7 +74,9 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
74
74
|
// eslint-disable-next-line no-unused-vars
|
75
75
|
const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
76
76
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
77
|
-
|
77
|
+
// eslint-disable-next-line max-len
|
78
|
+
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
79
|
+
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
|
78
80
|
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
79
81
|
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
80
82
|
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset, false, { setSampleSetColor }, { sampleSetColor }, { sampleType });
|
@@ -84,6 +86,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
84
86
|
matrixIndicesStatus,
|
85
87
|
obsSetsStatus,
|
86
88
|
featureLabelsStatus,
|
89
|
+
expandedFeatureLabelsStatus,
|
87
90
|
sampleSetsStatus,
|
88
91
|
sampleEdgesStatus,
|
89
92
|
]);
|
@@ -96,7 +99,9 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
96
99
|
]);
|
97
100
|
const [histogramData, setArr, exprMax] = useExpressionByCellSet(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, theme, yMin);
|
98
101
|
const firstGeneSelected = geneSelection && geneSelection.length >= 1
|
99
|
-
? (featureLabelsMap?.get(geneSelection[0])
|
102
|
+
? (featureLabelsMap?.get(geneSelection[0])
|
103
|
+
|| featureLabelsMap?.get(cleanFeatureId(geneSelection[0]))
|
104
|
+
|| geneSelection[0])
|
100
105
|
: null;
|
101
106
|
const selectedTransformName = transformOptions.find(o => o.value === featureValueTransform)?.name;
|
102
107
|
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, "."] })) }) }));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.5.
|
3
|
+
"version": "3.5.3",
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
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.5.
|
32
|
-
"@vitessce/sets-utils": "3.5.
|
33
|
-
"@vitessce/utils": "3.5.
|
34
|
-
"@vitessce/vega": "3.5.
|
35
|
-
"@vitessce/vit-s": "3.5.
|
36
|
-
"@vitessce/gl": "3.5.
|
31
|
+
"@vitessce/constants-internal": "3.5.3",
|
32
|
+
"@vitessce/sets-utils": "3.5.3",
|
33
|
+
"@vitessce/utils": "3.5.3",
|
34
|
+
"@vitessce/vega": "3.5.3",
|
35
|
+
"@vitessce/vit-s": "3.5.3",
|
36
|
+
"@vitessce/gl": "3.5.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"react": "^18.0.0",
|
@@ -8,9 +8,10 @@ import {
|
|
8
8
|
useFeatureLabelsData,
|
9
9
|
useSampleSetsData,
|
10
10
|
useSampleEdgesData,
|
11
|
+
useExpandedFeatureLabelsMap,
|
11
12
|
} from '@vitessce/vit-s';
|
12
13
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
13
|
-
import { VALUE_TRANSFORM_OPTIONS, capitalize } from '@vitessce/utils';
|
14
|
+
import { VALUE_TRANSFORM_OPTIONS, capitalize, cleanFeatureId } from '@vitessce/utils';
|
14
15
|
import {
|
15
16
|
treeToSetSizesBySetNames,
|
16
17
|
mergeObsSets,
|
@@ -157,10 +158,14 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
157
158
|
{ obsType, featureType, featureValueType },
|
158
159
|
);
|
159
160
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
160
|
-
|
161
|
+
// eslint-disable-next-line max-len
|
162
|
+
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
|
161
163
|
loaders, dataset, false, {}, {},
|
162
164
|
{ featureType },
|
163
165
|
);
|
166
|
+
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
167
|
+
featureType, featureLabelsMapOrig, { stripCuriePrefixes: true },
|
168
|
+
);
|
164
169
|
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(
|
165
170
|
loaders, dataset, false,
|
166
171
|
{ obsType, featureType, featureValueType },
|
@@ -187,6 +192,7 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
187
192
|
matrixIndicesStatus,
|
188
193
|
obsSetsStatus,
|
189
194
|
featureLabelsStatus,
|
195
|
+
expandedFeatureLabelsStatus,
|
190
196
|
sampleSetsStatus,
|
191
197
|
sampleEdgesStatus,
|
192
198
|
]);
|
@@ -207,7 +213,11 @@ export function CellSetExpressionPlotSubscriber(props) {
|
|
207
213
|
);
|
208
214
|
|
209
215
|
const firstGeneSelected = geneSelection && geneSelection.length >= 1
|
210
|
-
? (
|
216
|
+
? (
|
217
|
+
featureLabelsMap?.get(geneSelection[0])
|
218
|
+
|| featureLabelsMap?.get(cleanFeatureId(geneSelection[0]))
|
219
|
+
|| geneSelection[0]
|
220
|
+
)
|
211
221
|
: null;
|
212
222
|
const selectedTransformName = transformOptions.find(
|
213
223
|
o => o.value === featureValueTransform,
|