@vitessce/scatterplot-embedding 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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-3bd962eb.js";
2
+ import { B as BaseDecoder } from "./index-f135e4b2.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",
@@ -11216,6 +11269,23 @@ const CoordinationType$1 = {
11216
11269
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
11217
11270
  CONTOUR_COLOR: "contourColor"
11218
11271
  };
11272
+ const ViewHelpMapping = {
11273
+ SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
11274
+ HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
11275
+ SPATIAL: "The spatial view displays (potentially layered) spatially-resolved data including RGB or multiplexed images, segmentations of observations (bitmask- or polygon-based), and/or points (e.g., representing FISH transcripts).",
11276
+ DESCRIPTION: "The description view displays additional information about a dataset. When images are included in a dataset, the description view also includes image metadata (if contained in the image files).",
11277
+ STATUS: "The status view displays debugging messages, including app-wide error messages when datasets fail to load or when schemas fail to validate. Details about the entity under the mouse cursor (cell, gene, and/or molecule) are displayed during hover interactions.",
11278
+ LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
11279
+ GENOMIC_PROFILES: "The genomic profiles view displays genome browser tracks (using the genomic-profiles data type) containing bar plots, where the genome is along the x-axis and the value at each genome position is encoded with a bar along the y-axis.",
11280
+ GATING: "The gating scatterplot displays expression data for two genes (along the X and Y axes). Users can select two genes, and the scatterplot is dynamically generated using observation-by-feature matrix data. Gating can then be performed by using the lasso or box select tools.",
11281
+ FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
11282
+ OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
11283
+ OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
11284
+ OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
11285
+ FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
11286
+ DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
11287
+ FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis."
11288
+ };
11219
11289
  const COMPONENT_COORDINATION_TYPES = {
11220
11290
  [ViewType$1.SCATTERPLOT]: [
11221
11291
  CoordinationType$1.DATASET,
@@ -11797,10 +11867,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
11797
11867
  const handler = {
11798
11868
  get(obj, prop) {
11799
11869
  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];
11870
+ const propKey = String(prop);
11871
+ if (oldKeys.includes(propKey)) {
11872
+ console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
11873
+ ${oldObj[propKey][1]}`);
11874
+ return oldObj[propKey];
11804
11875
  }
11805
11876
  return obj[prop];
11806
11877
  }
@@ -11885,7 +11956,7 @@ const annDataObsFeatureMatrix = z.object({
11885
11956
  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
11957
  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
11958
  });
11888
- const annDataObsSets = z.array(z.object({
11959
+ const annDataObsSetsArr = z.array(z.object({
11889
11960
  name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
11890
11961
  path: z.union([
11891
11962
  z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
@@ -11893,9 +11964,15 @@ const annDataObsSets = z.array(z.object({
11893
11964
  ]),
11894
11965
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
11895
11966
  }));
11896
- z.array(z.object({
11967
+ const annDataObsSets = z.object({
11968
+ obsSets: annDataObsSetsArr
11969
+ });
11970
+ const annDataObsFeatureColumnsArr = z.array(z.object({
11897
11971
  path: z.string()
11898
11972
  }));
11973
+ z.object({
11974
+ obsFeatureColumns: annDataObsFeatureColumnsArr
11975
+ });
11899
11976
  const annDataObsSpots = annDataObsm;
11900
11977
  const annDataObsPoints = annDataObsm;
11901
11978
  const annDataObsLocations = annDataObsm;
@@ -12018,7 +12095,7 @@ z.object({
12018
12095
  scoreColumn: z.string().optional()
12019
12096
  }))
12020
12097
  });
12021
- z.object({
12098
+ const anndataZarrSchema = z.object({
12022
12099
  obsLabels: z.union([
12023
12100
  annDataObsLabels,
12024
12101
  z.array(annDataConvenienceObsLabelsItem)
@@ -12028,7 +12105,7 @@ z.object({
12028
12105
  z.array(annDataConvenienceFeatureLabelsItem)
12029
12106
  ]),
12030
12107
  obsFeatureMatrix: annDataObsFeatureMatrix,
12031
- obsSets: annDataObsSets,
12108
+ obsSets: annDataObsSetsArr,
12032
12109
  obsSpots: annDataObsSpots,
12033
12110
  obsPoints: annDataObsPoints,
12034
12111
  obsLocations: annDataObsLocations,
@@ -12039,6 +12116,9 @@ z.object({
12039
12116
  ]),
12040
12117
  sampleEdges: annDataSampleEdges
12041
12118
  }).partial();
12119
+ anndataZarrSchema.extend({
12120
+ refSpecUrl: z.string()
12121
+ });
12042
12122
  z.object({
12043
12123
  // TODO: should `image` be a special schema
12044
12124
  // to allow specifying fileUid (like for embeddingType)?
@@ -123877,16 +123957,16 @@ function addDecoder(cases, importFn) {
123877
123957
  }
123878
123958
  cases.forEach((c2) => registry$1.set(c2, importFn));
123879
123959
  }
123880
- addDecoder([void 0, 1], () => import("./raw-7c97b2da.js").then((m2) => m2.default));
123881
- addDecoder(5, () => import("./lzw-1ca0c541.js").then((m2) => m2.default));
123960
+ addDecoder([void 0, 1], () => import("./raw-d3cd6359.js").then((m2) => m2.default));
123961
+ addDecoder(5, () => import("./lzw-0762ddb6.js").then((m2) => m2.default));
123882
123962
  addDecoder(6, () => {
123883
123963
  throw new Error("old style JPEG compression is not supported.");
123884
123964
  });
123885
- addDecoder(7, () => import("./jpeg-42d9f587.js").then((m2) => m2.default));
123886
- addDecoder([8, 32946], () => import("./deflate-ada680de.js").then((m2) => m2.default));
123887
- addDecoder(32773, () => import("./packbits-c2ced2e6.js").then((m2) => m2.default));
123888
- addDecoder(34887, () => import("./lerc-f0d41405.js").then((m2) => m2.default));
123889
- addDecoder(50001, () => import("./webimage-bc235f64.js").then((m2) => m2.default));
123965
+ addDecoder(7, () => import("./jpeg-009f4f5a.js").then((m2) => m2.default));
123966
+ addDecoder([8, 32946], () => import("./deflate-9e699c70.js").then((m2) => m2.default));
123967
+ addDecoder(32773, () => import("./packbits-89153e95.js").then((m2) => m2.default));
123968
+ addDecoder(34887, () => import("./lerc-3a631699.js").then((m2) => m2.default));
123969
+ addDecoder(50001, () => import("./webimage-377ed019.js").then((m2) => m2.default));
123890
123970
  function decodeRowAcc(row, stride) {
123891
123971
  let length2 = row.length - stride;
123892
123972
  let offset5 = 0;
@@ -148084,6 +148164,7 @@ function EmbeddingScatterplotSubscriber(props) {
148084
148164
  theme,
148085
148165
  observationsLabelOverride,
148086
148166
  title: titleOverride,
148167
+ helpText = ViewHelpMapping.SCATTERPLOT,
148087
148168
  // Average fill density for dynamic opacity calculation.
148088
148169
  averageFillDensity
148089
148170
  } = props;
@@ -148493,6 +148574,7 @@ function EmbeddingScatterplotSubscriber(props) {
148493
148574
  urls,
148494
148575
  theme,
148495
148576
  isReady,
148577
+ helpText,
148496
148578
  options: /* @__PURE__ */ jsxRuntimeExports.jsx(
148497
148579
  ScatterplotOptions,
148498
148580
  {
@@ -148601,6 +148683,7 @@ function EmbeddingScatterplotSubscriber(props) {
148601
148683
  featureLabelsMap,
148602
148684
  featureValueColormap: geneExpressionColormap,
148603
148685
  featureValueColormapRange: geneExpressionColormapRange,
148686
+ obsSetSelection: cellSetSelection,
148604
148687
  extent: expressionExtents == null ? void 0 : expressionExtents[0],
148605
148688
  pointsVisible: embeddingPointsVisible,
148606
148689
  contoursVisible: embeddingContoursVisible,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-3bd962eb.js";
1
+ import { E } from "./index-f135e4b2.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-3bd962eb.js";
1
+ import { B as BaseDecoder } from "./index-f135e4b2.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-3bd962eb.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-f135e4b2.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-3bd962eb.js";
1
+ import { B as BaseDecoder } from "./index-f135e4b2.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-3bd962eb.js";
1
+ import { B as BaseDecoder } from "./index-f135e4b2.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-3bd962eb.js";
1
+ import { B as BaseDecoder } from "./index-f135e4b2.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-3bd962eb.js";
1
+ import { B as BaseDecoder } from "./index-f135e4b2.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,eAqgBA"}
@@ -7,7 +7,7 @@ import { setObsSelection, mergeObsSets, getCellSetPolygons, getCellColors, strat
7
7
  import { pluralize as plur, commaNumber } from '@vitessce/utils';
8
8
  import { Scatterplot, ScatterplotTooltipSubscriber, ScatterplotOptions, getPointSizeDevicePixels, getPointOpacity, } from '@vitessce/scatterplot';
9
9
  import { Legend } from '@vitessce/legend';
10
- import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
10
+ import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
11
11
  import { DEFAULT_CONTOUR_PERCENTILES } from './constants.js';
12
12
  /**
13
13
  * A subscriber component for the scatterplot.
@@ -23,7 +23,7 @@ import { DEFAULT_CONTOUR_PERCENTILES } from './constants.js';
23
23
  * when using dynamic opacity mode.
24
24
  */
25
25
  export function EmbeddingScatterplotSubscriber(props) {
26
- const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, observationsLabelOverride, title: titleOverride,
26
+ const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, observationsLabelOverride, title: titleOverride, helpText = ViewHelpMapping.SCATTERPLOT,
27
27
  // Average fill density for dynamic opacity calculation.
28
28
  averageFillDensity, } = props;
29
29
  const loaders = useLoaders();
@@ -253,12 +253,12 @@ export function EmbeddingScatterplotSubscriber(props) {
253
253
  setTargetY(target[1]);
254
254
  setTargetZ(target[2] || 0);
255
255
  };
256
- return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)}`, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, urls: urls, theme: theme, isReady: isReady, 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 })), 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: () => {
256
+ return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)}`, 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 })), 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: () => {
257
257
  setComponentHover(uuid);
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.9",
3
+ "version": "3.4.11",
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.9",
24
- "@vitessce/legend": "3.4.9",
25
- "@vitessce/scatterplot": "3.4.9",
26
- "@vitessce/sets-utils": "3.4.9",
27
- "@vitessce/utils": "3.4.9",
28
- "@vitessce/vit-s": "3.4.9"
23
+ "@vitessce/constants-internal": "3.4.11",
24
+ "@vitessce/legend": "3.4.11",
25
+ "@vitessce/scatterplot": "3.4.11",
26
+ "@vitessce/sets-utils": "3.4.11",
27
+ "@vitessce/utils": "3.4.11",
28
+ "@vitessce/vit-s": "3.4.11"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",
@@ -35,7 +35,7 @@ import {
35
35
  getPointOpacity,
36
36
  } from '@vitessce/scatterplot';
37
37
  import { Legend } from '@vitessce/legend';
38
- import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
38
+ import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
39
39
  import { DEFAULT_CONTOUR_PERCENTILES } from './constants.js';
40
40
 
41
41
 
@@ -62,6 +62,7 @@ export function EmbeddingScatterplotSubscriber(props) {
62
62
  theme,
63
63
  observationsLabelOverride,
64
64
  title: titleOverride,
65
+ helpText = ViewHelpMapping.SCATTERPLOT,
65
66
  // Average fill density for dynamic opacity calculation.
66
67
  averageFillDensity,
67
68
  } = props;
@@ -451,6 +452,7 @@ export function EmbeddingScatterplotSubscriber(props) {
451
452
  urls={urls}
452
453
  theme={theme}
453
454
  isReady={isReady}
455
+ helpText={helpText}
454
456
  options={(
455
457
  <ScatterplotOptions
456
458
  observationsLabel={observationsLabel}
@@ -555,6 +557,7 @@ export function EmbeddingScatterplotSubscriber(props) {
555
557
  featureLabelsMap={featureLabelsMap}
556
558
  featureValueColormap={geneExpressionColormap}
557
559
  featureValueColormapRange={geneExpressionColormapRange}
560
+ obsSetSelection={cellSetSelection}
558
561
  extent={expressionExtents?.[0]}
559
562
  // Contour percentile legend
560
563
  pointsVisible={embeddingPointsVisible}