@vitessce/scatterplot-embedding 3.4.8 → 3.4.10

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-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-773a6157.js";
2
+ import { B as BaseDecoder } from "./index-3543c718.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -8357,6 +8357,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
8357
8357
  coordinationScopesBy: componentCoordinationScopesBy.optional()
8358
8358
  }))
8359
8359
  });
8360
+ const configSchema1_0_17 = configSchema1_0_16.extend({
8361
+ version: z.literal("1.0.17")
8362
+ });
8360
8363
  configSchema1_0_0.shape.coordinationSpace.unwrap();
8361
8364
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
8362
8365
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -8828,7 +8831,43 @@ function upgradeFrom1_0_15(config2) {
8828
8831
  version: "1.0.16"
8829
8832
  };
8830
8833
  }
8831
- const latestConfigSchema = configSchema1_0_16;
8834
+ function upgradeFrom1_0_16(config2) {
8835
+ const newConfig = cloneDeep(config2);
8836
+ const { datasets } = newConfig;
8837
+ const newDatasets = datasets.map((datasetDef) => {
8838
+ const { files } = datasetDef;
8839
+ const newFiles = files.map((fileDef) => {
8840
+ const { fileType, options } = fileDef;
8841
+ if (fileType === "obsSets.anndata.zarr") {
8842
+ return {
8843
+ ...fileDef,
8844
+ options: {
8845
+ obsSets: options
8846
+ }
8847
+ };
8848
+ }
8849
+ if (fileType === "obsFeatureColumns.anndata.zarr") {
8850
+ return {
8851
+ ...fileDef,
8852
+ options: {
8853
+ obsFeatureColumns: options
8854
+ }
8855
+ };
8856
+ }
8857
+ return fileDef;
8858
+ });
8859
+ return {
8860
+ ...datasetDef,
8861
+ files: newFiles
8862
+ };
8863
+ });
8864
+ return {
8865
+ ...newConfig,
8866
+ datasets: newDatasets,
8867
+ version: "1.0.17"
8868
+ };
8869
+ }
8870
+ const latestConfigSchema = configSchema1_0_17;
8832
8871
  const SCHEMA_HANDLERS = [
8833
8872
  [configSchema0_1_0, upgradeFrom0_1_0],
8834
8873
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -8846,7 +8885,8 @@ const SCHEMA_HANDLERS = [
8846
8885
  [configSchema1_0_12, upgradeFrom1_0_12],
8847
8886
  [configSchema1_0_13, upgradeFrom1_0_13],
8848
8887
  [configSchema1_0_14, upgradeFrom1_0_14],
8849
- [configSchema1_0_15, upgradeFrom1_0_15]
8888
+ [configSchema1_0_15, upgradeFrom1_0_15],
8889
+ [configSchema1_0_16, upgradeFrom1_0_16]
8850
8890
  ];
8851
8891
  var re$4 = { exports: {} };
8852
8892
  const SEMVER_SPEC_VERSION = "2.0.0";
@@ -10992,6 +11032,7 @@ const FileType$1 = {
10992
11032
  // Joint file types
10993
11033
  ANNDATA_ZARR: "anndata.zarr",
10994
11034
  ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
11035
+ ANNDATA_H5AD: "anndata.h5ad",
10995
11036
  SPATIALDATA_ZARR: "spatialdata.zarr",
10996
11037
  // Atomic file types
10997
11038
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -11032,6 +11073,18 @@ const FileType$1 = {
11032
11073
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
11033
11074
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
11034
11075
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
11076
+ // AnnData - h5ad via reference spec
11077
+ OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
11078
+ OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
11079
+ OBS_SETS_ANNDATA_H5AD: "obsSets.anndata.h5ad",
11080
+ OBS_EMBEDDING_ANNDATA_H5AD: "obsEmbedding.anndata.h5ad",
11081
+ OBS_SPOTS_ANNDATA_H5AD: "obsSpots.anndata.h5ad",
11082
+ OBS_POINTS_ANNDATA_H5AD: "obsPoints.anndata.h5ad",
11083
+ OBS_LOCATIONS_ANNDATA_H5AD: "obsLocations.anndata.h5ad",
11084
+ OBS_SEGMENTATIONS_ANNDATA_H5AD: "obsSegmentations.anndata.h5ad",
11085
+ OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
11086
+ FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
11087
+ SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
11035
11088
  // SpatialData
11036
11089
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
11037
11090
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -11797,10 +11850,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
11797
11850
  const handler = {
11798
11851
  get(obj, prop) {
11799
11852
  const oldKeys = Object.keys(oldObj);
11800
- if (oldKeys.includes(prop)) {
11801
- console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':
11802
- ${oldObj[prop][1]}`);
11803
- return oldObj[prop];
11853
+ const propKey = String(prop);
11854
+ if (oldKeys.includes(propKey)) {
11855
+ console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
11856
+ ${oldObj[propKey][1]}`);
11857
+ return oldObj[propKey];
11804
11858
  }
11805
11859
  return obj[prop];
11806
11860
  }
@@ -11885,7 +11939,7 @@ const annDataObsFeatureMatrix = z.object({
11885
11939
  featureFilterPath: z.string().optional().describe("If the feature index should be filtered, put a boolean column here (analogous to the previous geneFilter option). e.g., var/in_obsm_X_small_matrix"),
11886
11940
  initialFeatureFilterPath: z.string().optional().describe("If only a subset of the matrix should be loaded initially, put a boolean column along the feature axis here (analogous to the previous matrixGeneFilter option). e.g., var/highly_variable")
11887
11941
  });
11888
- const annDataObsSets = z.array(z.object({
11942
+ const annDataObsSetsArr = z.array(z.object({
11889
11943
  name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
11890
11944
  path: z.union([
11891
11945
  z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
@@ -11893,9 +11947,15 @@ const annDataObsSets = z.array(z.object({
11893
11947
  ]),
11894
11948
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
11895
11949
  }));
11896
- z.array(z.object({
11950
+ const annDataObsSets = z.object({
11951
+ obsSets: annDataObsSetsArr
11952
+ });
11953
+ const annDataObsFeatureColumnsArr = z.array(z.object({
11897
11954
  path: z.string()
11898
11955
  }));
11956
+ z.object({
11957
+ obsFeatureColumns: annDataObsFeatureColumnsArr
11958
+ });
11899
11959
  const annDataObsSpots = annDataObsm;
11900
11960
  const annDataObsPoints = annDataObsm;
11901
11961
  const annDataObsLocations = annDataObsm;
@@ -12018,7 +12078,7 @@ z.object({
12018
12078
  scoreColumn: z.string().optional()
12019
12079
  }))
12020
12080
  });
12021
- z.object({
12081
+ const anndataZarrSchema = z.object({
12022
12082
  obsLabels: z.union([
12023
12083
  annDataObsLabels,
12024
12084
  z.array(annDataConvenienceObsLabelsItem)
@@ -12028,7 +12088,7 @@ z.object({
12028
12088
  z.array(annDataConvenienceFeatureLabelsItem)
12029
12089
  ]),
12030
12090
  obsFeatureMatrix: annDataObsFeatureMatrix,
12031
- obsSets: annDataObsSets,
12091
+ obsSets: annDataObsSetsArr,
12032
12092
  obsSpots: annDataObsSpots,
12033
12093
  obsPoints: annDataObsPoints,
12034
12094
  obsLocations: annDataObsLocations,
@@ -12039,6 +12099,9 @@ z.object({
12039
12099
  ]),
12040
12100
  sampleEdges: annDataSampleEdges
12041
12101
  }).partial();
12102
+ anndataZarrSchema.extend({
12103
+ refSpecUrl: z.string()
12104
+ });
12042
12105
  z.object({
12043
12106
  // TODO: should `image` be a special schema
12044
12107
  // to allow specifying fileUid (like for embeddingType)?
@@ -90061,24 +90124,16 @@ var getIntrinsic = function GetIntrinsic(name2, allowMissing) {
90061
90124
  return value;
90062
90125
  };
90063
90126
  var callBind$3 = { exports: {} };
90064
- var esDefineProperty;
90065
- var hasRequiredEsDefineProperty;
90066
- function requireEsDefineProperty() {
90067
- if (hasRequiredEsDefineProperty)
90068
- return esDefineProperty;
90069
- hasRequiredEsDefineProperty = 1;
90070
- var GetIntrinsic3 = getIntrinsic;
90071
- var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
90072
- if ($defineProperty2) {
90073
- try {
90074
- $defineProperty2({}, "a", { value: 1 });
90075
- } catch (e3) {
90076
- $defineProperty2 = false;
90077
- }
90127
+ var GetIntrinsic$4 = getIntrinsic;
90128
+ var $defineProperty$3 = GetIntrinsic$4("%Object.defineProperty%", true) || false;
90129
+ if ($defineProperty$3) {
90130
+ try {
90131
+ $defineProperty$3({}, "a", { value: 1 });
90132
+ } catch (e3) {
90133
+ $defineProperty$3 = false;
90078
90134
  }
90079
- esDefineProperty = $defineProperty2;
90080
- return esDefineProperty;
90081
90135
  }
90136
+ var esDefineProperty = $defineProperty$3;
90082
90137
  var GetIntrinsic$3 = getIntrinsic;
90083
90138
  var $gOPD$1 = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
90084
90139
  if ($gOPD$1) {
@@ -90089,7 +90144,7 @@ if ($gOPD$1) {
90089
90144
  }
90090
90145
  }
90091
90146
  var gopd$1 = $gOPD$1;
90092
- var $defineProperty$2 = requireEsDefineProperty();
90147
+ var $defineProperty$2 = esDefineProperty;
90093
90148
  var $SyntaxError = syntax;
90094
90149
  var $TypeError$3 = type;
90095
90150
  var gopd = gopd$1;
@@ -90130,7 +90185,7 @@ var defineDataProperty$1 = function defineDataProperty(obj, property, value) {
90130
90185
  throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
90131
90186
  }
90132
90187
  };
90133
- var $defineProperty$1 = requireEsDefineProperty();
90188
+ var $defineProperty$1 = esDefineProperty;
90134
90189
  var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
90135
90190
  return !!$defineProperty$1;
90136
90191
  };
@@ -90199,7 +90254,7 @@ var setFunctionLength = function setFunctionLength2(fn, length2) {
90199
90254
  var $apply = GetIntrinsic3("%Function.prototype.apply%");
90200
90255
  var $call = GetIntrinsic3("%Function.prototype.call%");
90201
90256
  var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind4.call($call, $apply);
90202
- var $defineProperty2 = requireEsDefineProperty();
90257
+ var $defineProperty2 = esDefineProperty;
90203
90258
  var $max = GetIntrinsic3("%Math.max%");
90204
90259
  module2.exports = function callBind2(originalFunction) {
90205
90260
  if (typeof originalFunction !== "function") {
@@ -123885,16 +123940,16 @@ function addDecoder(cases, importFn) {
123885
123940
  }
123886
123941
  cases.forEach((c2) => registry$1.set(c2, importFn));
123887
123942
  }
123888
- addDecoder([void 0, 1], () => import("./raw-42ff0533.js").then((m2) => m2.default));
123889
- addDecoder(5, () => import("./lzw-973ca3f2.js").then((m2) => m2.default));
123943
+ addDecoder([void 0, 1], () => import("./raw-3cb16c7d.js").then((m2) => m2.default));
123944
+ addDecoder(5, () => import("./lzw-9c5f8c34.js").then((m2) => m2.default));
123890
123945
  addDecoder(6, () => {
123891
123946
  throw new Error("old style JPEG compression is not supported.");
123892
123947
  });
123893
- addDecoder(7, () => import("./jpeg-804eb1f0.js").then((m2) => m2.default));
123894
- addDecoder([8, 32946], () => import("./deflate-3cea0656.js").then((m2) => m2.default));
123895
- addDecoder(32773, () => import("./packbits-bfe475e6.js").then((m2) => m2.default));
123896
- addDecoder(34887, () => import("./lerc-2b14ee6b.js").then((m2) => m2.default));
123897
- addDecoder(50001, () => import("./webimage-8445b416.js").then((m2) => m2.default));
123948
+ addDecoder(7, () => import("./jpeg-67801b6f.js").then((m2) => m2.default));
123949
+ addDecoder([8, 32946], () => import("./deflate-d9a80bee.js").then((m2) => m2.default));
123950
+ addDecoder(32773, () => import("./packbits-b0b456ef.js").then((m2) => m2.default));
123951
+ addDecoder(34887, () => import("./lerc-08b0769c.js").then((m2) => m2.default));
123952
+ addDecoder(50001, () => import("./webimage-20f3638a.js").then((m2) => m2.default));
123898
123953
  function decodeRowAcc(row, stride) {
123899
123954
  let length2 = row.length - stride;
123900
123955
  let offset5 = 0;
@@ -148609,6 +148664,7 @@ function EmbeddingScatterplotSubscriber(props) {
148609
148664
  featureLabelsMap,
148610
148665
  featureValueColormap: geneExpressionColormap,
148611
148666
  featureValueColormapRange: geneExpressionColormapRange,
148667
+ obsSetSelection: cellSetSelection,
148612
148668
  extent: expressionExtents == null ? void 0 : expressionExtents[0],
148613
148669
  pointsVisible: embeddingPointsVisible,
148614
148670
  contoursVisible: embeddingContoursVisible,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-773a6157.js";
1
+ import { E } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-773a6157.js";
1
+ import { B as BaseDecoder } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -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-773a6157.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-3543c718.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-773a6157.js";
1
+ import { B as BaseDecoder } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-773a6157.js";
1
+ import { B as BaseDecoder } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-773a6157.js";
1
+ import { B as BaseDecoder } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-773a6157.js";
1
+ import { B as BaseDecoder } from "./index-3543c718.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;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,eAkgBA"}
1
+ {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;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,eAmgBA"}
@@ -258,7 +258,7 @@ export function EmbeddingScatterplotSubscriber(props) {
258
258
  }, updateViewInfo: setComponentViewInfo, getExpressionValue: getExpressionValue, getCellIsSelected: getCellIsSelected, obsSetSelection: cellSetSelection, sampleSetSelection: sampleSetSelection,
259
259
  // InternMap data structures where keys are
260
260
  // 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, extent: expressionExtents?.[0],
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],
262
262
  // Contour percentile legend
263
263
  pointsVisible: embeddingPointsVisible, contoursVisible: embeddingContoursVisible, contoursFilled: embeddingContoursFilled, contourPercentiles: contourPercentiles || DEFAULT_CONTOUR_PERCENTILES, contourThresholds: contourThresholds })] }));
264
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.4.8",
3
+ "version": "3.4.10",
4
4
  "author": "Gehlenborg Lab",
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.4.8",
24
- "@vitessce/legend": "3.4.8",
25
- "@vitessce/scatterplot": "3.4.8",
26
- "@vitessce/sets-utils": "3.4.8",
27
- "@vitessce/utils": "3.4.8",
28
- "@vitessce/vit-s": "3.4.8"
23
+ "@vitessce/constants-internal": "3.4.10",
24
+ "@vitessce/legend": "3.4.10",
25
+ "@vitessce/scatterplot": "3.4.10",
26
+ "@vitessce/sets-utils": "3.4.10",
27
+ "@vitessce/utils": "3.4.10",
28
+ "@vitessce/vit-s": "3.4.10"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",
@@ -555,6 +555,7 @@ export function EmbeddingScatterplotSubscriber(props) {
555
555
  featureLabelsMap={featureLabelsMap}
556
556
  featureValueColormap={geneExpressionColormap}
557
557
  featureValueColormapRange={geneExpressionColormapRange}
558
+ obsSetSelection={cellSetSelection}
558
559
  extent={expressionExtents?.[0]}
559
560
  // Contour percentile legend
560
561
  pointsVisible={embeddingPointsVisible}