@vitessce/vega 3.4.9 → 3.4.11

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.
Files changed (2) hide show
  1. package/dist/index.js +73 -10
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -47025,6 +47025,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
47025
47025
  coordinationScopesBy: componentCoordinationScopesBy.optional()
47026
47026
  }))
47027
47027
  });
47028
+ const configSchema1_0_17 = configSchema1_0_16.extend({
47029
+ version: z.literal("1.0.17")
47030
+ });
47028
47031
  configSchema1_0_0.shape.coordinationSpace.unwrap();
47029
47032
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
47030
47033
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -47496,7 +47499,43 @@ function upgradeFrom1_0_15(config) {
47496
47499
  version: "1.0.16"
47497
47500
  };
47498
47501
  }
47499
- const latestConfigSchema = configSchema1_0_16;
47502
+ function upgradeFrom1_0_16(config) {
47503
+ const newConfig = cloneDeep(config);
47504
+ const { datasets } = newConfig;
47505
+ const newDatasets = datasets.map((datasetDef) => {
47506
+ const { files: files2 } = datasetDef;
47507
+ const newFiles = files2.map((fileDef) => {
47508
+ const { fileType, options } = fileDef;
47509
+ if (fileType === "obsSets.anndata.zarr") {
47510
+ return {
47511
+ ...fileDef,
47512
+ options: {
47513
+ obsSets: options
47514
+ }
47515
+ };
47516
+ }
47517
+ if (fileType === "obsFeatureColumns.anndata.zarr") {
47518
+ return {
47519
+ ...fileDef,
47520
+ options: {
47521
+ obsFeatureColumns: options
47522
+ }
47523
+ };
47524
+ }
47525
+ return fileDef;
47526
+ });
47527
+ return {
47528
+ ...datasetDef,
47529
+ files: newFiles
47530
+ };
47531
+ });
47532
+ return {
47533
+ ...newConfig,
47534
+ datasets: newDatasets,
47535
+ version: "1.0.17"
47536
+ };
47537
+ }
47538
+ const latestConfigSchema = configSchema1_0_17;
47500
47539
  const SCHEMA_HANDLERS = [
47501
47540
  [configSchema0_1_0, upgradeFrom0_1_0],
47502
47541
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -47514,7 +47553,8 @@ const SCHEMA_HANDLERS = [
47514
47553
  [configSchema1_0_12, upgradeFrom1_0_12],
47515
47554
  [configSchema1_0_13, upgradeFrom1_0_13],
47516
47555
  [configSchema1_0_14, upgradeFrom1_0_14],
47517
- [configSchema1_0_15, upgradeFrom1_0_15]
47556
+ [configSchema1_0_15, upgradeFrom1_0_15],
47557
+ [configSchema1_0_16, upgradeFrom1_0_16]
47518
47558
  ];
47519
47559
  var re$5 = { exports: {} };
47520
47560
  const SEMVER_SPEC_VERSION$1 = "2.0.0";
@@ -49660,6 +49700,7 @@ const FileType$1 = {
49660
49700
  // Joint file types
49661
49701
  ANNDATA_ZARR: "anndata.zarr",
49662
49702
  ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
49703
+ ANNDATA_H5AD: "anndata.h5ad",
49663
49704
  SPATIALDATA_ZARR: "spatialdata.zarr",
49664
49705
  // Atomic file types
49665
49706
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -49700,6 +49741,18 @@ const FileType$1 = {
49700
49741
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
49701
49742
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
49702
49743
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
49744
+ // AnnData - h5ad via reference spec
49745
+ OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
49746
+ OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
49747
+ OBS_SETS_ANNDATA_H5AD: "obsSets.anndata.h5ad",
49748
+ OBS_EMBEDDING_ANNDATA_H5AD: "obsEmbedding.anndata.h5ad",
49749
+ OBS_SPOTS_ANNDATA_H5AD: "obsSpots.anndata.h5ad",
49750
+ OBS_POINTS_ANNDATA_H5AD: "obsPoints.anndata.h5ad",
49751
+ OBS_LOCATIONS_ANNDATA_H5AD: "obsLocations.anndata.h5ad",
49752
+ OBS_SEGMENTATIONS_ANNDATA_H5AD: "obsSegmentations.anndata.h5ad",
49753
+ OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
49754
+ FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
49755
+ SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
49703
49756
  // SpatialData
49704
49757
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
49705
49758
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -50048,10 +50101,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
50048
50101
  const handler = {
50049
50102
  get(obj, prop) {
50050
50103
  const oldKeys = Object.keys(oldObj);
50051
- if (oldKeys.includes(prop)) {
50052
- console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':
50053
- ${oldObj[prop][1]}`);
50054
- return oldObj[prop];
50104
+ const propKey = String(prop);
50105
+ if (oldKeys.includes(propKey)) {
50106
+ console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
50107
+ ${oldObj[propKey][1]}`);
50108
+ return oldObj[propKey];
50055
50109
  }
50056
50110
  return obj[prop];
50057
50111
  }
@@ -50136,7 +50190,7 @@ const annDataObsFeatureMatrix = z.object({
50136
50190
  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"),
50137
50191
  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")
50138
50192
  });
50139
- const annDataObsSets = z.array(z.object({
50193
+ const annDataObsSetsArr = z.array(z.object({
50140
50194
  name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
50141
50195
  path: z.union([
50142
50196
  z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
@@ -50144,9 +50198,15 @@ const annDataObsSets = z.array(z.object({
50144
50198
  ]),
50145
50199
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
50146
50200
  }));
50147
- z.array(z.object({
50201
+ const annDataObsSets = z.object({
50202
+ obsSets: annDataObsSetsArr
50203
+ });
50204
+ const annDataObsFeatureColumnsArr = z.array(z.object({
50148
50205
  path: z.string()
50149
50206
  }));
50207
+ z.object({
50208
+ obsFeatureColumns: annDataObsFeatureColumnsArr
50209
+ });
50150
50210
  const annDataObsSpots = annDataObsm;
50151
50211
  const annDataObsPoints = annDataObsm;
50152
50212
  const annDataObsLocations = annDataObsm;
@@ -50269,7 +50329,7 @@ z.object({
50269
50329
  scoreColumn: z.string().optional()
50270
50330
  }))
50271
50331
  });
50272
- z.object({
50332
+ const anndataZarrSchema = z.object({
50273
50333
  obsLabels: z.union([
50274
50334
  annDataObsLabels,
50275
50335
  z.array(annDataConvenienceObsLabelsItem)
@@ -50279,7 +50339,7 @@ z.object({
50279
50339
  z.array(annDataConvenienceFeatureLabelsItem)
50280
50340
  ]),
50281
50341
  obsFeatureMatrix: annDataObsFeatureMatrix,
50282
- obsSets: annDataObsSets,
50342
+ obsSets: annDataObsSetsArr,
50283
50343
  obsSpots: annDataObsSpots,
50284
50344
  obsPoints: annDataObsPoints,
50285
50345
  obsLocations: annDataObsLocations,
@@ -50290,6 +50350,9 @@ z.object({
50290
50350
  ]),
50291
50351
  sampleEdges: annDataSampleEdges
50292
50352
  }).partial();
50353
+ anndataZarrSchema.extend({
50354
+ refSpecUrl: z.string()
50355
+ });
50293
50356
  z.object({
50294
50357
  // TODO: should `image` be a special schema
50295
50358
  // to allow specifying fileUid (like for embeddingType)?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/vega",
3
- "version": "3.4.9",
3
+ "version": "3.4.11",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "vega": "^5.21.0",
23
23
  "vega-lite": "^5.1.1",
24
24
  "vega-tooltip": "^0.27.0",
25
- "@vitessce/tooltip": "3.4.9",
26
- "@vitessce/legend": "3.4.9"
25
+ "@vitessce/tooltip": "3.4.11",
26
+ "@vitessce/legend": "3.4.11"
27
27
  },
28
28
  "devDependencies": {
29
29
  "react": "^18.0.0",