@vitessce/scatterplot-gating 3.6.6 → 3.6.8
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-0khwfeEa.js → deflate-CfBCa-sD.js} +1 -1
- package/dist/{index-Ceq7OIVC.js → index-W40dIkpk.js} +126 -44
- package/dist/index.js +1 -1
- package/dist/{jpeg-BIWhN5Z_.js → jpeg-CopckebW.js} +1 -1
- package/dist/{lerc-F_eWR4uk.js → lerc-DEsPnFq8.js} +1 -1
- package/dist/{lzw-DxtPY-6B.js → lzw-D_qPkuE6.js} +1 -1
- package/dist/{packbits-BwpCwQeA.js → packbits-Dhz_WVRw.js} +1 -1
- package/dist/{raw-DtEUssqa.js → raw-Cumc1mfn.js} +1 -1
- package/dist/{webimage-DTHl4ms3.js → webimage-yuc72XBP.js} +1 -1
- package/dist-tsc/GatingSubscriber.d.ts.map +1 -1
- package/dist-tsc/GatingSubscriber.js +17 -6
- package/package.json +7 -7
- package/src/GatingSubscriber.js +26 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-W40dIkpk.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -7011,6 +7011,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
|
|
|
7011
7011
|
const configSchema1_0_17 = configSchema1_0_16.extend({
|
|
7012
7012
|
version: z.literal("1.0.17")
|
|
7013
7013
|
});
|
|
7014
|
+
const configSchema1_0_18 = configSchema1_0_17.extend({
|
|
7015
|
+
version: z.literal("1.0.18")
|
|
7016
|
+
});
|
|
7014
7017
|
configSchema1_0_0.shape.coordinationSpace.unwrap();
|
|
7015
7018
|
configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
|
|
7016
7019
|
function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
|
|
@@ -7518,7 +7521,54 @@ function upgradeFrom1_0_16(config2) {
|
|
|
7518
7521
|
version: "1.0.17"
|
|
7519
7522
|
};
|
|
7520
7523
|
}
|
|
7521
|
-
|
|
7524
|
+
function upgradeFrom1_0_17(config2) {
|
|
7525
|
+
const newConfig = cloneDeep(config2);
|
|
7526
|
+
const { datasets } = newConfig;
|
|
7527
|
+
const newDatasets = datasets.map((datasetDef) => {
|
|
7528
|
+
const { files } = datasetDef;
|
|
7529
|
+
const newFiles = files.map((fileDef) => {
|
|
7530
|
+
const { fileType, options } = fileDef;
|
|
7531
|
+
if (fileType === "spatialdata.zarr" || fileType === "spatialdata.zarr.zip") {
|
|
7532
|
+
if (options.labels && options.shapes) {
|
|
7533
|
+
throw new Error("Cannot upgrade both labels and shapes at the same time. For now, a workaround is to include two separate spatialdata.zarr file definitions, one for labels and one for shapes.");
|
|
7534
|
+
}
|
|
7535
|
+
if (options.labels) {
|
|
7536
|
+
const newOptions = {
|
|
7537
|
+
...options,
|
|
7538
|
+
obsSegmentations: options.labels
|
|
7539
|
+
};
|
|
7540
|
+
delete newOptions.labels;
|
|
7541
|
+
return {
|
|
7542
|
+
...fileDef,
|
|
7543
|
+
options: newOptions
|
|
7544
|
+
};
|
|
7545
|
+
}
|
|
7546
|
+
if (options.shapes) {
|
|
7547
|
+
const newOptions = {
|
|
7548
|
+
...options,
|
|
7549
|
+
obsSegmentations: options.shapes
|
|
7550
|
+
};
|
|
7551
|
+
delete newOptions.shapes;
|
|
7552
|
+
return {
|
|
7553
|
+
...fileDef,
|
|
7554
|
+
options: newOptions
|
|
7555
|
+
};
|
|
7556
|
+
}
|
|
7557
|
+
}
|
|
7558
|
+
return fileDef;
|
|
7559
|
+
});
|
|
7560
|
+
return {
|
|
7561
|
+
...datasetDef,
|
|
7562
|
+
files: newFiles
|
|
7563
|
+
};
|
|
7564
|
+
});
|
|
7565
|
+
return {
|
|
7566
|
+
...newConfig,
|
|
7567
|
+
datasets: newDatasets,
|
|
7568
|
+
version: "1.0.18"
|
|
7569
|
+
};
|
|
7570
|
+
}
|
|
7571
|
+
const latestConfigSchema = configSchema1_0_18;
|
|
7522
7572
|
const SCHEMA_HANDLERS = [
|
|
7523
7573
|
[configSchema0_1_0, upgradeFrom0_1_0],
|
|
7524
7574
|
[configSchema1_0_0, upgradeFrom1_0_0],
|
|
@@ -7537,7 +7587,8 @@ const SCHEMA_HANDLERS = [
|
|
|
7537
7587
|
[configSchema1_0_13, upgradeFrom1_0_13],
|
|
7538
7588
|
[configSchema1_0_14, upgradeFrom1_0_14],
|
|
7539
7589
|
[configSchema1_0_15, upgradeFrom1_0_15],
|
|
7540
|
-
[configSchema1_0_16, upgradeFrom1_0_16]
|
|
7590
|
+
[configSchema1_0_16, upgradeFrom1_0_16],
|
|
7591
|
+
[configSchema1_0_17, upgradeFrom1_0_17]
|
|
7541
7592
|
];
|
|
7542
7593
|
var re = { exports: {} };
|
|
7543
7594
|
var constants$1;
|
|
@@ -9569,9 +9620,7 @@ const FileType$1 = {
|
|
|
9569
9620
|
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
9570
9621
|
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
9571
9622
|
FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
|
|
9572
|
-
|
|
9573
|
-
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
9574
|
-
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
9623
|
+
OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
|
|
9575
9624
|
// SpatialData - zipped
|
|
9576
9625
|
IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
|
|
9577
9626
|
LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
|
|
@@ -9580,6 +9629,7 @@ const FileType$1 = {
|
|
|
9580
9629
|
OBS_SETS_SPATIALDATA_ZARR_ZIP: "obsSets.spatialdata.zarr.zip",
|
|
9581
9630
|
OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
|
|
9582
9631
|
FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
|
|
9632
|
+
OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
|
|
9583
9633
|
// MuData
|
|
9584
9634
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
9585
9635
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -9829,6 +9879,7 @@ const ViewHelpMapping = {
|
|
|
9829
9879
|
[FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR]: DataType$2.OBS_FEATURE_MATRIX,
|
|
9830
9880
|
[FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
|
|
9831
9881
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
|
|
9882
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
|
|
9832
9883
|
// For new file types to support old file types
|
|
9833
9884
|
[FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
|
|
9834
9885
|
[FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
|
|
@@ -10002,6 +10053,9 @@ const ViewHelpMapping = {
|
|
|
10002
10053
|
},
|
|
10003
10054
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: {
|
|
10004
10055
|
zip: FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR_ZIP
|
|
10056
|
+
},
|
|
10057
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
|
|
10058
|
+
zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
|
|
10005
10059
|
}
|
|
10006
10060
|
});
|
|
10007
10061
|
[
|
|
@@ -11021,10 +11075,14 @@ const imageSpatialdataSchema = z.object({
|
|
|
11021
11075
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
11022
11076
|
});
|
|
11023
11077
|
const obsSegmentationsSpatialdataSchema = z.object({
|
|
11024
|
-
// TODO:
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11078
|
+
// TODO: support obsTypesFromElementNames?
|
|
11079
|
+
path: z.string().describe("The path to the segmentation data, stored in either shapes/ or labels/."),
|
|
11080
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the labels or shapes. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
11081
|
+
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
11082
|
+
});
|
|
11083
|
+
const obsPointsSpatialdataSchema = z.object({
|
|
11084
|
+
path: z.string().describe("The path to the point data."),
|
|
11085
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the points. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
11028
11086
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
11029
11087
|
});
|
|
11030
11088
|
z.object({
|
|
@@ -11144,13 +11202,10 @@ z.object({
|
|
|
11144
11202
|
image: imageSpatialdataSchema,
|
|
11145
11203
|
// TODO: should this be a special schema
|
|
11146
11204
|
// to allow specifying fileUid (like for embeddingType)?
|
|
11147
|
-
// TODO: allow multiple labels?
|
|
11148
|
-
|
|
11205
|
+
// TODO: allow multiple labels/shapes?
|
|
11206
|
+
obsSegmentations: obsSegmentationsSpatialdataSchema,
|
|
11207
|
+
obsPoints: obsPointsSpatialdataSchema,
|
|
11149
11208
|
// TODO: allow multiple shapes?
|
|
11150
|
-
// TODO: unify labels and shapes to obsSegmentations,
|
|
11151
|
-
// then distinguish in expand function based on
|
|
11152
|
-
// "labels/*" vs. "shapes/*" in path?
|
|
11153
|
-
shapes: obsSegmentationsSpatialdataSchema,
|
|
11154
11209
|
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
11155
11210
|
obsSpots: obsSpotsSpatialdataSchema,
|
|
11156
11211
|
// TODO: obsPoints
|
|
@@ -123051,22 +123106,22 @@ function addDecoder(cases, importFn) {
|
|
|
123051
123106
|
}
|
|
123052
123107
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
123053
123108
|
}
|
|
123054
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
123055
|
-
addDecoder(5, () => import("./lzw-
|
|
123109
|
+
addDecoder([void 0, 1], () => import("./raw-Cumc1mfn.js").then((m2) => m2.default));
|
|
123110
|
+
addDecoder(5, () => import("./lzw-D_qPkuE6.js").then((m2) => m2.default));
|
|
123056
123111
|
addDecoder(6, () => {
|
|
123057
123112
|
throw new Error("old style JPEG compression is not supported.");
|
|
123058
123113
|
});
|
|
123059
|
-
addDecoder(7, () => import("./jpeg-
|
|
123060
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
123061
|
-
addDecoder(32773, () => import("./packbits-
|
|
123114
|
+
addDecoder(7, () => import("./jpeg-CopckebW.js").then((m2) => m2.default));
|
|
123115
|
+
addDecoder([8, 32946], () => import("./deflate-CfBCa-sD.js").then((m2) => m2.default));
|
|
123116
|
+
addDecoder(32773, () => import("./packbits-Dhz_WVRw.js").then((m2) => m2.default));
|
|
123062
123117
|
addDecoder(
|
|
123063
123118
|
34887,
|
|
123064
|
-
() => import("./lerc-
|
|
123119
|
+
() => import("./lerc-DEsPnFq8.js").then(async (m2) => {
|
|
123065
123120
|
await m2.zstd.init();
|
|
123066
123121
|
return m2;
|
|
123067
123122
|
}).then((m2) => m2.default)
|
|
123068
123123
|
);
|
|
123069
|
-
addDecoder(50001, () => import("./webimage-
|
|
123124
|
+
addDecoder(50001, () => import("./webimage-yuc72XBP.js").then((m2) => m2.default));
|
|
123070
123125
|
function decodeRowAcc(row, stride) {
|
|
123071
123126
|
let length2 = row.length - stride;
|
|
123072
123127
|
let offset2 = 0;
|
|
@@ -145723,6 +145778,23 @@ ButtonBase.propTypes = {
|
|
|
145723
145778
|
*/
|
|
145724
145779
|
type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
|
|
145725
145780
|
};
|
|
145781
|
+
function hasCorrectMainProperty(obj) {
|
|
145782
|
+
return typeof obj.main === "string";
|
|
145783
|
+
}
|
|
145784
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
145785
|
+
if (!hasCorrectMainProperty(obj)) {
|
|
145786
|
+
return false;
|
|
145787
|
+
}
|
|
145788
|
+
for (const value of additionalPropertiesToCheck) {
|
|
145789
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
145790
|
+
return false;
|
|
145791
|
+
}
|
|
145792
|
+
}
|
|
145793
|
+
return true;
|
|
145794
|
+
}
|
|
145795
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
145796
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
145797
|
+
}
|
|
145726
145798
|
function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
145727
145799
|
const propValue = props[propName];
|
|
145728
145800
|
const safePropName = propFullName || propName;
|
|
@@ -145830,23 +145902,6 @@ Portal.propTypes = {
|
|
|
145830
145902
|
{
|
|
145831
145903
|
Portal["propTypes"] = exactProp(Portal.propTypes);
|
|
145832
145904
|
}
|
|
145833
|
-
function hasCorrectMainProperty(obj) {
|
|
145834
|
-
return typeof obj.main === "string";
|
|
145835
|
-
}
|
|
145836
|
-
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
145837
|
-
if (!hasCorrectMainProperty(obj)) {
|
|
145838
|
-
return false;
|
|
145839
|
-
}
|
|
145840
|
-
for (const value of additionalPropertiesToCheck) {
|
|
145841
|
-
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
145842
|
-
return false;
|
|
145843
|
-
}
|
|
145844
|
-
}
|
|
145845
|
-
return true;
|
|
145846
|
-
}
|
|
145847
|
-
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
145848
|
-
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
145849
|
-
}
|
|
145850
145905
|
function getStyleValue(value) {
|
|
145851
145906
|
return parseInt(value, 10) || 0;
|
|
145852
145907
|
}
|
|
@@ -159388,7 +159443,7 @@ function GatingSubscriber(props) {
|
|
|
159388
159443
|
}, [titleOverride, gatingFeatureSelectionX, gatingFeatureSelectionY]);
|
|
159389
159444
|
const featureSelectionX = useMemo(() => gatingFeatureSelectionX ? [gatingFeatureSelectionX] : null, [gatingFeatureSelectionX]);
|
|
159390
159445
|
const featureSelectionY = useMemo(() => gatingFeatureSelectionY ? [gatingFeatureSelectionY] : null, [gatingFeatureSelectionY]);
|
|
159391
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
|
159446
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(
|
|
159392
159447
|
loaders,
|
|
159393
159448
|
dataset,
|
|
159394
159449
|
false,
|
|
@@ -159396,21 +159451,39 @@ function GatingSubscriber(props) {
|
|
|
159396
159451
|
{ obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
|
|
159397
159452
|
{ obsType }
|
|
159398
159453
|
);
|
|
159399
|
-
const [
|
|
159454
|
+
const [
|
|
159455
|
+
// eslint-disable-next-line no-unused-vars
|
|
159456
|
+
expressionDataColor,
|
|
159457
|
+
loadedColor,
|
|
159458
|
+
featureSelectionColorStatus,
|
|
159459
|
+
featureSelectionColorErrors
|
|
159460
|
+
] = useFeatureSelection(
|
|
159400
159461
|
loaders,
|
|
159401
159462
|
dataset,
|
|
159402
159463
|
false,
|
|
159403
159464
|
gatingFeatureSelectionColor,
|
|
159404
159465
|
{ obsType, featureType, featureValueType }
|
|
159405
159466
|
);
|
|
159406
|
-
const [
|
|
159467
|
+
const [
|
|
159468
|
+
// eslint-disable-next-line no-unused-vars
|
|
159469
|
+
expressionDataX,
|
|
159470
|
+
loadedX,
|
|
159471
|
+
featureSelectionXStatus,
|
|
159472
|
+
featureSelectionXErrors
|
|
159473
|
+
] = useFeatureSelection(
|
|
159407
159474
|
loaders,
|
|
159408
159475
|
dataset,
|
|
159409
159476
|
false,
|
|
159410
159477
|
featureSelectionX,
|
|
159411
159478
|
{ obsType, featureType, featureValueType }
|
|
159412
159479
|
);
|
|
159413
|
-
const [
|
|
159480
|
+
const [
|
|
159481
|
+
// eslint-disable-next-line no-unused-vars
|
|
159482
|
+
expressionDataY,
|
|
159483
|
+
loadedY,
|
|
159484
|
+
featureSelectionYStatus,
|
|
159485
|
+
featureSelectionYErrors
|
|
159486
|
+
] = useFeatureSelection(
|
|
159414
159487
|
loaders,
|
|
159415
159488
|
dataset,
|
|
159416
159489
|
false,
|
|
@@ -159420,13 +159493,21 @@ function GatingSubscriber(props) {
|
|
|
159420
159493
|
const [
|
|
159421
159494
|
{ obsIndex, featureIndex },
|
|
159422
159495
|
matrixIndicesStatus,
|
|
159423
|
-
matrixIndicesUrls
|
|
159496
|
+
matrixIndicesUrls,
|
|
159497
|
+
matrixIndicesError
|
|
159424
159498
|
] = useObsFeatureMatrixIndices(
|
|
159425
159499
|
loaders,
|
|
159426
159500
|
dataset,
|
|
159427
159501
|
false,
|
|
159428
159502
|
{ obsType, featureType, featureValueType }
|
|
159429
159503
|
);
|
|
159504
|
+
const errors = [
|
|
159505
|
+
obsSetsError,
|
|
159506
|
+
...featureSelectionColorErrors,
|
|
159507
|
+
...featureSelectionXErrors,
|
|
159508
|
+
...featureSelectionYErrors,
|
|
159509
|
+
matrixIndicesError
|
|
159510
|
+
];
|
|
159430
159511
|
const cellsCount = (obsIndex == null ? void 0 : obsIndex.length) || 0;
|
|
159431
159512
|
const isReady = useReady([
|
|
159432
159513
|
obsSetsStatus,
|
|
@@ -159636,6 +159717,7 @@ function GatingSubscriber(props) {
|
|
|
159636
159717
|
theme,
|
|
159637
159718
|
isReady,
|
|
159638
159719
|
helpText,
|
|
159720
|
+
errors,
|
|
159639
159721
|
options: /* @__PURE__ */ React__default.createElement(
|
|
159640
159722
|
ScatterplotOptions,
|
|
159641
159723
|
{
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-W40dIkpk.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;KAYK;AACL,wCAVK;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAES,cAAc,EAA7B,OAAO;IACS,mBAAmB;IAErB,kBAAkB,EAAhC,MAAM;CAEhB,
|
|
1
|
+
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;KAYK;AACL,wCAVK;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAES,cAAc,EAA7B,OAAO;IACS,mBAAmB;IAErB,kBAAkB,EAAhC,MAAM;CAEhB,eAmbF"}
|
|
@@ -43,14 +43,25 @@ export function GatingSubscriber(props) {
|
|
|
43
43
|
const featureSelectionX = useMemo(() => (gatingFeatureSelectionX ? [gatingFeatureSelectionX] : null), [gatingFeatureSelectionX]);
|
|
44
44
|
const featureSelectionY = useMemo(() => (gatingFeatureSelectionY ? [gatingFeatureSelectionY] : null), [gatingFeatureSelectionY]);
|
|
45
45
|
// Get data from loaders using the data hooks.
|
|
46
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
|
|
46
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
|
|
47
|
+
const [
|
|
47
48
|
// eslint-disable-next-line no-unused-vars
|
|
48
|
-
|
|
49
|
+
expressionDataColor, loadedColor, featureSelectionColorStatus, featureSelectionColorErrors,] = useFeatureSelection(loaders, dataset, false, gatingFeatureSelectionColor, { obsType, featureType, featureValueType });
|
|
50
|
+
const [
|
|
49
51
|
// eslint-disable-next-line no-unused-vars
|
|
50
|
-
|
|
52
|
+
expressionDataX, loadedX, featureSelectionXStatus, featureSelectionXErrors,] = useFeatureSelection(loaders, dataset, false, featureSelectionX, { obsType, featureType, featureValueType });
|
|
53
|
+
const [
|
|
51
54
|
// eslint-disable-next-line no-unused-vars
|
|
52
|
-
|
|
53
|
-
const [{ obsIndex, featureIndex }, matrixIndicesStatus, matrixIndicesUrls,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
|
55
|
+
expressionDataY, loadedY, featureSelectionYStatus, featureSelectionYErrors,] = useFeatureSelection(loaders, dataset, false, featureSelectionY, { obsType, featureType, featureValueType });
|
|
56
|
+
const [{ obsIndex, featureIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
|
57
|
+
// Consolidate error values from data hooks.
|
|
58
|
+
const errors = [
|
|
59
|
+
obsSetsError,
|
|
60
|
+
...featureSelectionColorErrors,
|
|
61
|
+
...featureSelectionXErrors,
|
|
62
|
+
...featureSelectionYErrors,
|
|
63
|
+
matrixIndicesError,
|
|
64
|
+
];
|
|
54
65
|
const cellsCount = obsIndex?.length || 0;
|
|
55
66
|
const isReady = useReady([
|
|
56
67
|
obsSetsStatus,
|
|
@@ -192,7 +203,7 @@ export function GatingSubscriber(props) {
|
|
|
192
203
|
}, [obsXY, obsIndex, featureValueTransform,
|
|
193
204
|
gatingFeatureSelectionX, gatingFeatureSelectionY, obsType,
|
|
194
205
|
]);
|
|
195
|
-
return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellsCount)} ${plur(obsType, cellsCount)}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, options: (_jsx(ScatterplotOptions, { observationsLabel: obsType, cellRadius: cellRadiusFixed, setCellRadius: setCellRadiusFixed, cellRadiusMode: cellRadiusMode, setCellRadiusMode: setCellRadiusMode, cellOpacity: cellOpacityFixed, setCellOpacity: setCellOpacityFixed, cellOpacityMode: cellOpacityMode, setCellOpacityMode: setCellOpacityMode, cellSetLabelsVisible: cellSetLabelsVisible, setCellSetLabelsVisible: setCellSetLabelsVisible, cellSetLabelSize: cellSetLabelSize, setCellSetLabelSize: setCellSetLabelSize, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellSetPolygonsVisible: setCellSetPolygonsVisible, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding, geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, children: _jsx(GatingScatterplotOptions, { featureType: featureType, gatingFeatureSelectionX: gatingFeatureSelectionX, setGatingFeatureSelectionX: setGatingFeatureSelectionX, gatingFeatureSelectionY: gatingFeatureSelectionY, setGatingFeatureSelectionY: setGatingFeatureSelectionY, gatingFeatureValueTransform: featureValueTransform, setGatingFeatureValueTransform: (newValue) => {
|
|
206
|
+
return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellsCount)} ${plur(obsType, cellsCount)}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, options: (_jsx(ScatterplotOptions, { observationsLabel: obsType, cellRadius: cellRadiusFixed, setCellRadius: setCellRadiusFixed, cellRadiusMode: cellRadiusMode, setCellRadiusMode: setCellRadiusMode, cellOpacity: cellOpacityFixed, setCellOpacity: setCellOpacityFixed, cellOpacityMode: cellOpacityMode, setCellOpacityMode: setCellOpacityMode, cellSetLabelsVisible: cellSetLabelsVisible, setCellSetLabelsVisible: setCellSetLabelsVisible, cellSetLabelSize: cellSetLabelSize, setCellSetLabelSize: setCellSetLabelSize, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellSetPolygonsVisible: setCellSetPolygonsVisible, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding, geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, children: _jsx(GatingScatterplotOptions, { featureType: featureType, gatingFeatureSelectionX: gatingFeatureSelectionX, setGatingFeatureSelectionX: setGatingFeatureSelectionX, gatingFeatureSelectionY: gatingFeatureSelectionY, setGatingFeatureSelectionY: setGatingFeatureSelectionY, gatingFeatureValueTransform: featureValueTransform, setGatingFeatureValueTransform: (newValue) => {
|
|
196
207
|
setFeatureValueTransform(newValue);
|
|
197
208
|
setTargetX(null);
|
|
198
209
|
setTargetY(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.8",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"d3-array": "^2.4.0",
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"react-aria": "^3.28.0",
|
|
22
|
-
"@vitessce/styles": "3.6.
|
|
23
|
-
"@vitessce/constants-internal": "3.6.
|
|
24
|
-
"@vitessce/scatterplot": "3.6.
|
|
25
|
-
"@vitessce/sets-utils": "3.6.
|
|
26
|
-
"@vitessce/utils": "3.6.
|
|
27
|
-
"@vitessce/vit-s": "3.6.
|
|
22
|
+
"@vitessce/styles": "3.6.8",
|
|
23
|
+
"@vitessce/constants-internal": "3.6.8",
|
|
24
|
+
"@vitessce/scatterplot": "3.6.8",
|
|
25
|
+
"@vitessce/sets-utils": "3.6.8",
|
|
26
|
+
"@vitessce/utils": "3.6.8",
|
|
27
|
+
"@vitessce/vit-s": "3.6.8"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|
package/src/GatingSubscriber.js
CHANGED
|
@@ -144,33 +144,51 @@ export function GatingSubscriber(props) {
|
|
|
144
144
|
), [gatingFeatureSelectionY]);
|
|
145
145
|
|
|
146
146
|
// Get data from loaders using the data hooks.
|
|
147
|
-
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
|
|
147
|
+
const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls, obsSetsError] = useObsSetsData(
|
|
148
148
|
loaders, dataset, false,
|
|
149
149
|
{ setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
|
|
150
150
|
{ obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
|
|
151
151
|
{ obsType },
|
|
152
152
|
);
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
const [
|
|
154
|
+
// eslint-disable-next-line no-unused-vars
|
|
155
|
+
expressionDataColor, loadedColor, featureSelectionColorStatus, featureSelectionColorErrors,
|
|
156
|
+
] = useFeatureSelection(
|
|
155
157
|
loaders, dataset, false, gatingFeatureSelectionColor,
|
|
156
158
|
{ obsType, featureType, featureValueType },
|
|
157
159
|
);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
const [
|
|
161
|
+
// eslint-disable-next-line no-unused-vars
|
|
162
|
+
expressionDataX, loadedX, featureSelectionXStatus, featureSelectionXErrors,
|
|
163
|
+
] = useFeatureSelection(
|
|
160
164
|
loaders, dataset, false, featureSelectionX,
|
|
161
165
|
{ obsType, featureType, featureValueType },
|
|
162
166
|
);
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
const [
|
|
168
|
+
// eslint-disable-next-line no-unused-vars
|
|
169
|
+
expressionDataY, loadedY, featureSelectionYStatus, featureSelectionYErrors,
|
|
170
|
+
] = useFeatureSelection(
|
|
165
171
|
loaders, dataset, false, featureSelectionY,
|
|
166
172
|
{ obsType, featureType, featureValueType },
|
|
167
173
|
);
|
|
168
174
|
const [
|
|
169
175
|
{ obsIndex, featureIndex }, matrixIndicesStatus, matrixIndicesUrls,
|
|
176
|
+
matrixIndicesError,
|
|
170
177
|
] = useObsFeatureMatrixIndices(
|
|
171
178
|
loaders, dataset, false,
|
|
172
179
|
{ obsType, featureType, featureValueType },
|
|
173
180
|
);
|
|
181
|
+
|
|
182
|
+
// Consolidate error values from data hooks.
|
|
183
|
+
const errors = [
|
|
184
|
+
obsSetsError,
|
|
185
|
+
...featureSelectionColorErrors,
|
|
186
|
+
...featureSelectionXErrors,
|
|
187
|
+
...featureSelectionYErrors,
|
|
188
|
+
matrixIndicesError,
|
|
189
|
+
];
|
|
190
|
+
|
|
191
|
+
|
|
174
192
|
const cellsCount = obsIndex?.length || 0;
|
|
175
193
|
|
|
176
194
|
const isReady = useReady([
|
|
@@ -363,6 +381,7 @@ export function GatingSubscriber(props) {
|
|
|
363
381
|
theme={theme}
|
|
364
382
|
isReady={isReady}
|
|
365
383
|
helpText={helpText}
|
|
384
|
+
errors={errors}
|
|
366
385
|
options={(
|
|
367
386
|
<ScatterplotOptions
|
|
368
387
|
observationsLabel={obsType}
|