@vitessce/scatterplot-embedding 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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
2
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -7077,6 +7077,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
7077
7077
  const configSchema1_0_17 = configSchema1_0_16.extend({
7078
7078
  version: z.literal("1.0.17")
7079
7079
  });
7080
+ const configSchema1_0_18 = configSchema1_0_17.extend({
7081
+ version: z.literal("1.0.18")
7082
+ });
7080
7083
  configSchema1_0_0.shape.coordinationSpace.unwrap();
7081
7084
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
7082
7085
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -7584,7 +7587,54 @@ function upgradeFrom1_0_16(config2) {
7584
7587
  version: "1.0.17"
7585
7588
  };
7586
7589
  }
7587
- const latestConfigSchema = configSchema1_0_17;
7590
+ function upgradeFrom1_0_17(config2) {
7591
+ const newConfig = cloneDeep(config2);
7592
+ const { datasets } = newConfig;
7593
+ const newDatasets = datasets.map((datasetDef) => {
7594
+ const { files } = datasetDef;
7595
+ const newFiles = files.map((fileDef) => {
7596
+ const { fileType, options } = fileDef;
7597
+ if (fileType === "spatialdata.zarr" || fileType === "spatialdata.zarr.zip") {
7598
+ if (options.labels && options.shapes) {
7599
+ 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.");
7600
+ }
7601
+ if (options.labels) {
7602
+ const newOptions = {
7603
+ ...options,
7604
+ obsSegmentations: options.labels
7605
+ };
7606
+ delete newOptions.labels;
7607
+ return {
7608
+ ...fileDef,
7609
+ options: newOptions
7610
+ };
7611
+ }
7612
+ if (options.shapes) {
7613
+ const newOptions = {
7614
+ ...options,
7615
+ obsSegmentations: options.shapes
7616
+ };
7617
+ delete newOptions.shapes;
7618
+ return {
7619
+ ...fileDef,
7620
+ options: newOptions
7621
+ };
7622
+ }
7623
+ }
7624
+ return fileDef;
7625
+ });
7626
+ return {
7627
+ ...datasetDef,
7628
+ files: newFiles
7629
+ };
7630
+ });
7631
+ return {
7632
+ ...newConfig,
7633
+ datasets: newDatasets,
7634
+ version: "1.0.18"
7635
+ };
7636
+ }
7637
+ const latestConfigSchema = configSchema1_0_18;
7588
7638
  const SCHEMA_HANDLERS = [
7589
7639
  [configSchema0_1_0, upgradeFrom0_1_0],
7590
7640
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -7603,7 +7653,8 @@ const SCHEMA_HANDLERS = [
7603
7653
  [configSchema1_0_13, upgradeFrom1_0_13],
7604
7654
  [configSchema1_0_14, upgradeFrom1_0_14],
7605
7655
  [configSchema1_0_15, upgradeFrom1_0_15],
7606
- [configSchema1_0_16, upgradeFrom1_0_16]
7656
+ [configSchema1_0_16, upgradeFrom1_0_16],
7657
+ [configSchema1_0_17, upgradeFrom1_0_17]
7607
7658
  ];
7608
7659
  var re$1 = { exports: {} };
7609
7660
  var constants$2;
@@ -9635,9 +9686,7 @@ const FileType$1 = {
9635
9686
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
9636
9687
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
9637
9688
  FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
9638
- // TODO:
9639
- // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
9640
- // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
9689
+ OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
9641
9690
  // SpatialData - zipped
9642
9691
  IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
9643
9692
  LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
@@ -9646,6 +9695,7 @@ const FileType$1 = {
9646
9695
  OBS_SETS_SPATIALDATA_ZARR_ZIP: "obsSets.spatialdata.zarr.zip",
9647
9696
  OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
9648
9697
  FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
9698
+ OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
9649
9699
  // MuData
9650
9700
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
9651
9701
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -9895,6 +9945,7 @@ const ViewHelpMapping = {
9895
9945
  [FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR]: DataType$2.OBS_FEATURE_MATRIX,
9896
9946
  [FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
9897
9947
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
9948
+ [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
9898
9949
  // For new file types to support old file types
9899
9950
  [FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
9900
9951
  [FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
@@ -10068,6 +10119,9 @@ const ViewHelpMapping = {
10068
10119
  },
10069
10120
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: {
10070
10121
  zip: FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR_ZIP
10122
+ },
10123
+ [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
10124
+ zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
10071
10125
  }
10072
10126
  });
10073
10127
  [
@@ -11087,10 +11141,14 @@ const imageSpatialdataSchema = z.object({
11087
11141
  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.')
11088
11142
  });
11089
11143
  const obsSegmentationsSpatialdataSchema = z.object({
11090
- // TODO: should this be renamed labelsSpatialdataSchema?
11091
- // TODO: support obsTypesFromChannelNames?
11092
- path: z.string(),
11093
- tablePath: z.string().optional().describe("The path to a table which annotates the labels. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
11144
+ // TODO: support obsTypesFromElementNames?
11145
+ path: z.string().describe("The path to the segmentation data, stored in either shapes/ or labels/."),
11146
+ 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."),
11147
+ 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.')
11148
+ });
11149
+ const obsPointsSpatialdataSchema = z.object({
11150
+ path: z.string().describe("The path to the point data."),
11151
+ 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."),
11094
11152
  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.')
11095
11153
  });
11096
11154
  z.object({
@@ -11210,13 +11268,10 @@ z.object({
11210
11268
  image: imageSpatialdataSchema,
11211
11269
  // TODO: should this be a special schema
11212
11270
  // to allow specifying fileUid (like for embeddingType)?
11213
- // TODO: allow multiple labels?
11214
- labels: obsSegmentationsSpatialdataSchema,
11271
+ // TODO: allow multiple labels/shapes?
11272
+ obsSegmentations: obsSegmentationsSpatialdataSchema,
11273
+ obsPoints: obsPointsSpatialdataSchema,
11215
11274
  // TODO: allow multiple shapes?
11216
- // TODO: unify labels and shapes to obsSegmentations,
11217
- // then distinguish in expand function based on
11218
- // "labels/*" vs. "shapes/*" in path?
11219
- shapes: obsSegmentationsSpatialdataSchema,
11220
11275
  obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
11221
11276
  obsSpots: obsSpotsSpatialdataSchema,
11222
11277
  // TODO: obsPoints
@@ -123250,22 +123305,22 @@ function addDecoder(cases, importFn) {
123250
123305
  }
123251
123306
  cases.forEach((c2) => registry$1.set(c2, importFn));
123252
123307
  }
123253
- addDecoder([void 0, 1], () => import("./raw-D_I_nvlb.js").then((m2) => m2.default));
123254
- addDecoder(5, () => import("./lzw-QEt1oPJg.js").then((m2) => m2.default));
123308
+ addDecoder([void 0, 1], () => import("./raw-BqckyMzs.js").then((m2) => m2.default));
123309
+ addDecoder(5, () => import("./lzw-3prZR1De.js").then((m2) => m2.default));
123255
123310
  addDecoder(6, () => {
123256
123311
  throw new Error("old style JPEG compression is not supported.");
123257
123312
  });
123258
- addDecoder(7, () => import("./jpeg-DYRomFzh.js").then((m2) => m2.default));
123259
- addDecoder([8, 32946], () => import("./deflate-JiaVZVLy.js").then((m2) => m2.default));
123260
- addDecoder(32773, () => import("./packbits-bJMxFBEb.js").then((m2) => m2.default));
123313
+ addDecoder(7, () => import("./jpeg-CIYA5vLI.js").then((m2) => m2.default));
123314
+ addDecoder([8, 32946], () => import("./deflate-DQOZf0tG.js").then((m2) => m2.default));
123315
+ addDecoder(32773, () => import("./packbits-Dn-nd6sC.js").then((m2) => m2.default));
123261
123316
  addDecoder(
123262
123317
  34887,
123263
- () => import("./lerc-CjJL0X_L.js").then(async (m2) => {
123318
+ () => import("./lerc-DTPsduDc.js").then(async (m2) => {
123264
123319
  await m2.zstd.init();
123265
123320
  return m2;
123266
123321
  }).then((m2) => m2.default)
123267
123322
  );
123268
- addDecoder(50001, () => import("./webimage-CXFDDcP-.js").then((m2) => m2.default));
123323
+ addDecoder(50001, () => import("./webimage-Cd8IIoXB.js").then((m2) => m2.default));
123269
123324
  function decodeRowAcc(row, stride) {
123270
123325
  let length2 = row.length - stride;
123271
123326
  let offset2 = 0;
@@ -145279,6 +145334,23 @@ ButtonBase.propTypes = {
145279
145334
  */
145280
145335
  type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
145281
145336
  };
145337
+ function hasCorrectMainProperty(obj) {
145338
+ return typeof obj.main === "string";
145339
+ }
145340
+ function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
145341
+ if (!hasCorrectMainProperty(obj)) {
145342
+ return false;
145343
+ }
145344
+ for (const value of additionalPropertiesToCheck) {
145345
+ if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
145346
+ return false;
145347
+ }
145348
+ }
145349
+ return true;
145350
+ }
145351
+ function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
145352
+ return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
145353
+ }
145282
145354
  function HTMLElementType(props, propName, componentName, location, propFullName) {
145283
145355
  const propValue = props[propName];
145284
145356
  const safePropName = propFullName || propName;
@@ -145386,23 +145458,6 @@ Portal.propTypes = {
145386
145458
  {
145387
145459
  Portal["propTypes"] = exactProp(Portal.propTypes);
145388
145460
  }
145389
- function hasCorrectMainProperty(obj) {
145390
- return typeof obj.main === "string";
145391
- }
145392
- function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
145393
- if (!hasCorrectMainProperty(obj)) {
145394
- return false;
145395
- }
145396
- for (const value of additionalPropertiesToCheck) {
145397
- if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
145398
- return false;
145399
- }
145400
- }
145401
- return true;
145402
- }
145403
- function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
145404
- return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
145405
- }
145406
145461
  function isHostComponent(element) {
145407
145462
  return typeof element === "string";
145408
145463
  }
@@ -153344,7 +153399,14 @@ function EmbeddingScatterplotSubscriber(props) {
153344
153399
  const featureAggregationStrategyToUse = featureAggregationStrategy ?? DEFAULT_FEATURE_AGGREGATION_STRATEGY;
153345
153400
  const [width2, height2, deckRef] = useDeckCanvasSize();
153346
153401
  const title = titleOverride || `Scatterplot (${mapping})`;
153347
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(
153402
+ const [
153403
+ // eslint-disable-next-line no-unused-vars
153404
+ obsLabelsTypes,
153405
+ obsLabelsData,
153406
+ obsLabelsStatus,
153407
+ obsLabelsUrls,
153408
+ obsLabelsErrors
153409
+ ] = useMultiObsLabels(
153348
153410
  coordinationScopes,
153349
153411
  obsType,
153350
153412
  loaders,
@@ -153353,7 +153415,8 @@ function EmbeddingScatterplotSubscriber(props) {
153353
153415
  const [
153354
153416
  { obsIndex: obsEmbeddingIndex, obsEmbedding },
153355
153417
  obsEmbeddingStatus,
153356
- obsEmbeddingUrls
153418
+ obsEmbeddingUrls,
153419
+ obsEmbeddingError
153357
153420
  ] = useObsEmbeddingData(
153358
153421
  loaders,
153359
153422
  dataset,
@@ -153363,7 +153426,12 @@ function EmbeddingScatterplotSubscriber(props) {
153363
153426
  { obsType, embeddingType: mapping }
153364
153427
  );
153365
153428
  const cellsCount = (obsEmbeddingIndex == null ? void 0 : obsEmbeddingIndex.length) || 0;
153366
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
153429
+ const [
153430
+ { obsSets: cellSets, obsSetsMembership },
153431
+ obsSetsStatus,
153432
+ obsSetsUrls,
153433
+ obsSetsError
153434
+ ] = useObsSetsData(
153367
153435
  loaders,
153368
153436
  dataset,
153369
153437
  false,
@@ -153371,7 +153439,13 @@ function EmbeddingScatterplotSubscriber(props) {
153371
153439
  { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
153372
153440
  { obsType }
153373
153441
  );
153374
- const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(
153442
+ const [
153443
+ // eslint-disable-next-line no-unused-vars
153444
+ expressionData,
153445
+ loadedFeatureSelection,
153446
+ featureSelectionStatus,
153447
+ featureSelectionErrors
153448
+ ] = useFeatureSelection(
153375
153449
  loaders,
153376
153450
  dataset,
153377
153451
  false,
@@ -153381,14 +153455,20 @@ function EmbeddingScatterplotSubscriber(props) {
153381
153455
  const [
153382
153456
  { obsIndex: matrixObsIndex },
153383
153457
  matrixIndicesStatus,
153384
- matrixIndicesUrls
153458
+ matrixIndicesUrls,
153459
+ matrixIndicesError
153385
153460
  ] = useObsFeatureMatrixIndices(
153386
153461
  loaders,
153387
153462
  dataset,
153388
153463
  false,
153389
153464
  { obsType, featureType, featureValueType }
153390
153465
  );
153391
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
153466
+ const [
153467
+ { featureLabelsMap: featureLabelsMapOrig },
153468
+ featureLabelsStatus,
153469
+ featureLabelsUrls,
153470
+ featureLabelsError
153471
+ ] = useFeatureLabelsData(
153392
153472
  loaders,
153393
153473
  dataset,
153394
153474
  false,
@@ -153401,7 +153481,7 @@ function EmbeddingScatterplotSubscriber(props) {
153401
153481
  featureLabelsMapOrig,
153402
153482
  { stripCuriePrefixes: true }
153403
153483
  );
153404
- const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(
153484
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl, sampleSetsError] = useSampleSetsData(
153405
153485
  loaders,
153406
153486
  dataset,
153407
153487
  false,
@@ -153409,7 +153489,7 @@ function EmbeddingScatterplotSubscriber(props) {
153409
153489
  {},
153410
153490
  { sampleType }
153411
153491
  );
153412
- const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl] = useSampleEdgesData(
153492
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl, sampleEdgesError] = useSampleEdgesData(
153413
153493
  loaders,
153414
153494
  dataset,
153415
153495
  false,
@@ -153417,6 +153497,16 @@ function EmbeddingScatterplotSubscriber(props) {
153417
153497
  {},
153418
153498
  { obsType, sampleType }
153419
153499
  );
153500
+ const errors = [
153501
+ ...obsLabelsErrors,
153502
+ obsEmbeddingError,
153503
+ obsSetsError,
153504
+ ...featureSelectionErrors,
153505
+ matrixIndicesError,
153506
+ featureLabelsError,
153507
+ sampleSetsError,
153508
+ sampleEdgesError
153509
+ ];
153420
153510
  const isReady = useReady([
153421
153511
  obsEmbeddingStatus,
153422
153512
  obsSetsStatus,
@@ -153709,6 +153799,7 @@ function EmbeddingScatterplotSubscriber(props) {
153709
153799
  theme,
153710
153800
  isReady,
153711
153801
  helpText,
153802
+ errors,
153712
153803
  options: /* @__PURE__ */ React__default.createElement(
153713
153804
  ScatterplotOptions,
153714
153805
  {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-BUHBKs-S.js";
1
+ import { D, E } from "./index-B4Ggb1ZC.js";
2
2
  export {
3
3
  D as DualEmbeddingScatterplotSubscriber,
4
4
  E as EmbeddingScatterplotSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
1
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -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-BUHBKs-S.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-B4Ggb1ZC.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
1
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
1
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
1
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUHBKs-S.js";
1
+ import { B as BaseDecoder } from "./index-B4Ggb1ZC.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;;;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,eAkkBA"}
1
+ {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;;;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,eA4lBA"}
@@ -43,19 +43,31 @@ export function EmbeddingScatterplotSubscriber(props) {
43
43
  ?? DEFAULT_FEATURE_AGGREGATION_STRATEGY;
44
44
  const [width, height, deckRef] = useDeckCanvasSize();
45
45
  const title = titleOverride || `Scatterplot (${mapping})`;
46
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
46
+ const [
47
+ // eslint-disable-next-line no-unused-vars
48
+ obsLabelsTypes, obsLabelsData, obsLabelsStatus, obsLabelsUrls, obsLabelsErrors,] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
47
49
  // Get data from loaders using the data hooks.
48
- const [{ obsIndex: obsEmbeddingIndex, obsEmbedding }, obsEmbeddingStatus, obsEmbeddingUrls,] = useObsEmbeddingData(loaders, dataset, true, {}, {}, { obsType, embeddingType: mapping });
50
+ const [{ obsIndex: obsEmbeddingIndex, obsEmbedding }, obsEmbeddingStatus, obsEmbeddingUrls, obsEmbeddingError,] = useObsEmbeddingData(loaders, dataset, true, {}, {}, { obsType, embeddingType: mapping });
49
51
  const cellsCount = obsEmbeddingIndex?.length || 0;
50
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
52
+ const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls, obsSetsError,] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
53
+ const [
51
54
  // eslint-disable-next-line no-unused-vars
52
- const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
53
- const [{ obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
54
- // eslint-disable-next-line max-len
55
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
55
+ expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
56
+ const [{ obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
57
+ const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
56
58
  const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
57
- const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
58
- const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
59
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl, sampleSetsError] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
60
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl, sampleEdgesError] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
61
+ const errors = [
62
+ ...obsLabelsErrors,
63
+ obsEmbeddingError,
64
+ obsSetsError,
65
+ ...featureSelectionErrors,
66
+ matrixIndicesError,
67
+ featureLabelsError,
68
+ sampleSetsError,
69
+ sampleEdgesError,
70
+ ];
59
71
  const isReady = useReady([
60
72
  obsEmbeddingStatus,
61
73
  obsSetsStatus,
@@ -293,7 +305,7 @@ export function EmbeddingScatterplotSubscriber(props) {
293
305
  const cellCountToUse = embeddingPointsVisible
294
306
  ? cellsCount
295
307
  : (stratifiedDataCount ?? cellsCount);
296
- return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellCountToUse)} ${plur(observationsLabel, cellCountToUse)}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, options: (_jsx(ScatterplotOptions, { observationsLabel: observationsLabel, cellRadius: cellRadiusFixed, setCellRadius: setCellRadiusFixed, cellRadiusMode: cellRadiusMode, setCellRadiusMode: setCellRadiusMode, cellOpacity: cellOpacityFixed, setCellOpacity: setCellOpacityFixed, cellOpacityMode: cellOpacityMode, setCellOpacityMode: setCellOpacityMode, cellSetLabelsVisible: cellSetLabelsVisible, setCellSetLabelsVisible: setCellSetLabelsVisible, tooltipsVisible: tooltipsVisible, setTooltipsVisible: setTooltipsVisible, cellSetLabelSize: cellSetLabelSize, setCellSetLabelSize: setCellSetLabelSize, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellSetPolygonsVisible: setCellSetPolygonsVisible, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding, geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, embeddingPointsVisible: embeddingPointsVisible, setEmbeddingPointsVisible: setEmbeddingPointsVisible, embeddingContoursVisible: embeddingContoursVisible, setEmbeddingContoursVisible: setEmbeddingContoursVisible, embeddingContoursFilled: embeddingContoursFilled, setEmbeddingContoursFilled: setEmbeddingContoursFilled, contourPercentiles: contourPercentiles, setContourPercentiles: setContourPercentiles, defaultContourPercentiles: DEFAULT_CONTOUR_PERCENTILES, contourColorEncoding: contourColorEncoding, setContourColorEncoding: setContourColorEncoding, featureAggregationStrategy: featureAggregationStrategy, setFeatureAggregationStrategy: setFeatureAggregationStrategy })), children: [_jsx(Scatterplot, { ref: deckRef, uuid: uuid, theme: theme, viewState: { zoom, target: [targetX, targetY, targetZ] }, setViewState: setViewState, originalViewState: originalViewState, obsEmbeddingIndex: obsEmbeddingIndex, obsEmbedding: obsEmbedding, cellFilter: cellFilter, cellSelection: cellSelection, cellHighlight: cellHighlight, cellColors: cellColors, cellSetPolygons: cellSetPolygons, cellSetLabelSize: cellSetLabelSize, cellSetLabelsVisible: cellSetLabelsVisible, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellFilter: setCellFilter, setCellSelection: setCellSelectionProp, setCellHighlight: setCellHighlight, cellRadius: cellRadius, cellOpacity: cellOpacity, cellColorEncoding: cellColorEncoding, geneExpressionColormap: geneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setComponentHover: () => {
308
+ return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellCountToUse)} ${plur(observationsLabel, cellCountToUse)}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, helpText: helpText, errors: errors, options: (_jsx(ScatterplotOptions, { observationsLabel: observationsLabel, cellRadius: cellRadiusFixed, setCellRadius: setCellRadiusFixed, cellRadiusMode: cellRadiusMode, setCellRadiusMode: setCellRadiusMode, cellOpacity: cellOpacityFixed, setCellOpacity: setCellOpacityFixed, cellOpacityMode: cellOpacityMode, setCellOpacityMode: setCellOpacityMode, cellSetLabelsVisible: cellSetLabelsVisible, setCellSetLabelsVisible: setCellSetLabelsVisible, tooltipsVisible: tooltipsVisible, setTooltipsVisible: setTooltipsVisible, cellSetLabelSize: cellSetLabelSize, setCellSetLabelSize: setCellSetLabelSize, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellSetPolygonsVisible: setCellSetPolygonsVisible, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding, geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, embeddingPointsVisible: embeddingPointsVisible, setEmbeddingPointsVisible: setEmbeddingPointsVisible, embeddingContoursVisible: embeddingContoursVisible, setEmbeddingContoursVisible: setEmbeddingContoursVisible, embeddingContoursFilled: embeddingContoursFilled, setEmbeddingContoursFilled: setEmbeddingContoursFilled, contourPercentiles: contourPercentiles, setContourPercentiles: setContourPercentiles, defaultContourPercentiles: DEFAULT_CONTOUR_PERCENTILES, contourColorEncoding: contourColorEncoding, setContourColorEncoding: setContourColorEncoding, featureAggregationStrategy: featureAggregationStrategy, setFeatureAggregationStrategy: setFeatureAggregationStrategy })), children: [_jsx(Scatterplot, { ref: deckRef, uuid: uuid, theme: theme, viewState: { zoom, target: [targetX, targetY, targetZ] }, setViewState: setViewState, originalViewState: originalViewState, obsEmbeddingIndex: obsEmbeddingIndex, obsEmbedding: obsEmbedding, cellFilter: cellFilter, cellSelection: cellSelection, cellHighlight: cellHighlight, cellColors: cellColors, cellSetPolygons: cellSetPolygons, cellSetLabelSize: cellSetLabelSize, cellSetLabelsVisible: cellSetLabelsVisible, cellSetPolygonsVisible: cellSetPolygonsVisible, setCellFilter: setCellFilter, setCellSelection: setCellSelectionProp, setCellHighlight: setCellHighlight, cellRadius: cellRadius, cellOpacity: cellOpacity, cellColorEncoding: cellColorEncoding, geneExpressionColormap: geneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setComponentHover: () => {
297
309
  setComponentHover(uuid);
298
310
  }, updateViewInfo: setComponentViewInfo, getExpressionValue: getExpressionValue, getCellIsSelected: getCellIsSelected, obsSetSelection: cellSetSelection, sampleSetSelection: sampleSetSelection,
299
311
  // InternMap data structures where keys are
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.6.6",
3
+ "version": "3.6.8",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,13 +20,13 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "react-aria": "^3.28.0",
22
22
  "@turf/circle": "^7.2.0",
23
- "@vitessce/styles": "3.6.6",
24
- "@vitessce/constants-internal": "3.6.6",
25
- "@vitessce/legend": "3.6.6",
26
- "@vitessce/scatterplot": "3.6.6",
27
- "@vitessce/sets-utils": "3.6.6",
28
- "@vitessce/vit-s": "3.6.6",
29
- "@vitessce/utils": "3.6.6"
23
+ "@vitessce/styles": "3.6.8",
24
+ "@vitessce/constants-internal": "3.6.8",
25
+ "@vitessce/legend": "3.6.8",
26
+ "@vitessce/scatterplot": "3.6.8",
27
+ "@vitessce/sets-utils": "3.6.8",
28
+ "@vitessce/utils": "3.6.8",
29
+ "@vitessce/vit-s": "3.6.8"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "^18.0.0",
@@ -165,37 +165,51 @@ export function EmbeddingScatterplotSubscriber(props) {
165
165
 
166
166
  const title = titleOverride || `Scatterplot (${mapping})`;
167
167
 
168
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(
168
+ const [
169
+ // eslint-disable-next-line no-unused-vars
170
+ obsLabelsTypes, obsLabelsData, obsLabelsStatus, obsLabelsUrls, obsLabelsErrors,
171
+ ] = useMultiObsLabels(
169
172
  coordinationScopes, obsType, loaders, dataset,
170
173
  );
171
174
 
172
175
  // Get data from loaders using the data hooks.
173
176
  const [
174
- { obsIndex: obsEmbeddingIndex, obsEmbedding }, obsEmbeddingStatus, obsEmbeddingUrls,
177
+ { obsIndex: obsEmbeddingIndex, obsEmbedding },
178
+ obsEmbeddingStatus,
179
+ obsEmbeddingUrls,
180
+ obsEmbeddingError,
175
181
  ] = useObsEmbeddingData(
176
182
  loaders, dataset, true, {}, {},
177
183
  { obsType, embeddingType: mapping },
178
184
  );
179
185
  const cellsCount = obsEmbeddingIndex?.length || 0;
180
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
186
+ const [
187
+ { obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls, obsSetsError,
188
+ ] = useObsSetsData(
181
189
  loaders, dataset, false,
182
190
  { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
183
191
  { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
184
192
  { obsType },
185
193
  );
186
- // eslint-disable-next-line no-unused-vars
187
- const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(
194
+ const [
195
+ // eslint-disable-next-line no-unused-vars
196
+ expressionData, loadedFeatureSelection, featureSelectionStatus, featureSelectionErrors,
197
+ ] = useFeatureSelection(
188
198
  loaders, dataset, false, geneSelection,
189
199
  { obsType, featureType, featureValueType },
190
200
  );
191
201
  const [
192
- { obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls,
202
+ { obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls, matrixIndicesError,
193
203
  ] = useObsFeatureMatrixIndices(
194
204
  loaders, dataset, false,
195
205
  { obsType, featureType, featureValueType },
196
206
  );
197
- // eslint-disable-next-line max-len
198
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
207
+ const [
208
+ { featureLabelsMap: featureLabelsMapOrig },
209
+ featureLabelsStatus,
210
+ featureLabelsUrls,
211
+ featureLabelsError,
212
+ ] = useFeatureLabelsData(
199
213
  loaders, dataset, false, {}, {},
200
214
  { featureType },
201
215
  );
@@ -203,16 +217,27 @@ export function EmbeddingScatterplotSubscriber(props) {
203
217
  featureType, featureLabelsMapOrig, { stripCuriePrefixes: true },
204
218
  );
205
219
 
206
- const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl] = useSampleSetsData(
220
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrl, sampleSetsError] = useSampleSetsData(
207
221
  loaders, dataset, false, {}, {},
208
222
  { sampleType },
209
223
  );
210
224
 
211
- const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl] = useSampleEdgesData(
225
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrl, sampleEdgesError] = useSampleEdgesData(
212
226
  loaders, dataset, false, {}, {},
213
227
  { obsType, sampleType },
214
228
  );
215
229
 
230
+ const errors = [
231
+ ...obsLabelsErrors,
232
+ obsEmbeddingError,
233
+ obsSetsError,
234
+ ...featureSelectionErrors,
235
+ matrixIndicesError,
236
+ featureLabelsError,
237
+ sampleSetsError,
238
+ sampleEdgesError,
239
+ ];
240
+
216
241
  const isReady = useReady([
217
242
  obsEmbeddingStatus,
218
243
  obsSetsStatus,
@@ -508,6 +533,7 @@ export function EmbeddingScatterplotSubscriber(props) {
508
533
  theme={theme}
509
534
  isReady={isReady}
510
535
  helpText={helpText}
536
+ errors={errors}
511
537
  options={(
512
538
  <ScatterplotOptions
513
539
  observationsLabel={observationsLabel}