@vitessce/scatterplot-gating 3.0.0 → 3.0.1
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-de0bc9c8.js → deflate-9e0df7d6.js} +1 -1
- package/dist/{index-6f1cc356.js → index-55139ae6.js} +22 -17
- package/dist/index.js +1 -1
- package/dist/{jpeg-a72c0702.js → jpeg-401dc42f.js} +1 -1
- package/dist/{lerc-27230ebf.js → lerc-0b18eed1.js} +1 -1
- package/dist/{lzw-e71d3b12.js → lzw-4ce0a11f.js} +1 -1
- package/dist/{packbits-5ddf3db9.js → packbits-2356dc29.js} +1 -1
- package/dist/{raw-424e77e0.js → raw-cb261cd1.js} +1 -1
- package/dist/{webimage-93e70904.js → webimage-a363de79.js} +1 -1
- package/dist-tsc/GatingSubscriber.d.ts.map +1 -1
- package/dist-tsc/GatingSubscriber.js +6 -3
- package/package.json +8 -8
- package/src/GatingSubscriber.js +10 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, Children, isValidElement, PureComponent, useCallback } from "react";
|
|
3
|
-
import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo, useLoaders, useSetComponentHover, useSetComponentViewInfo, useCoordination,
|
|
3
|
+
import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo, useLoaders, useSetComponentHover, useSetComponentViewInfo, useCoordination, useDeckCanvasSize, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useReady, useUrls, useUint8FeatureSelection, useExpressionValueGetter, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import ReactDOM__default from "react-dom";
|
|
6
6
|
function _mergeNamespaces(n2, m2) {
|
|
@@ -121150,16 +121150,16 @@ function addDecoder(cases, importFn) {
|
|
|
121150
121150
|
}
|
|
121151
121151
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121152
121152
|
}
|
|
121153
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121154
|
-
addDecoder(5, () => import("./lzw-
|
|
121153
|
+
addDecoder([void 0, 1], () => import("./raw-cb261cd1.js").then((m2) => m2.default));
|
|
121154
|
+
addDecoder(5, () => import("./lzw-4ce0a11f.js").then((m2) => m2.default));
|
|
121155
121155
|
addDecoder(6, () => {
|
|
121156
121156
|
throw new Error("old style JPEG compression is not supported.");
|
|
121157
121157
|
});
|
|
121158
|
-
addDecoder(7, () => import("./jpeg-
|
|
121159
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121160
|
-
addDecoder(32773, () => import("./packbits-
|
|
121161
|
-
addDecoder(34887, () => import("./lerc-
|
|
121162
|
-
addDecoder(50001, () => import("./webimage-
|
|
121158
|
+
addDecoder(7, () => import("./jpeg-401dc42f.js").then((m2) => m2.default));
|
|
121159
|
+
addDecoder([8, 32946], () => import("./deflate-9e0df7d6.js").then((m2) => m2.default));
|
|
121160
|
+
addDecoder(32773, () => import("./packbits-2356dc29.js").then((m2) => m2.default));
|
|
121161
|
+
addDecoder(34887, () => import("./lerc-0b18eed1.js").then((m2) => m2.default));
|
|
121162
|
+
addDecoder(50001, () => import("./webimage-a363de79.js").then((m2) => m2.default));
|
|
121163
121163
|
function decodeRowAcc(row, stride) {
|
|
121164
121164
|
let length2 = row.length - stride;
|
|
121165
121165
|
let offset5 = 0;
|
|
@@ -147436,7 +147436,7 @@ const CenterFocusStrong = createSvgIcon(/* @__PURE__ */ React.createElement("pat
|
|
|
147436
147436
|
d: "M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"
|
|
147437
147437
|
}), "CenterFocusStrong");
|
|
147438
147438
|
const useStyles$1 = makeStyles(() => ({
|
|
147439
|
-
|
|
147439
|
+
toolButton: {
|
|
147440
147440
|
display: "inline-flex",
|
|
147441
147441
|
"&:active": {
|
|
147442
147442
|
opacity: ".65",
|
|
@@ -147459,7 +147459,7 @@ const useStyles$1 = makeStyles(() => ({
|
|
|
147459
147459
|
transform: "scale(0.98)"
|
|
147460
147460
|
// make the button slightly smaller
|
|
147461
147461
|
},
|
|
147462
|
-
|
|
147462
|
+
toolIcon: {
|
|
147463
147463
|
// btn btn-outline-secondary mr-2 icon
|
|
147464
147464
|
padding: "0",
|
|
147465
147465
|
height: "2em",
|
|
@@ -147497,12 +147497,12 @@ const useStyles$1 = makeStyles(() => ({
|
|
|
147497
147497
|
function IconTool(props2) {
|
|
147498
147498
|
const { alt, onClick, isActive, children } = props2;
|
|
147499
147499
|
const classes = useStyles$1();
|
|
147500
|
-
return jsxRuntimeExports.jsx("button", { className: clsx(classes.
|
|
147500
|
+
return jsxRuntimeExports.jsx("button", { className: clsx(classes.toolIcon, { [classes.toolActive]: isActive }), onClick, type: "button", title: alt, children });
|
|
147501
147501
|
}
|
|
147502
147502
|
function IconButton2(props2) {
|
|
147503
147503
|
const { alt, onClick, children } = props2;
|
|
147504
147504
|
const classes = useStyles$1();
|
|
147505
|
-
return jsxRuntimeExports.jsx("button", { className: clsx(classes.
|
|
147505
|
+
return jsxRuntimeExports.jsx("button", { className: clsx(classes.toolIcon, classes.toolButton), onClick, type: "button", title: alt, children });
|
|
147506
147506
|
}
|
|
147507
147507
|
function ToolMenu(props2) {
|
|
147508
147508
|
const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true }, recenterOnClick = () => {
|
|
@@ -148456,7 +148456,6 @@ function GatingSubscriber(props2) {
|
|
|
148456
148456
|
COMPONENT_COORDINATION_TYPES[ViewType$1.GATING],
|
|
148457
148457
|
coordinationScopes
|
|
148458
148458
|
);
|
|
148459
|
-
const [urls, addUrl] = useUrls(loaders, dataset);
|
|
148460
148459
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
148461
148460
|
const title = useMemo(() => {
|
|
148462
148461
|
if (titleOverride) {
|
|
@@ -148469,10 +148468,9 @@ function GatingSubscriber(props2) {
|
|
|
148469
148468
|
}, [titleOverride, gatingFeatureSelectionX, gatingFeatureSelectionY]);
|
|
148470
148469
|
const featureSelectionX = useMemo(() => gatingFeatureSelectionX ? [gatingFeatureSelectionX] : null, [gatingFeatureSelectionX]);
|
|
148471
148470
|
const featureSelectionY = useMemo(() => gatingFeatureSelectionY ? [gatingFeatureSelectionY] : null, [gatingFeatureSelectionY]);
|
|
148472
|
-
const [{ obsSets: cellSets }, obsSetsStatus] = useObsSetsData(
|
|
148471
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
|
148473
148472
|
loaders,
|
|
148474
148473
|
dataset,
|
|
148475
|
-
addUrl,
|
|
148476
148474
|
false,
|
|
148477
148475
|
{ setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
|
|
148478
148476
|
{ obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
|
|
@@ -148499,10 +148497,13 @@ function GatingSubscriber(props2) {
|
|
|
148499
148497
|
featureSelectionY,
|
|
148500
148498
|
{ obsType, featureType, featureValueType }
|
|
148501
148499
|
);
|
|
148502
|
-
const [
|
|
148500
|
+
const [
|
|
148501
|
+
{ obsIndex, featureIndex },
|
|
148502
|
+
matrixIndicesStatus,
|
|
148503
|
+
matrixIndicesUrls
|
|
148504
|
+
] = useObsFeatureMatrixIndices(
|
|
148503
148505
|
loaders,
|
|
148504
148506
|
dataset,
|
|
148505
|
-
addUrl,
|
|
148506
148507
|
false,
|
|
148507
148508
|
{ obsType, featureType, featureValueType }
|
|
148508
148509
|
);
|
|
@@ -148514,6 +148515,10 @@ function GatingSubscriber(props2) {
|
|
|
148514
148515
|
featureSelectionYStatus,
|
|
148515
148516
|
matrixIndicesStatus
|
|
148516
148517
|
]);
|
|
148518
|
+
const urls = useUrls([
|
|
148519
|
+
obsSetsUrls,
|
|
148520
|
+
matrixIndicesUrls
|
|
148521
|
+
]);
|
|
148517
148522
|
const obsXY = useMemo(() => {
|
|
148518
148523
|
if (!(cellsCount && (expressionDataX == null ? void 0 : expressionDataX[0]) && (expressionDataY == null ? void 0 : expressionDataY[0]) && featureSelectionX && featureSelectionY)) {
|
|
148519
148524
|
return null;
|
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-55139ae6.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;KAYK;AACL;IAV2B,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAES,cAAc,EAA7B,OAAO;IACS,mBAAmB;IAErB,kBAAkB,EAAhC,MAAM;
|
|
1
|
+
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;KAYK;AACL;IAV2B,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAES,cAAc,EAA7B,OAAO;IACS,mBAAmB;IAErB,kBAAkB,EAAhC,MAAM;gBA4ZlB"}
|
|
@@ -31,7 +31,6 @@ export function GatingSubscriber(props) {
|
|
|
31
31
|
const setComponentViewInfo = useSetComponentViewInfo(uuid);
|
|
32
32
|
// Get "props" from the coordination space.
|
|
33
33
|
const [{ dataset, obsType, featureType, featureValueType, embeddingZoom: zoom, embeddingTargetX: targetX, embeddingTargetY: targetY, embeddingTargetZ: targetZ, obsFilter: cellFilter, obsHighlight: cellHighlight, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, embeddingObsSetPolygonsVisible: cellSetPolygonsVisible, embeddingObsSetLabelsVisible: cellSetLabelsVisible, embeddingObsSetLabelSize: cellSetLabelSize, embeddingObsRadius: cellRadiusFixed, embeddingObsRadiusMode: cellRadiusMode, embeddingObsOpacity: cellOpacityFixed, embeddingObsOpacityMode: cellOpacityMode, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, featureSelection: gatingFeatureSelectionColor, featureValueTransform, featureValueTransformCoefficient, gatingFeatureSelectionX, gatingFeatureSelectionY, }, { setEmbeddingZoom: setZoom, setEmbeddingTargetX: setTargetX, setEmbeddingTargetY: setTargetY, setEmbeddingTargetZ: setTargetZ, setObsFilter: setCellFilter, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setEmbeddingObsSetPolygonsVisible: setCellSetPolygonsVisible, setEmbeddingObsSetLabelsVisible: setCellSetLabelsVisible, setEmbeddingObsSetLabelSize: setCellSetLabelSize, setEmbeddingObsRadius: setCellRadiusFixed, setEmbeddingObsRadiusMode: setCellRadiusMode, setEmbeddingObsOpacity: setCellOpacityFixed, setEmbeddingObsOpacityMode: setCellOpacityMode, setFeatureValueColormap: setGeneExpressionColormap, setFeatureValueColormapRange: setGeneExpressionColormapRange, setFeatureValueTransform, setFeatureValueTransformCoefficient, setGatingFeatureSelectionX, setGatingFeatureSelectionY, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.GATING], coordinationScopes);
|
|
34
|
-
const [urls, addUrl] = useUrls(loaders, dataset);
|
|
35
34
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
36
35
|
const title = useMemo(() => {
|
|
37
36
|
if (titleOverride) {
|
|
@@ -45,14 +44,14 @@ export function GatingSubscriber(props) {
|
|
|
45
44
|
const featureSelectionX = useMemo(() => (gatingFeatureSelectionX ? [gatingFeatureSelectionX] : null), [gatingFeatureSelectionX]);
|
|
46
45
|
const featureSelectionY = useMemo(() => (gatingFeatureSelectionY ? [gatingFeatureSelectionY] : null), [gatingFeatureSelectionY]);
|
|
47
46
|
// Get data from loaders using the data hooks.
|
|
48
|
-
const [{ obsSets: cellSets }, obsSetsStatus] = useObsSetsData(loaders, dataset,
|
|
47
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
|
|
49
48
|
// eslint-disable-next-line no-unused-vars
|
|
50
49
|
const [expressionDataColor, loadedColor, featureSelectionColorStatus] = useFeatureSelection(loaders, dataset, false, gatingFeatureSelectionColor, { obsType, featureType, featureValueType });
|
|
51
50
|
// eslint-disable-next-line no-unused-vars
|
|
52
51
|
const [expressionDataX, loadedX, featureSelectionXStatus] = useFeatureSelection(loaders, dataset, false, featureSelectionX, { obsType, featureType, featureValueType });
|
|
53
52
|
// eslint-disable-next-line no-unused-vars
|
|
54
53
|
const [expressionDataY, loadedY, featureSelectionYStatus] = useFeatureSelection(loaders, dataset, false, featureSelectionY, { obsType, featureType, featureValueType });
|
|
55
|
-
const [{ obsIndex, featureIndex }, matrixIndicesStatus] = useObsFeatureMatrixIndices(loaders, dataset,
|
|
54
|
+
const [{ obsIndex, featureIndex }, matrixIndicesStatus, matrixIndicesUrls,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
|
56
55
|
const cellsCount = obsIndex?.length || 0;
|
|
57
56
|
const isReady = useReady([
|
|
58
57
|
obsSetsStatus,
|
|
@@ -61,6 +60,10 @@ export function GatingSubscriber(props) {
|
|
|
61
60
|
featureSelectionYStatus,
|
|
62
61
|
matrixIndicesStatus,
|
|
63
62
|
]);
|
|
63
|
+
const urls = useUrls([
|
|
64
|
+
obsSetsUrls,
|
|
65
|
+
matrixIndicesUrls,
|
|
66
|
+
]);
|
|
64
67
|
// Generate a new cells object with a mapping added for the user selected genes.
|
|
65
68
|
const obsXY = useMemo(() => {
|
|
66
69
|
if (!(cellsCount && expressionDataX?.[0] && expressionDataY?.[0]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,23 +20,23 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"plur": "^5.1.0",
|
|
23
|
-
"@vitessce/constants-internal": "3.0.
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/constants-internal": "3.0.1",
|
|
24
|
+
"@vitessce/scatterplot": "3.0.1",
|
|
25
|
+
"@vitessce/sets-utils": "3.0.1",
|
|
26
|
+
"@vitessce/utils": "3.0.1",
|
|
27
|
+
"@vitessce/vit-s": "3.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|
|
31
31
|
"vite": "^4.3.0",
|
|
32
|
-
"vitest": "^0.
|
|
32
|
+
"vitest": "^0.32.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
|
39
|
-
"test": "pnpm exec vitest --run
|
|
39
|
+
"test": "pnpm exec vitest --run"
|
|
40
40
|
},
|
|
41
41
|
"module": "dist/index.js",
|
|
42
42
|
"exports": {
|
package/src/GatingSubscriber.js
CHANGED
|
@@ -120,7 +120,6 @@ export function GatingSubscriber(props) {
|
|
|
120
120
|
coordinationScopes,
|
|
121
121
|
);
|
|
122
122
|
|
|
123
|
-
const [urls, addUrl] = useUrls(loaders, dataset);
|
|
124
123
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
125
124
|
|
|
126
125
|
const title = useMemo(() => {
|
|
@@ -141,8 +140,8 @@ export function GatingSubscriber(props) {
|
|
|
141
140
|
), [gatingFeatureSelectionY]);
|
|
142
141
|
|
|
143
142
|
// Get data from loaders using the data hooks.
|
|
144
|
-
const [{ obsSets: cellSets }, obsSetsStatus] = useObsSetsData(
|
|
145
|
-
loaders, dataset,
|
|
143
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
|
144
|
+
loaders, dataset, false,
|
|
146
145
|
{ setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
|
|
147
146
|
{ obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
|
|
148
147
|
{ obsType },
|
|
@@ -162,8 +161,10 @@ export function GatingSubscriber(props) {
|
|
|
162
161
|
loaders, dataset, false, featureSelectionY,
|
|
163
162
|
{ obsType, featureType, featureValueType },
|
|
164
163
|
);
|
|
165
|
-
const [
|
|
166
|
-
|
|
164
|
+
const [
|
|
165
|
+
{ obsIndex, featureIndex }, matrixIndicesStatus, matrixIndicesUrls,
|
|
166
|
+
] = useObsFeatureMatrixIndices(
|
|
167
|
+
loaders, dataset, false,
|
|
167
168
|
{ obsType, featureType, featureValueType },
|
|
168
169
|
);
|
|
169
170
|
const cellsCount = obsIndex?.length || 0;
|
|
@@ -175,6 +176,10 @@ export function GatingSubscriber(props) {
|
|
|
175
176
|
featureSelectionYStatus,
|
|
176
177
|
matrixIndicesStatus,
|
|
177
178
|
]);
|
|
179
|
+
const urls = useUrls([
|
|
180
|
+
obsSetsUrls,
|
|
181
|
+
matrixIndicesUrls,
|
|
182
|
+
]);
|
|
178
183
|
|
|
179
184
|
// Generate a new cells object with a mapping added for the user selected genes.
|
|
180
185
|
const obsXY = useMemo(() => {
|