@vitessce/scatterplot-embedding 3.4.10 → 3.4.12

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-3543c718.js";
2
+ import { B as BaseDecoder } from "./index-616c9001.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -11155,6 +11155,7 @@ const CoordinationType$1 = {
11155
11155
  FEATURE_TYPE: "featureType",
11156
11156
  FEATURE_VALUE_TYPE: "featureValueType",
11157
11157
  OBS_LABELS_TYPE: "obsLabelsType",
11158
+ FEATURE_LABELS_TYPE: "featureLabelsType",
11158
11159
  // Other types
11159
11160
  EMBEDDING_TYPE: "embeddingType",
11160
11161
  EMBEDDING_ZOOM: "embeddingZoom",
@@ -11269,6 +11270,23 @@ const CoordinationType$1 = {
11269
11270
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
11270
11271
  CONTOUR_COLOR: "contourColor"
11271
11272
  };
11273
+ const ViewHelpMapping = {
11274
+ 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).",
11275
+ HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
11276
+ 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).",
11277
+ 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).",
11278
+ 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.",
11279
+ LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
11280
+ 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.",
11281
+ 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.",
11282
+ FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
11283
+ OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
11284
+ 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.",
11285
+ 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).",
11286
+ FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
11287
+ 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).",
11288
+ 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."
11289
+ };
11272
11290
  const COMPONENT_COORDINATION_TYPES = {
11273
11291
  [ViewType$1.SCATTERPLOT]: [
11274
11292
  CoordinationType$1.DATASET,
@@ -11947,7 +11965,7 @@ const annDataObsSetsArr = z.array(z.object({
11947
11965
  ]),
11948
11966
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
11949
11967
  }));
11950
- const annDataObsSets = z.object({
11968
+ z.object({
11951
11969
  obsSets: annDataObsSetsArr
11952
11970
  });
11953
11971
  const annDataObsFeatureColumnsArr = z.array(z.object({
@@ -12009,7 +12027,7 @@ const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
12009
12027
  const obsSetsSpatialdataSchema = z.object({
12010
12028
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
12011
12029
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
12012
- obsSets: annDataObsSets
12030
+ obsSets: annDataObsSetsArr
12013
12031
  });
12014
12032
  z.object({
12015
12033
  targetX: z.number(),
@@ -123940,16 +123958,16 @@ function addDecoder(cases, importFn) {
123940
123958
  }
123941
123959
  cases.forEach((c2) => registry$1.set(c2, importFn));
123942
123960
  }
123943
- addDecoder([void 0, 1], () => import("./raw-3cb16c7d.js").then((m2) => m2.default));
123944
- addDecoder(5, () => import("./lzw-9c5f8c34.js").then((m2) => m2.default));
123961
+ addDecoder([void 0, 1], () => import("./raw-e9fa39bf.js").then((m2) => m2.default));
123962
+ addDecoder(5, () => import("./lzw-64a77c97.js").then((m2) => m2.default));
123945
123963
  addDecoder(6, () => {
123946
123964
  throw new Error("old style JPEG compression is not supported.");
123947
123965
  });
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));
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));
123953
123971
  function decodeRowAcc(row, stride) {
123954
123972
  let length2 = row.length - stride;
123955
123973
  let offset5 = 0;
@@ -148147,6 +148165,7 @@ function EmbeddingScatterplotSubscriber(props) {
148147
148165
  theme,
148148
148166
  observationsLabelOverride,
148149
148167
  title: titleOverride,
148168
+ helpText = ViewHelpMapping.SCATTERPLOT,
148150
148169
  // Average fill density for dynamic opacity calculation.
148151
148170
  averageFillDensity
148152
148171
  } = props;
@@ -148556,6 +148575,7 @@ function EmbeddingScatterplotSubscriber(props) {
148556
148575
  urls,
148557
148576
  theme,
148558
148577
  isReady,
148578
+ helpText,
148559
148579
  options: /* @__PURE__ */ jsxRuntimeExports.jsx(
148560
148580
  ScatterplotOptions,
148561
148581
  {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-3543c718.js";
1
+ import { E } from "./index-616c9001.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-3543c718.js";
1
+ import { B as BaseDecoder } from "./index-616c9001.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-3543c718.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-616c9001.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-3543c718.js";
1
+ import { B as BaseDecoder } from "./index-616c9001.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-3543c718.js";
1
+ import { B as BaseDecoder } from "./index-616c9001.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-3543c718.js";
1
+ import { B as BaseDecoder } from "./index-616c9001.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-3543c718.js";
1
+ import { B as BaseDecoder } from "./index-616c9001.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,eAmgBA"}
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,7 +253,7 @@ 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.4.10",
3
+ "version": "3.4.12",
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.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"
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"
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}