@vitessce/scatterplot-embedding 3.5.2 → 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-aa8592bc.js → deflate-5287db37.js} +1 -1
- package/dist/{index-b29153a1.js → index-e8cfd624.js} +1261 -1306
- package/dist/index.js +1 -1
- package/dist/{jpeg-fb8ccf5b.js → jpeg-17a85e73.js} +1 -1
- package/dist/{lerc-6a5274b2.js → lerc-c362fa1c.js} +1 -1
- package/dist/{lzw-b0644528.js → lzw-24b336d4.js} +1 -1
- package/dist/{packbits-54f0a5dc.js → packbits-44cebc8c.js} +1 -1
- package/dist/{raw-d4deb41a.js → raw-55d1ddac.js} +1 -1
- package/dist/{webimage-75b55168.js → webimage-6f2a65d0.js} +1 -1
- package/dist-tsc/EmbeddingScatterplotSubscriber.d.ts.map +1 -1
- package/dist-tsc/EmbeddingScatterplotSubscriber.js +6 -3
- package/package.json +7 -7
- package/src/EmbeddingScatterplotSubscriber.js +9 -1
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-e8cfd624.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;GAYG;AACH,sDAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAihBA"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useState, useEffect, useCallback, useMemo, } from 'react';
|
|
3
3
|
import { extent, quantileSorted } from 'd3-array';
|
|
4
4
|
import { isEqual } from 'lodash-es';
|
|
5
|
-
import { TitleInfo, useReady, useUrls, useDeckCanvasSize, useUint8FeatureSelection, useExpressionValueGetter, useGetObsInfo, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useMultiObsLabels, useSampleSetsData, useSampleEdgesData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, } from '@vitessce/vit-s';
|
|
5
|
+
import { TitleInfo, useReady, useUrls, useDeckCanvasSize, useUint8FeatureSelection, useExpressionValueGetter, useGetObsInfo, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useMultiObsLabels, useSampleSetsData, useSampleEdgesData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
|
|
6
6
|
import { setObsSelection, mergeObsSets, getCellSetPolygons, getCellColors, stratifyArrays, } from '@vitessce/sets-utils';
|
|
7
7
|
import { pluralize as plur, commaNumber } from '@vitessce/utils';
|
|
8
8
|
import { Scatterplot, ScatterplotTooltipSubscriber, ScatterplotOptions, getPointSizeDevicePixels, getPointOpacity, } from '@vitessce/scatterplot';
|
|
@@ -43,7 +43,9 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
43
43
|
// eslint-disable-next-line no-unused-vars
|
|
44
44
|
const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
|
|
45
45
|
const [{ obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
|
46
|
-
|
|
46
|
+
// eslint-disable-next-line max-len
|
|
47
|
+
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
|
48
|
+
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
|
|
47
49
|
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
|
|
48
50
|
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
|
|
49
51
|
const isReady = useReady([
|
|
@@ -51,6 +53,7 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
51
53
|
obsSetsStatus,
|
|
52
54
|
featureSelectionStatus,
|
|
53
55
|
featureLabelsStatus,
|
|
56
|
+
expandedFeatureLabelsStatus,
|
|
54
57
|
matrixIndicesStatus,
|
|
55
58
|
sampleSetsStatus,
|
|
56
59
|
sampleEdgesStatus,
|
|
@@ -258,7 +261,7 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
258
261
|
}, updateViewInfo: setComponentViewInfo, getExpressionValue: getExpressionValue, getCellIsSelected: getCellIsSelected, obsSetSelection: cellSetSelection, sampleSetSelection: sampleSetSelection,
|
|
259
262
|
// InternMap data structures where keys are
|
|
260
263
|
// obsSet -> sampleSet -> arrayKey -> [].
|
|
261
|
-
stratifiedData: stratifiedData, obsSetColor: cellSetColor, sampleSetColor: sampleSetColor, contourThresholds: contourThresholds, contourColorEncoding: contourColorEncoding, contourColor: contourColor, contoursFilled: embeddingContoursFilled, embeddingPointsVisible: embeddingPointsVisible, embeddingContoursVisible: embeddingContoursVisible }), tooltipsVisible && (_jsx(ScatterplotTooltipSubscriber, { parentUuid: uuid, obsHighlight: cellHighlight, width: width, height: height, getObsInfo: getObsInfo })), _jsx(Legend, { visible: true, theme: theme, featureType: featureType, featureValueType: featureValueType, obsColorEncoding: cellColorEncoding, featureSelection: geneSelection, featureLabelsMap: featureLabelsMap, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, obsSetSelection: cellSetSelection, extent: expressionExtents?.[0], missing: expressionMissing?.[0],
|
|
264
|
+
stratifiedData: stratifiedData, obsSetColor: cellSetColor, sampleSetColor: sampleSetColor, contourThresholds: contourThresholds, contourColorEncoding: contourColorEncoding, contourColor: contourColor, contoursFilled: embeddingContoursFilled, embeddingPointsVisible: embeddingPointsVisible, embeddingContoursVisible: embeddingContoursVisible }), tooltipsVisible && (_jsx(ScatterplotTooltipSubscriber, { parentUuid: uuid, obsHighlight: cellHighlight, width: width, height: height, getObsInfo: getObsInfo, featureType: featureType, featureLabelsMap: featureLabelsMap })), _jsx(Legend, { visible: true, theme: theme, featureType: featureType, featureValueType: featureValueType, obsColorEncoding: cellColorEncoding, featureSelection: geneSelection, featureLabelsMap: featureLabelsMap, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, obsSetSelection: cellSetSelection, extent: expressionExtents?.[0], missing: expressionMissing?.[0],
|
|
262
265
|
// Contour percentile legend
|
|
263
266
|
pointsVisible: embeddingPointsVisible, contoursVisible: embeddingContoursVisible, contoursFilled: embeddingContoursFilled, contourPercentiles: contourPercentiles || DEFAULT_CONTOUR_PERCENTILES, contourThresholds: contourThresholds })] }));
|
|
264
267
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-embedding",
|
|
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": {
|
|
@@ -20,12 +20,12 @@
|
|
|
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.5.
|
|
24
|
-
"@vitessce/legend": "3.5.
|
|
25
|
-
"@vitessce/scatterplot": "3.5.
|
|
26
|
-
"@vitessce/sets-utils": "3.5.
|
|
27
|
-
"@vitessce/utils": "3.5.
|
|
28
|
-
"@vitessce/vit-s": "3.5.
|
|
23
|
+
"@vitessce/constants-internal": "3.5.3",
|
|
24
|
+
"@vitessce/legend": "3.5.3",
|
|
25
|
+
"@vitessce/scatterplot": "3.5.3",
|
|
26
|
+
"@vitessce/sets-utils": "3.5.3",
|
|
27
|
+
"@vitessce/utils": "3.5.3",
|
|
28
|
+
"@vitessce/vit-s": "3.5.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "^18.0.0",
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
useSetComponentHover,
|
|
24
24
|
useSetComponentViewInfo,
|
|
25
25
|
useInitialCoordination,
|
|
26
|
+
useExpandedFeatureLabelsMap,
|
|
26
27
|
} from '@vitessce/vit-s';
|
|
27
28
|
import {
|
|
28
29
|
setObsSelection, mergeObsSets, getCellSetPolygons, getCellColors,
|
|
@@ -179,10 +180,14 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
179
180
|
loaders, dataset, false,
|
|
180
181
|
{ obsType, featureType, featureValueType },
|
|
181
182
|
);
|
|
182
|
-
|
|
183
|
+
// eslint-disable-next-line max-len
|
|
184
|
+
const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
|
|
183
185
|
loaders, dataset, false, {}, {},
|
|
184
186
|
{ featureType },
|
|
185
187
|
);
|
|
188
|
+
const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
|
189
|
+
featureType, featureLabelsMapOrig, { stripCuriePrefixes: true },
|
|
190
|
+
);
|
|
186
191
|
|
|
187
192
|
const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(
|
|
188
193
|
loaders, dataset, false, {}, {},
|
|
@@ -199,6 +204,7 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
199
204
|
obsSetsStatus,
|
|
200
205
|
featureSelectionStatus,
|
|
201
206
|
featureLabelsStatus,
|
|
207
|
+
expandedFeatureLabelsStatus,
|
|
202
208
|
matrixIndicesStatus,
|
|
203
209
|
sampleSetsStatus,
|
|
204
210
|
sampleEdgesStatus,
|
|
@@ -549,6 +555,8 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
549
555
|
width={width}
|
|
550
556
|
height={height}
|
|
551
557
|
getObsInfo={getObsInfo}
|
|
558
|
+
featureType={featureType}
|
|
559
|
+
featureLabelsMap={featureLabelsMap}
|
|
552
560
|
/>
|
|
553
561
|
)}
|
|
554
562
|
<Legend
|