@vitessce/scatterplot-embedding 3.5.5 → 3.5.7
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-5287db37.js → deflate-7ff395f6.js} +1 -1
- package/dist/{index-e8cfd624.js → index-6931089e.js} +415 -22
- package/dist/index.js +2 -1
- package/dist/{jpeg-17a85e73.js → jpeg-db1f9adb.js} +1 -1
- package/dist/{lerc-c362fa1c.js → lerc-9859e1c5.js} +1 -1
- package/dist/{lzw-24b336d4.js → lzw-4b6e12be.js} +1 -1
- package/dist/{packbits-44cebc8c.js → packbits-61eb655b.js} +1 -1
- package/dist/{raw-55d1ddac.js → raw-3928687d.js} +1 -1
- package/dist/{webimage-6f2a65d0.js → webimage-62020543.js} +1 -1
- package/dist-tsc/DualEmbeddingScatterplotSubscriber.d.ts +25 -0
- package/dist-tsc/DualEmbeddingScatterplotSubscriber.d.ts.map +1 -0
- package/dist-tsc/DualEmbeddingScatterplotSubscriber.js +33 -0
- package/dist-tsc/EmbeddingScatterplotSubscriber.d.ts.map +1 -1
- package/dist-tsc/EmbeddingScatterplotSubscriber.js +6 -2
- package/dist-tsc/index.d.ts +1 -0
- package/dist-tsc/index.js +1 -0
- package/package.json +7 -7
- package/src/DualEmbeddingScatterplotSubscriber.js +65 -0
- package/src/EmbeddingScatterplotSubscriber.js +8 -1
- package/src/index.js +1 -0
|
@@ -4369,6 +4369,258 @@ function getNextScope(prevScopes) {
|
|
|
4369
4369
|
} while (prevScopes.includes(nextScope));
|
|
4370
4370
|
return nextScope;
|
|
4371
4371
|
}
|
|
4372
|
+
var loglevel = { exports: {} };
|
|
4373
|
+
(function(module2) {
|
|
4374
|
+
(function(root2, definition) {
|
|
4375
|
+
if (module2.exports) {
|
|
4376
|
+
module2.exports = definition();
|
|
4377
|
+
} else {
|
|
4378
|
+
root2.log = definition();
|
|
4379
|
+
}
|
|
4380
|
+
})(commonjsGlobal, function() {
|
|
4381
|
+
var noop2 = function() {
|
|
4382
|
+
};
|
|
4383
|
+
var undefinedType2 = "undefined";
|
|
4384
|
+
var isIE2 = typeof window !== undefinedType2 && typeof window.navigator !== undefinedType2 && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
|
4385
|
+
var logMethods = [
|
|
4386
|
+
"trace",
|
|
4387
|
+
"debug",
|
|
4388
|
+
"info",
|
|
4389
|
+
"warn",
|
|
4390
|
+
"error"
|
|
4391
|
+
];
|
|
4392
|
+
var _loggersByName = {};
|
|
4393
|
+
var defaultLogger = null;
|
|
4394
|
+
function bindMethod(obj, methodName) {
|
|
4395
|
+
var method = obj[methodName];
|
|
4396
|
+
if (typeof method.bind === "function") {
|
|
4397
|
+
return method.bind(obj);
|
|
4398
|
+
} else {
|
|
4399
|
+
try {
|
|
4400
|
+
return Function.prototype.bind.call(method, obj);
|
|
4401
|
+
} catch (e3) {
|
|
4402
|
+
return function() {
|
|
4403
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
4404
|
+
};
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
function traceForIE() {
|
|
4409
|
+
if (console.log) {
|
|
4410
|
+
if (console.log.apply) {
|
|
4411
|
+
console.log.apply(console, arguments);
|
|
4412
|
+
} else {
|
|
4413
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
if (console.trace)
|
|
4417
|
+
console.trace();
|
|
4418
|
+
}
|
|
4419
|
+
function realMethod(methodName) {
|
|
4420
|
+
if (methodName === "debug") {
|
|
4421
|
+
methodName = "log";
|
|
4422
|
+
}
|
|
4423
|
+
if (typeof console === undefinedType2) {
|
|
4424
|
+
return false;
|
|
4425
|
+
} else if (methodName === "trace" && isIE2) {
|
|
4426
|
+
return traceForIE;
|
|
4427
|
+
} else if (console[methodName] !== void 0) {
|
|
4428
|
+
return bindMethod(console, methodName);
|
|
4429
|
+
} else if (console.log !== void 0) {
|
|
4430
|
+
return bindMethod(console, "log");
|
|
4431
|
+
} else {
|
|
4432
|
+
return noop2;
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
function replaceLoggingMethods() {
|
|
4436
|
+
var level = this.getLevel();
|
|
4437
|
+
for (var i2 = 0; i2 < logMethods.length; i2++) {
|
|
4438
|
+
var methodName = logMethods[i2];
|
|
4439
|
+
this[methodName] = i2 < level ? noop2 : this.methodFactory(methodName, level, this.name);
|
|
4440
|
+
}
|
|
4441
|
+
this.log = this.debug;
|
|
4442
|
+
if (typeof console === undefinedType2 && level < this.levels.SILENT) {
|
|
4443
|
+
return "No console available for logging";
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
4447
|
+
return function() {
|
|
4448
|
+
if (typeof console !== undefinedType2) {
|
|
4449
|
+
replaceLoggingMethods.call(this);
|
|
4450
|
+
this[methodName].apply(this, arguments);
|
|
4451
|
+
}
|
|
4452
|
+
};
|
|
4453
|
+
}
|
|
4454
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
4455
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
4456
|
+
}
|
|
4457
|
+
function Logger(name2, factory) {
|
|
4458
|
+
var self2 = this;
|
|
4459
|
+
var inheritedLevel;
|
|
4460
|
+
var defaultLevel;
|
|
4461
|
+
var userLevel;
|
|
4462
|
+
var storageKey = "loglevel";
|
|
4463
|
+
if (typeof name2 === "string") {
|
|
4464
|
+
storageKey += ":" + name2;
|
|
4465
|
+
} else if (typeof name2 === "symbol") {
|
|
4466
|
+
storageKey = void 0;
|
|
4467
|
+
}
|
|
4468
|
+
function persistLevelIfPossible(levelNum) {
|
|
4469
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
|
4470
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
4471
|
+
return;
|
|
4472
|
+
try {
|
|
4473
|
+
window.localStorage[storageKey] = levelName;
|
|
4474
|
+
return;
|
|
4475
|
+
} catch (ignore) {
|
|
4476
|
+
}
|
|
4477
|
+
try {
|
|
4478
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
4479
|
+
} catch (ignore) {
|
|
4480
|
+
}
|
|
4481
|
+
}
|
|
4482
|
+
function getPersistedLevel() {
|
|
4483
|
+
var storedLevel;
|
|
4484
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
4485
|
+
return;
|
|
4486
|
+
try {
|
|
4487
|
+
storedLevel = window.localStorage[storageKey];
|
|
4488
|
+
} catch (ignore) {
|
|
4489
|
+
}
|
|
4490
|
+
if (typeof storedLevel === undefinedType2) {
|
|
4491
|
+
try {
|
|
4492
|
+
var cookie = window.document.cookie;
|
|
4493
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
4494
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
4495
|
+
if (location !== -1) {
|
|
4496
|
+
storedLevel = /^([^;]+)/.exec(
|
|
4497
|
+
cookie.slice(location + cookieName.length + 1)
|
|
4498
|
+
)[1];
|
|
4499
|
+
}
|
|
4500
|
+
} catch (ignore) {
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4503
|
+
if (self2.levels[storedLevel] === void 0) {
|
|
4504
|
+
storedLevel = void 0;
|
|
4505
|
+
}
|
|
4506
|
+
return storedLevel;
|
|
4507
|
+
}
|
|
4508
|
+
function clearPersistedLevel() {
|
|
4509
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
4510
|
+
return;
|
|
4511
|
+
try {
|
|
4512
|
+
window.localStorage.removeItem(storageKey);
|
|
4513
|
+
} catch (ignore) {
|
|
4514
|
+
}
|
|
4515
|
+
try {
|
|
4516
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
4517
|
+
} catch (ignore) {
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
function normalizeLevel(input) {
|
|
4521
|
+
var level = input;
|
|
4522
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
|
4523
|
+
level = self2.levels[level.toUpperCase()];
|
|
4524
|
+
}
|
|
4525
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
|
4526
|
+
return level;
|
|
4527
|
+
} else {
|
|
4528
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
self2.name = name2;
|
|
4532
|
+
self2.levels = {
|
|
4533
|
+
"TRACE": 0,
|
|
4534
|
+
"DEBUG": 1,
|
|
4535
|
+
"INFO": 2,
|
|
4536
|
+
"WARN": 3,
|
|
4537
|
+
"ERROR": 4,
|
|
4538
|
+
"SILENT": 5
|
|
4539
|
+
};
|
|
4540
|
+
self2.methodFactory = factory || defaultMethodFactory;
|
|
4541
|
+
self2.getLevel = function() {
|
|
4542
|
+
if (userLevel != null) {
|
|
4543
|
+
return userLevel;
|
|
4544
|
+
} else if (defaultLevel != null) {
|
|
4545
|
+
return defaultLevel;
|
|
4546
|
+
} else {
|
|
4547
|
+
return inheritedLevel;
|
|
4548
|
+
}
|
|
4549
|
+
};
|
|
4550
|
+
self2.setLevel = function(level, persist) {
|
|
4551
|
+
userLevel = normalizeLevel(level);
|
|
4552
|
+
if (persist !== false) {
|
|
4553
|
+
persistLevelIfPossible(userLevel);
|
|
4554
|
+
}
|
|
4555
|
+
return replaceLoggingMethods.call(self2);
|
|
4556
|
+
};
|
|
4557
|
+
self2.setDefaultLevel = function(level) {
|
|
4558
|
+
defaultLevel = normalizeLevel(level);
|
|
4559
|
+
if (!getPersistedLevel()) {
|
|
4560
|
+
self2.setLevel(level, false);
|
|
4561
|
+
}
|
|
4562
|
+
};
|
|
4563
|
+
self2.resetLevel = function() {
|
|
4564
|
+
userLevel = null;
|
|
4565
|
+
clearPersistedLevel();
|
|
4566
|
+
replaceLoggingMethods.call(self2);
|
|
4567
|
+
};
|
|
4568
|
+
self2.enableAll = function(persist) {
|
|
4569
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
|
4570
|
+
};
|
|
4571
|
+
self2.disableAll = function(persist) {
|
|
4572
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
|
4573
|
+
};
|
|
4574
|
+
self2.rebuild = function() {
|
|
4575
|
+
if (defaultLogger !== self2) {
|
|
4576
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
4577
|
+
}
|
|
4578
|
+
replaceLoggingMethods.call(self2);
|
|
4579
|
+
if (defaultLogger === self2) {
|
|
4580
|
+
for (var childName in _loggersByName) {
|
|
4581
|
+
_loggersByName[childName].rebuild();
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
};
|
|
4585
|
+
inheritedLevel = normalizeLevel(
|
|
4586
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
4587
|
+
);
|
|
4588
|
+
var initialLevel = getPersistedLevel();
|
|
4589
|
+
if (initialLevel != null) {
|
|
4590
|
+
userLevel = normalizeLevel(initialLevel);
|
|
4591
|
+
}
|
|
4592
|
+
replaceLoggingMethods.call(self2);
|
|
4593
|
+
}
|
|
4594
|
+
defaultLogger = new Logger();
|
|
4595
|
+
defaultLogger.getLogger = function getLogger(name2) {
|
|
4596
|
+
if (typeof name2 !== "symbol" && typeof name2 !== "string" || name2 === "") {
|
|
4597
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
4598
|
+
}
|
|
4599
|
+
var logger = _loggersByName[name2];
|
|
4600
|
+
if (!logger) {
|
|
4601
|
+
logger = _loggersByName[name2] = new Logger(
|
|
4602
|
+
name2,
|
|
4603
|
+
defaultLogger.methodFactory
|
|
4604
|
+
);
|
|
4605
|
+
}
|
|
4606
|
+
return logger;
|
|
4607
|
+
};
|
|
4608
|
+
var _log = typeof window !== undefinedType2 ? window.log : void 0;
|
|
4609
|
+
defaultLogger.noConflict = function() {
|
|
4610
|
+
if (typeof window !== undefinedType2 && window.log === defaultLogger) {
|
|
4611
|
+
window.log = _log;
|
|
4612
|
+
}
|
|
4613
|
+
return defaultLogger;
|
|
4614
|
+
};
|
|
4615
|
+
defaultLogger.getLoggers = function getLoggers2() {
|
|
4616
|
+
return _loggersByName;
|
|
4617
|
+
};
|
|
4618
|
+
defaultLogger["default"] = defaultLogger;
|
|
4619
|
+
return defaultLogger;
|
|
4620
|
+
});
|
|
4621
|
+
})(loglevel);
|
|
4622
|
+
var loglevelExports = loglevel.exports;
|
|
4623
|
+
const log$5 = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
|
|
4372
4624
|
const DEFAULT_DARK_COLOR = [50, 50, 50];
|
|
4373
4625
|
const DEFAULT_LIGHT_COLOR$3 = [200, 200, 200];
|
|
4374
4626
|
const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
|
@@ -8783,7 +9035,7 @@ function upgradeFrom1_0_14(config2) {
|
|
|
8783
9035
|
Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
|
|
8784
9036
|
var _a2;
|
|
8785
9037
|
if ((_a2 = viewDef.props) == null ? void 0 : _a2[oldProp]) {
|
|
8786
|
-
|
|
9038
|
+
log$5.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
|
|
8787
9039
|
}
|
|
8788
9040
|
});
|
|
8789
9041
|
});
|
|
@@ -8806,7 +9058,7 @@ function upgradeFrom1_0_15(config2) {
|
|
|
8806
9058
|
Object.entries(coordinationScopes).forEach(([coordinationType, coordinationScope]) => {
|
|
8807
9059
|
if (!Array.isArray(coordinationScope) && typeof coordinationScope === "object") {
|
|
8808
9060
|
if (coordinationType === "dataset") {
|
|
8809
|
-
|
|
9061
|
+
log$5.error("Expected coordinationScopes.dataset value to be either string or string[], but got object.");
|
|
8810
9062
|
}
|
|
8811
9063
|
coordinationScopesBy.dataset[coordinationType] = coordinationScope;
|
|
8812
9064
|
} else if (Array.isArray(coordinationScope) || typeof coordinationScope === "string") {
|
|
@@ -11018,7 +11270,9 @@ const ViewType$1 = {
|
|
|
11018
11270
|
DOT_PLOT: "dotPlot",
|
|
11019
11271
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
11020
11272
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
11021
|
-
LINK_CONTROLLER: "linkController"
|
|
11273
|
+
LINK_CONTROLLER: "linkController",
|
|
11274
|
+
DUAL_SCATTERPLOT: "dualScatterplot",
|
|
11275
|
+
TREEMAP: "treemap"
|
|
11022
11276
|
};
|
|
11023
11277
|
const DataType$2 = {
|
|
11024
11278
|
OBS_LABELS: "obsLabels",
|
|
@@ -11072,6 +11326,7 @@ const FileType$1 = {
|
|
|
11072
11326
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
11073
11327
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
11074
11328
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
|
11329
|
+
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
|
11075
11330
|
// AnnData - zipped
|
|
11076
11331
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
|
11077
11332
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
|
@@ -11084,6 +11339,7 @@ const FileType$1 = {
|
|
|
11084
11339
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
|
11085
11340
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
11086
11341
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
11342
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
|
11087
11343
|
// AnnData - h5ad via reference spec
|
|
11088
11344
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
11089
11345
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
@@ -11096,6 +11352,7 @@ const FileType$1 = {
|
|
|
11096
11352
|
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
|
11097
11353
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
11098
11354
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
11355
|
+
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
|
11099
11356
|
// SpatialData
|
|
11100
11357
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
11101
11358
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -11197,15 +11454,23 @@ const CoordinationType$1 = {
|
|
|
11197
11454
|
HEATMAP_ZOOM_Y: "heatmapZoomY",
|
|
11198
11455
|
HEATMAP_TARGET_X: "heatmapTargetX",
|
|
11199
11456
|
HEATMAP_TARGET_Y: "heatmapTargetY",
|
|
11200
|
-
OBS_FILTER: "obsFilter",
|
|
11201
11457
|
OBS_HIGHLIGHT: "obsHighlight",
|
|
11458
|
+
OBS_SELECTION: "obsSelection",
|
|
11202
11459
|
OBS_SET_SELECTION: "obsSetSelection",
|
|
11460
|
+
OBS_SELECTION_MODE: "obsSelectionMode",
|
|
11461
|
+
OBS_FILTER: "obsFilter",
|
|
11462
|
+
OBS_SET_FILTER: "obsSetFilter",
|
|
11463
|
+
OBS_FILTER_MODE: "obsFilterMode",
|
|
11203
11464
|
OBS_SET_HIGHLIGHT: "obsSetHighlight",
|
|
11204
11465
|
OBS_SET_EXPANSION: "obsSetExpansion",
|
|
11205
11466
|
OBS_SET_COLOR: "obsSetColor",
|
|
11206
|
-
FEATURE_FILTER: "featureFilter",
|
|
11207
11467
|
FEATURE_HIGHLIGHT: "featureHighlight",
|
|
11208
11468
|
FEATURE_SELECTION: "featureSelection",
|
|
11469
|
+
FEATURE_SET_SELECTION: "featureSetSelection",
|
|
11470
|
+
FEATURE_SELECTION_MODE: "featureSelectionMode",
|
|
11471
|
+
FEATURE_FILTER: "featureFilter",
|
|
11472
|
+
FEATURE_SET_FILTER: "featureSetFilter",
|
|
11473
|
+
FEATURE_FILTER_MODE: "featureFilterMode",
|
|
11209
11474
|
FEATURE_VALUE_COLORMAP: "featureValueColormap",
|
|
11210
11475
|
FEATURE_VALUE_TRANSFORM: "featureValueTransform",
|
|
11211
11476
|
FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
|
|
@@ -11272,14 +11537,22 @@ const CoordinationType$1 = {
|
|
|
11272
11537
|
SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
|
|
11273
11538
|
// Multi-sample / comparative
|
|
11274
11539
|
SAMPLE_TYPE: "sampleType",
|
|
11540
|
+
SAMPLE_SELECTION: "sampleSelection",
|
|
11275
11541
|
SAMPLE_SET_SELECTION: "sampleSetSelection",
|
|
11542
|
+
SAMPLE_SELECTION_MODE: "sampleSelectionMode",
|
|
11543
|
+
SAMPLE_FILTER: "sampleFilter",
|
|
11544
|
+
SAMPLE_SET_FILTER: "sampleSetFilter",
|
|
11545
|
+
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
|
11276
11546
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
|
11547
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
|
11277
11548
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
|
11278
11549
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
|
11279
11550
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
|
11280
11551
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
11281
11552
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
11282
|
-
CONTOUR_COLOR: "contourColor"
|
|
11553
|
+
CONTOUR_COLOR: "contourColor",
|
|
11554
|
+
// Treemap
|
|
11555
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
11283
11556
|
};
|
|
11284
11557
|
const ViewHelpMapping = {
|
|
11285
11558
|
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).",
|
|
@@ -11296,7 +11569,8 @@ const ViewHelpMapping = {
|
|
|
11296
11569
|
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).",
|
|
11297
11570
|
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
|
11298
11571
|
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).",
|
|
11299
|
-
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."
|
|
11572
|
+
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.",
|
|
11573
|
+
TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering."
|
|
11300
11574
|
};
|
|
11301
11575
|
const COMPONENT_COORDINATION_TYPES = {
|
|
11302
11576
|
[ViewType$1.SCATTERPLOT]: [
|
|
@@ -11321,6 +11595,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11321
11595
|
CoordinationType$1.OBS_FILTER,
|
|
11322
11596
|
CoordinationType$1.OBS_HIGHLIGHT,
|
|
11323
11597
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11598
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11324
11599
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11325
11600
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11326
11601
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
|
@@ -11332,6 +11607,50 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11332
11607
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
11333
11608
|
CoordinationType$1.SAMPLE_TYPE,
|
|
11334
11609
|
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
11610
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
11611
|
+
CoordinationType$1.SAMPLE_SET_COLOR,
|
|
11612
|
+
CoordinationType$1.EMBEDDING_POINTS_VISIBLE,
|
|
11613
|
+
CoordinationType$1.EMBEDDING_CONTOURS_VISIBLE,
|
|
11614
|
+
CoordinationType$1.EMBEDDING_CONTOURS_FILLED,
|
|
11615
|
+
CoordinationType$1.EMBEDDING_CONTOUR_PERCENTILES,
|
|
11616
|
+
CoordinationType$1.CONTOUR_COLOR_ENCODING,
|
|
11617
|
+
CoordinationType$1.CONTOUR_COLOR
|
|
11618
|
+
],
|
|
11619
|
+
[ViewType$1.DUAL_SCATTERPLOT]: [
|
|
11620
|
+
CoordinationType$1.DATASET,
|
|
11621
|
+
CoordinationType$1.OBS_TYPE,
|
|
11622
|
+
CoordinationType$1.FEATURE_TYPE,
|
|
11623
|
+
CoordinationType$1.FEATURE_VALUE_TYPE,
|
|
11624
|
+
CoordinationType$1.OBS_LABELS_TYPE,
|
|
11625
|
+
CoordinationType$1.EMBEDDING_TYPE,
|
|
11626
|
+
CoordinationType$1.EMBEDDING_ZOOM,
|
|
11627
|
+
CoordinationType$1.EMBEDDING_ROTATION,
|
|
11628
|
+
CoordinationType$1.EMBEDDING_TARGET_X,
|
|
11629
|
+
CoordinationType$1.EMBEDDING_TARGET_Y,
|
|
11630
|
+
CoordinationType$1.EMBEDDING_TARGET_Z,
|
|
11631
|
+
CoordinationType$1.EMBEDDING_OBS_SET_POLYGONS_VISIBLE,
|
|
11632
|
+
CoordinationType$1.EMBEDDING_OBS_SET_LABELS_VISIBLE,
|
|
11633
|
+
CoordinationType$1.EMBEDDING_OBS_SET_LABEL_SIZE,
|
|
11634
|
+
CoordinationType$1.EMBEDDING_OBS_RADIUS,
|
|
11635
|
+
CoordinationType$1.EMBEDDING_OBS_RADIUS_MODE,
|
|
11636
|
+
CoordinationType$1.EMBEDDING_OBS_OPACITY,
|
|
11637
|
+
CoordinationType$1.EMBEDDING_OBS_OPACITY_MODE,
|
|
11638
|
+
CoordinationType$1.OBS_FILTER,
|
|
11639
|
+
CoordinationType$1.OBS_HIGHLIGHT,
|
|
11640
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
|
11641
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11642
|
+
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11643
|
+
CoordinationType$1.OBS_SET_COLOR,
|
|
11644
|
+
CoordinationType$1.FEATURE_HIGHLIGHT,
|
|
11645
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
11646
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
11647
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
11648
|
+
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
11649
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
11650
|
+
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
11651
|
+
CoordinationType$1.SAMPLE_TYPE,
|
|
11652
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
11653
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
11335
11654
|
CoordinationType$1.SAMPLE_SET_COLOR,
|
|
11336
11655
|
CoordinationType$1.EMBEDDING_POINTS_VISIBLE,
|
|
11337
11656
|
CoordinationType$1.EMBEDDING_CONTOURS_VISIBLE,
|
|
@@ -11398,6 +11717,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11398
11717
|
CoordinationType$1.OBS_FILTER,
|
|
11399
11718
|
CoordinationType$1.OBS_HIGHLIGHT,
|
|
11400
11719
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11720
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11401
11721
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11402
11722
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11403
11723
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
|
@@ -11434,6 +11754,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11434
11754
|
CoordinationType$1.OBS_FILTER,
|
|
11435
11755
|
CoordinationType$1.OBS_HIGHLIGHT,
|
|
11436
11756
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11757
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11437
11758
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11438
11759
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11439
11760
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
|
@@ -11493,6 +11814,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11493
11814
|
CoordinationType$1.OBS_FILTER,
|
|
11494
11815
|
CoordinationType$1.OBS_HIGHLIGHT,
|
|
11495
11816
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11817
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11496
11818
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11497
11819
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11498
11820
|
CoordinationType$1.FEATURE_FILTER,
|
|
@@ -11508,6 +11830,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11508
11830
|
CoordinationType$1.DATASET,
|
|
11509
11831
|
CoordinationType$1.OBS_TYPE,
|
|
11510
11832
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11833
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11511
11834
|
CoordinationType$1.OBS_SET_EXPANSION,
|
|
11512
11835
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11513
11836
|
CoordinationType$1.OBS_SET_COLOR,
|
|
@@ -11519,6 +11842,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11519
11842
|
CoordinationType$1.DATASET,
|
|
11520
11843
|
CoordinationType$1.OBS_TYPE,
|
|
11521
11844
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11845
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11522
11846
|
CoordinationType$1.OBS_SET_EXPANSION,
|
|
11523
11847
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11524
11848
|
CoordinationType$1.OBS_SET_COLOR,
|
|
@@ -11551,6 +11875,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11551
11875
|
CoordinationType$1.FEATURE_VALUE_TRANSFORM,
|
|
11552
11876
|
CoordinationType$1.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
|
|
11553
11877
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
11878
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11554
11879
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11555
11880
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11556
11881
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
@@ -11567,7 +11892,8 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11567
11892
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
11568
11893
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11569
11894
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
11570
|
-
CoordinationType$1.OBS_SET_SELECTION
|
|
11895
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
|
11896
|
+
CoordinationType$1.OBS_SET_FILTER
|
|
11571
11897
|
],
|
|
11572
11898
|
[ViewType$1.LAYER_CONTROLLER]: [
|
|
11573
11899
|
CoordinationType$1.DATASET,
|
|
@@ -11682,11 +12008,13 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11682
12008
|
CoordinationType$1.FEATURE_VALUE_POSITIVITY_THRESHOLD,
|
|
11683
12009
|
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
11684
12010
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
12011
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
11685
12012
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
11686
12013
|
CoordinationType$1.OBS_SET_COLOR,
|
|
11687
12014
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
11688
12015
|
CoordinationType$1.SAMPLE_TYPE,
|
|
11689
12016
|
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
12017
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
11690
12018
|
CoordinationType$1.SAMPLE_SET_COLOR
|
|
11691
12019
|
],
|
|
11692
12020
|
higlass: [
|
|
@@ -11717,8 +12045,37 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11717
12045
|
[ViewType$1.LINK_CONTROLLER]: [],
|
|
11718
12046
|
[ViewType$1.BIOMARKER_SELECT]: [
|
|
11719
12047
|
CoordinationType$1.FEATURE_SELECTION,
|
|
11720
|
-
CoordinationType$1.SAMPLE_SET_SELECTION
|
|
12048
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
12049
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
12050
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
|
12051
|
+
CoordinationType$1.OBS_SET_FILTER
|
|
11721
12052
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
12053
|
+
],
|
|
12054
|
+
[ViewType$1.TREEMAP]: [
|
|
12055
|
+
CoordinationType$1.DATASET,
|
|
12056
|
+
CoordinationType$1.OBS_TYPE,
|
|
12057
|
+
CoordinationType$1.FEATURE_TYPE,
|
|
12058
|
+
CoordinationType$1.FEATURE_VALUE_TYPE,
|
|
12059
|
+
CoordinationType$1.OBS_FILTER,
|
|
12060
|
+
CoordinationType$1.OBS_HIGHLIGHT,
|
|
12061
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
|
12062
|
+
CoordinationType$1.OBS_SET_FILTER,
|
|
12063
|
+
CoordinationType$1.OBS_SELECTION,
|
|
12064
|
+
CoordinationType$1.OBS_SELECTION_MODE,
|
|
12065
|
+
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
12066
|
+
CoordinationType$1.OBS_SET_COLOR,
|
|
12067
|
+
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
12068
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
12069
|
+
CoordinationType$1.SAMPLE_TYPE,
|
|
12070
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
12071
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
12072
|
+
CoordinationType$1.SAMPLE_SET_COLOR,
|
|
12073
|
+
CoordinationType$1.SAMPLE_SELECTION,
|
|
12074
|
+
CoordinationType$1.SAMPLE_SELECTION_MODE,
|
|
12075
|
+
CoordinationType$1.SAMPLE_FILTER,
|
|
12076
|
+
CoordinationType$1.SAMPLE_FILTER_MODE,
|
|
12077
|
+
CoordinationType$1.SAMPLE_HIGHLIGHT,
|
|
12078
|
+
CoordinationType$1.HIERARCHY_LEVELS
|
|
11722
12079
|
]
|
|
11723
12080
|
};
|
|
11724
12081
|
const ViewType = {
|
|
@@ -11887,7 +12244,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
11887
12244
|
const oldKeys = Object.keys(oldObj);
|
|
11888
12245
|
const propKey = String(prop);
|
|
11889
12246
|
if (oldKeys.includes(propKey)) {
|
|
11890
|
-
|
|
12247
|
+
log$5.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
|
11891
12248
|
${oldObj[propKey][1]}`);
|
|
11892
12249
|
return oldObj[propKey];
|
|
11893
12250
|
}
|
|
@@ -11985,6 +12342,9 @@ const annDataObsSetsArr = z.array(z.object({
|
|
|
11985
12342
|
z.object({
|
|
11986
12343
|
obsSets: annDataObsSetsArr
|
|
11987
12344
|
});
|
|
12345
|
+
z.object({
|
|
12346
|
+
sampleSets: annDataObsSetsArr
|
|
12347
|
+
});
|
|
11988
12348
|
const annDataObsFeatureColumnsArr = z.array(z.object({
|
|
11989
12349
|
path: z.string()
|
|
11990
12350
|
}));
|
|
@@ -19025,7 +19385,7 @@ function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetS
|
|
|
19025
19385
|
sampleSetKeys.forEach((sampleSetKey) => {
|
|
19026
19386
|
const finalInsertionIndex = result.get(cellSetKey).get(sampleSetKey).get("i");
|
|
19027
19387
|
if (finalInsertionIndex !== result.get(cellSetKey).get(sampleSetKey).get("obsIndex").length) {
|
|
19028
|
-
|
|
19388
|
+
log$5.warn("The final insertion index is lower than expected.");
|
|
19029
19389
|
}
|
|
19030
19390
|
result.get(cellSetKey).get(sampleSetKey).delete("i");
|
|
19031
19391
|
});
|
|
@@ -123983,16 +124343,16 @@ function addDecoder(cases, importFn) {
|
|
|
123983
124343
|
}
|
|
123984
124344
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
123985
124345
|
}
|
|
123986
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
123987
|
-
addDecoder(5, () => import("./lzw-
|
|
124346
|
+
addDecoder([void 0, 1], () => import("./raw-3928687d.js").then((m2) => m2.default));
|
|
124347
|
+
addDecoder(5, () => import("./lzw-4b6e12be.js").then((m2) => m2.default));
|
|
123988
124348
|
addDecoder(6, () => {
|
|
123989
124349
|
throw new Error("old style JPEG compression is not supported.");
|
|
123990
124350
|
});
|
|
123991
|
-
addDecoder(7, () => import("./jpeg-
|
|
123992
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
123993
|
-
addDecoder(32773, () => import("./packbits-
|
|
123994
|
-
addDecoder(34887, () => import("./lerc-
|
|
123995
|
-
addDecoder(50001, () => import("./webimage-
|
|
124351
|
+
addDecoder(7, () => import("./jpeg-db1f9adb.js").then((m2) => m2.default));
|
|
124352
|
+
addDecoder([8, 32946], () => import("./deflate-7ff395f6.js").then((m2) => m2.default));
|
|
124353
|
+
addDecoder(32773, () => import("./packbits-61eb655b.js").then((m2) => m2.default));
|
|
124354
|
+
addDecoder(34887, () => import("./lerc-9859e1c5.js").then((m2) => m2.default));
|
|
124355
|
+
addDecoder(50001, () => import("./webimage-62020543.js").then((m2) => m2.default));
|
|
123996
124356
|
function decodeRowAcc(row, stride) {
|
|
123997
124357
|
let length2 = row.length - stride;
|
|
123998
124358
|
let offset5 = 0;
|
|
@@ -134049,10 +134409,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
|
|
|
134049
134409
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
|
134050
134410
|
const colorTexHeight = Math.max(2, Math.ceil(totalColorsLength / texSize));
|
|
134051
134411
|
if (valueTexHeight > texSize) {
|
|
134052
|
-
|
|
134412
|
+
log$5.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
|
|
134053
134413
|
}
|
|
134054
134414
|
if (colorTexHeight > texSize) {
|
|
134055
|
-
|
|
134415
|
+
log$5.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
|
|
134056
134416
|
}
|
|
134057
134417
|
const totalData = new Uint8Array(texSize * valueTexHeight);
|
|
134058
134418
|
const totalColors = new Uint8Array(texSize * colorTexHeight);
|
|
@@ -148134,7 +148494,9 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
148134
148494
|
title: titleOverride,
|
|
148135
148495
|
helpText = ViewHelpMapping.SCATTERPLOT,
|
|
148136
148496
|
// Average fill density for dynamic opacity calculation.
|
|
148137
|
-
averageFillDensity
|
|
148497
|
+
averageFillDensity,
|
|
148498
|
+
// For the dual scatterplot:
|
|
148499
|
+
sampleSetSelection: sampleSetSelectionFromProps
|
|
148138
148500
|
} = props;
|
|
148139
148501
|
const loaders = useLoaders();
|
|
148140
148502
|
const setComponentHover = useSetComponentHover();
|
|
@@ -148167,7 +148529,7 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
148167
148529
|
featureValueColormap: geneExpressionColormap,
|
|
148168
148530
|
featureValueColormapRange: geneExpressionColormapRange,
|
|
148169
148531
|
tooltipsVisible,
|
|
148170
|
-
sampleSetSelection,
|
|
148532
|
+
sampleSetSelection: sampleSetSelectionFromCoordination,
|
|
148171
148533
|
sampleSetColor,
|
|
148172
148534
|
embeddingPointsVisible,
|
|
148173
148535
|
embeddingContoursVisible,
|
|
@@ -148211,6 +148573,7 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
148211
148573
|
coordinationScopes
|
|
148212
148574
|
);
|
|
148213
148575
|
const observationsLabel = observationsLabelOverride || obsType;
|
|
148576
|
+
const sampleSetSelection = sampleSetSelectionFromProps || sampleSetSelectionFromCoordination;
|
|
148214
148577
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
148215
148578
|
const title = titleOverride || `Scatterplot (${mapping})`;
|
|
148216
148579
|
const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(
|
|
@@ -148677,8 +149040,38 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
148677
149040
|
}
|
|
148678
149041
|
);
|
|
148679
149042
|
}
|
|
149043
|
+
function DualEmbeddingScatterplotSubscriber(props) {
|
|
149044
|
+
const {
|
|
149045
|
+
uuid,
|
|
149046
|
+
coordinationScopes
|
|
149047
|
+
} = props;
|
|
149048
|
+
const [{
|
|
149049
|
+
sampleSetSelection
|
|
149050
|
+
}] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.DUAL_SCATTERPLOT], coordinationScopes);
|
|
149051
|
+
const caseSampleSetSelection = useMemo(() => (sampleSetSelection == null ? void 0 : sampleSetSelection[0]) ? [sampleSetSelection[0]] : null, [sampleSetSelection]);
|
|
149052
|
+
const ctrlSampleSetSelection = useMemo(() => (sampleSetSelection == null ? void 0 : sampleSetSelection[1]) ? [sampleSetSelection[1]] : null, [sampleSetSelection]);
|
|
149053
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "100%", height: "100%", display: "flex", flexDirection: "row" }, children: [
|
|
149054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
149055
|
+
EmbeddingScatterplotSubscriber,
|
|
149056
|
+
{
|
|
149057
|
+
...props,
|
|
149058
|
+
uuid: `${uuid}-case`,
|
|
149059
|
+
sampleSetSelection: caseSampleSetSelection
|
|
149060
|
+
}
|
|
149061
|
+
) }),
|
|
149062
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
149063
|
+
EmbeddingScatterplotSubscriber,
|
|
149064
|
+
{
|
|
149065
|
+
...props,
|
|
149066
|
+
uuid: `${uuid}-ctrl`,
|
|
149067
|
+
sampleSetSelection: ctrlSampleSetSelection
|
|
149068
|
+
}
|
|
149069
|
+
) })
|
|
149070
|
+
] });
|
|
149071
|
+
}
|
|
148680
149072
|
export {
|
|
148681
149073
|
BaseDecoder as B,
|
|
149074
|
+
DualEmbeddingScatterplotSubscriber as D,
|
|
148682
149075
|
EmbeddingScatterplotSubscriber as E,
|
|
148683
149076
|
getDefaultExportFromCjs as g
|
|
148684
149077
|
};
|
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-6931089e.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A subscriber component for a pair of embedding scatterplots.
|
|
3
|
+
* This dual implementation
|
|
4
|
+
* interprets a user specification of a pair of CoordinationType.SAMPLE_SET_FILTER
|
|
5
|
+
* coordination types to stratify of the data.
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {number} props.uuid The unique identifier for this component.
|
|
8
|
+
* @param {string} props.theme The current theme name.
|
|
9
|
+
* @param {object} props.coordinationScopes The mapping from coordination types to coordination
|
|
10
|
+
* scopes.
|
|
11
|
+
* @param {function} props.removeGridComponent The callback function to pass to TitleInfo,
|
|
12
|
+
* to call when the component has been removed from the grid.
|
|
13
|
+
* @param {string} props.title An override value for the component title.
|
|
14
|
+
* @param {number} props.averageFillDensity Override the average fill density calculation
|
|
15
|
+
* when using dynamic opacity mode.
|
|
16
|
+
*/
|
|
17
|
+
export function DualEmbeddingScatterplotSubscriber(props: {
|
|
18
|
+
uuid: number;
|
|
19
|
+
theme: string;
|
|
20
|
+
coordinationScopes: object;
|
|
21
|
+
removeGridComponent: Function;
|
|
22
|
+
title: string;
|
|
23
|
+
averageFillDensity: number;
|
|
24
|
+
}): JSX.Element;
|
|
25
|
+
//# sourceMappingURL=DualEmbeddingScatterplotSubscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DualEmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/DualEmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH,0DAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAyCA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { useCoordination, } from '@vitessce/vit-s';
|
|
4
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
5
|
+
import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber.js';
|
|
6
|
+
/**
|
|
7
|
+
* A subscriber component for a pair of embedding scatterplots.
|
|
8
|
+
* This dual implementation
|
|
9
|
+
* interprets a user specification of a pair of CoordinationType.SAMPLE_SET_FILTER
|
|
10
|
+
* coordination types to stratify of the data.
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {number} props.uuid The unique identifier for this component.
|
|
13
|
+
* @param {string} props.theme The current theme name.
|
|
14
|
+
* @param {object} props.coordinationScopes The mapping from coordination types to coordination
|
|
15
|
+
* scopes.
|
|
16
|
+
* @param {function} props.removeGridComponent The callback function to pass to TitleInfo,
|
|
17
|
+
* to call when the component has been removed from the grid.
|
|
18
|
+
* @param {string} props.title An override value for the component title.
|
|
19
|
+
* @param {number} props.averageFillDensity Override the average fill density calculation
|
|
20
|
+
* when using dynamic opacity mode.
|
|
21
|
+
*/
|
|
22
|
+
export function DualEmbeddingScatterplotSubscriber(props) {
|
|
23
|
+
const { uuid, coordinationScopes, } = props;
|
|
24
|
+
// Get "props" from the coordination space.
|
|
25
|
+
const [{ sampleSetSelection, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.DUAL_SCATTERPLOT], coordinationScopes);
|
|
26
|
+
const caseSampleSetSelection = useMemo(() => (sampleSetSelection?.[0]
|
|
27
|
+
? [sampleSetSelection[0]]
|
|
28
|
+
: null), [sampleSetSelection]);
|
|
29
|
+
const ctrlSampleSetSelection = useMemo(() => (sampleSetSelection?.[1]
|
|
30
|
+
? [sampleSetSelection[1]]
|
|
31
|
+
: null), [sampleSetSelection]);
|
|
32
|
+
return (_jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'row' }, children: [_jsx("div", { style: { width: '50%', display: 'flex', flexDirection: 'column' }, children: _jsx(EmbeddingScatterplotSubscriber, { ...props, uuid: `${uuid}-case`, sampleSetSelection: caseSampleSetSelection }) }), _jsx("div", { style: { width: '50%', display: 'flex', flexDirection: 'column' }, children: _jsx(EmbeddingScatterplotSubscriber, { ...props, uuid: `${uuid}-ctrl`, sampleSetSelection: ctrlSampleSetSelection }) })] }));
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;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,
|
|
1
|
+
{"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;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,eAwhBA"}
|
|
@@ -25,14 +25,18 @@ import { DEFAULT_CONTOUR_PERCENTILES } from './constants.js';
|
|
|
25
25
|
export function EmbeddingScatterplotSubscriber(props) {
|
|
26
26
|
const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, observationsLabelOverride, title: titleOverride, helpText = ViewHelpMapping.SCATTERPLOT,
|
|
27
27
|
// Average fill density for dynamic opacity calculation.
|
|
28
|
-
averageFillDensity,
|
|
28
|
+
averageFillDensity,
|
|
29
|
+
// For the dual scatterplot:
|
|
30
|
+
sampleSetSelection: sampleSetSelectionFromProps, } = props;
|
|
29
31
|
const loaders = useLoaders();
|
|
30
32
|
const setComponentHover = useSetComponentHover();
|
|
31
33
|
const setComponentViewInfo = useSetComponentViewInfo(uuid);
|
|
32
34
|
// Get "props" from the coordination space.
|
|
33
|
-
const [{ dataset, obsType, featureType, featureValueType, sampleType, embeddingZoom: zoom, embeddingTargetX: targetX, embeddingTargetY: targetY, embeddingTargetZ: targetZ, embeddingType: mapping, obsFilter: cellFilter, obsHighlight: cellHighlight, featureSelection: geneSelection, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, embeddingObsSetPolygonsVisible: cellSetPolygonsVisible, embeddingObsSetLabelsVisible: cellSetLabelsVisible, embeddingObsSetLabelSize: cellSetLabelSize, embeddingObsRadius: cellRadiusFixed, embeddingObsRadiusMode: cellRadiusMode, embeddingObsOpacity: cellOpacityFixed, embeddingObsOpacityMode: cellOpacityMode, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, tooltipsVisible, sampleSetSelection, sampleSetColor, embeddingPointsVisible, embeddingContoursVisible, embeddingContoursFilled, embeddingContourPercentiles: contourPercentiles, contourColorEncoding, contourColor, }, { setEmbeddingZoom: setZoom, setEmbeddingTargetX: setTargetX, setEmbeddingTargetY: setTargetY, setEmbeddingTargetZ: setTargetZ, setObsFilter: setCellFilter, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setEmbeddingObsSetPolygonsVisible: setCellSetPolygonsVisible, setEmbeddingObsSetLabelsVisible: setCellSetLabelsVisible, setEmbeddingObsSetLabelSize: setCellSetLabelSize, setEmbeddingObsRadius: setCellRadiusFixed, setEmbeddingObsRadiusMode: setCellRadiusMode, setEmbeddingObsOpacity: setCellOpacityFixed, setEmbeddingObsOpacityMode: setCellOpacityMode, setFeatureValueColormap: setGeneExpressionColormap, setFeatureValueColormapRange: setGeneExpressionColormapRange, setTooltipsVisible, setEmbeddingPointsVisible, setEmbeddingContoursVisible, setEmbeddingContoursFilled, setEmbeddingContourPercentiles: setContourPercentiles, setContourColorEncoding, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.SCATTERPLOT], coordinationScopes);
|
|
35
|
+
const [{ dataset, obsType, featureType, featureValueType, sampleType, embeddingZoom: zoom, embeddingTargetX: targetX, embeddingTargetY: targetY, embeddingTargetZ: targetZ, embeddingType: mapping, obsFilter: cellFilter, obsHighlight: cellHighlight, featureSelection: geneSelection, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, embeddingObsSetPolygonsVisible: cellSetPolygonsVisible, embeddingObsSetLabelsVisible: cellSetLabelsVisible, embeddingObsSetLabelSize: cellSetLabelSize, embeddingObsRadius: cellRadiusFixed, embeddingObsRadiusMode: cellRadiusMode, embeddingObsOpacity: cellOpacityFixed, embeddingObsOpacityMode: cellOpacityMode, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, tooltipsVisible, sampleSetSelection: sampleSetSelectionFromCoordination, sampleSetColor, embeddingPointsVisible, embeddingContoursVisible, embeddingContoursFilled, embeddingContourPercentiles: contourPercentiles, contourColorEncoding, contourColor, }, { setEmbeddingZoom: setZoom, setEmbeddingTargetX: setTargetX, setEmbeddingTargetY: setTargetY, setEmbeddingTargetZ: setTargetZ, setObsFilter: setCellFilter, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setEmbeddingObsSetPolygonsVisible: setCellSetPolygonsVisible, setEmbeddingObsSetLabelsVisible: setCellSetLabelsVisible, setEmbeddingObsSetLabelSize: setCellSetLabelSize, setEmbeddingObsRadius: setCellRadiusFixed, setEmbeddingObsRadiusMode: setCellRadiusMode, setEmbeddingObsOpacity: setCellOpacityFixed, setEmbeddingObsOpacityMode: setCellOpacityMode, setFeatureValueColormap: setGeneExpressionColormap, setFeatureValueColormapRange: setGeneExpressionColormapRange, setTooltipsVisible, setEmbeddingPointsVisible, setEmbeddingContoursVisible, setEmbeddingContoursFilled, setEmbeddingContourPercentiles: setContourPercentiles, setContourColorEncoding, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.SCATTERPLOT], coordinationScopes);
|
|
34
36
|
const { embeddingZoom: initialZoom, embeddingTargetX: initialTargetX, embeddingTargetY: initialTargetY, } = useInitialCoordination(COMPONENT_COORDINATION_TYPES[ViewType.SCATTERPLOT], coordinationScopes);
|
|
35
37
|
const observationsLabel = observationsLabelOverride || obsType;
|
|
38
|
+
const sampleSetSelection = (sampleSetSelectionFromProps
|
|
39
|
+
|| sampleSetSelectionFromCoordination);
|
|
36
40
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
37
41
|
const title = titleOverride || `Scatterplot (${mapping})`;
|
|
38
42
|
const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
|
package/dist-tsc/index.d.ts
CHANGED
package/dist-tsc/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-embedding",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
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.5.
|
|
24
|
-
"@vitessce/legend": "3.5.
|
|
25
|
-
"@vitessce/scatterplot": "3.5.
|
|
26
|
-
"@vitessce/sets-utils": "3.5.
|
|
27
|
-
"@vitessce/utils": "3.5.
|
|
28
|
-
"@vitessce/vit-s": "3.5.
|
|
23
|
+
"@vitessce/constants-internal": "3.5.7",
|
|
24
|
+
"@vitessce/legend": "3.5.7",
|
|
25
|
+
"@vitessce/scatterplot": "3.5.7",
|
|
26
|
+
"@vitessce/sets-utils": "3.5.7",
|
|
27
|
+
"@vitessce/utils": "3.5.7",
|
|
28
|
+
"@vitessce/vit-s": "3.5.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "^18.0.0",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
useCoordination,
|
|
4
|
+
} from '@vitessce/vit-s';
|
|
5
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
6
|
+
import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber.js';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A subscriber component for a pair of embedding scatterplots.
|
|
11
|
+
* This dual implementation
|
|
12
|
+
* interprets a user specification of a pair of CoordinationType.SAMPLE_SET_FILTER
|
|
13
|
+
* coordination types to stratify of the data.
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {number} props.uuid The unique identifier for this component.
|
|
16
|
+
* @param {string} props.theme The current theme name.
|
|
17
|
+
* @param {object} props.coordinationScopes The mapping from coordination types to coordination
|
|
18
|
+
* scopes.
|
|
19
|
+
* @param {function} props.removeGridComponent The callback function to pass to TitleInfo,
|
|
20
|
+
* to call when the component has been removed from the grid.
|
|
21
|
+
* @param {string} props.title An override value for the component title.
|
|
22
|
+
* @param {number} props.averageFillDensity Override the average fill density calculation
|
|
23
|
+
* when using dynamic opacity mode.
|
|
24
|
+
*/
|
|
25
|
+
export function DualEmbeddingScatterplotSubscriber(props) {
|
|
26
|
+
const {
|
|
27
|
+
uuid,
|
|
28
|
+
coordinationScopes,
|
|
29
|
+
} = props;
|
|
30
|
+
|
|
31
|
+
// Get "props" from the coordination space.
|
|
32
|
+
const [{
|
|
33
|
+
sampleSetSelection,
|
|
34
|
+
}] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.DUAL_SCATTERPLOT], coordinationScopes);
|
|
35
|
+
|
|
36
|
+
const caseSampleSetSelection = useMemo(() => (
|
|
37
|
+
sampleSetSelection?.[0]
|
|
38
|
+
? [sampleSetSelection[0]]
|
|
39
|
+
: null
|
|
40
|
+
), [sampleSetSelection]);
|
|
41
|
+
const ctrlSampleSetSelection = useMemo(() => (
|
|
42
|
+
sampleSetSelection?.[1]
|
|
43
|
+
? [sampleSetSelection[1]]
|
|
44
|
+
: null
|
|
45
|
+
), [sampleSetSelection]);
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'row' }}>
|
|
49
|
+
<div style={{ width: '50%', display: 'flex', flexDirection: 'column' }}>
|
|
50
|
+
<EmbeddingScatterplotSubscriber
|
|
51
|
+
{...props}
|
|
52
|
+
uuid={`${uuid}-case`}
|
|
53
|
+
sampleSetSelection={caseSampleSetSelection}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
<div style={{ width: '50%', display: 'flex', flexDirection: 'column' }}>
|
|
57
|
+
<EmbeddingScatterplotSubscriber
|
|
58
|
+
{...props}
|
|
59
|
+
uuid={`${uuid}-ctrl`}
|
|
60
|
+
sampleSetSelection={ctrlSampleSetSelection}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -66,6 +66,9 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
66
66
|
helpText = ViewHelpMapping.SCATTERPLOT,
|
|
67
67
|
// Average fill density for dynamic opacity calculation.
|
|
68
68
|
averageFillDensity,
|
|
69
|
+
|
|
70
|
+
// For the dual scatterplot:
|
|
71
|
+
sampleSetSelection: sampleSetSelectionFromProps,
|
|
69
72
|
} = props;
|
|
70
73
|
|
|
71
74
|
const loaders = useLoaders();
|
|
@@ -101,7 +104,7 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
101
104
|
featureValueColormap: geneExpressionColormap,
|
|
102
105
|
featureValueColormapRange: geneExpressionColormapRange,
|
|
103
106
|
tooltipsVisible,
|
|
104
|
-
sampleSetSelection,
|
|
107
|
+
sampleSetSelection: sampleSetSelectionFromCoordination,
|
|
105
108
|
sampleSetColor,
|
|
106
109
|
embeddingPointsVisible,
|
|
107
110
|
embeddingContoursVisible,
|
|
@@ -146,6 +149,10 @@ export function EmbeddingScatterplotSubscriber(props) {
|
|
|
146
149
|
);
|
|
147
150
|
|
|
148
151
|
const observationsLabel = observationsLabelOverride || obsType;
|
|
152
|
+
const sampleSetSelection = (
|
|
153
|
+
sampleSetSelectionFromProps
|
|
154
|
+
|| sampleSetSelectionFromCoordination
|
|
155
|
+
);
|
|
149
156
|
|
|
150
157
|
const [width, height, deckRef] = useDeckCanvasSize();
|
|
151
158
|
|
package/src/index.js
CHANGED