@vitessce/heatmap 3.4.9 → 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-ce0b6d53.js";
2
+ import { B as BaseDecoder } from "./index-953d6196.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -8341,6 +8341,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
8341
8341
  coordinationScopesBy: componentCoordinationScopesBy.optional()
8342
8342
  }))
8343
8343
  });
8344
+ const configSchema1_0_17 = configSchema1_0_16.extend({
8345
+ version: z.literal("1.0.17")
8346
+ });
8344
8347
  configSchema1_0_0.shape.coordinationSpace.unwrap();
8345
8348
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
8346
8349
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -8812,7 +8815,43 @@ function upgradeFrom1_0_15(config2) {
8812
8815
  version: "1.0.16"
8813
8816
  };
8814
8817
  }
8815
- const latestConfigSchema = configSchema1_0_16;
8818
+ function upgradeFrom1_0_16(config2) {
8819
+ const newConfig = cloneDeep(config2);
8820
+ const { datasets } = newConfig;
8821
+ const newDatasets = datasets.map((datasetDef) => {
8822
+ const { files } = datasetDef;
8823
+ const newFiles = files.map((fileDef) => {
8824
+ const { fileType, options } = fileDef;
8825
+ if (fileType === "obsSets.anndata.zarr") {
8826
+ return {
8827
+ ...fileDef,
8828
+ options: {
8829
+ obsSets: options
8830
+ }
8831
+ };
8832
+ }
8833
+ if (fileType === "obsFeatureColumns.anndata.zarr") {
8834
+ return {
8835
+ ...fileDef,
8836
+ options: {
8837
+ obsFeatureColumns: options
8838
+ }
8839
+ };
8840
+ }
8841
+ return fileDef;
8842
+ });
8843
+ return {
8844
+ ...datasetDef,
8845
+ files: newFiles
8846
+ };
8847
+ });
8848
+ return {
8849
+ ...newConfig,
8850
+ datasets: newDatasets,
8851
+ version: "1.0.17"
8852
+ };
8853
+ }
8854
+ const latestConfigSchema = configSchema1_0_17;
8816
8855
  const SCHEMA_HANDLERS = [
8817
8856
  [configSchema0_1_0, upgradeFrom0_1_0],
8818
8857
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -8830,7 +8869,8 @@ const SCHEMA_HANDLERS = [
8830
8869
  [configSchema1_0_12, upgradeFrom1_0_12],
8831
8870
  [configSchema1_0_13, upgradeFrom1_0_13],
8832
8871
  [configSchema1_0_14, upgradeFrom1_0_14],
8833
- [configSchema1_0_15, upgradeFrom1_0_15]
8872
+ [configSchema1_0_15, upgradeFrom1_0_15],
8873
+ [configSchema1_0_16, upgradeFrom1_0_16]
8834
8874
  ];
8835
8875
  var re$4 = { exports: {} };
8836
8876
  const SEMVER_SPEC_VERSION = "2.0.0";
@@ -10976,6 +11016,7 @@ const FileType$1 = {
10976
11016
  // Joint file types
10977
11017
  ANNDATA_ZARR: "anndata.zarr",
10978
11018
  ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
11019
+ ANNDATA_H5AD: "anndata.h5ad",
10979
11020
  SPATIALDATA_ZARR: "spatialdata.zarr",
10980
11021
  // Atomic file types
10981
11022
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -11016,6 +11057,18 @@ const FileType$1 = {
11016
11057
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
11017
11058
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
11018
11059
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
11060
+ // AnnData - h5ad via reference spec
11061
+ OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
11062
+ OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
11063
+ OBS_SETS_ANNDATA_H5AD: "obsSets.anndata.h5ad",
11064
+ OBS_EMBEDDING_ANNDATA_H5AD: "obsEmbedding.anndata.h5ad",
11065
+ OBS_SPOTS_ANNDATA_H5AD: "obsSpots.anndata.h5ad",
11066
+ OBS_POINTS_ANNDATA_H5AD: "obsPoints.anndata.h5ad",
11067
+ OBS_LOCATIONS_ANNDATA_H5AD: "obsLocations.anndata.h5ad",
11068
+ OBS_SEGMENTATIONS_ANNDATA_H5AD: "obsSegmentations.anndata.h5ad",
11069
+ OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
11070
+ FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
11071
+ SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
11019
11072
  // SpatialData
11020
11073
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
11021
11074
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -11781,10 +11834,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
11781
11834
  const handler = {
11782
11835
  get(obj, prop) {
11783
11836
  const oldKeys = Object.keys(oldObj);
11784
- if (oldKeys.includes(prop)) {
11785
- console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':
11786
- ${oldObj[prop][1]}`);
11787
- return oldObj[prop];
11837
+ const propKey = String(prop);
11838
+ if (oldKeys.includes(propKey)) {
11839
+ console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
11840
+ ${oldObj[propKey][1]}`);
11841
+ return oldObj[propKey];
11788
11842
  }
11789
11843
  return obj[prop];
11790
11844
  }
@@ -11869,7 +11923,7 @@ const annDataObsFeatureMatrix = z.object({
11869
11923
  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"),
11870
11924
  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")
11871
11925
  });
11872
- const annDataObsSets = z.array(z.object({
11926
+ const annDataObsSetsArr = z.array(z.object({
11873
11927
  name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
11874
11928
  path: z.union([
11875
11929
  z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
@@ -11877,9 +11931,15 @@ const annDataObsSets = z.array(z.object({
11877
11931
  ]),
11878
11932
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
11879
11933
  }));
11880
- z.array(z.object({
11934
+ const annDataObsSets = z.object({
11935
+ obsSets: annDataObsSetsArr
11936
+ });
11937
+ const annDataObsFeatureColumnsArr = z.array(z.object({
11881
11938
  path: z.string()
11882
11939
  }));
11940
+ z.object({
11941
+ obsFeatureColumns: annDataObsFeatureColumnsArr
11942
+ });
11883
11943
  const annDataObsSpots = annDataObsm;
11884
11944
  const annDataObsPoints = annDataObsm;
11885
11945
  const annDataObsLocations = annDataObsm;
@@ -12002,7 +12062,7 @@ z.object({
12002
12062
  scoreColumn: z.string().optional()
12003
12063
  }))
12004
12064
  });
12005
- z.object({
12065
+ const anndataZarrSchema = z.object({
12006
12066
  obsLabels: z.union([
12007
12067
  annDataObsLabels,
12008
12068
  z.array(annDataConvenienceObsLabelsItem)
@@ -12012,7 +12072,7 @@ z.object({
12012
12072
  z.array(annDataConvenienceFeatureLabelsItem)
12013
12073
  ]),
12014
12074
  obsFeatureMatrix: annDataObsFeatureMatrix,
12015
- obsSets: annDataObsSets,
12075
+ obsSets: annDataObsSetsArr,
12016
12076
  obsSpots: annDataObsSpots,
12017
12077
  obsPoints: annDataObsPoints,
12018
12078
  obsLocations: annDataObsLocations,
@@ -12023,6 +12083,9 @@ z.object({
12023
12083
  ]),
12024
12084
  sampleEdges: annDataSampleEdges
12025
12085
  }).partial();
12086
+ anndataZarrSchema.extend({
12087
+ refSpecUrl: z.string()
12088
+ });
12026
12089
  z.object({
12027
12090
  // TODO: should `image` be a special schema
12028
12091
  // to allow specifying fileUid (like for embeddingType)?
@@ -133448,16 +133511,16 @@ function addDecoder(cases, importFn) {
133448
133511
  }
133449
133512
  cases.forEach((c) => registry$1.set(c, importFn));
133450
133513
  }
133451
- addDecoder([void 0, 1], () => import("./raw-d1159197.js").then((m) => m.default));
133452
- addDecoder(5, () => import("./lzw-9772f236.js").then((m) => m.default));
133514
+ addDecoder([void 0, 1], () => import("./raw-b710e818.js").then((m) => m.default));
133515
+ addDecoder(5, () => import("./lzw-929a0051.js").then((m) => m.default));
133453
133516
  addDecoder(6, () => {
133454
133517
  throw new Error("old style JPEG compression is not supported.");
133455
133518
  });
133456
- addDecoder(7, () => import("./jpeg-03b23b5d.js").then((m) => m.default));
133457
- addDecoder([8, 32946], () => import("./deflate-8ccd191a.js").then((m) => m.default));
133458
- addDecoder(32773, () => import("./packbits-25b16319.js").then((m) => m.default));
133459
- addDecoder(34887, () => import("./lerc-5f11d7ac.js").then((m) => m.default));
133460
- addDecoder(50001, () => import("./webimage-ac198f10.js").then((m) => m.default));
133519
+ addDecoder(7, () => import("./jpeg-f703d405.js").then((m) => m.default));
133520
+ addDecoder([8, 32946], () => import("./deflate-2be2485c.js").then((m) => m.default));
133521
+ addDecoder(32773, () => import("./packbits-6ec444ef.js").then((m) => m.default));
133522
+ addDecoder(34887, () => import("./lerc-c762e2de.js").then((m) => m.default));
133523
+ addDecoder(50001, () => import("./webimage-0383ab0d.js").then((m) => m.default));
133461
133524
  function decodeRowAcc(row, stride) {
133462
133525
  let length2 = row.length - stride;
133463
133526
  let offset5 = 0;
@@ -145416,6 +145479,7 @@ function HeatmapSubscriber(props) {
145416
145479
  obsColorEncoding: "geneExpression",
145417
145480
  considerSelections: false,
145418
145481
  featureSelection: geneSelection,
145482
+ obsSetSelection: cellSetSelection,
145419
145483
  featureValueColormap: geneExpressionColormap,
145420
145484
  featureValueColormapRange: geneExpressionColormapRange,
145421
145485
  extent: obsFeatureMatrixExtent
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, H } from "./index-ce0b6d53.js";
1
+ import { a, H } from "./index-953d6196.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-ce0b6d53.js";
1
+ import { B as BaseDecoder } from "./index-953d6196.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-ce0b6d53.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-953d6196.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-ce0b6d53.js";
1
+ import { B as BaseDecoder } from "./index-953d6196.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-ce0b6d53.js";
1
+ import { B as BaseDecoder } from "./index-953d6196.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-ce0b6d53.js";
1
+ import { B as BaseDecoder } from "./index-953d6196.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-ce0b6d53.js";
1
+ import { B as BaseDecoder } from "./index-953d6196.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"HeatmapSubscriber.d.ts","sourceRoot":"","sources":["../src/HeatmapSubscriber.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;GAUG;AACH,yCATG;IAAsB,IAAI,EAAlB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACS,SAAS,EAAxB,OAAO;CAEjB,eAwPA"}
1
+ {"version":3,"file":"HeatmapSubscriber.d.ts","sourceRoot":"","sources":["../src/HeatmapSubscriber.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;GAUG;AACH,yCATG;IAAsB,IAAI,EAAlB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACS,SAAS,EAAxB,OAAO;CAEjB,eAyPA"}
@@ -107,5 +107,5 @@ export function HeatmapSubscriber(props) {
107
107
  setTargetY(target[1]);
108
108
  }, colormapRange: geneExpressionColormapRange, setColormapRange: setGeneExpressionColormapRange, height: height, width: width, theme: theme, uuid: uuid, uint8ObsFeatureMatrix: uint8ObsFeatureMatrix?.data, cellColors: cellColors, colormap: geneExpressionColormap, setIsRendering: setIsRendering, setCellHighlight: setCellHighlight, setGeneHighlight: setGeneHighlight, featureLabelsMap: featureLabelsMap, obsIndex: obsIndex, featureIndex: featureIndex, setTrackHighlight: setTrackHighlight, setComponentHover: () => {
109
109
  setComponentHover(uuid);
110
- }, updateViewInfo: setComponentViewInfo, observationsTitle: observationsTitle, variablesTitle: variablesTitle, variablesDashes: false, observationsDashes: false, cellColorLabels: cellColorLabels, useDevicePixels: true, onHeatmapClick: onHeatmapClick, setColorEncoding: setHoveredColorEncoding }), tooltipsVisible && (_jsx(HeatmapTooltipSubscriber, { parentUuid: uuid, width: width, height: height, transpose: transpose, getObsInfo: getObsInfo, getFeatureInfo: getFeatureInfo, obsHighlight: cellHighlight, featureHighlight: geneHighlight })), _jsx(Legend, { visible: true, theme: theme, featureType: featureType, featureValueType: featureValueType, obsColorEncoding: "geneExpression", considerSelections: false, featureSelection: geneSelection, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, extent: obsFeatureMatrixExtent })] }));
110
+ }, updateViewInfo: setComponentViewInfo, observationsTitle: observationsTitle, variablesTitle: variablesTitle, variablesDashes: false, observationsDashes: false, cellColorLabels: cellColorLabels, useDevicePixels: true, onHeatmapClick: onHeatmapClick, setColorEncoding: setHoveredColorEncoding }), tooltipsVisible && (_jsx(HeatmapTooltipSubscriber, { parentUuid: uuid, width: width, height: height, transpose: transpose, getObsInfo: getObsInfo, getFeatureInfo: getFeatureInfo, obsHighlight: cellHighlight, featureHighlight: geneHighlight })), _jsx(Legend, { visible: true, theme: theme, featureType: featureType, featureValueType: featureValueType, obsColorEncoding: "geneExpression", considerSelections: false, featureSelection: geneSelection, obsSetSelection: cellSetSelection, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, extent: obsFeatureMatrixExtent })] }));
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/heatmap",
3
- "version": "3.4.9",
3
+ "version": "3.4.10",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,14 +20,14 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "uuid": "^9.0.0",
22
22
  "react-aria": "^3.28.0",
23
- "@vitessce/constants-internal": "3.4.9",
24
- "@vitessce/gl": "3.4.9",
25
- "@vitessce/legend": "3.4.9",
26
- "@vitessce/sets-utils": "3.4.9",
27
- "@vitessce/tooltip": "3.4.9",
28
- "@vitessce/utils": "3.4.9",
29
- "@vitessce/vit-s": "3.4.9",
30
- "@vitessce/workers": "3.4.9"
23
+ "@vitessce/constants-internal": "3.4.10",
24
+ "@vitessce/gl": "3.4.10",
25
+ "@vitessce/legend": "3.4.10",
26
+ "@vitessce/sets-utils": "3.4.10",
27
+ "@vitessce/tooltip": "3.4.10",
28
+ "@vitessce/utils": "3.4.10",
29
+ "@vitessce/vit-s": "3.4.10",
30
+ "@vitessce/workers": "3.4.10"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/jest-dom": "^5.16.4",
@@ -277,6 +277,7 @@ export function HeatmapSubscriber(props) {
277
277
  obsColorEncoding="geneExpression"
278
278
  considerSelections={false}
279
279
  featureSelection={geneSelection}
280
+ obsSetSelection={cellSetSelection}
280
281
  featureValueColormap={geneExpressionColormap}
281
282
  featureValueColormapRange={geneExpressionColormapRange}
282
283
  extent={obsFeatureMatrixExtent}