@vitessce/scatterplot-embedding 3.4.12 → 3.5.0

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-616c9001.js";
2
+ import { B as BaseDecoder } from "./index-b29153a1.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -11010,7 +11010,8 @@ const ViewType$1 = {
11010
11010
  OBS_SET_FEATURE_VALUE_DISTRIBUTION: "obsSetFeatureValueDistribution",
11011
11011
  FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
11012
11012
  DOT_PLOT: "dotPlot",
11013
- FEATURE_BAR_PLOT: "featureBarPlot"
11013
+ FEATURE_BAR_PLOT: "featureBarPlot",
11014
+ BIOMARKER_SELECT: "biomarkerSelect"
11014
11015
  };
11015
11016
  const DataType$2 = {
11016
11017
  OBS_LABELS: "obsLabels",
@@ -11049,6 +11050,9 @@ const FileType$1 = {
11049
11050
  // OME-Zarr
11050
11051
  IMAGE_OME_ZARR: "image.ome-zarr",
11051
11052
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
11053
+ // OME-Zarr - Zipped
11054
+ IMAGE_OME_ZARR_ZIP: "image.ome-zarr.zip",
11055
+ OBS_SEGMENTATIONS_OME_ZARR_ZIP: "obsSegmentations.ome-zarr.zip",
11052
11056
  // AnnData
11053
11057
  OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
11054
11058
  OBS_FEATURE_COLUMNS_ANNDATA_ZARR: "obsFeatureColumns.anndata.zarr",
@@ -11702,6 +11706,11 @@ const COMPONENT_COORDINATION_TYPES = {
11702
11706
  CoordinationType$1.OBS_SET_COLOR,
11703
11707
  CoordinationType$1.OBS_COLOR_ENCODING,
11704
11708
  CoordinationType$1.ADDITIONAL_OBS_SETS
11709
+ ],
11710
+ [ViewType$1.BIOMARKER_SELECT]: [
11711
+ CoordinationType$1.FEATURE_SELECTION,
11712
+ CoordinationType$1.SAMPLE_SET_SELECTION
11713
+ // TODO: create coordination types for internal state of the biomarker selection view?
11705
11714
  ]
11706
11715
  };
11707
11716
  const ViewType = {
@@ -12005,24 +12014,29 @@ const imageOmeZarrSchema = z.object({
12005
12014
  imageOmeZarrSchema.extend({
12006
12015
  obsTypesFromChannelNames: z.boolean().optional()
12007
12016
  });
12008
- const imageSpatialdataSchema = imageOmeZarrSchema.extend({
12009
- path: z.string()
12017
+ const imageSpatialdataSchema = z.object({
12018
+ path: z.string(),
12019
+ 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.')
12010
12020
  });
12011
12021
  const obsSegmentationsSpatialdataSchema = z.object({
12012
- // TODO: should this also extend the imageOmeZarrSchema?
12013
12022
  // TODO: should this be renamed labelsSpatialdataSchema?
12014
12023
  // TODO: support obsTypesFromChannelNames?
12015
- path: z.string()
12024
+ path: z.string(),
12025
+ 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."),
12026
+ 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.')
12016
12027
  });
12017
12028
  z.object({
12018
- path: z.string()
12029
+ path: z.string(),
12030
+ coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the coordinates. If not provided, the "global" coordinate system is assumed.')
12019
12031
  });
12020
12032
  const obsSpotsSpatialdataSchema = z.object({
12021
12033
  path: z.string(),
12022
- tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
12034
+ tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
12035
+ coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the coordinates and radii. If not provided, the "global" coordinate system is assumed.')
12023
12036
  });
12024
12037
  const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
12025
- region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
12038
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
12039
+ 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.')
12026
12040
  });
12027
12041
  const obsSetsSpatialdataSchema = z.object({
12028
12042
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
@@ -12123,15 +12137,21 @@ anndataZarrSchema.extend({
12123
12137
  z.object({
12124
12138
  // TODO: should `image` be a special schema
12125
12139
  // to allow specifying fileUid (like for embeddingType)?
12140
+ // TODO: allow multiple images
12126
12141
  image: imageSpatialdataSchema,
12127
12142
  // TODO: should this be a special schema
12128
12143
  // to allow specifying fileUid (like for embeddingType)?
12144
+ // TODO: allow multiple labels
12129
12145
  labels: obsSegmentationsSpatialdataSchema,
12130
12146
  obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
12131
12147
  obsSpots: obsSpotsSpatialdataSchema,
12132
12148
  // TODO: obsPoints
12133
12149
  // TODO: obsLocations
12134
- obsSets: obsSetsSpatialdataSchema
12150
+ obsSets: obsSetsSpatialdataSchema,
12151
+ // TODO: obsEmbedding
12152
+ // TODO: obsLabels
12153
+ // TODO: featureLabels
12154
+ coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
12135
12155
  }).partial();
12136
12156
  z.object({
12137
12157
  obsLabelsTypes: z.array(z.string()).optional(),
@@ -89680,7 +89700,7 @@ keysShim.shim = function shimObjectKeys() {
89680
89700
  return Object.keys || keysShim;
89681
89701
  };
89682
89702
  var objectKeys$1 = keysShim;
89683
- var shams$2 = function hasSymbols() {
89703
+ var shams$1 = function hasSymbols() {
89684
89704
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
89685
89705
  return false;
89686
89706
  }
@@ -89725,9 +89745,9 @@ var shams$2 = function hasSymbols() {
89725
89745
  }
89726
89746
  return true;
89727
89747
  };
89728
- var hasSymbols$4 = shams$2;
89729
- var shams$1 = function hasToStringTagShams() {
89730
- return hasSymbols$4() && !!Symbol.toStringTag;
89748
+ var hasSymbols$3 = shams$1;
89749
+ var shams = function hasToStringTagShams() {
89750
+ return hasSymbols$3() && !!Symbol.toStringTag;
89731
89751
  };
89732
89752
  var esErrors = Error;
89733
89753
  var _eval = EvalError;
@@ -89737,8 +89757,8 @@ var syntax = SyntaxError;
89737
89757
  var type = TypeError;
89738
89758
  var uri = URIError;
89739
89759
  var origSymbol = typeof Symbol !== "undefined" && Symbol;
89740
- var hasSymbolSham = shams$2;
89741
- var hasSymbols$3 = function hasNativeSymbols() {
89760
+ var hasSymbolSham = shams$1;
89761
+ var hasSymbols$2 = function hasNativeSymbols() {
89742
89762
  if (typeof origSymbol !== "function") {
89743
89763
  return false;
89744
89764
  }
@@ -89754,11 +89774,12 @@ var hasSymbols$3 = function hasNativeSymbols() {
89754
89774
  return hasSymbolSham();
89755
89775
  };
89756
89776
  var test = {
89777
+ __proto__: null,
89757
89778
  foo: {}
89758
89779
  };
89759
89780
  var $Object$1 = Object;
89760
89781
  var hasProto$1 = function hasProto() {
89761
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
89782
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object$1);
89762
89783
  };
89763
89784
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
89764
89785
  var toStr$2 = Object.prototype.toString;
@@ -89873,7 +89894,7 @@ var ThrowTypeError = $gOPD$2 ? function() {
89873
89894
  }
89874
89895
  }
89875
89896
  }() : throwTypeError;
89876
- var hasSymbols$2 = hasSymbols$3();
89897
+ var hasSymbols$1 = hasSymbols$2();
89877
89898
  var hasProto2 = hasProto$1();
89878
89899
  var getProto$1 = Object.getPrototypeOf || (hasProto2 ? function(x2) {
89879
89900
  return x2.__proto__;
@@ -89885,7 +89906,7 @@ var INTRINSICS = {
89885
89906
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
89886
89907
  "%Array%": Array,
89887
89908
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
89888
- "%ArrayIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
89909
+ "%ArrayIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
89889
89910
  "%AsyncFromSyncIteratorPrototype%": undefined$1,
89890
89911
  "%AsyncFunction%": needsEval,
89891
89912
  "%AsyncGenerator%": needsEval,
@@ -89916,10 +89937,10 @@ var INTRINSICS = {
89916
89937
  "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
89917
89938
  "%isFinite%": isFinite,
89918
89939
  "%isNaN%": isNaN,
89919
- "%IteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
89940
+ "%IteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
89920
89941
  "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
89921
89942
  "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
89922
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
89943
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
89923
89944
  "%Math%": Math,
89924
89945
  "%Number%": Number,
89925
89946
  "%Object%": Object,
@@ -89932,11 +89953,11 @@ var INTRINSICS = {
89932
89953
  "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
89933
89954
  "%RegExp%": RegExp,
89934
89955
  "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
89935
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
89956
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
89936
89957
  "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
89937
89958
  "%String%": String,
89938
- "%StringIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
89939
- "%Symbol%": hasSymbols$2 ? Symbol : undefined$1,
89959
+ "%StringIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
89960
+ "%Symbol%": hasSymbols$1 ? Symbol : undefined$1,
89940
89961
  "%SyntaxError%": $SyntaxError$1,
89941
89962
  "%ThrowTypeError%": ThrowTypeError,
89942
89963
  "%TypedArray%": TypedArray,
@@ -90305,7 +90326,7 @@ var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
90305
90326
  }
90306
90327
  return intrinsic;
90307
90328
  };
90308
- var hasToStringTag$2 = shams$1();
90329
+ var hasToStringTag$2 = shams();
90309
90330
  var callBound$1 = callBound$2;
90310
90331
  var $toString$1 = callBound$1("Object.prototype.toString");
90311
90332
  var isStandardArguments = function isArguments2(value) {
@@ -90350,7 +90371,7 @@ hasPropertyDescriptors2.hasArrayLengthDefineBug = function hasArrayLengthDefineB
90350
90371
  };
90351
90372
  var hasPropertyDescriptors_1 = hasPropertyDescriptors2;
90352
90373
  var keys$1 = objectKeys$1;
90353
- var hasSymbols$1 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
90374
+ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
90354
90375
  var toStr$1 = Object.prototype.toString;
90355
90376
  var concat = Array.prototype.concat;
90356
90377
  var defineDataProperty2 = defineDataProperty$1;
@@ -90377,7 +90398,7 @@ var defineProperty$3 = function(object2, name2, value, predicate) {
90377
90398
  var defineProperties = function(object2, map2) {
90378
90399
  var predicates = arguments.length > 2 ? arguments[2] : {};
90379
90400
  var props = keys$1(map2);
90380
- if (hasSymbols$1) {
90401
+ if (hasSymbols2) {
90381
90402
  props = concat.call(props, Object.getOwnPropertySymbols(map2));
90382
90403
  }
90383
90404
  for (var i2 = 0; i2 < props.length; i2 += 1) {
@@ -90428,10 +90449,6 @@ define$4(polyfill$1, {
90428
90449
  shim: shim$2
90429
90450
  });
90430
90451
  var objectIs = polyfill$1;
90431
- var hasSymbols2 = shams$2;
90432
- var shams = function hasToStringTagShams2() {
90433
- return hasSymbols2() && !!Symbol.toStringTag;
90434
- };
90435
90452
  var callBound = callBound$2;
90436
90453
  var hasToStringTag$1 = shams();
90437
90454
  var has$3;
@@ -90638,7 +90655,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
90638
90655
  };
90639
90656
  var toStr = Object.prototype.toString;
90640
90657
  var dateClass = "[object Date]";
90641
- var hasToStringTag = shams$1();
90658
+ var hasToStringTag = shams();
90642
90659
  var isDateObject = function isDateObject2(value) {
90643
90660
  if (typeof value !== "object" || value === null) {
90644
90661
  return false;
@@ -123958,16 +123975,16 @@ function addDecoder(cases, importFn) {
123958
123975
  }
123959
123976
  cases.forEach((c2) => registry$1.set(c2, importFn));
123960
123977
  }
123961
- addDecoder([void 0, 1], () => import("./raw-e9fa39bf.js").then((m2) => m2.default));
123962
- addDecoder(5, () => import("./lzw-64a77c97.js").then((m2) => m2.default));
123978
+ addDecoder([void 0, 1], () => import("./raw-d4deb41a.js").then((m2) => m2.default));
123979
+ addDecoder(5, () => import("./lzw-b0644528.js").then((m2) => m2.default));
123963
123980
  addDecoder(6, () => {
123964
123981
  throw new Error("old style JPEG compression is not supported.");
123965
123982
  });
123966
- addDecoder(7, () => import("./jpeg-b058e474.js").then((m2) => m2.default));
123967
- addDecoder([8, 32946], () => import("./deflate-c51c61e0.js").then((m2) => m2.default));
123968
- addDecoder(32773, () => import("./packbits-a8913205.js").then((m2) => m2.default));
123969
- addDecoder(34887, () => import("./lerc-c39dd0df.js").then((m2) => m2.default));
123970
- addDecoder(50001, () => import("./webimage-18d86ed2.js").then((m2) => m2.default));
123983
+ addDecoder(7, () => import("./jpeg-fb8ccf5b.js").then((m2) => m2.default));
123984
+ addDecoder([8, 32946], () => import("./deflate-aa8592bc.js").then((m2) => m2.default));
123985
+ addDecoder(32773, () => import("./packbits-54f0a5dc.js").then((m2) => m2.default));
123986
+ addDecoder(34887, () => import("./lerc-6a5274b2.js").then((m2) => m2.default));
123987
+ addDecoder(50001, () => import("./webimage-75b55168.js").then((m2) => m2.default));
123971
123988
  function decodeRowAcc(row, stride) {
123972
123989
  let length2 = row.length - stride;
123973
123990
  let offset5 = 0;
@@ -144803,6 +144820,7 @@ const CELLS_LAYER_ID = "scatterplot";
144803
144820
  const LABEL_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
144804
144821
  const NUM_FORCE_SIMULATION_TICKS = 100;
144805
144822
  const LABEL_UPDATE_ZOOM_DELTA = 0.25;
144823
+ const POINT_LAYER_Z_INDEX = 0;
144806
144824
  const makeDefaultGetCellColors = (cellColors, obsIndex, theme) => (object2, { index: index2 }) => {
144807
144825
  const [r2, g2, b, a2] = cellColors && obsIndex && cellColors.get(obsIndex[index2]) || getDefaultColor(theme);
144808
144826
  return [r2, g2, b, 255 * (a2 || 1)];
@@ -144820,7 +144838,7 @@ const makeFlippedGetObsCoords = (obsEmbedding) => (i2) => [
144820
144838
  const getPosition = (object2, { index: index2, data, target }) => {
144821
144839
  target[0] = data.src.obsEmbedding.data[0][index2];
144822
144840
  target[1] = -data.src.obsEmbedding.data[1][index2];
144823
- target[2] = 0;
144841
+ target[2] = POINT_LAYER_Z_INDEX;
144824
144842
  return target;
144825
144843
  };
144826
144844
  const contourGetWeight = (object2, { index: index2, data }) => data.src.featureValues[index2];
@@ -144830,7 +144848,6 @@ const contourGetPosition = (object2, { index: index2, data, target }) => {
144830
144848
  target[2] = 0;
144831
144849
  return target;
144832
144850
  };
144833
- const contourGetPolygonOffset = () => [0, 20];
144834
144851
  class Scatterplot extends AbstractSpatialOrScatterplot {
144835
144852
  constructor(props) {
144836
144853
  super(props);
@@ -144870,7 +144887,6 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
144870
144887
  data: deckData,
144871
144888
  getWeight: contourGetWeight,
144872
144889
  getPosition: contourGetPosition,
144873
- getPolygonOffset: contourGetPolygonOffset,
144874
144890
  contours: contourThresholds.map((threshold, i2) => ({
144875
144891
  threshold: contoursFilled ? [threshold, threshold[i2 + 1] || Infinity] : threshold,
144876
144892
  // TODO: should the opacity steps be uniform? Should align with human perception.
@@ -144881,7 +144897,10 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
144881
144897
  // a
144882
144898
  contoursFilled ? (i2 + 0.5) / contourThresholds.length * 255 : (i2 + 1) / contourThresholds.length * 255
144883
144899
  ],
144884
- strokeWidth: 2
144900
+ strokeWidth: 2,
144901
+ // We need to specify a greater z-index so that the contour layers
144902
+ // will render on top of the point layer.
144903
+ zIndex: POINT_LAYER_Z_INDEX + 1 + i2
144885
144904
  })),
144886
144905
  aggregation: "MEAN",
144887
144906
  gpuAggregation: true,
@@ -147995,7 +148014,7 @@ const rectHeight = 8;
147995
148014
  const rectMarginY = 2;
147996
148015
  const rectMarginX = 2;
147997
148016
  function Legend(props) {
147998
- const { visible: visibleProp, positionRelative = false, highContrast = false, obsType, featureValueType, considerSelections = true, obsColorEncoding, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, spatialChannelColor, spatialLayerColor, obsSetSelection, obsSetColor, extent: extent2, width = 100, height = 36, theme, showObsLabel = false, pointsVisible = true, contoursVisible = false, contoursFilled, contourPercentiles, contourThresholds } = props;
148017
+ const { visible: visibleProp, positionRelative = false, highContrast = false, obsType, featureValueType, considerSelections = true, obsColorEncoding, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, spatialChannelColor, spatialLayerColor, obsSetSelection, obsSetColor, extent: extent2, missing, width = 100, height = 36, theme, showObsLabel = false, pointsVisible = true, contoursVisible = false, contoursFilled, contourPercentiles, contourThresholds } = props;
147999
148018
  const svgRef = useRef();
148000
148019
  const classes = useStyles();
148001
148020
  const isDarkTheme = theme === "dark";
@@ -148079,7 +148098,8 @@ function Legend(props) {
148079
148098
  });
148080
148099
  });
148081
148100
  }
148082
- const featureSelectionLabel = featureSelection && featureSelection.length >= 1 && !isStaticColor ? (featureLabelsMap == null ? void 0 : featureLabelsMap.get(featureSelection[0])) || featureSelection[0] : null;
148101
+ const featureSelectionLabelRaw = featureSelection && featureSelection.length >= 1 && !isStaticColor ? (featureLabelsMap == null ? void 0 : featureLabelsMap.get(featureSelection[0])) || featureSelection[0] : null;
148102
+ const featureSelectionLabel = missing ? `${featureSelectionLabelRaw} (${Math.round(missing * 100)}% NaN)` : featureSelectionLabelRaw;
148083
148103
  const obsLabel = capitalize$1(obsType);
148084
148104
  const featureLabel = considerSelections ? featureSelectionLabel || capitalize$1(featureValueType) : capitalize$1(featureValueType);
148085
148105
  const mainLabel = showObsLabel ? obsLabel : featureLabel;
@@ -148474,7 +148494,11 @@ function EmbeddingScatterplotSubscriber(props) {
148474
148494
  const getCellIsSelected = useCallback((object2, { index: index2 }) => (cellSelectionSet || /* @__PURE__ */ new Set([])).has(obsEmbeddingIndex[index2]) ? 1 : 0, [cellSelectionSet, obsEmbeddingIndex]);
148475
148495
  const cellRadius = cellRadiusMode === "manual" ? cellRadiusFixed : dynamicCellRadius;
148476
148496
  const cellOpacity = cellOpacityMode === "manual" ? cellOpacityFixed : dynamicCellOpacity;
148477
- const [uint8ExpressionData, expressionExtents] = useUint8FeatureSelection(expressionData);
148497
+ const {
148498
+ normData: uint8ExpressionData,
148499
+ extents: expressionExtents,
148500
+ missing: expressionMissing
148501
+ } = useUint8FeatureSelection(expressionData);
148478
148502
  const getExpressionValue = useExpressionValueGetter({
148479
148503
  instanceObsIndex: obsEmbeddingIndex,
148480
148504
  matrixObsIndex,
@@ -148686,6 +148710,7 @@ function EmbeddingScatterplotSubscriber(props) {
148686
148710
  featureValueColormapRange: geneExpressionColormapRange,
148687
148711
  obsSetSelection: cellSetSelection,
148688
148712
  extent: expressionExtents == null ? void 0 : expressionExtents[0],
148713
+ missing: expressionMissing == null ? void 0 : expressionMissing[0],
148689
148714
  pointsVisible: embeddingPointsVisible,
148690
148715
  contoursVisible: embeddingContoursVisible,
148691
148716
  contoursFilled: embeddingContoursFilled,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-616c9001.js";
1
+ import { E } from "./index-b29153a1.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-616c9001.js";
1
+ import { B as BaseDecoder } from "./index-b29153a1.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-616c9001.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-b29153a1.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-616c9001.js";
1
+ import { B as BaseDecoder } from "./index-b29153a1.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-616c9001.js";
1
+ import { B as BaseDecoder } from "./index-b29153a1.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-616c9001.js";
1
+ import { B as BaseDecoder } from "./index-b29153a1.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-616c9001.js";
1
+ import { B as BaseDecoder } from "./index-b29153a1.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,eAqgBA"}
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,eA0gBA"}
@@ -156,7 +156,7 @@ export function EmbeddingScatterplotSubscriber(props) {
156
156
  const getCellIsSelected = useCallback((object, { index }) => ((cellSelectionSet || new Set([])).has(obsEmbeddingIndex[index]) ? 1.0 : 0.0), [cellSelectionSet, obsEmbeddingIndex]);
157
157
  const cellRadius = (cellRadiusMode === 'manual' ? cellRadiusFixed : dynamicCellRadius);
158
158
  const cellOpacity = (cellOpacityMode === 'manual' ? cellOpacityFixed : dynamicCellOpacity);
159
- const [uint8ExpressionData, expressionExtents] = useUint8FeatureSelection(expressionData);
159
+ const { normData: uint8ExpressionData, extents: expressionExtents, missing: expressionMissing, } = useUint8FeatureSelection(expressionData);
160
160
  // Set up a getter function for gene expression values, to be used
161
161
  // by the DeckGL layer to obtain values for instanced attributes.
162
162
  const getExpressionValue = useExpressionValueGetter({
@@ -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, obsSetSelection: cellSetSelection, 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], missing: expressionMissing?.[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,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.4.12",
4
- "author": "Gehlenborg Lab",
3
+ "version": "3.5.0",
4
+ "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
7
7
  "type": "git",
@@ -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.12",
24
- "@vitessce/legend": "3.4.12",
25
- "@vitessce/scatterplot": "3.4.12",
26
- "@vitessce/sets-utils": "3.4.12",
27
- "@vitessce/utils": "3.4.12",
28
- "@vitessce/vit-s": "3.4.12"
23
+ "@vitessce/constants-internal": "3.5.0",
24
+ "@vitessce/legend": "3.5.0",
25
+ "@vitessce/scatterplot": "3.5.0",
26
+ "@vitessce/sets-utils": "3.5.0",
27
+ "@vitessce/utils": "3.5.0",
28
+ "@vitessce/vit-s": "3.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",
@@ -333,7 +333,11 @@ export function EmbeddingScatterplotSubscriber(props) {
333
333
  const cellRadius = (cellRadiusMode === 'manual' ? cellRadiusFixed : dynamicCellRadius);
334
334
  const cellOpacity = (cellOpacityMode === 'manual' ? cellOpacityFixed : dynamicCellOpacity);
335
335
 
336
- const [uint8ExpressionData, expressionExtents] = useUint8FeatureSelection(expressionData);
336
+ const {
337
+ normData: uint8ExpressionData,
338
+ extents: expressionExtents,
339
+ missing: expressionMissing,
340
+ } = useUint8FeatureSelection(expressionData);
337
341
 
338
342
  // Set up a getter function for gene expression values, to be used
339
343
  // by the DeckGL layer to obtain values for instanced attributes.
@@ -559,6 +563,7 @@ export function EmbeddingScatterplotSubscriber(props) {
559
563
  featureValueColormapRange={geneExpressionColormapRange}
560
564
  obsSetSelection={cellSetSelection}
561
565
  extent={expressionExtents?.[0]}
566
+ missing={expressionMissing?.[0]}
562
567
  // Contour percentile legend
563
568
  pointsVisible={embeddingPointsVisible}
564
569
  contoursVisible={embeddingContoursVisible}