@vitessce/heatmap 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.
- package/dist/{deflate-8ccd191a.js → deflate-651ff0f1.js} +1 -1
- package/dist/{index-ce0b6d53.js → index-ee6a9dfb.js} +101 -18
- package/dist/index.js +1 -1
- package/dist/{jpeg-03b23b5d.js → jpeg-1ac7dac2.js} +1 -1
- package/dist/{lerc-5f11d7ac.js → lerc-041fa622.js} +1 -1
- package/dist/{lzw-9772f236.js → lzw-d3d185fb.js} +1 -1
- package/dist/{packbits-25b16319.js → packbits-3b3d0e9b.js} +1 -1
- package/dist/{raw-d1159197.js → raw-a1a15d51.js} +1 -1
- package/dist/{webimage-ac198f10.js → webimage-891a5d2c.js} +1 -1
- package/dist-tsc/HeatmapSubscriber.d.ts.map +1 -1
- package/dist-tsc/HeatmapSubscriber.js +4 -4
- package/package.json +9 -9
- package/src/HeatmapSubscriber.js +4 -1
|
@@ -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
|
-
|
|
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",
|
|
@@ -11200,6 +11253,23 @@ const CoordinationType$1 = {
|
|
|
11200
11253
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
11201
11254
|
CONTOUR_COLOR: "contourColor"
|
|
11202
11255
|
};
|
|
11256
|
+
const ViewHelpMapping = {
|
|
11257
|
+
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).",
|
|
11258
|
+
HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
|
|
11259
|
+
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).",
|
|
11260
|
+
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).",
|
|
11261
|
+
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.",
|
|
11262
|
+
LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
|
|
11263
|
+
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.",
|
|
11264
|
+
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.",
|
|
11265
|
+
FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
|
|
11266
|
+
OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
|
|
11267
|
+
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.",
|
|
11268
|
+
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).",
|
|
11269
|
+
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
|
11270
|
+
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).",
|
|
11271
|
+
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."
|
|
11272
|
+
};
|
|
11203
11273
|
const COMPONENT_COORDINATION_TYPES = {
|
|
11204
11274
|
[ViewType$1.SCATTERPLOT]: [
|
|
11205
11275
|
CoordinationType$1.DATASET,
|
|
@@ -11781,10 +11851,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
11781
11851
|
const handler = {
|
|
11782
11852
|
get(obj, prop) {
|
|
11783
11853
|
const oldKeys = Object.keys(oldObj);
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
${oldObj[
|
|
11787
|
-
|
|
11854
|
+
const propKey = String(prop);
|
|
11855
|
+
if (oldKeys.includes(propKey)) {
|
|
11856
|
+
console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
|
11857
|
+
${oldObj[propKey][1]}`);
|
|
11858
|
+
return oldObj[propKey];
|
|
11788
11859
|
}
|
|
11789
11860
|
return obj[prop];
|
|
11790
11861
|
}
|
|
@@ -11869,7 +11940,7 @@ const annDataObsFeatureMatrix = z.object({
|
|
|
11869
11940
|
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
11941
|
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
11942
|
});
|
|
11872
|
-
const
|
|
11943
|
+
const annDataObsSetsArr = z.array(z.object({
|
|
11873
11944
|
name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
|
|
11874
11945
|
path: z.union([
|
|
11875
11946
|
z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
|
|
@@ -11877,9 +11948,15 @@ const annDataObsSets = z.array(z.object({
|
|
|
11877
11948
|
]),
|
|
11878
11949
|
scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
|
|
11879
11950
|
}));
|
|
11880
|
-
z.
|
|
11951
|
+
const annDataObsSets = z.object({
|
|
11952
|
+
obsSets: annDataObsSetsArr
|
|
11953
|
+
});
|
|
11954
|
+
const annDataObsFeatureColumnsArr = z.array(z.object({
|
|
11881
11955
|
path: z.string()
|
|
11882
11956
|
}));
|
|
11957
|
+
z.object({
|
|
11958
|
+
obsFeatureColumns: annDataObsFeatureColumnsArr
|
|
11959
|
+
});
|
|
11883
11960
|
const annDataObsSpots = annDataObsm;
|
|
11884
11961
|
const annDataObsPoints = annDataObsm;
|
|
11885
11962
|
const annDataObsLocations = annDataObsm;
|
|
@@ -12002,7 +12079,7 @@ z.object({
|
|
|
12002
12079
|
scoreColumn: z.string().optional()
|
|
12003
12080
|
}))
|
|
12004
12081
|
});
|
|
12005
|
-
z.object({
|
|
12082
|
+
const anndataZarrSchema = z.object({
|
|
12006
12083
|
obsLabels: z.union([
|
|
12007
12084
|
annDataObsLabels,
|
|
12008
12085
|
z.array(annDataConvenienceObsLabelsItem)
|
|
@@ -12012,7 +12089,7 @@ z.object({
|
|
|
12012
12089
|
z.array(annDataConvenienceFeatureLabelsItem)
|
|
12013
12090
|
]),
|
|
12014
12091
|
obsFeatureMatrix: annDataObsFeatureMatrix,
|
|
12015
|
-
obsSets:
|
|
12092
|
+
obsSets: annDataObsSetsArr,
|
|
12016
12093
|
obsSpots: annDataObsSpots,
|
|
12017
12094
|
obsPoints: annDataObsPoints,
|
|
12018
12095
|
obsLocations: annDataObsLocations,
|
|
@@ -12023,6 +12100,9 @@ z.object({
|
|
|
12023
12100
|
]),
|
|
12024
12101
|
sampleEdges: annDataSampleEdges
|
|
12025
12102
|
}).partial();
|
|
12103
|
+
anndataZarrSchema.extend({
|
|
12104
|
+
refSpecUrl: z.string()
|
|
12105
|
+
});
|
|
12026
12106
|
z.object({
|
|
12027
12107
|
// TODO: should `image` be a special schema
|
|
12028
12108
|
// to allow specifying fileUid (like for embeddingType)?
|
|
@@ -133448,16 +133528,16 @@ function addDecoder(cases, importFn) {
|
|
|
133448
133528
|
}
|
|
133449
133529
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
133450
133530
|
}
|
|
133451
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
133452
|
-
addDecoder(5, () => import("./lzw-
|
|
133531
|
+
addDecoder([void 0, 1], () => import("./raw-a1a15d51.js").then((m) => m.default));
|
|
133532
|
+
addDecoder(5, () => import("./lzw-d3d185fb.js").then((m) => m.default));
|
|
133453
133533
|
addDecoder(6, () => {
|
|
133454
133534
|
throw new Error("old style JPEG compression is not supported.");
|
|
133455
133535
|
});
|
|
133456
|
-
addDecoder(7, () => import("./jpeg-
|
|
133457
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
133458
|
-
addDecoder(32773, () => import("./packbits-
|
|
133459
|
-
addDecoder(34887, () => import("./lerc-
|
|
133460
|
-
addDecoder(50001, () => import("./webimage-
|
|
133536
|
+
addDecoder(7, () => import("./jpeg-1ac7dac2.js").then((m) => m.default));
|
|
133537
|
+
addDecoder([8, 32946], () => import("./deflate-651ff0f1.js").then((m) => m.default));
|
|
133538
|
+
addDecoder(32773, () => import("./packbits-3b3d0e9b.js").then((m) => m.default));
|
|
133539
|
+
addDecoder(34887, () => import("./lerc-041fa622.js").then((m) => m.default));
|
|
133540
|
+
addDecoder(50001, () => import("./webimage-891a5d2c.js").then((m) => m.default));
|
|
133461
133541
|
function decodeRowAcc(row, stride) {
|
|
133462
133542
|
let length2 = row.length - stride;
|
|
133463
133543
|
let offset5 = 0;
|
|
@@ -145180,7 +145260,8 @@ function HeatmapSubscriber(props) {
|
|
|
145180
145260
|
transpose: transpose2,
|
|
145181
145261
|
observationsLabelOverride,
|
|
145182
145262
|
variablesLabelOverride,
|
|
145183
|
-
title = "Heatmap"
|
|
145263
|
+
title = "Heatmap",
|
|
145264
|
+
helpText = ViewHelpMapping.HEATMAP
|
|
145184
145265
|
} = props;
|
|
145185
145266
|
const loaders = useLoaders();
|
|
145186
145267
|
const setComponentHover = useSetComponentHover();
|
|
@@ -145331,6 +145412,7 @@ function HeatmapSubscriber(props) {
|
|
|
145331
145412
|
TitleInfo,
|
|
145332
145413
|
{
|
|
145333
145414
|
title,
|
|
145415
|
+
helpText,
|
|
145334
145416
|
info: `${commaNumber(cellsCount)} ${pluralize(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${pluralize(variablesLabel, genesCount)},
|
|
145335
145417
|
with ${commaNumber(selectedCount)} ${pluralize(observationsLabel, selectedCount)} selected`,
|
|
145336
145418
|
urls,
|
|
@@ -145416,6 +145498,7 @@ function HeatmapSubscriber(props) {
|
|
|
145416
145498
|
obsColorEncoding: "geneExpression",
|
|
145417
145499
|
considerSelections: false,
|
|
145418
145500
|
featureSelection: geneSelection,
|
|
145501
|
+
obsSetSelection: cellSetSelection,
|
|
145419
145502
|
featureValueColormap: geneExpressionColormap,
|
|
145420
145503
|
featureValueColormapRange: geneExpressionColormapRange,
|
|
145421
145504
|
extent: obsFeatureMatrixExtent
|
package/dist/index.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-ee6a9dfb.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
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,
|
|
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,eA2PA"}
|
|
@@ -3,7 +3,7 @@ import React, { useState, useCallback, useMemo, } from 'react';
|
|
|
3
3
|
import { TitleInfo, useDeckCanvasSize, useGetObsMembership, useGetObsInfo, useReady, useUrls, useObsSetsData, useObsFeatureMatrixData, useUint8ObsFeatureMatrix, useMultiObsLabels, useFeatureLabelsData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, } from '@vitessce/vit-s';
|
|
4
4
|
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
5
5
|
import { mergeObsSets, findLongestCommonPath, getCellColors } from '@vitessce/sets-utils';
|
|
6
|
-
import { COMPONENT_COORDINATION_TYPES, ViewType } from '@vitessce/constants-internal';
|
|
6
|
+
import { COMPONENT_COORDINATION_TYPES, ViewType, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
7
7
|
import { Legend } from '@vitessce/legend';
|
|
8
8
|
import Heatmap from './Heatmap.js';
|
|
9
9
|
import HeatmapTooltipSubscriber from './HeatmapTooltipSubscriber.js';
|
|
@@ -20,7 +20,7 @@ import HeatmapOptions from './HeatmapOptions.js';
|
|
|
20
20
|
* render as cell-by-gene or gene-by-cell.
|
|
21
21
|
*/
|
|
22
22
|
export function HeatmapSubscriber(props) {
|
|
23
|
-
const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, transpose, observationsLabelOverride, variablesLabelOverride, title = 'Heatmap', } = props;
|
|
23
|
+
const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, transpose, observationsLabelOverride, variablesLabelOverride, title = 'Heatmap', helpText = ViewHelpMapping.HEATMAP, } = props;
|
|
24
24
|
const loaders = useLoaders();
|
|
25
25
|
const setComponentHover = useSetComponentHover();
|
|
26
26
|
const setComponentViewInfo = useSetComponentViewInfo(uuid);
|
|
@@ -99,7 +99,7 @@ export function HeatmapSubscriber(props) {
|
|
|
99
99
|
`${capitalize(observationsLabel)} Set`,
|
|
100
100
|
]), [observationsLabel]);
|
|
101
101
|
const selectedCount = cellColors.size;
|
|
102
|
-
return (_jsxs(TitleInfo, { title: title, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
|
|
102
|
+
return (_jsxs(TitleInfo, { title: title, helpText: helpText, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
|
|
103
103
|
with ${commaNumber(selectedCount)} ${plur(observationsLabel, selectedCount)} selected`, urls: urls, theme: theme, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady && !isRendering, options: (_jsx(HeatmapOptions, { geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, tooltipsVisible: tooltipsVisible, setTooltipsVisible: setTooltipsVisible })), children: [_jsx(Heatmap, { ref: deckRef, transpose: transpose, viewState: { zoom: zoomX, target: [targetX, targetY] }, setViewState: ({ zoom, target }) => {
|
|
104
104
|
setZoomX(zoom);
|
|
105
105
|
setZoomY(zoom);
|
|
@@ -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.
|
|
3
|
+
"version": "3.4.11",
|
|
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.
|
|
24
|
-
"@vitessce/gl": "3.4.
|
|
25
|
-
"@vitessce/legend": "3.4.
|
|
26
|
-
"@vitessce/sets-utils": "3.4.
|
|
27
|
-
"@vitessce/tooltip": "3.4.
|
|
28
|
-
"@vitessce/utils": "3.4.
|
|
29
|
-
"@vitessce/vit-s": "3.4.
|
|
30
|
-
"@vitessce/workers": "3.4.
|
|
23
|
+
"@vitessce/constants-internal": "3.4.11",
|
|
24
|
+
"@vitessce/gl": "3.4.11",
|
|
25
|
+
"@vitessce/legend": "3.4.11",
|
|
26
|
+
"@vitessce/sets-utils": "3.4.11",
|
|
27
|
+
"@vitessce/tooltip": "3.4.11",
|
|
28
|
+
"@vitessce/utils": "3.4.11",
|
|
29
|
+
"@vitessce/vit-s": "3.4.11",
|
|
30
|
+
"@vitessce/workers": "3.4.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|
package/src/HeatmapSubscriber.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from '@vitessce/vit-s';
|
|
19
19
|
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
20
20
|
import { mergeObsSets, findLongestCommonPath, getCellColors } from '@vitessce/sets-utils';
|
|
21
|
-
import { COMPONENT_COORDINATION_TYPES, ViewType } from '@vitessce/constants-internal';
|
|
21
|
+
import { COMPONENT_COORDINATION_TYPES, ViewType, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
22
22
|
import { Legend } from '@vitessce/legend';
|
|
23
23
|
import Heatmap from './Heatmap.js';
|
|
24
24
|
import HeatmapTooltipSubscriber from './HeatmapTooltipSubscriber.js';
|
|
@@ -48,6 +48,7 @@ export function HeatmapSubscriber(props) {
|
|
|
48
48
|
observationsLabelOverride,
|
|
49
49
|
variablesLabelOverride,
|
|
50
50
|
title = 'Heatmap',
|
|
51
|
+
helpText = ViewHelpMapping.HEATMAP,
|
|
51
52
|
} = props;
|
|
52
53
|
|
|
53
54
|
const loaders = useLoaders();
|
|
@@ -199,6 +200,7 @@ export function HeatmapSubscriber(props) {
|
|
|
199
200
|
return (
|
|
200
201
|
<TitleInfo
|
|
201
202
|
title={title}
|
|
203
|
+
helpText={helpText}
|
|
202
204
|
info={`${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
|
|
203
205
|
with ${commaNumber(selectedCount)} ${plur(observationsLabel, selectedCount)} selected`}
|
|
204
206
|
urls={urls}
|
|
@@ -277,6 +279,7 @@ export function HeatmapSubscriber(props) {
|
|
|
277
279
|
obsColorEncoding="geneExpression"
|
|
278
280
|
considerSelections={false}
|
|
279
281
|
featureSelection={geneSelection}
|
|
282
|
+
obsSetSelection={cellSetSelection}
|
|
280
283
|
featureValueColormap={geneExpressionColormap}
|
|
281
284
|
featureValueColormapRange={geneExpressionColormapRange}
|
|
282
285
|
extent={obsFeatureMatrixExtent}
|