@vitessce/all 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-db3c0a2f.js → deflate-04bafa55.js} +1 -1
- package/dist/{higlass-0ef762be.js → higlass-4fa163b9.js} +1 -1
- package/dist/{index-688bbda8.js → index-0b46e436.js} +2 -2
- package/dist/{index-af9740fa.js → index-1a4d9e84.js} +933 -101
- package/dist/index.js +1 -1
- package/dist/{jpeg-7d2f2798.js → jpeg-6c54524a.js} +1 -1
- package/dist/{lerc-85a406f3.js → lerc-df637713.js} +1 -1
- package/dist/{lzw-ab54a798.js → lzw-bb4fcd5c.js} +1 -1
- package/dist/{packbits-bc646376.js → packbits-8de5f515.js} +1 -1
- package/dist/{raw-5c0afb89.js → raw-13d1e148.js} +1 -1
- package/dist/{troika-three-text.esm-37beeb83.js → troika-three-text.esm-a4aeebaf.js} +1 -1
- package/dist/{webimage-14cbc289.js → webimage-3d32244e.js} +1 -1
- package/dist-tsc/Vitessce.d.ts.map +1 -1
- package/dist-tsc/Vitessce.js +2 -1
- package/dist-tsc/base-plugins.d.ts +3 -3
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +22 -4
- package/package.json +29 -28
- package/src/Vitessce.tsx +2 -1
- package/src/base-plugins.ts +37 -1
@@ -969,6 +969,258 @@ var reactJsxRuntime_development = {};
|
|
969
969
|
jsxRuntime.exports = reactJsxRuntime_development;
|
970
970
|
}
|
971
971
|
var jsxRuntimeExports = jsxRuntime.exports;
|
972
|
+
var loglevel = { exports: {} };
|
973
|
+
(function(module2) {
|
974
|
+
(function(root2, definition2) {
|
975
|
+
if (module2.exports) {
|
976
|
+
module2.exports = definition2();
|
977
|
+
} else {
|
978
|
+
root2.log = definition2();
|
979
|
+
}
|
980
|
+
})(commonjsGlobal$1, function() {
|
981
|
+
var noop2 = function() {
|
982
|
+
};
|
983
|
+
var undefinedType2 = "undefined";
|
984
|
+
var isIE2 = typeof window !== undefinedType2 && typeof window.navigator !== undefinedType2 && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
985
|
+
var logMethods = [
|
986
|
+
"trace",
|
987
|
+
"debug",
|
988
|
+
"info",
|
989
|
+
"warn",
|
990
|
+
"error"
|
991
|
+
];
|
992
|
+
var _loggersByName = {};
|
993
|
+
var defaultLogger = null;
|
994
|
+
function bindMethod(obj, methodName) {
|
995
|
+
var method2 = obj[methodName];
|
996
|
+
if (typeof method2.bind === "function") {
|
997
|
+
return method2.bind(obj);
|
998
|
+
} else {
|
999
|
+
try {
|
1000
|
+
return Function.prototype.bind.call(method2, obj);
|
1001
|
+
} catch (e3) {
|
1002
|
+
return function() {
|
1003
|
+
return Function.prototype.apply.apply(method2, [obj, arguments]);
|
1004
|
+
};
|
1005
|
+
}
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
function traceForIE() {
|
1009
|
+
if (console.log) {
|
1010
|
+
if (console.log.apply) {
|
1011
|
+
console.log.apply(console, arguments);
|
1012
|
+
} else {
|
1013
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
if (console.trace)
|
1017
|
+
console.trace();
|
1018
|
+
}
|
1019
|
+
function realMethod(methodName) {
|
1020
|
+
if (methodName === "debug") {
|
1021
|
+
methodName = "log";
|
1022
|
+
}
|
1023
|
+
if (typeof console === undefinedType2) {
|
1024
|
+
return false;
|
1025
|
+
} else if (methodName === "trace" && isIE2) {
|
1026
|
+
return traceForIE;
|
1027
|
+
} else if (console[methodName] !== void 0) {
|
1028
|
+
return bindMethod(console, methodName);
|
1029
|
+
} else if (console.log !== void 0) {
|
1030
|
+
return bindMethod(console, "log");
|
1031
|
+
} else {
|
1032
|
+
return noop2;
|
1033
|
+
}
|
1034
|
+
}
|
1035
|
+
function replaceLoggingMethods() {
|
1036
|
+
var level = this.getLevel();
|
1037
|
+
for (var i2 = 0; i2 < logMethods.length; i2++) {
|
1038
|
+
var methodName = logMethods[i2];
|
1039
|
+
this[methodName] = i2 < level ? noop2 : this.methodFactory(methodName, level, this.name);
|
1040
|
+
}
|
1041
|
+
this.log = this.debug;
|
1042
|
+
if (typeof console === undefinedType2 && level < this.levels.SILENT) {
|
1043
|
+
return "No console available for logging";
|
1044
|
+
}
|
1045
|
+
}
|
1046
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
1047
|
+
return function() {
|
1048
|
+
if (typeof console !== undefinedType2) {
|
1049
|
+
replaceLoggingMethods.call(this);
|
1050
|
+
this[methodName].apply(this, arguments);
|
1051
|
+
}
|
1052
|
+
};
|
1053
|
+
}
|
1054
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
1055
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
1056
|
+
}
|
1057
|
+
function Logger(name2, factory2) {
|
1058
|
+
var self2 = this;
|
1059
|
+
var inheritedLevel;
|
1060
|
+
var defaultLevel;
|
1061
|
+
var userLevel;
|
1062
|
+
var storageKey = "loglevel";
|
1063
|
+
if (typeof name2 === "string") {
|
1064
|
+
storageKey += ":" + name2;
|
1065
|
+
} else if (typeof name2 === "symbol") {
|
1066
|
+
storageKey = void 0;
|
1067
|
+
}
|
1068
|
+
function persistLevelIfPossible(levelNum) {
|
1069
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
1070
|
+
if (typeof window === undefinedType2 || !storageKey)
|
1071
|
+
return;
|
1072
|
+
try {
|
1073
|
+
window.localStorage[storageKey] = levelName;
|
1074
|
+
return;
|
1075
|
+
} catch (ignore2) {
|
1076
|
+
}
|
1077
|
+
try {
|
1078
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
1079
|
+
} catch (ignore2) {
|
1080
|
+
}
|
1081
|
+
}
|
1082
|
+
function getPersistedLevel() {
|
1083
|
+
var storedLevel;
|
1084
|
+
if (typeof window === undefinedType2 || !storageKey)
|
1085
|
+
return;
|
1086
|
+
try {
|
1087
|
+
storedLevel = window.localStorage[storageKey];
|
1088
|
+
} catch (ignore2) {
|
1089
|
+
}
|
1090
|
+
if (typeof storedLevel === undefinedType2) {
|
1091
|
+
try {
|
1092
|
+
var cookie = window.document.cookie;
|
1093
|
+
var cookieName = encodeURIComponent(storageKey);
|
1094
|
+
var location = cookie.indexOf(cookieName + "=");
|
1095
|
+
if (location !== -1) {
|
1096
|
+
storedLevel = /^([^;]+)/.exec(
|
1097
|
+
cookie.slice(location + cookieName.length + 1)
|
1098
|
+
)[1];
|
1099
|
+
}
|
1100
|
+
} catch (ignore2) {
|
1101
|
+
}
|
1102
|
+
}
|
1103
|
+
if (self2.levels[storedLevel] === void 0) {
|
1104
|
+
storedLevel = void 0;
|
1105
|
+
}
|
1106
|
+
return storedLevel;
|
1107
|
+
}
|
1108
|
+
function clearPersistedLevel() {
|
1109
|
+
if (typeof window === undefinedType2 || !storageKey)
|
1110
|
+
return;
|
1111
|
+
try {
|
1112
|
+
window.localStorage.removeItem(storageKey);
|
1113
|
+
} catch (ignore2) {
|
1114
|
+
}
|
1115
|
+
try {
|
1116
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
1117
|
+
} catch (ignore2) {
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
function normalizeLevel(input) {
|
1121
|
+
var level = input;
|
1122
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
1123
|
+
level = self2.levels[level.toUpperCase()];
|
1124
|
+
}
|
1125
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
1126
|
+
return level;
|
1127
|
+
} else {
|
1128
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
self2.name = name2;
|
1132
|
+
self2.levels = {
|
1133
|
+
"TRACE": 0,
|
1134
|
+
"DEBUG": 1,
|
1135
|
+
"INFO": 2,
|
1136
|
+
"WARN": 3,
|
1137
|
+
"ERROR": 4,
|
1138
|
+
"SILENT": 5
|
1139
|
+
};
|
1140
|
+
self2.methodFactory = factory2 || defaultMethodFactory;
|
1141
|
+
self2.getLevel = function() {
|
1142
|
+
if (userLevel != null) {
|
1143
|
+
return userLevel;
|
1144
|
+
} else if (defaultLevel != null) {
|
1145
|
+
return defaultLevel;
|
1146
|
+
} else {
|
1147
|
+
return inheritedLevel;
|
1148
|
+
}
|
1149
|
+
};
|
1150
|
+
self2.setLevel = function(level, persist) {
|
1151
|
+
userLevel = normalizeLevel(level);
|
1152
|
+
if (persist !== false) {
|
1153
|
+
persistLevelIfPossible(userLevel);
|
1154
|
+
}
|
1155
|
+
return replaceLoggingMethods.call(self2);
|
1156
|
+
};
|
1157
|
+
self2.setDefaultLevel = function(level) {
|
1158
|
+
defaultLevel = normalizeLevel(level);
|
1159
|
+
if (!getPersistedLevel()) {
|
1160
|
+
self2.setLevel(level, false);
|
1161
|
+
}
|
1162
|
+
};
|
1163
|
+
self2.resetLevel = function() {
|
1164
|
+
userLevel = null;
|
1165
|
+
clearPersistedLevel();
|
1166
|
+
replaceLoggingMethods.call(self2);
|
1167
|
+
};
|
1168
|
+
self2.enableAll = function(persist) {
|
1169
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
1170
|
+
};
|
1171
|
+
self2.disableAll = function(persist) {
|
1172
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
1173
|
+
};
|
1174
|
+
self2.rebuild = function() {
|
1175
|
+
if (defaultLogger !== self2) {
|
1176
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
1177
|
+
}
|
1178
|
+
replaceLoggingMethods.call(self2);
|
1179
|
+
if (defaultLogger === self2) {
|
1180
|
+
for (var childName in _loggersByName) {
|
1181
|
+
_loggersByName[childName].rebuild();
|
1182
|
+
}
|
1183
|
+
}
|
1184
|
+
};
|
1185
|
+
inheritedLevel = normalizeLevel(
|
1186
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
1187
|
+
);
|
1188
|
+
var initialLevel = getPersistedLevel();
|
1189
|
+
if (initialLevel != null) {
|
1190
|
+
userLevel = normalizeLevel(initialLevel);
|
1191
|
+
}
|
1192
|
+
replaceLoggingMethods.call(self2);
|
1193
|
+
}
|
1194
|
+
defaultLogger = new Logger();
|
1195
|
+
defaultLogger.getLogger = function getLogger(name2) {
|
1196
|
+
if (typeof name2 !== "symbol" && typeof name2 !== "string" || name2 === "") {
|
1197
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
1198
|
+
}
|
1199
|
+
var logger2 = _loggersByName[name2];
|
1200
|
+
if (!logger2) {
|
1201
|
+
logger2 = _loggersByName[name2] = new Logger(
|
1202
|
+
name2,
|
1203
|
+
defaultLogger.methodFactory
|
1204
|
+
);
|
1205
|
+
}
|
1206
|
+
return logger2;
|
1207
|
+
};
|
1208
|
+
var _log = typeof window !== undefinedType2 ? window.log : void 0;
|
1209
|
+
defaultLogger.noConflict = function() {
|
1210
|
+
if (typeof window !== undefinedType2 && window.log === defaultLogger) {
|
1211
|
+
window.log = _log;
|
1212
|
+
}
|
1213
|
+
return defaultLogger;
|
1214
|
+
};
|
1215
|
+
defaultLogger.getLoggers = function getLoggers2() {
|
1216
|
+
return _loggersByName;
|
1217
|
+
};
|
1218
|
+
defaultLogger["default"] = defaultLogger;
|
1219
|
+
return defaultLogger;
|
1220
|
+
});
|
1221
|
+
})(loglevel);
|
1222
|
+
var loglevelExports = loglevel.exports;
|
1223
|
+
const log$c = /* @__PURE__ */ getDefaultExportFromCjs$1(loglevelExports);
|
972
1224
|
var util;
|
973
1225
|
(function(util2) {
|
974
1226
|
util2.assertEqual = (val) => val;
|
@@ -7139,6 +7391,27 @@ function getNextScope(prevScopes) {
|
|
7139
7391
|
} while (prevScopes.includes(nextScope));
|
7140
7392
|
return nextScope;
|
7141
7393
|
}
|
7394
|
+
const identityFunc = (d) => d;
|
7395
|
+
function unnestMap(map2, keys4, aggFunc) {
|
7396
|
+
if (keys4.length < 2) {
|
7397
|
+
throw new Error("Insufficient number of keys passed to flattenInternMap");
|
7398
|
+
}
|
7399
|
+
const aggFuncToUse = !aggFunc ? identityFunc : aggFunc;
|
7400
|
+
return Array.from(map2.entries()).flatMap(([k, v2]) => {
|
7401
|
+
if (v2 instanceof Map) {
|
7402
|
+
const keysWithoutFirst = [...keys4];
|
7403
|
+
keysWithoutFirst.splice(0, 1);
|
7404
|
+
return unnestMap(v2, keysWithoutFirst, aggFuncToUse).map((childObj) => ({
|
7405
|
+
[keys4[0]]: k,
|
7406
|
+
...childObj
|
7407
|
+
}));
|
7408
|
+
}
|
7409
|
+
return {
|
7410
|
+
[keys4[0]]: k,
|
7411
|
+
[keys4[1]]: aggFuncToUse(v2)
|
7412
|
+
};
|
7413
|
+
});
|
7414
|
+
}
|
7142
7415
|
const DEFAULT_DARK_COLOR = [50, 50, 50];
|
7143
7416
|
const DEFAULT_LIGHT_COLOR$3 = [200, 200, 200];
|
7144
7417
|
const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
@@ -7190,16 +7463,16 @@ const COLORMAP_OPTIONS = [
|
|
7190
7463
|
];
|
7191
7464
|
const DEFAULT_GL_OPTIONS$1 = { webgl2: true };
|
7192
7465
|
function createDefaultUpdateCellsHover(componentName) {
|
7193
|
-
return (hoverInfo) =>
|
7466
|
+
return (hoverInfo) => log$c.warn(`${componentName} updateCellsHover: ${hoverInfo.cellId}`);
|
7194
7467
|
}
|
7195
7468
|
function createDefaultUpdateGenesHover(componentName) {
|
7196
|
-
return (hoverInfo) =>
|
7469
|
+
return (hoverInfo) => log$c.warn(`${componentName} updateGenesHover: ${hoverInfo.geneId}`);
|
7197
7470
|
}
|
7198
7471
|
function createDefaultUpdateTracksHover(componentName) {
|
7199
|
-
return (hoverInfo) =>
|
7472
|
+
return (hoverInfo) => log$c.warn(`${componentName} updateTracksHover: ${hoverInfo}`);
|
7200
7473
|
}
|
7201
7474
|
function createDefaultUpdateViewInfo(componentName) {
|
7202
|
-
return (viewInfo) =>
|
7475
|
+
return (viewInfo) => log$c.warn(`${componentName} updateViewInfo: ${viewInfo}`);
|
7203
7476
|
}
|
7204
7477
|
function copyUint8Array(arr) {
|
7205
7478
|
const newBuffer = new ArrayBuffer(arr.buffer.byteLength);
|
@@ -7701,7 +7974,7 @@ function upgradeFrom1_0_14(config3) {
|
|
7701
7974
|
Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
|
7702
7975
|
var _a3;
|
7703
7976
|
if ((_a3 = viewDef.props) == null ? void 0 : _a3[oldProp]) {
|
7704
|
-
|
7977
|
+
log$c.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
|
7705
7978
|
}
|
7706
7979
|
});
|
7707
7980
|
});
|
@@ -7724,7 +7997,7 @@ function upgradeFrom1_0_15(config3) {
|
|
7724
7997
|
Object.entries(coordinationScopes).forEach(([coordinationType, coordinationScope]) => {
|
7725
7998
|
if (!Array.isArray(coordinationScope) && typeof coordinationScope === "object") {
|
7726
7999
|
if (coordinationType === "dataset") {
|
7727
|
-
|
8000
|
+
log$c.error("Expected coordinationScopes.dataset value to be either string or string[], but got object.");
|
7728
8001
|
}
|
7729
8002
|
coordinationScopesBy.dataset[coordinationType] = coordinationScope;
|
7730
8003
|
} else if (Array.isArray(coordinationScope) || typeof coordinationScope === "string") {
|
@@ -9936,7 +10209,9 @@ const ViewType$1 = {
|
|
9936
10209
|
DOT_PLOT: "dotPlot",
|
9937
10210
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
9938
10211
|
BIOMARKER_SELECT: "biomarkerSelect",
|
9939
|
-
LINK_CONTROLLER: "linkController"
|
10212
|
+
LINK_CONTROLLER: "linkController",
|
10213
|
+
DUAL_SCATTERPLOT: "dualScatterplot",
|
10214
|
+
TREEMAP: "treemap"
|
9940
10215
|
};
|
9941
10216
|
const DataType$3 = {
|
9942
10217
|
OBS_LABELS: "obsLabels",
|
@@ -10012,6 +10287,7 @@ const FileType$1 = {
|
|
10012
10287
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
10013
10288
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
10014
10289
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
10290
|
+
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
10015
10291
|
// AnnData - zipped
|
10016
10292
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
10017
10293
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
@@ -10024,6 +10300,7 @@ const FileType$1 = {
|
|
10024
10300
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
10025
10301
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
10026
10302
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
10303
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
10027
10304
|
// AnnData - h5ad via reference spec
|
10028
10305
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
10029
10306
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
@@ -10036,6 +10313,7 @@ const FileType$1 = {
|
|
10036
10313
|
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
10037
10314
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
10038
10315
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
10316
|
+
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
10039
10317
|
// SpatialData
|
10040
10318
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
10041
10319
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
@@ -10137,15 +10415,23 @@ const CoordinationType$1 = {
|
|
10137
10415
|
HEATMAP_ZOOM_Y: "heatmapZoomY",
|
10138
10416
|
HEATMAP_TARGET_X: "heatmapTargetX",
|
10139
10417
|
HEATMAP_TARGET_Y: "heatmapTargetY",
|
10140
|
-
OBS_FILTER: "obsFilter",
|
10141
10418
|
OBS_HIGHLIGHT: "obsHighlight",
|
10419
|
+
OBS_SELECTION: "obsSelection",
|
10142
10420
|
OBS_SET_SELECTION: "obsSetSelection",
|
10421
|
+
OBS_SELECTION_MODE: "obsSelectionMode",
|
10422
|
+
OBS_FILTER: "obsFilter",
|
10423
|
+
OBS_SET_FILTER: "obsSetFilter",
|
10424
|
+
OBS_FILTER_MODE: "obsFilterMode",
|
10143
10425
|
OBS_SET_HIGHLIGHT: "obsSetHighlight",
|
10144
10426
|
OBS_SET_EXPANSION: "obsSetExpansion",
|
10145
10427
|
OBS_SET_COLOR: "obsSetColor",
|
10146
|
-
FEATURE_FILTER: "featureFilter",
|
10147
10428
|
FEATURE_HIGHLIGHT: "featureHighlight",
|
10148
10429
|
FEATURE_SELECTION: "featureSelection",
|
10430
|
+
FEATURE_SET_SELECTION: "featureSetSelection",
|
10431
|
+
FEATURE_SELECTION_MODE: "featureSelectionMode",
|
10432
|
+
FEATURE_FILTER: "featureFilter",
|
10433
|
+
FEATURE_SET_FILTER: "featureSetFilter",
|
10434
|
+
FEATURE_FILTER_MODE: "featureFilterMode",
|
10149
10435
|
FEATURE_VALUE_COLORMAP: "featureValueColormap",
|
10150
10436
|
FEATURE_VALUE_TRANSFORM: "featureValueTransform",
|
10151
10437
|
FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
|
@@ -10212,14 +10498,22 @@ const CoordinationType$1 = {
|
|
10212
10498
|
SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
|
10213
10499
|
// Multi-sample / comparative
|
10214
10500
|
SAMPLE_TYPE: "sampleType",
|
10501
|
+
SAMPLE_SELECTION: "sampleSelection",
|
10215
10502
|
SAMPLE_SET_SELECTION: "sampleSetSelection",
|
10503
|
+
SAMPLE_SELECTION_MODE: "sampleSelectionMode",
|
10504
|
+
SAMPLE_FILTER: "sampleFilter",
|
10505
|
+
SAMPLE_SET_FILTER: "sampleSetFilter",
|
10506
|
+
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
10216
10507
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
10508
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
10217
10509
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
10218
10510
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
10219
10511
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
10220
10512
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
10221
10513
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
10222
|
-
CONTOUR_COLOR: "contourColor"
|
10514
|
+
CONTOUR_COLOR: "contourColor",
|
10515
|
+
// Treemap
|
10516
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
10223
10517
|
};
|
10224
10518
|
const STATUS$1 = {
|
10225
10519
|
LOADING: "loading",
|
@@ -10245,7 +10539,8 @@ const ViewHelpMapping = {
|
|
10245
10539
|
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).",
|
10246
10540
|
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
10247
10541
|
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).",
|
10248
|
-
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."
|
10542
|
+
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.",
|
10543
|
+
TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering."
|
10249
10544
|
};
|
10250
10545
|
const ALT_ZARR_STORE_TYPES = {
|
10251
10546
|
// For AnnData:
|
@@ -10293,6 +10588,10 @@ const ALT_ZARR_STORE_TYPES = {
|
|
10293
10588
|
zip: FileType$1.SAMPLE_EDGES_ANNDATA_ZARR_ZIP,
|
10294
10589
|
h5ad: FileType$1.SAMPLE_EDGES_ANNDATA_H5AD
|
10295
10590
|
},
|
10591
|
+
[FileType$1.SAMPLE_SETS_ANNDATA_ZARR]: {
|
10592
|
+
zip: FileType$1.SAMPLE_SETS_ANNDATA_ZARR_ZIP,
|
10593
|
+
h5ad: FileType$1.SAMPLE_SETS_ANNDATA_H5AD
|
10594
|
+
},
|
10296
10595
|
// For OME-Zarr:
|
10297
10596
|
[FileType$1.IMAGE_OME_ZARR]: {
|
10298
10597
|
zip: FileType$1.IMAGE_OME_ZARR_ZIP
|
@@ -10324,6 +10623,50 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10324
10623
|
CoordinationType$1.OBS_FILTER,
|
10325
10624
|
CoordinationType$1.OBS_HIGHLIGHT,
|
10326
10625
|
CoordinationType$1.OBS_SET_SELECTION,
|
10626
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10627
|
+
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10628
|
+
CoordinationType$1.OBS_SET_COLOR,
|
10629
|
+
CoordinationType$1.FEATURE_HIGHLIGHT,
|
10630
|
+
CoordinationType$1.FEATURE_SELECTION,
|
10631
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
10632
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
10633
|
+
CoordinationType$1.OBS_COLOR_ENCODING,
|
10634
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
10635
|
+
CoordinationType$1.TOOLTIPS_VISIBLE,
|
10636
|
+
CoordinationType$1.SAMPLE_TYPE,
|
10637
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
10638
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
10639
|
+
CoordinationType$1.SAMPLE_SET_COLOR,
|
10640
|
+
CoordinationType$1.EMBEDDING_POINTS_VISIBLE,
|
10641
|
+
CoordinationType$1.EMBEDDING_CONTOURS_VISIBLE,
|
10642
|
+
CoordinationType$1.EMBEDDING_CONTOURS_FILLED,
|
10643
|
+
CoordinationType$1.EMBEDDING_CONTOUR_PERCENTILES,
|
10644
|
+
CoordinationType$1.CONTOUR_COLOR_ENCODING,
|
10645
|
+
CoordinationType$1.CONTOUR_COLOR
|
10646
|
+
],
|
10647
|
+
[ViewType$1.DUAL_SCATTERPLOT]: [
|
10648
|
+
CoordinationType$1.DATASET,
|
10649
|
+
CoordinationType$1.OBS_TYPE,
|
10650
|
+
CoordinationType$1.FEATURE_TYPE,
|
10651
|
+
CoordinationType$1.FEATURE_VALUE_TYPE,
|
10652
|
+
CoordinationType$1.OBS_LABELS_TYPE,
|
10653
|
+
CoordinationType$1.EMBEDDING_TYPE,
|
10654
|
+
CoordinationType$1.EMBEDDING_ZOOM,
|
10655
|
+
CoordinationType$1.EMBEDDING_ROTATION,
|
10656
|
+
CoordinationType$1.EMBEDDING_TARGET_X,
|
10657
|
+
CoordinationType$1.EMBEDDING_TARGET_Y,
|
10658
|
+
CoordinationType$1.EMBEDDING_TARGET_Z,
|
10659
|
+
CoordinationType$1.EMBEDDING_OBS_SET_POLYGONS_VISIBLE,
|
10660
|
+
CoordinationType$1.EMBEDDING_OBS_SET_LABELS_VISIBLE,
|
10661
|
+
CoordinationType$1.EMBEDDING_OBS_SET_LABEL_SIZE,
|
10662
|
+
CoordinationType$1.EMBEDDING_OBS_RADIUS,
|
10663
|
+
CoordinationType$1.EMBEDDING_OBS_RADIUS_MODE,
|
10664
|
+
CoordinationType$1.EMBEDDING_OBS_OPACITY,
|
10665
|
+
CoordinationType$1.EMBEDDING_OBS_OPACITY_MODE,
|
10666
|
+
CoordinationType$1.OBS_FILTER,
|
10667
|
+
CoordinationType$1.OBS_HIGHLIGHT,
|
10668
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
10669
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10327
10670
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10328
10671
|
CoordinationType$1.OBS_SET_COLOR,
|
10329
10672
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
@@ -10335,6 +10678,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10335
10678
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
10336
10679
|
CoordinationType$1.SAMPLE_TYPE,
|
10337
10680
|
CoordinationType$1.SAMPLE_SET_SELECTION,
|
10681
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
10338
10682
|
CoordinationType$1.SAMPLE_SET_COLOR,
|
10339
10683
|
CoordinationType$1.EMBEDDING_POINTS_VISIBLE,
|
10340
10684
|
CoordinationType$1.EMBEDDING_CONTOURS_VISIBLE,
|
@@ -10401,6 +10745,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10401
10745
|
CoordinationType$1.OBS_FILTER,
|
10402
10746
|
CoordinationType$1.OBS_HIGHLIGHT,
|
10403
10747
|
CoordinationType$1.OBS_SET_SELECTION,
|
10748
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10404
10749
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10405
10750
|
CoordinationType$1.OBS_SET_COLOR,
|
10406
10751
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
@@ -10437,6 +10782,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10437
10782
|
CoordinationType$1.OBS_FILTER,
|
10438
10783
|
CoordinationType$1.OBS_HIGHLIGHT,
|
10439
10784
|
CoordinationType$1.OBS_SET_SELECTION,
|
10785
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10440
10786
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10441
10787
|
CoordinationType$1.OBS_SET_COLOR,
|
10442
10788
|
CoordinationType$1.FEATURE_HIGHLIGHT,
|
@@ -10496,6 +10842,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10496
10842
|
CoordinationType$1.OBS_FILTER,
|
10497
10843
|
CoordinationType$1.OBS_HIGHLIGHT,
|
10498
10844
|
CoordinationType$1.OBS_SET_SELECTION,
|
10845
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10499
10846
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10500
10847
|
CoordinationType$1.OBS_SET_COLOR,
|
10501
10848
|
CoordinationType$1.FEATURE_FILTER,
|
@@ -10511,6 +10858,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10511
10858
|
CoordinationType$1.DATASET,
|
10512
10859
|
CoordinationType$1.OBS_TYPE,
|
10513
10860
|
CoordinationType$1.OBS_SET_SELECTION,
|
10861
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10514
10862
|
CoordinationType$1.OBS_SET_EXPANSION,
|
10515
10863
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10516
10864
|
CoordinationType$1.OBS_SET_COLOR,
|
@@ -10522,6 +10870,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10522
10870
|
CoordinationType$1.DATASET,
|
10523
10871
|
CoordinationType$1.OBS_TYPE,
|
10524
10872
|
CoordinationType$1.OBS_SET_SELECTION,
|
10873
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10525
10874
|
CoordinationType$1.OBS_SET_EXPANSION,
|
10526
10875
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10527
10876
|
CoordinationType$1.OBS_SET_COLOR,
|
@@ -10554,6 +10903,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10554
10903
|
CoordinationType$1.FEATURE_VALUE_TRANSFORM,
|
10555
10904
|
CoordinationType$1.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
|
10556
10905
|
CoordinationType$1.OBS_SET_SELECTION,
|
10906
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10557
10907
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10558
10908
|
CoordinationType$1.OBS_SET_COLOR,
|
10559
10909
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
@@ -10570,7 +10920,8 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10570
10920
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
10571
10921
|
CoordinationType$1.OBS_SET_COLOR,
|
10572
10922
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
10573
|
-
CoordinationType$1.OBS_SET_SELECTION
|
10923
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
10924
|
+
CoordinationType$1.OBS_SET_FILTER
|
10574
10925
|
],
|
10575
10926
|
[ViewType$1.LAYER_CONTROLLER]: [
|
10576
10927
|
CoordinationType$1.DATASET,
|
@@ -10685,11 +11036,13 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10685
11036
|
CoordinationType$1.FEATURE_VALUE_POSITIVITY_THRESHOLD,
|
10686
11037
|
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
10687
11038
|
CoordinationType$1.OBS_SET_SELECTION,
|
11039
|
+
CoordinationType$1.OBS_SET_FILTER,
|
10688
11040
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
10689
11041
|
CoordinationType$1.OBS_SET_COLOR,
|
10690
11042
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
10691
11043
|
CoordinationType$1.SAMPLE_TYPE,
|
10692
11044
|
CoordinationType$1.SAMPLE_SET_SELECTION,
|
11045
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
10693
11046
|
CoordinationType$1.SAMPLE_SET_COLOR
|
10694
11047
|
],
|
10695
11048
|
higlass: [
|
@@ -10720,8 +11073,37 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
10720
11073
|
[ViewType$1.LINK_CONTROLLER]: [],
|
10721
11074
|
[ViewType$1.BIOMARKER_SELECT]: [
|
10722
11075
|
CoordinationType$1.FEATURE_SELECTION,
|
10723
|
-
CoordinationType$1.SAMPLE_SET_SELECTION
|
11076
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
11077
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
11078
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
11079
|
+
CoordinationType$1.OBS_SET_FILTER
|
10724
11080
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
11081
|
+
],
|
11082
|
+
[ViewType$1.TREEMAP]: [
|
11083
|
+
CoordinationType$1.DATASET,
|
11084
|
+
CoordinationType$1.OBS_TYPE,
|
11085
|
+
CoordinationType$1.FEATURE_TYPE,
|
11086
|
+
CoordinationType$1.FEATURE_VALUE_TYPE,
|
11087
|
+
CoordinationType$1.OBS_FILTER,
|
11088
|
+
CoordinationType$1.OBS_HIGHLIGHT,
|
11089
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
11090
|
+
CoordinationType$1.OBS_SET_FILTER,
|
11091
|
+
CoordinationType$1.OBS_SELECTION,
|
11092
|
+
CoordinationType$1.OBS_SELECTION_MODE,
|
11093
|
+
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
11094
|
+
CoordinationType$1.OBS_SET_COLOR,
|
11095
|
+
CoordinationType$1.OBS_COLOR_ENCODING,
|
11096
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
11097
|
+
CoordinationType$1.SAMPLE_TYPE,
|
11098
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
11099
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
11100
|
+
CoordinationType$1.SAMPLE_SET_COLOR,
|
11101
|
+
CoordinationType$1.SAMPLE_SELECTION,
|
11102
|
+
CoordinationType$1.SAMPLE_SELECTION_MODE,
|
11103
|
+
CoordinationType$1.SAMPLE_FILTER,
|
11104
|
+
CoordinationType$1.SAMPLE_FILTER_MODE,
|
11105
|
+
CoordinationType$1.SAMPLE_HIGHLIGHT,
|
11106
|
+
CoordinationType$1.HIERARCHY_LEVELS
|
10725
11107
|
]
|
10726
11108
|
};
|
10727
11109
|
const GLOBAL_LABELS = ["z", "t"];
|
@@ -10914,7 +11296,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
10914
11296
|
const oldKeys = Object.keys(oldObj);
|
10915
11297
|
const propKey = String(prop);
|
10916
11298
|
if (oldKeys.includes(propKey)) {
|
10917
|
-
|
11299
|
+
log$c.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
10918
11300
|
${oldObj[propKey][1]}`);
|
10919
11301
|
return oldObj[propKey];
|
10920
11302
|
}
|
@@ -11054,6 +11436,9 @@ const annDataObsSetsArr = z.array(z.object({
|
|
11054
11436
|
const annDataObsSets = z.object({
|
11055
11437
|
obsSets: annDataObsSetsArr
|
11056
11438
|
});
|
11439
|
+
const annDataSampleSets = z.object({
|
11440
|
+
sampleSets: annDataObsSetsArr
|
11441
|
+
});
|
11057
11442
|
const annDataObsFeatureColumnsArr = z.array(z.object({
|
11058
11443
|
path: z.string()
|
11059
11444
|
}));
|
@@ -11144,6 +11529,7 @@ const obsPointsAnndataSchema = annDataObsLocations;
|
|
11144
11529
|
const obsLocationsAnndataSchema = annDataObsLocations;
|
11145
11530
|
const obsSegmentationsAnndataSchema = annDataObsSegmentations;
|
11146
11531
|
const obsSetsAnndataSchema = annDataObsSets;
|
11532
|
+
const sampleSetsAnndataSchema = annDataSampleSets;
|
11147
11533
|
const obsFeatureMatrixAnndataSchema = annDataObsFeatureMatrix;
|
11148
11534
|
const obsLabelsAnndataSchema = annDataObsLabels;
|
11149
11535
|
const featureLabelsAnndataSchema = annDataFeatureLabels;
|
@@ -52641,8 +53027,8 @@ function downloadForUser(dataString, fileName) {
|
|
52641
53027
|
downloadAnchorNode.click();
|
52642
53028
|
downloadAnchorNode.remove();
|
52643
53029
|
}
|
52644
|
-
class InternMap extends Map {
|
52645
|
-
constructor(entries2, key2 = keyof) {
|
53030
|
+
let InternMap$1 = class InternMap extends Map {
|
53031
|
+
constructor(entries2, key2 = keyof$1) {
|
52646
53032
|
super();
|
52647
53033
|
Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key2 } });
|
52648
53034
|
if (entries2 != null)
|
@@ -52650,20 +53036,20 @@ class InternMap extends Map {
|
|
52650
53036
|
this.set(key22, value2);
|
52651
53037
|
}
|
52652
53038
|
get(key2) {
|
52653
|
-
return super.get(intern_get(this, key2));
|
53039
|
+
return super.get(intern_get$1(this, key2));
|
52654
53040
|
}
|
52655
53041
|
has(key2) {
|
52656
|
-
return super.has(intern_get(this, key2));
|
53042
|
+
return super.has(intern_get$1(this, key2));
|
52657
53043
|
}
|
52658
53044
|
set(key2, value2) {
|
52659
|
-
return super.set(intern_set(this, key2), value2);
|
53045
|
+
return super.set(intern_set$1(this, key2), value2);
|
52660
53046
|
}
|
52661
53047
|
delete(key2) {
|
52662
|
-
return super.delete(intern_delete(this, key2));
|
53048
|
+
return super.delete(intern_delete$1(this, key2));
|
52663
53049
|
}
|
52664
|
-
}
|
53050
|
+
};
|
52665
53051
|
class InternSet extends Set {
|
52666
|
-
constructor(values3, key2 = keyof) {
|
53052
|
+
constructor(values3, key2 = keyof$1) {
|
52667
53053
|
super();
|
52668
53054
|
Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key2 } });
|
52669
53055
|
if (values3 != null)
|
@@ -52671,27 +53057,27 @@ class InternSet extends Set {
|
|
52671
53057
|
this.add(value2);
|
52672
53058
|
}
|
52673
53059
|
has(value2) {
|
52674
|
-
return super.has(intern_get(this, value2));
|
53060
|
+
return super.has(intern_get$1(this, value2));
|
52675
53061
|
}
|
52676
53062
|
add(value2) {
|
52677
|
-
return super.add(intern_set(this, value2));
|
53063
|
+
return super.add(intern_set$1(this, value2));
|
52678
53064
|
}
|
52679
53065
|
delete(value2) {
|
52680
|
-
return super.delete(intern_delete(this, value2));
|
53066
|
+
return super.delete(intern_delete$1(this, value2));
|
52681
53067
|
}
|
52682
53068
|
}
|
52683
|
-
function intern_get({ _intern, _key }, value2) {
|
53069
|
+
function intern_get$1({ _intern, _key }, value2) {
|
52684
53070
|
const key2 = _key(value2);
|
52685
53071
|
return _intern.has(key2) ? _intern.get(key2) : value2;
|
52686
53072
|
}
|
52687
|
-
function intern_set({ _intern, _key }, value2) {
|
53073
|
+
function intern_set$1({ _intern, _key }, value2) {
|
52688
53074
|
const key2 = _key(value2);
|
52689
53075
|
if (_intern.has(key2))
|
52690
53076
|
return _intern.get(key2);
|
52691
53077
|
_intern.set(key2, value2);
|
52692
53078
|
return value2;
|
52693
53079
|
}
|
52694
|
-
function intern_delete({ _intern, _key }, value2) {
|
53080
|
+
function intern_delete$1({ _intern, _key }, value2) {
|
52695
53081
|
const key2 = _key(value2);
|
52696
53082
|
if (_intern.has(key2)) {
|
52697
53083
|
value2 = _intern.get(key2);
|
@@ -52699,7 +53085,7 @@ function intern_delete({ _intern, _key }, value2) {
|
|
52699
53085
|
}
|
52700
53086
|
return value2;
|
52701
53087
|
}
|
52702
|
-
function keyof(value2) {
|
53088
|
+
function keyof$1(value2) {
|
52703
53089
|
return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
|
52704
53090
|
}
|
52705
53091
|
function dataToCellSetsTree(data2, options) {
|
@@ -52712,7 +53098,7 @@ function dataToCellSetsTree(data2, options) {
|
|
52712
53098
|
children: []
|
52713
53099
|
};
|
52714
53100
|
if (cellSetIds.length > 0 && Array.isArray(cellSetIds[0])) {
|
52715
|
-
const levelSets = new InternMap([], JSON.stringify);
|
53101
|
+
const levelSets = new InternMap$1([], JSON.stringify);
|
52716
53102
|
cellNames[j].forEach((id2, i2) => {
|
52717
53103
|
const classes = cellSetIds.map((col) => col[i2]);
|
52718
53104
|
if (levelSets.has(classes)) {
|
@@ -52826,7 +53212,7 @@ function getCellColors(params2) {
|
|
52826
53212
|
return /* @__PURE__ */ new Map();
|
52827
53213
|
}
|
52828
53214
|
function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetSelection, obsIndex, mergedCellSets, cellSetSelection, arraysToStratify) {
|
52829
|
-
const result = new InternMap([], JSON.stringify);
|
53215
|
+
const result = new InternMap$1([], JSON.stringify);
|
52830
53216
|
const hasSampleSetSelection = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 0;
|
52831
53217
|
const hasCellSetSelection = Array.isArray(cellSetSelection) && cellSetSelection.length > 0;
|
52832
53218
|
const sampleSetKeys = hasSampleSetSelection ? sampleSetSelection : [null];
|
@@ -52841,10 +53227,10 @@ function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetS
|
|
52841
53227
|
const sampleSetInfo = sampleSets && sampleSetSelection ? treeToObsIdsBySetNames(sampleSets, sampleSetSelection) : null;
|
52842
53228
|
const cellSetInfo = mergedCellSets && cellSetSelection ? treeToObsIdsBySetNames(mergedCellSets, cellSetSelection) : null;
|
52843
53229
|
cellSetKeys.forEach((cellSetKey) => {
|
52844
|
-
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
53230
|
+
result.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
52845
53231
|
sampleSetKeys.forEach((sampleSetKey) => {
|
52846
53232
|
var _a3, _b3;
|
52847
|
-
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
53233
|
+
result.get(cellSetKey).set(sampleSetKey, new InternMap$1([], JSON.stringify));
|
52848
53234
|
const sampleIdsInSampleSet = (_a3 = sampleSetInfo && sampleSetKey ? sampleSetInfo == null ? void 0 : sampleSetInfo.find((n3) => isEqual$5(n3.path, sampleSetKey)) : null) == null ? void 0 : _a3.ids;
|
52849
53235
|
const obsIdsInSampleSet = sampleIdsInSampleSet ? sampleIdsInSampleSet.flatMap((sampleId) => (sampleIdToObsIdsMap == null ? void 0 : sampleIdToObsIdsMap.get(sampleId)) || []) : null;
|
52850
53236
|
const obsIdsInCellSet = (_b3 = cellSetInfo && cellSetKey ? cellSetInfo == null ? void 0 : cellSetInfo.find((n3) => isEqual$5(n3.path, cellSetKey)) : null) == null ? void 0 : _b3.ids;
|
@@ -52886,7 +53272,7 @@ function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetS
|
|
52886
53272
|
sampleSetKeys.forEach((sampleSetKey) => {
|
52887
53273
|
const finalInsertionIndex = result.get(cellSetKey).get(sampleSetKey).get("i");
|
52888
53274
|
if (finalInsertionIndex !== result.get(cellSetKey).get(sampleSetKey).get("obsIndex").length) {
|
52889
|
-
|
53275
|
+
log$c.warn("The final insertion index is lower than expected.");
|
52890
53276
|
}
|
52891
53277
|
result.get(cellSetKey).get(sampleSetKey).delete("i");
|
52892
53278
|
});
|
@@ -52894,7 +53280,7 @@ function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetS
|
|
52894
53280
|
return result;
|
52895
53281
|
}
|
52896
53282
|
function stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, mergedCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient) {
|
52897
|
-
const result = new InternMap([], JSON.stringify);
|
53283
|
+
const result = new InternMap$1([], JSON.stringify);
|
52898
53284
|
const hasSampleSetSelection = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 0;
|
52899
53285
|
const hasCellSetSelection = Array.isArray(cellSetSelection) && cellSetSelection.length > 0;
|
52900
53286
|
const hasGeneSelection = Array.isArray(geneSelection) && geneSelection.length > 0;
|
@@ -52902,9 +53288,9 @@ function stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
52902
53288
|
const cellSetKeys = hasCellSetSelection ? cellSetSelection : [null];
|
52903
53289
|
const geneKeys = hasGeneSelection ? geneSelection : [null];
|
52904
53290
|
cellSetKeys.forEach((cellSetKey) => {
|
52905
|
-
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
53291
|
+
result.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
52906
53292
|
sampleSetKeys.forEach((sampleSetKey) => {
|
52907
|
-
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
53293
|
+
result.get(cellSetKey).set(sampleSetKey, new InternMap$1([], JSON.stringify));
|
52908
53294
|
geneKeys.forEach((geneKey) => {
|
52909
53295
|
result.get(cellSetKey).get(sampleSetKey).set(geneKey, []);
|
52910
53296
|
});
|
@@ -52936,9 +53322,9 @@ function stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
52936
53322
|
return [null, null];
|
52937
53323
|
}
|
52938
53324
|
function aggregateStratifiedExpressionData(stratifiedResult, geneSelection) {
|
52939
|
-
const result = new InternMap([], JSON.stringify);
|
53325
|
+
const result = new InternMap$1([], JSON.stringify);
|
52940
53326
|
Array.from(stratifiedResult.entries()).forEach(([cellSetKey, firstLevelInternMap]) => {
|
52941
|
-
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
53327
|
+
result.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
52942
53328
|
Array.from(firstLevelInternMap.entries()).forEach(([sampleSetKey, secondLevelInternMap]) => {
|
52943
53329
|
const values3 = secondLevelInternMap.get(geneSelection[0]);
|
52944
53330
|
result.get(cellSetKey).set(sampleSetKey, values3);
|
@@ -66766,9 +67152,76 @@ function extent$2(values3, valueof) {
|
|
66766
67152
|
}
|
66767
67153
|
return [min2, max2];
|
66768
67154
|
}
|
67155
|
+
class InternMap2 extends Map {
|
67156
|
+
constructor(entries2, key2 = keyof) {
|
67157
|
+
super();
|
67158
|
+
Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key2 } });
|
67159
|
+
if (entries2 != null)
|
67160
|
+
for (const [key22, value2] of entries2)
|
67161
|
+
this.set(key22, value2);
|
67162
|
+
}
|
67163
|
+
get(key2) {
|
67164
|
+
return super.get(intern_get(this, key2));
|
67165
|
+
}
|
67166
|
+
has(key2) {
|
67167
|
+
return super.has(intern_get(this, key2));
|
67168
|
+
}
|
67169
|
+
set(key2, value2) {
|
67170
|
+
return super.set(intern_set(this, key2), value2);
|
67171
|
+
}
|
67172
|
+
delete(key2) {
|
67173
|
+
return super.delete(intern_delete(this, key2));
|
67174
|
+
}
|
67175
|
+
}
|
67176
|
+
function intern_get({ _intern, _key }, value2) {
|
67177
|
+
const key2 = _key(value2);
|
67178
|
+
return _intern.has(key2) ? _intern.get(key2) : value2;
|
67179
|
+
}
|
67180
|
+
function intern_set({ _intern, _key }, value2) {
|
67181
|
+
const key2 = _key(value2);
|
67182
|
+
if (_intern.has(key2))
|
67183
|
+
return _intern.get(key2);
|
67184
|
+
_intern.set(key2, value2);
|
67185
|
+
return value2;
|
67186
|
+
}
|
67187
|
+
function intern_delete({ _intern, _key }, value2) {
|
67188
|
+
const key2 = _key(value2);
|
67189
|
+
if (_intern.has(key2)) {
|
67190
|
+
value2 = _intern.get(value2);
|
67191
|
+
_intern.delete(key2);
|
67192
|
+
}
|
67193
|
+
return value2;
|
67194
|
+
}
|
67195
|
+
function keyof(value2) {
|
67196
|
+
return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
|
67197
|
+
}
|
66769
67198
|
function identity$i(x2) {
|
66770
67199
|
return x2;
|
66771
67200
|
}
|
67201
|
+
function rollup(values3, reduce2, ...keys4) {
|
67202
|
+
return nest$1(values3, identity$i, reduce2, keys4);
|
67203
|
+
}
|
67204
|
+
function nest$1(values3, map2, reduce2, keys4) {
|
67205
|
+
return function regroup(values22, i2) {
|
67206
|
+
if (i2 >= keys4.length)
|
67207
|
+
return reduce2(values22);
|
67208
|
+
const groups2 = new InternMap2();
|
67209
|
+
const keyof2 = keys4[i2++];
|
67210
|
+
let index2 = -1;
|
67211
|
+
for (const value2 of values22) {
|
67212
|
+
const key2 = keyof2(value2, ++index2, values22);
|
67213
|
+
const group2 = groups2.get(key2);
|
67214
|
+
if (group2)
|
67215
|
+
group2.push(value2);
|
67216
|
+
else
|
67217
|
+
groups2.set(key2, [value2]);
|
67218
|
+
}
|
67219
|
+
for (const [key2, values32] of groups2) {
|
67220
|
+
groups2.set(key2, regroup(values32, i2));
|
67221
|
+
}
|
67222
|
+
return map2(groups2);
|
67223
|
+
}(values3, 0);
|
67224
|
+
}
|
66772
67225
|
var array$8 = Array.prototype;
|
66773
67226
|
var slice$8 = array$8.slice;
|
66774
67227
|
function constant$a(x2) {
|
@@ -172592,16 +173045,16 @@ async function getDecoder(fileDirectory) {
|
|
172592
173045
|
const Decoder = await importFn();
|
172593
173046
|
return new Decoder(fileDirectory);
|
172594
173047
|
}
|
172595
|
-
addDecoder([void 0, 1], () => import("./raw-
|
172596
|
-
addDecoder(5, () => import("./lzw-
|
173048
|
+
addDecoder([void 0, 1], () => import("./raw-13d1e148.js").then((m2) => m2.default));
|
173049
|
+
addDecoder(5, () => import("./lzw-bb4fcd5c.js").then((m2) => m2.default));
|
172597
173050
|
addDecoder(6, () => {
|
172598
173051
|
throw new Error("old style JPEG compression is not supported.");
|
172599
173052
|
});
|
172600
|
-
addDecoder(7, () => import("./jpeg-
|
172601
|
-
addDecoder([8, 32946], () => import("./deflate-
|
172602
|
-
addDecoder(32773, () => import("./packbits-
|
172603
|
-
addDecoder(34887, () => import("./lerc-
|
172604
|
-
addDecoder(50001, () => import("./webimage-
|
173053
|
+
addDecoder(7, () => import("./jpeg-6c54524a.js").then((m2) => m2.default));
|
173054
|
+
addDecoder([8, 32946], () => import("./deflate-04bafa55.js").then((m2) => m2.default));
|
173055
|
+
addDecoder(32773, () => import("./packbits-8de5f515.js").then((m2) => m2.default));
|
173056
|
+
addDecoder(34887, () => import("./lerc-df637713.js").then((m2) => m2.default));
|
173057
|
+
addDecoder(50001, () => import("./webimage-3d32244e.js").then((m2) => m2.default));
|
172605
173058
|
function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
|
172606
173059
|
return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
|
172607
173060
|
}
|
@@ -186023,10 +186476,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
|
|
186023
186476
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
186024
186477
|
const colorTexHeight = Math.max(2, Math.ceil(totalColorsLength / texSize));
|
186025
186478
|
if (valueTexHeight > texSize) {
|
186026
|
-
|
186479
|
+
log$c.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
|
186027
186480
|
}
|
186028
186481
|
if (colorTexHeight > texSize) {
|
186029
|
-
|
186482
|
+
log$c.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
|
186030
186483
|
}
|
186031
186484
|
const totalData = new Uint8Array(texSize * valueTexHeight);
|
186032
186485
|
const totalColors = new Uint8Array(texSize * colorTexHeight);
|
@@ -188851,7 +189304,7 @@ function initInterpolator$1(domain2, interpolator) {
|
|
188851
189304
|
}
|
188852
189305
|
const implicit$1 = Symbol("implicit");
|
188853
189306
|
function ordinal$1() {
|
188854
|
-
var index2 = new InternMap(), domain2 = [], range2 = [], unknown = implicit$1;
|
189307
|
+
var index2 = new InternMap$1(), domain2 = [], range2 = [], unknown = implicit$1;
|
188855
189308
|
function scale2(d) {
|
188856
189309
|
let i2 = index2.get(d);
|
188857
189310
|
if (i2 === void 0) {
|
@@ -188864,7 +189317,7 @@ function ordinal$1() {
|
|
188864
189317
|
scale2.domain = function(_2) {
|
188865
189318
|
if (!arguments.length)
|
188866
189319
|
return domain2.slice();
|
188867
|
-
domain2 = [], index2 = new InternMap();
|
189320
|
+
domain2 = [], index2 = new InternMap$1();
|
188868
189321
|
for (const value2 of _2) {
|
188869
189322
|
if (index2.has(value2))
|
188870
189323
|
continue;
|
@@ -192716,14 +193169,17 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
192716
193169
|
title: titleOverride,
|
192717
193170
|
helpText = ViewHelpMapping.SCATTERPLOT,
|
192718
193171
|
// Average fill density for dynamic opacity calculation.
|
192719
|
-
averageFillDensity
|
193172
|
+
averageFillDensity,
|
193173
|
+
// For the dual scatterplot:
|
193174
|
+
sampleSetSelection: sampleSetSelectionFromProps
|
192720
193175
|
} = props;
|
192721
193176
|
const loaders = useLoaders();
|
192722
193177
|
const setComponentHover = useSetComponentHover();
|
192723
193178
|
const setComponentViewInfo = useSetComponentViewInfo(uuid);
|
192724
|
-
const [{ dataset, obsType, featureType, featureValueType, sampleType, embeddingZoom: zoom2, embeddingTargetX: targetX2, embeddingTargetY: targetY2, 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$1.SCATTERPLOT], coordinationScopes);
|
193179
|
+
const [{ dataset, obsType, featureType, featureValueType, sampleType, embeddingZoom: zoom2, embeddingTargetX: targetX2, embeddingTargetY: targetY2, 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$1.SCATTERPLOT], coordinationScopes);
|
192725
193180
|
const { embeddingZoom: initialZoom, embeddingTargetX: initialTargetX, embeddingTargetY: initialTargetY } = useInitialCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.SCATTERPLOT], coordinationScopes);
|
192726
193181
|
const observationsLabel = observationsLabelOverride || obsType;
|
193182
|
+
const sampleSetSelection = sampleSetSelectionFromProps || sampleSetSelectionFromCoordination;
|
192727
193183
|
const [width2, height2, deckRef] = useDeckCanvasSize();
|
192728
193184
|
const title2 = titleOverride || `Scatterplot (${mapping})`;
|
192729
193185
|
const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
|
@@ -193012,6 +193468,13 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
193012
193468
|
contourThresholds
|
193013
193469
|
})] });
|
193014
193470
|
}
|
193471
|
+
function DualEmbeddingScatterplotSubscriber(props) {
|
193472
|
+
const { uuid, coordinationScopes } = props;
|
193473
|
+
const [{ sampleSetSelection }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.DUAL_SCATTERPLOT], coordinationScopes);
|
193474
|
+
const caseSampleSetSelection = useMemo(() => (sampleSetSelection == null ? void 0 : sampleSetSelection[0]) ? [sampleSetSelection[0]] : null, [sampleSetSelection]);
|
193475
|
+
const ctrlSampleSetSelection = useMemo(() => (sampleSetSelection == null ? void 0 : sampleSetSelection[1]) ? [sampleSetSelection[1]] : null, [sampleSetSelection]);
|
193476
|
+
return jsxRuntimeExports.jsxs("div", { style: { width: "100%", height: "100%", display: "flex", flexDirection: "row" }, children: [jsxRuntimeExports.jsx("div", { style: { width: "50%", display: "flex", flexDirection: "column" }, children: jsxRuntimeExports.jsx(EmbeddingScatterplotSubscriber, { ...props, uuid: `${uuid}-case`, sampleSetSelection: caseSampleSetSelection }) }), jsxRuntimeExports.jsx("div", { style: { width: "50%", display: "flex", flexDirection: "column" }, children: jsxRuntimeExports.jsx(EmbeddingScatterplotSubscriber, { ...props, uuid: `${uuid}-ctrl`, sampleSetSelection: ctrlSampleSetSelection }) })] });
|
193477
|
+
}
|
193015
193478
|
function GatingScatterplotOptions(props) {
|
193016
193479
|
const { featureType, gatingFeatureSelectionX, setGatingFeatureSelectionX, gatingFeatureSelectionY, setGatingFeatureSelectionY, gatingFeatureValueTransform, setGatingFeatureValueTransform, gatingFeatureValueTransformCoefficient, setGatingFeatureValueTransformCoefficient, geneSelectOptions, transformOptions } = props;
|
193017
193480
|
const gatingScatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
|
@@ -208712,7 +209175,7 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
|
|
208712
209175
|
if (type2 === "sequence") {
|
208713
209176
|
return normalizeCoordinateTransformations(transform4.transformations, datasets);
|
208714
209177
|
}
|
208715
|
-
|
209178
|
+
log$c.warn(`Coordinate transformation type "${type2}" is not supported.`);
|
208716
209179
|
}
|
208717
209180
|
return transform4;
|
208718
209181
|
});
|
@@ -212572,7 +213035,7 @@ function SpatialSubscriber$1(props) {
|
|
212572
213035
|
]);
|
212573
213036
|
useEffect(() => {
|
212574
213037
|
if (!hasSegmentationsData && cellsLayer && !obsSegmentations && !obsSegmentationsIndex && obsCentroids && obsCentroidsIndex) {
|
212575
|
-
|
213038
|
+
log$c.warn("Rendering cell segmentation diamonds for backwards compatibility.");
|
212576
213039
|
}
|
212577
213040
|
}, [
|
212578
213041
|
hasSegmentationsData,
|
@@ -212932,13 +213395,21 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
|
|
212932
213395
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
212933
213396
|
pickable: true,
|
212934
213397
|
autoHighlight: AUTO_HIGHLIGHT,
|
212935
|
-
filled:
|
213398
|
+
filled: true,
|
212936
213399
|
stroked: !spatialSegmentationFilled,
|
212937
213400
|
backgroundColor: [0, 0, 0],
|
212938
213401
|
// isSelected: getCellIsSelected,
|
212939
213402
|
getPolygon,
|
212940
|
-
getFillColor:
|
212941
|
-
|
213403
|
+
getFillColor: (object2, { index: index2 }) => {
|
213404
|
+
const color2 = isStaticColor ? staticColor : getCellColor(object2, { index: index2 });
|
213405
|
+
color2[3] = spatialSegmentationFilled ? opacity2 * 255 : 0;
|
213406
|
+
return color2;
|
213407
|
+
},
|
213408
|
+
getLineColor: (object2, { index: index2 }) => {
|
213409
|
+
const color2 = isStaticColor ? staticColor : getCellColor(object2, { index: index2 });
|
213410
|
+
color2[3] = spatialSegmentationFilled ? 0 : opacity2 * 255;
|
213411
|
+
return color2;
|
213412
|
+
},
|
212942
213413
|
onClick: (info2) => {
|
212943
213414
|
},
|
212944
213415
|
onHover: (info2) => delegateHover(info2, "segmentation-polygon", layerScope),
|
@@ -212954,8 +213425,20 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
|
|
212954
213425
|
isExpressionMode: obsColorEncoding === "geneSelection",
|
212955
213426
|
colormap: featureValueColormap,
|
212956
213427
|
updateTriggers: {
|
212957
|
-
getFillColor: [
|
212958
|
-
|
213428
|
+
getFillColor: [
|
213429
|
+
opacity2,
|
213430
|
+
spatialSegmentationFilled,
|
213431
|
+
obsColorEncoding,
|
213432
|
+
staticColor,
|
213433
|
+
layerColors
|
213434
|
+
],
|
213435
|
+
getLineColor: [
|
213436
|
+
opacity2,
|
213437
|
+
spatialSegmentationFilled,
|
213438
|
+
obsColorEncoding,
|
213439
|
+
staticColor,
|
213440
|
+
layerColors
|
213441
|
+
]
|
212959
213442
|
/*
|
212960
213443
|
getLineWidth: [stroked],
|
212961
213444
|
isSelected: cellSelection,
|
@@ -214031,7 +214514,7 @@ class ErrorBoundary extends React__default.Component {
|
|
214031
214514
|
}
|
214032
214515
|
}
|
214033
214516
|
const LazySpatialThree = React__default.lazy(async () => {
|
214034
|
-
const { SpatialWrapper: SpatialWrapper2 } = await import("./index-
|
214517
|
+
const { SpatialWrapper: SpatialWrapper2 } = await import("./index-0b46e436.js");
|
214035
214518
|
return { default: SpatialWrapper2 };
|
214036
214519
|
});
|
214037
214520
|
const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
|
@@ -223019,7 +223502,7 @@ function LinkController(props) {
|
|
223019
223502
|
};
|
223020
223503
|
(_a3 = connection.current) == null ? void 0 : _a3.send(JSON.stringify(message));
|
223021
223504
|
} catch (error2) {
|
223022
|
-
|
223505
|
+
log$c.error("Unable to send Configuration to Server", error2);
|
223023
223506
|
}
|
223024
223507
|
}
|
223025
223508
|
}, [id2, socketOpen, sync]);
|
@@ -223036,7 +223519,7 @@ function LinkController(props) {
|
|
223036
223519
|
}).then((response) => response.json()).then((response) => {
|
223037
223520
|
setLinkID(response.link_id);
|
223038
223521
|
}).catch((err2) => {
|
223039
|
-
|
223522
|
+
log$c.error("Fetch Error :-S", err2);
|
223040
223523
|
});
|
223041
223524
|
}
|
223042
223525
|
}, [linkID, linkEndpoint]);
|
@@ -223052,27 +223535,27 @@ function LinkController(props) {
|
|
223052
223535
|
if (linkID !== null) {
|
223053
223536
|
const ws2 = new WebSocket(websocketEndpoint, ["Authorization", authToken, linkID]);
|
223054
223537
|
ws2.addEventListener("open", (event2) => {
|
223055
|
-
|
223538
|
+
log$c.log("Open", event2);
|
223056
223539
|
setSocketOpen(true);
|
223057
223540
|
});
|
223058
223541
|
ws2.addEventListener("connecting", (event2) => {
|
223059
|
-
|
223542
|
+
log$c.log("Connecting", event2);
|
223060
223543
|
setSocketOpen(false);
|
223061
223544
|
});
|
223062
223545
|
ws2.addEventListener("error", (event2) => {
|
223063
|
-
|
223546
|
+
log$c.log("Error", event2);
|
223064
223547
|
});
|
223065
223548
|
ws2.addEventListener("close", (event2) => {
|
223066
|
-
|
223549
|
+
log$c.log("Close", event2);
|
223067
223550
|
});
|
223068
223551
|
ws2.addEventListener("message", (event2) => {
|
223069
|
-
|
223552
|
+
log$c.log("Message", event2);
|
223070
223553
|
const eventData = event2.data;
|
223071
223554
|
if (eventData.includes(";")) {
|
223072
223555
|
if (eventData.split(";")[0] === id2) {
|
223073
|
-
|
223556
|
+
log$c.log("Message from ourselves");
|
223074
223557
|
} else {
|
223075
|
-
|
223558
|
+
log$c.log("Message from server ");
|
223076
223559
|
if (sync) {
|
223077
223560
|
setConfig({
|
223078
223561
|
...JSON.parse(decodeURI(atob(eventData.split(";")[1]))),
|
@@ -223792,7 +224275,7 @@ const useStyles$3 = makeStyles((theme) => ({
|
|
223792
224275
|
}));
|
223793
224276
|
register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
|
223794
224277
|
const LazyHiGlassComponent = React__default.lazy(async () => {
|
223795
|
-
const { HiGlassComponent } = await import("./higlass-
|
224278
|
+
const { HiGlassComponent } = await import("./higlass-4fa163b9.js");
|
223796
224279
|
return { default: HiGlassComponent };
|
223797
224280
|
});
|
223798
224281
|
const HG_SIZE = 800;
|
@@ -228992,7 +229475,10 @@ function CellSetExpressionPlot(props) {
|
|
228992
229475
|
stratificationSide = ordinal$1().domain(sampleSetNames).range(["left", "right"]);
|
228993
229476
|
stratificationColor = ordinal$1().domain(sampleSetNames).range(
|
228994
229477
|
// TODO: check for full path equality here.
|
228995
|
-
sampleSetNames.map((name2) =>
|
229478
|
+
sampleSetNames.map((name2) => {
|
229479
|
+
var _a3;
|
229480
|
+
return ((_a3 = sampleSetColor == null ? void 0 : sampleSetColor.find((d) => d.path.at(-1) === name2)) == null ? void 0 : _a3.color) || [125, 125, 125];
|
229481
|
+
}).map(colorArrayToString)
|
228996
229482
|
);
|
228997
229483
|
}
|
228998
229484
|
const {
|
@@ -229123,11 +229609,11 @@ function summarize(iterable, keepZeros) {
|
|
229123
229609
|
};
|
229124
229610
|
}
|
229125
229611
|
function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
229126
|
-
const result = new InternMap([], JSON.stringify);
|
229612
|
+
const result = new InternMap$1([], JSON.stringify);
|
229127
229613
|
Array.from(stratifiedResult.entries()).forEach(([cellSetKey, firstLevelInternMap]) => {
|
229128
|
-
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
229614
|
+
result.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
229129
229615
|
Array.from(firstLevelInternMap.entries()).forEach(([sampleSetKey, secondLevelInternMap]) => {
|
229130
|
-
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
229616
|
+
result.get(cellSetKey).set(sampleSetKey, new InternMap$1([], JSON.stringify));
|
229131
229617
|
Array.from(secondLevelInternMap.entries()).forEach(([geneKey, values3]) => {
|
229132
229618
|
if (values3) {
|
229133
229619
|
const exprMean = mean$1(values3);
|
@@ -229145,9 +229631,9 @@ function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
|
229145
229631
|
return result;
|
229146
229632
|
}
|
229147
229633
|
function summarizeStratifiedExpressionData(stratifiedResult, keepZeros) {
|
229148
|
-
const summarizedResult = new InternMap([], JSON.stringify);
|
229634
|
+
const summarizedResult = new InternMap$1([], JSON.stringify);
|
229149
229635
|
Array.from(stratifiedResult.entries()).forEach(([cellSetKey, firstLevelInternMap]) => {
|
229150
|
-
summarizedResult.set(cellSetKey, new InternMap([], JSON.stringify));
|
229636
|
+
summarizedResult.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
229151
229637
|
Array.from(firstLevelInternMap.entries()).forEach(([sampleSetKey, secondLevelInternMap]) => {
|
229152
229638
|
const values3 = secondLevelInternMap;
|
229153
229639
|
const summary = summarize(values3, keepZeros);
|
@@ -248338,10 +248824,10 @@ const Tiles = {
|
|
248338
248824
|
resquarify: treemapResquarify
|
248339
248825
|
};
|
248340
248826
|
const Output$4 = ["x0", "y0", "x1", "y1", "depth", "children"];
|
248341
|
-
function Treemap(params2) {
|
248827
|
+
function Treemap$1(params2) {
|
248342
248828
|
HierarchyLayout.call(this, params2);
|
248343
248829
|
}
|
248344
|
-
Treemap.Definition = {
|
248830
|
+
Treemap$1.Definition = {
|
248345
248831
|
"type": "Treemap",
|
248346
248832
|
"metadata": {
|
248347
248833
|
"tree": true,
|
@@ -248407,7 +248893,7 @@ Treemap.Definition = {
|
|
248407
248893
|
"default": Output$4
|
248408
248894
|
}]
|
248409
248895
|
};
|
248410
|
-
inherits(Treemap, HierarchyLayout, {
|
248896
|
+
inherits(Treemap$1, HierarchyLayout, {
|
248411
248897
|
/**
|
248412
248898
|
* Treemap layout generator. Adds 'method' and 'ratio' parameters
|
248413
248899
|
* to configure the underlying tile method.
|
@@ -248438,7 +248924,7 @@ const tree = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
248438
248924
|
stratify: Stratify,
|
248439
248925
|
tree: Tree,
|
248440
248926
|
treelinks: TreeLinks,
|
248441
|
-
treemap: Treemap
|
248927
|
+
treemap: Treemap$1
|
248442
248928
|
}, Symbol.toStringTag, { value: "Module" }));
|
248443
248929
|
const ALPHA_MASK = 4278190080;
|
248444
248930
|
function baseBitmaps($2, data2) {
|
@@ -281041,8 +281527,8 @@ function useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
281041
281527
|
if (stratifiedData) {
|
281042
281528
|
const dotData = dotStratifiedExpressionData(stratifiedData, posThreshold);
|
281043
281529
|
const geneToUuid = new Map(geneSelection == null ? void 0 : geneSelection.map((gene) => [gene, v4$1()]));
|
281044
|
-
const cellSetToUuid = new InternMap(cellSetSelection == null ? void 0 : cellSetSelection.map((sampleSet) => [sampleSet, v4$1()]), JSON.stringify);
|
281045
|
-
const sampleSetToUuid = new InternMap(sampleSetSelection == null ? void 0 : sampleSetSelection.map((sampleSet) => [sampleSet, v4$1()]), JSON.stringify);
|
281530
|
+
const cellSetToUuid = new InternMap$1(cellSetSelection == null ? void 0 : cellSetSelection.map((sampleSet) => [sampleSet, v4$1()]), JSON.stringify);
|
281531
|
+
const sampleSetToUuid = new InternMap$1(sampleSetSelection == null ? void 0 : sampleSetSelection.map((sampleSet) => [sampleSet, v4$1()]), JSON.stringify);
|
281046
281532
|
const result = [];
|
281047
281533
|
Array.from(dotData.entries()).forEach(([cellSetKey, firstLevelInternMap]) => {
|
281048
281534
|
Array.from(firstLevelInternMap.entries()).forEach(([sampleSetKey, secondLevelInternMap]) => {
|
@@ -281285,6 +281771,235 @@ function FeatureBarPlotSubscriber(props) {
|
|
281285
281771
|
]);
|
281286
281772
|
return jsxRuntimeExports.jsx(TitleInfo, { title: `Feature Values${firstGeneSelected ? ` (${firstGeneSelected})` : ""}`, removeGridComponent, urls: urls2, theme, isReady, helpText, children: jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: expressionArr ? jsxRuntimeExports.jsx(FeatureBarPlot, { yMin, yMax: expressionMax, yUnits, data: expressionArr, theme, width: width2, height: height2, obsType, cellHighlight, cellSetSelection, additionalCellSets, cellSetColor, featureType, featureValueType, featureName: firstGeneSelected, onBarSelect, onBarHighlight }) : jsxRuntimeExports.jsxs("span", { children: ["Select a ", featureType, "."] }) }) });
|
281287
281773
|
}
|
281774
|
+
function uidGenerator(prefix2) {
|
281775
|
+
let i2 = 0;
|
281776
|
+
return () => {
|
281777
|
+
i2 += 1;
|
281778
|
+
return { id: `${prefix2}-${i2}`, href: `#${prefix2}-${i2}` };
|
281779
|
+
};
|
281780
|
+
}
|
281781
|
+
function getColorScale(setSelectionArr, setColorArr, theme) {
|
281782
|
+
var _a3;
|
281783
|
+
return ordinal$1().domain(setSelectionArr || []).range(((_a3 = setSelectionArr == null ? void 0 : setSelectionArr.map((setNamePath) => {
|
281784
|
+
var _a4;
|
281785
|
+
return ((_a4 = setColorArr == null ? void 0 : setColorArr.find((d) => isEqual$5(d.path, setNamePath))) == null ? void 0 : _a4.color) || getDefaultColor(theme);
|
281786
|
+
})) == null ? void 0 : _a3.map(colorArrayToString)) || []);
|
281787
|
+
}
|
281788
|
+
function Treemap(props) {
|
281789
|
+
const { obsCounts, obsColorEncoding, hierarchyLevels, theme, width: width2, height: height2, obsType, sampleType, obsSetColor, sampleSetColor, obsSetSelection, sampleSetSelection, marginTop = 5, marginRight = 5, marginLeft = 80, marginBottom } = props;
|
281790
|
+
const hierarchyData = useMemo(() => {
|
281791
|
+
if (!obsCounts) {
|
281792
|
+
return null;
|
281793
|
+
}
|
281794
|
+
let map2;
|
281795
|
+
if (isEqual$5(hierarchyLevels, ["sampleSet", "obsSet"])) {
|
281796
|
+
map2 = rollup(obsCounts, (D2) => D2[0].value, (d) => d.sampleSetPath, (d) => d.obsSetPath);
|
281797
|
+
} else if (isEqual$5(hierarchyLevels, ["obsSet", "sampleSet"])) {
|
281798
|
+
map2 = rollup(obsCounts, (D2) => D2[0].value, (d) => d.obsSetPath, (d) => d.sampleSetPath);
|
281799
|
+
} else {
|
281800
|
+
throw new Error("Unexpected levels value.");
|
281801
|
+
}
|
281802
|
+
return hierarchy(map2);
|
281803
|
+
}, [obsCounts, hierarchyLevels]);
|
281804
|
+
const [obsSetColorScale, sampleSetColorScale] = useMemo(() => [
|
281805
|
+
getColorScale(obsSetSelection, obsSetColor, theme),
|
281806
|
+
getColorScale(sampleSetSelection, sampleSetColor, theme)
|
281807
|
+
], [obsSetSelection, sampleSetSelection, sampleSetColor, obsSetColor, theme]);
|
281808
|
+
const treemapLeaves = useMemo(() => {
|
281809
|
+
const treemapFunc = treemap().tile(treemapBinary).size([width2, height2]).padding(1).round(true);
|
281810
|
+
const treemapLayout = treemapFunc(hierarchyData.sum((d) => d[1]).sort((a2, b2) => b2[1] - a2[1]));
|
281811
|
+
return treemapLayout.leaves();
|
281812
|
+
}, [hierarchyData, width2, height2]);
|
281813
|
+
const svgRef = useRef();
|
281814
|
+
useEffect(() => {
|
281815
|
+
const domElement = svgRef.current;
|
281816
|
+
const svg2 = select$1(domElement);
|
281817
|
+
svg2.selectAll("g").remove();
|
281818
|
+
svg2.attr("width", width2).attr("height", height2).attr("viewBox", [0, 0, width2, height2]).attr("style", "font: 10px sans-serif");
|
281819
|
+
if (!treemapLeaves || !obsSetSelection || !sampleSetSelection) {
|
281820
|
+
return;
|
281821
|
+
}
|
281822
|
+
const leaf = svg2.selectAll("g").data(treemapLeaves).join("g").attr("transform", (d) => `translate(${d.x0},${d.y0})`);
|
281823
|
+
leaf.append("title").text((d) => {
|
281824
|
+
var _a3;
|
281825
|
+
const cellCount = (_a3 = d.data) == null ? void 0 : _a3[1];
|
281826
|
+
const primaryPathString = JSON.stringify(d.data[0]);
|
281827
|
+
const secondaryPathString = JSON.stringify(d.parent.data[0]);
|
281828
|
+
return `${cellCount.toLocaleString()} ${pluralize(obsType, cellCount)} in ${primaryPathString} and ${secondaryPathString}`;
|
281829
|
+
});
|
281830
|
+
const getLeafUid = uidGenerator("leaf");
|
281831
|
+
const getClipUid = uidGenerator("clip");
|
281832
|
+
const colorScale2 = obsColorEncoding === "sampleSetSelection" ? sampleSetColorScale : obsSetColorScale;
|
281833
|
+
const getPathForColoring = (d) => {
|
281834
|
+
var _a3, _b3, _c3, _d2, _e2, _f3;
|
281835
|
+
return (
|
281836
|
+
// eslint-disable-next-line no-nested-ternary
|
281837
|
+
obsColorEncoding === "sampleSetSelection" ? hierarchyLevels[0] === "obsSet" ? (_a3 = d.data) == null ? void 0 : _a3[0] : (_c3 = (_b3 = d.parent) == null ? void 0 : _b3.data) == null ? void 0 : _c3[0] : hierarchyLevels[0] === "sampleSet" ? (_d2 = d.data) == null ? void 0 : _d2[0] : (_f3 = (_e2 = d.parent) == null ? void 0 : _e2.data) == null ? void 0 : _f3[0]
|
281838
|
+
);
|
281839
|
+
};
|
281840
|
+
leaf.append("rect").attr("id", (d) => {
|
281841
|
+
d.leafUid = getLeafUid();
|
281842
|
+
return d.leafUid.id;
|
281843
|
+
}).attr("fill", (d) => colorScale2(getPathForColoring(d))).attr("fill-opacity", 0.8).attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
|
281844
|
+
leaf.append("clipPath").attr("id", (d) => {
|
281845
|
+
d.clipUid = getClipUid();
|
281846
|
+
return d.clipUid.id;
|
281847
|
+
}).append("use").attr("xlink:href", (d) => d.leafUid.href);
|
281848
|
+
leaf.append("text").attr("clip-path", (d) => `url(${d.clipUid.href})`).selectAll("tspan").data((d) => {
|
281849
|
+
var _a3, _b3, _c3, _d2, _e2, _f3, _g2;
|
281850
|
+
return [
|
281851
|
+
// Each element in this array corresponds to a line of text.
|
281852
|
+
(_b3 = (_a3 = d.data) == null ? void 0 : _a3[0]) == null ? void 0 : _b3.at(-1),
|
281853
|
+
(_e2 = (_d2 = (_c3 = d.parent) == null ? void 0 : _c3.data) == null ? void 0 : _d2[0]) == null ? void 0 : _e2.at(-1),
|
281854
|
+
`${(_f3 = d.data) == null ? void 0 : _f3[1].toLocaleString()} ${pluralize(obsType, (_g2 = d.data) == null ? void 0 : _g2[1])}`
|
281855
|
+
];
|
281856
|
+
}).join("tspan").attr("x", 3).attr("y", (d, i2, nodes) => `${(i2 === nodes.length - 1) * 0.3 + 1.1 + i2 * 0.9}em`).text((d) => d);
|
281857
|
+
}, [
|
281858
|
+
width2,
|
281859
|
+
height2,
|
281860
|
+
marginLeft,
|
281861
|
+
marginBottom,
|
281862
|
+
theme,
|
281863
|
+
marginTop,
|
281864
|
+
marginRight,
|
281865
|
+
obsType,
|
281866
|
+
sampleType,
|
281867
|
+
treemapLeaves,
|
281868
|
+
sampleSetColor,
|
281869
|
+
sampleSetSelection,
|
281870
|
+
obsSetSelection,
|
281871
|
+
obsSetColor,
|
281872
|
+
obsSetColorScale,
|
281873
|
+
sampleSetColorScale,
|
281874
|
+
obsColorEncoding,
|
281875
|
+
hierarchyLevels
|
281876
|
+
]);
|
281877
|
+
return jsxRuntimeExports.jsx("svg", { ref: svgRef, style: {
|
281878
|
+
top: 0,
|
281879
|
+
left: 0,
|
281880
|
+
width: `${width2}px`,
|
281881
|
+
height: `${height2}px`,
|
281882
|
+
position: "relative"
|
281883
|
+
} });
|
281884
|
+
}
|
281885
|
+
function TreemapOptions(props) {
|
281886
|
+
const { children: children2, obsType, sampleType, hierarchyLevels, setHierarchyLevels, obsColorEncoding, setObsColorEncoding } = props;
|
281887
|
+
const treemapOptionsId = $bdb11010cef70236$export$f680877a34711e37();
|
281888
|
+
const classes = usePlotOptionsStyles();
|
281889
|
+
function handleColorEncodingChange(event2) {
|
281890
|
+
setObsColorEncoding(event2.target.value);
|
281891
|
+
}
|
281892
|
+
function handleHierarchyLevelsOrderingChange(event2) {
|
281893
|
+
if (event2.target.value === "sampleSet") {
|
281894
|
+
setHierarchyLevels(["sampleSet", "obsSet"]);
|
281895
|
+
} else {
|
281896
|
+
setHierarchyLevels(["obsSet", "sampleSet"]);
|
281897
|
+
}
|
281898
|
+
}
|
281899
|
+
const primaryHierarchyLevel = isEqual$5(hierarchyLevels, ["sampleSet", "obsSet"]) ? "sampleSet" : "obsSet";
|
281900
|
+
return jsxRuntimeExports.jsxs(OptionsContainer, { children: [children2, jsxRuntimeExports.jsxs(TableRow$1, { children: [jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `cell-color-encoding-select-${treemapOptionsId}`, children: "Color Encoding" }) }), jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: jsxRuntimeExports.jsxs(OptionSelect, { className: classes.select, value: obsColorEncoding, onChange: handleColorEncodingChange, inputProps: {
|
281901
|
+
id: `cell-color-encoding-select-${treemapOptionsId}`
|
281902
|
+
}, children: [jsxRuntimeExports.jsxs("option", { value: "cellSetSelection", children: [capitalize$2(obsType), " Sets"] }), jsxRuntimeExports.jsxs("option", { value: "sampleSetSelection", children: [capitalize$2(sampleType), " Sets"] })] }) })] }), jsxRuntimeExports.jsxs(TableRow$1, { children: [jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `treemap-set-hierarchy-levels-${treemapOptionsId}`, children: "Primary Hierarchy Level" }) }), jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: jsxRuntimeExports.jsxs(OptionSelect, { className: classes.select, value: primaryHierarchyLevel, onChange: handleHierarchyLevelsOrderingChange, inputProps: {
|
281903
|
+
id: `hierarchy-level-select-${treemapOptionsId}`
|
281904
|
+
}, children: [jsxRuntimeExports.jsxs("option", { value: "obsSet", children: [capitalize$2(obsType), " Sets"] }), jsxRuntimeExports.jsxs("option", { value: "sampleSet", children: [capitalize$2(sampleType), " Sets"] })] }) })] })] });
|
281905
|
+
}
|
281906
|
+
const DEFAULT_HIERARCHY_LEVELS = ["obsSet", "sampleSet"];
|
281907
|
+
function TreemapSubscriber(props) {
|
281908
|
+
const { coordinationScopes, removeGridComponent, theme, helpText = ViewHelpMapping.TREEMAP } = props;
|
281909
|
+
const classes = useStyles$2();
|
281910
|
+
const loaders = useLoaders();
|
281911
|
+
const [{ dataset, obsType, featureType, featureValueType, obsFilter, obsHighlight, obsSetSelection, obsSetFilter, obsSelection, obsSelectionMode, obsSetHighlight, obsSetColor, obsColorEncoding, additionalObsSets, sampleType, sampleSetSelection, sampleSetFilter, sampleSetColor, sampleSelection, sampleSelectionMode, sampleFilter, sampleFilterMode, sampleHighlight, hierarchyLevels }, { setObsFilter, setObsSelection: setObsSelection2, setObsSetFilter, setObsSetSelection, setObsSelectionMode, setObsFilterMode, setObsHighlight, setObsSetColor, setObsColorEncoding, setAdditionalObsSets, setSampleFilter, setSampleSetFilter, setSampleFilterMode, setSampleSelection, setSampleSetSelection, setSampleSelectionMode, setSampleHighlight, setSampleSetColor, setHierarchyLevels }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.TREEMAP], coordinationScopes);
|
281912
|
+
const [width2, height2, containerRef] = useGridItemSize();
|
281913
|
+
const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
|
281914
|
+
const [{ obsSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
|
281915
|
+
const [{ sampleIndex, sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(
|
281916
|
+
loaders,
|
281917
|
+
dataset,
|
281918
|
+
// TODO: support `false`, i.e., configurations in which
|
281919
|
+
// there are no sampleSets
|
281920
|
+
true,
|
281921
|
+
{ setSampleSetColor },
|
281922
|
+
{ sampleSetColor },
|
281923
|
+
{ sampleType }
|
281924
|
+
);
|
281925
|
+
const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(
|
281926
|
+
loaders,
|
281927
|
+
dataset,
|
281928
|
+
// TODO: support `false`, i.e., configurations in which
|
281929
|
+
// there are no sampleEdges
|
281930
|
+
true,
|
281931
|
+
{},
|
281932
|
+
{},
|
281933
|
+
{ obsType, sampleType }
|
281934
|
+
);
|
281935
|
+
const isReady = useReady([
|
281936
|
+
matrixIndicesStatus,
|
281937
|
+
obsSetsStatus,
|
281938
|
+
sampleSetsStatus,
|
281939
|
+
sampleEdgesStatus
|
281940
|
+
]);
|
281941
|
+
const urls2 = useUrls([
|
281942
|
+
matrixIndicesUrls,
|
281943
|
+
obsSetsUrls,
|
281944
|
+
sampleSetsUrls,
|
281945
|
+
sampleEdgesUrls
|
281946
|
+
]);
|
281947
|
+
const mergedObsSets = useMemo(() => mergeObsSets(obsSets, additionalObsSets), [obsSets, additionalObsSets]);
|
281948
|
+
const mergedSampleSets = useMemo(() => mergeObsSets(sampleSets, null), [sampleSets]);
|
281949
|
+
const obsCount = (obsIndex == null ? void 0 : obsIndex.length) || 0;
|
281950
|
+
const sampleCount = (sampleIndex == null ? void 0 : sampleIndex.length) || 0;
|
281951
|
+
const [obsCounts, sampleCounts] = useMemo(() => {
|
281952
|
+
var _a3, _b3;
|
281953
|
+
const obsResult = new InternMap$1([], JSON.stringify);
|
281954
|
+
const sampleResult = new InternMap$1([], JSON.stringify);
|
281955
|
+
const hasSampleSetSelection = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 0;
|
281956
|
+
const hasCellSetSelection = Array.isArray(obsSetSelection) && obsSetSelection.length > 0;
|
281957
|
+
const sampleSetKeys = hasSampleSetSelection ? sampleSetSelection : [null];
|
281958
|
+
const cellSetKeys = hasCellSetSelection ? obsSetSelection : [null];
|
281959
|
+
cellSetKeys.forEach((cellSetKey) => {
|
281960
|
+
obsResult.set(cellSetKey, new InternMap$1([], JSON.stringify));
|
281961
|
+
sampleSetKeys.forEach((sampleSetKey) => {
|
281962
|
+
obsResult.get(cellSetKey).set(sampleSetKey, 0);
|
281963
|
+
});
|
281964
|
+
});
|
281965
|
+
const sampleSetSizes = treeToSetSizesBySetNames(mergedSampleSets, sampleSetSelection, sampleSetSelection, sampleSetColor, theme);
|
281966
|
+
sampleSetKeys.forEach((sampleSetKey) => {
|
281967
|
+
var _a4;
|
281968
|
+
const sampleSetSize = (_a4 = sampleSetSizes.find((d) => isEqual$5(d.setNamePath, sampleSetKey))) == null ? void 0 : _a4.size;
|
281969
|
+
sampleResult.set(sampleSetKey, sampleSetSize || 0);
|
281970
|
+
});
|
281971
|
+
if (mergedObsSets && obsSetSelection) {
|
281972
|
+
const sampleIdToSetMap = sampleSets && sampleSetSelection ? treeToSelectedSetMap(sampleSets, sampleSetSelection) : null;
|
281973
|
+
const cellIdToSetMap = treeToSelectedSetMap(mergedObsSets, obsSetSelection);
|
281974
|
+
for (let i2 = 0; i2 < obsIndex.length; i2 += 1) {
|
281975
|
+
const obsId = obsIndex[i2];
|
281976
|
+
const cellSet = cellIdToSetMap == null ? void 0 : cellIdToSetMap.get(obsId);
|
281977
|
+
const sampleId = sampleEdges == null ? void 0 : sampleEdges.get(obsId);
|
281978
|
+
const sampleSet = sampleId ? sampleIdToSetMap == null ? void 0 : sampleIdToSetMap.get(sampleId) : null;
|
281979
|
+
if (hasSampleSetSelection && !sampleSet) {
|
281980
|
+
continue;
|
281981
|
+
}
|
281982
|
+
const prevObsCount = (_a3 = obsResult.get(cellSet)) == null ? void 0 : _a3.get(sampleSet);
|
281983
|
+
(_b3 = obsResult.get(cellSet)) == null ? void 0 : _b3.set(sampleSet, prevObsCount + 1);
|
281984
|
+
}
|
281985
|
+
}
|
281986
|
+
return [
|
281987
|
+
unnestMap(obsResult, ["obsSetPath", "sampleSetPath", "value"]),
|
281988
|
+
unnestMap(sampleResult, ["sampleSetPath", "value"])
|
281989
|
+
];
|
281990
|
+
}, [
|
281991
|
+
obsIndex,
|
281992
|
+
sampleEdges,
|
281993
|
+
sampleSets,
|
281994
|
+
obsSetColor,
|
281995
|
+
sampleSetColor,
|
281996
|
+
mergedObsSets,
|
281997
|
+
obsSetSelection,
|
281998
|
+
mergedSampleSets
|
281999
|
+
// TODO: consider filtering-related coordination values
|
282000
|
+
]);
|
282001
|
+
return jsxRuntimeExports.jsx(TitleInfo, { title: `Treemap of ${capitalize$2(pluralize(obsType, 2))}`, info: `${commaNumber(obsCount)} ${pluralize(obsType, obsCount)} from ${commaNumber(sampleCount)} ${pluralize(sampleType, sampleCount)}`, removeGridComponent, urls: urls2, theme, isReady, helpText, options: jsxRuntimeExports.jsx(TreemapOptions, { obsType, sampleType, obsColorEncoding, setObsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, setHierarchyLevels }), children: jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: jsxRuntimeExports.jsx(Treemap, { obsCounts, sampleCounts, obsColorEncoding, hierarchyLevels: hierarchyLevels || DEFAULT_HIERARCHY_LEVELS, theme, width: width2, height: height2, obsType, sampleType, obsSetColor, sampleSetColor, obsSetSelection, sampleSetSelection }) }) });
|
282002
|
+
}
|
281288
282003
|
class LoaderResult {
|
281289
282004
|
/**
|
281290
282005
|
* @param {LoaderDataType} data
|
@@ -281349,10 +282064,11 @@ class LoaderValidationError extends AbstractLoaderError {
|
|
281349
282064
|
this.datasetFileType = datasetFileType;
|
281350
282065
|
this.datasetUrl = datasetUrl;
|
281351
282066
|
this.reason = reason;
|
282067
|
+
this.message = `${datasetType} from ${datasetUrl}: validation failed`;
|
281352
282068
|
}
|
281353
282069
|
warnInConsole() {
|
281354
|
-
const {
|
281355
|
-
|
282070
|
+
const { reason, message } = this;
|
282071
|
+
log$c.warn(message, JSON.stringify(reason, null, 2));
|
281356
282072
|
}
|
281357
282073
|
}
|
281358
282074
|
class DataSourceFetchError extends AbstractLoaderError {
|
@@ -281361,10 +282077,11 @@ class DataSourceFetchError extends AbstractLoaderError {
|
|
281361
282077
|
this.source = source2;
|
281362
282078
|
this.url = url;
|
281363
282079
|
this.headers = headers;
|
282080
|
+
this.message = `${source2} failed to fetch from ${url} with headers ${JSON.stringify(headers)}`;
|
281364
282081
|
}
|
281365
282082
|
warnInConsole() {
|
281366
|
-
const {
|
281367
|
-
|
282083
|
+
const { message } = this;
|
282084
|
+
log$c.warn(message);
|
281368
282085
|
}
|
281369
282086
|
}
|
281370
282087
|
class CsvSource {
|
@@ -282175,7 +282892,7 @@ async function initLoader(imageData) {
|
|
282175
282892
|
const { metadata: loaderMetadata } = loader2;
|
282176
282893
|
const { omero, multiscales } = loaderMetadata;
|
282177
282894
|
if (!Array.isArray(multiscales) || multiscales.length === 0) {
|
282178
|
-
|
282895
|
+
log$c.error("Multiscales array must exist and have at least one element");
|
282179
282896
|
}
|
282180
282897
|
const { coordinateTransformations } = multiscales[0];
|
282181
282898
|
const axes = getNgffAxes(multiscales[0].axes);
|
@@ -282253,7 +282970,7 @@ class RasterJsonAsImageLoader extends RasterLoader {
|
|
282253
282970
|
}
|
282254
282971
|
});
|
282255
282972
|
if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
|
282256
|
-
|
282973
|
+
log$c.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.");
|
282257
282974
|
}
|
282258
282975
|
return new LoaderResult({
|
282259
282976
|
image: loaders.length > 0 && meta2.length > 0 ? { loaders, meta: meta2 } : null
|
@@ -282285,7 +283002,7 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
|
|
282285
283002
|
}
|
282286
283003
|
});
|
282287
283004
|
if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
|
282288
|
-
|
283005
|
+
log$c.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.");
|
282289
283006
|
}
|
282290
283007
|
return new LoaderResult(loaders.length > 0 && meta2.length > 0 ? {
|
282291
283008
|
obsSegmentationsType: "bitmask",
|
@@ -282348,7 +283065,7 @@ function basename(path2) {
|
|
282348
283065
|
const arr = path2.split("/");
|
282349
283066
|
const result = arr.at(-1);
|
282350
283067
|
if (!result) {
|
282351
|
-
|
283068
|
+
log$c.error("basename of path is empty", path2);
|
282352
283069
|
return "";
|
282353
283070
|
}
|
282354
283071
|
return result;
|
@@ -282519,6 +283236,16 @@ class AnnDataSource extends ZarrDataSource {
|
|
282519
283236
|
this.obsIndex = this.getJson("obs/.zattrs").then(({ _index }) => this.getFlatArrDecompressed(`/obs/${_index}`));
|
282520
283237
|
return this.obsIndex;
|
282521
283238
|
}
|
283239
|
+
/**
|
283240
|
+
* Class method for loading the obs index.
|
283241
|
+
* @param {string|undefined} path Used by subclasses.
|
283242
|
+
* @returns {Promise<string[]>} An promise for a zarr array
|
283243
|
+
* containing the indices.
|
283244
|
+
*/
|
283245
|
+
loadDataFrameIndex(path2 = void 0) {
|
283246
|
+
const dfPath = path2 ? dirname(path2) : "";
|
283247
|
+
return this.getJson(`${dfPath}/.zattrs`).then(({ _index }) => this.getFlatArrDecompressed(`${dfPath.length > 0 ? "/" : ""}${dfPath}/${_index}`));
|
283248
|
+
}
|
282522
283249
|
/**
|
282523
283250
|
* Class method for loading the var index.
|
282524
283251
|
* @param {string|undefined} path Used by subclasses.
|
@@ -282630,7 +283357,7 @@ class AnnDataSource extends ZarrDataSource {
|
|
282630
283357
|
try {
|
282631
283358
|
val = await this._loadElement(`${path2}/${key2}`);
|
282632
283359
|
} catch (e3) {
|
282633
|
-
|
283360
|
+
log$c.error(`Error in _loadDict: could not load ${key2}`);
|
282634
283361
|
}
|
282635
283362
|
result[key2] = val;
|
282636
283363
|
}));
|
@@ -283515,6 +284242,68 @@ class SampleEdgesAnndataLoader extends AbstractTwoStepLoader {
|
|
283515
284242
|
});
|
283516
284243
|
}
|
283517
284244
|
}
|
284245
|
+
class SampleSetsAnndataLoader extends AbstractTwoStepLoader {
|
284246
|
+
loadObsIndices() {
|
284247
|
+
var _a3;
|
284248
|
+
const { options } = this;
|
284249
|
+
const obsIndexPromises = (_a3 = options.sampleSets) == null ? void 0 : _a3.map(({ path: path2 }) => path2).map((pathOrPaths) => {
|
284250
|
+
if (Array.isArray(pathOrPaths)) {
|
284251
|
+
if (pathOrPaths.length > 0) {
|
284252
|
+
return this.dataSource.loadDataFrameIndex(pathOrPaths[0]);
|
284253
|
+
}
|
284254
|
+
return this.dataSource.loadDataFrameIndex();
|
284255
|
+
}
|
284256
|
+
return this.dataSource.loadDataFrameIndex(pathOrPaths);
|
284257
|
+
});
|
284258
|
+
return Promise.all(obsIndexPromises);
|
284259
|
+
}
|
284260
|
+
loadCellSetIds() {
|
284261
|
+
var _a3;
|
284262
|
+
const { options } = this;
|
284263
|
+
const cellSetZarrLocation = (_a3 = options.sampleSets) == null ? void 0 : _a3.map(({ path: path2 }) => path2);
|
284264
|
+
return this.dataSource.loadObsColumns(cellSetZarrLocation);
|
284265
|
+
}
|
284266
|
+
loadCellSetScores() {
|
284267
|
+
var _a3;
|
284268
|
+
const { options } = this;
|
284269
|
+
const cellSetScoreZarrLocation = (_a3 = options.sampleSets) == null ? void 0 : _a3.map((option) => option.scorePath || void 0);
|
284270
|
+
return this.dataSource.loadObsColumns(cellSetScoreZarrLocation);
|
284271
|
+
}
|
284272
|
+
async load() {
|
284273
|
+
const superResult = await super.load().catch((reason) => Promise.resolve(reason));
|
284274
|
+
if (superResult instanceof AbstractLoaderError) {
|
284275
|
+
return Promise.reject(superResult);
|
284276
|
+
}
|
284277
|
+
if (!this.cachedResult) {
|
284278
|
+
const { options } = this;
|
284279
|
+
this.cachedResult = Promise.all([
|
284280
|
+
this.dataSource.loadDataFrameIndex(),
|
284281
|
+
this.loadObsIndices(),
|
284282
|
+
this.loadCellSetIds(),
|
284283
|
+
this.loadCellSetScores()
|
284284
|
+
]).then((data2) => [
|
284285
|
+
data2[0],
|
284286
|
+
dataToCellSetsTree([data2[1], data2[2], data2[3]], options.sampleSets)
|
284287
|
+
]);
|
284288
|
+
}
|
284289
|
+
const [obsIndex, obsSets] = await this.cachedResult;
|
284290
|
+
const obsSetsMembership = treeToMembershipMap(obsSets);
|
284291
|
+
const coordinationValues = {};
|
284292
|
+
const { tree: tree2 } = obsSets;
|
284293
|
+
const newAutoSetSelectionParentName = tree2[0].name;
|
284294
|
+
tree2[0].children.map((node2) => [
|
284295
|
+
newAutoSetSelectionParentName,
|
284296
|
+
node2.name
|
284297
|
+
]);
|
284298
|
+
const newAutoSetColors = initializeCellSetColor(obsSets, []);
|
284299
|
+
coordinationValues.sampleSetColor = newAutoSetColors;
|
284300
|
+
return Promise.resolve(new LoaderResult({
|
284301
|
+
sampleIndex: obsIndex,
|
284302
|
+
sampleSets: obsSets,
|
284303
|
+
sampleSetsMembership: obsSetsMembership
|
284304
|
+
}, null, coordinationValues));
|
284305
|
+
}
|
284306
|
+
}
|
283518
284307
|
class GenomicProfilesZarrLoader extends AbstractTwoStepLoader {
|
283519
284308
|
loadAttrs() {
|
283520
284309
|
if (this.attrs) {
|
@@ -283648,7 +284437,7 @@ class ImageWrapper {
|
|
283648
284437
|
const channelNames = this.getChannelNames();
|
283649
284438
|
const channelIndex = channelNames.indexOf(channelSpecifier);
|
283650
284439
|
if (channelIndex === -1) {
|
283651
|
-
|
284440
|
+
log$c.error(`Channel ${channelSpecifier} not found in image.`);
|
283652
284441
|
}
|
283653
284442
|
return channelIndex;
|
283654
284443
|
}
|
@@ -283822,11 +284611,11 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
|
|
283822
284611
|
const isSpatialData = !!spatialDataChannels || !!imageLabel;
|
283823
284612
|
const isLabels = !!imageLabel;
|
283824
284613
|
if (!isSpatialData && !omero) {
|
283825
|
-
|
284614
|
+
log$c.error("image.ome-zarr must have omero metadata in attributes.");
|
283826
284615
|
return Promise.reject(payload);
|
283827
284616
|
}
|
283828
284617
|
if (!Array.isArray(multiscales) || multiscales.length === 0) {
|
283829
|
-
|
284618
|
+
log$c.error("Multiscales array must exist and have at least one element");
|
283830
284619
|
}
|
283831
284620
|
const { datasets, coordinateTransformations: coordinateTransformationsFromFile, name: imageName } = multiscales[0];
|
283832
284621
|
const axes = getNgffAxes(multiscales[0].axes);
|
@@ -284136,7 +284925,7 @@ class SpatialDataObsSpotsLoader extends AbstractTwoStepLoader {
|
|
284136
284925
|
const xScaleFactor = scaleFactors[0];
|
284137
284926
|
const yScaleFactor = scaleFactors[1];
|
284138
284927
|
if (xScaleFactor !== yScaleFactor) {
|
284139
|
-
|
284928
|
+
log$c.warn("Using x-axis scale factor for transformation of obsSpots, but x and y scale factors are not equal");
|
284140
284929
|
}
|
284141
284930
|
for (let i2 = 0; i2 < this.radius.shape[0]; i2++) {
|
284142
284931
|
this.radius.data[i2] *= xScaleFactor;
|
@@ -340216,8 +341005,8 @@ function BiomarkerSelectSubscriber(props) {
|
|
340216
341005
|
const { coordinationScopes, stratificationOptions } = props;
|
340217
341006
|
useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.BIOMARKER_SELECT], coordinationScopes);
|
340218
341007
|
const viewConfigStoreApi = useViewConfigStoreApi();
|
340219
|
-
useViewConfig();
|
340220
|
-
useSetViewConfig(viewConfigStoreApi);
|
341008
|
+
const viewConfig = useViewConfig();
|
341009
|
+
const setViewConfig = useSetViewConfig(viewConfigStoreApi);
|
340221
341010
|
const [isSelecting, setIsSelecting] = useState(true);
|
340222
341011
|
const [mode, setMode] = useState(null);
|
340223
341012
|
const [step2, setStep] = useState(null);
|
@@ -340229,7 +341018,20 @@ function BiomarkerSelectSubscriber(props) {
|
|
340229
341018
|
const autocompleteNode = useCallback(async (inputValue) => autocompleteFeature2(inputValue), [autocompleteFeature2]);
|
340230
341019
|
const getEdges = useCallback(async (node2, targetModality) => transformFeature2(node2, targetModality), [transformFeature2]);
|
340231
341020
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isSelecting ? jsxRuntimeExports.jsx(ScmdUi, { mode, setMode, step: step2, setStep, currentModalityAgnosticSelection, setCurrentModalityAgnosticSelection, currentModalitySpecificSelection, setCurrentModalitySpecificSelection, currentStratificationSelection, setCurrentStratificationSelection, autocompleteNode, getEdges, stratifications: stratificationOptions, onFinish: () => {
|
340232
|
-
|
341021
|
+
setViewConfig({
|
341022
|
+
...viewConfig,
|
341023
|
+
coordinationSpace: {
|
341024
|
+
...viewConfig.coordinationSpace,
|
341025
|
+
sampleSetFilter: {
|
341026
|
+
...viewConfig.coordinationSpace.sampleSetFilter,
|
341027
|
+
"case-control": currentStratificationSelection == null ? void 0 : currentStratificationSelection.sampleSets
|
341028
|
+
},
|
341029
|
+
sampleSetSelection: {
|
341030
|
+
...viewConfig.coordinationSpace.sampleSetSelection,
|
341031
|
+
"case-control": currentStratificationSelection == null ? void 0 : currentStratificationSelection.sampleSets
|
341032
|
+
}
|
341033
|
+
}
|
341034
|
+
});
|
340233
341035
|
} }) : null });
|
340234
341036
|
}
|
340235
341037
|
function isArray3(value2) {
|
@@ -341912,6 +342714,7 @@ const baseViewTypes = [
|
|
341912
342714
|
makeViewType(ViewType$1.DESCRIPTION, DescriptionSubscriber),
|
341913
342715
|
makeViewType(ViewType$1.OBS_SETS, ObsSetsManagerSubscriber),
|
341914
342716
|
makeViewType(ViewType$1.SCATTERPLOT, EmbeddingScatterplotSubscriber),
|
342717
|
+
makeViewType(ViewType$1.DUAL_SCATTERPLOT, DualEmbeddingScatterplotSubscriber),
|
341915
342718
|
makeViewType(ViewType$1.GATING, GatingSubscriber),
|
341916
342719
|
makeViewType(ViewType$1.SPATIAL, SpatialSubscriber$1),
|
341917
342720
|
makeViewType(ViewType$1.SPATIAL_BETA, SpatialSubscriber),
|
@@ -341928,7 +342731,8 @@ const baseViewTypes = [
|
|
341928
342731
|
makeViewType(ViewType$1.GENOMIC_PROFILES, GenomicProfilesSubscriber),
|
341929
342732
|
makeViewType(ViewType$1.DOT_PLOT, DotPlotSubscriber),
|
341930
342733
|
makeViewType(ViewType$1.BIOMARKER_SELECT, BiomarkerSelectSubscriber),
|
341931
|
-
makeViewType(ViewType$1.LINK_CONTROLLER, LinkControllerSubscriber)
|
342734
|
+
makeViewType(ViewType$1.LINK_CONTROLLER, LinkControllerSubscriber),
|
342735
|
+
makeViewType(ViewType$1.TREEMAP, TreemapSubscriber)
|
341932
342736
|
];
|
341933
342737
|
const baseFileTypes = [
|
341934
342738
|
// All CSV file types
|
@@ -341956,6 +342760,7 @@ const baseFileTypes = [
|
|
341956
342760
|
...makeZarrFileTypes(FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
|
341957
342761
|
...makeZarrFileTypes(FileType$1.FEATURE_LABELS_ANNDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
|
341958
342762
|
...makeZarrFileTypes(FileType$1.SAMPLE_EDGES_ANNDATA_ZARR, DataType$3.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
|
342763
|
+
...makeZarrFileTypes(FileType$1.SAMPLE_SETS_ANNDATA_ZARR, DataType$3.SAMPLE_SETS, SampleSetsAnndataLoader, AnnDataSource, sampleSetsAnndataSchema),
|
341959
342764
|
// All MuData file types
|
341960
342765
|
makeFileType(FileType$1.OBS_SETS_MUDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
|
341961
342766
|
makeFileType(FileType$1.OBS_EMBEDDING_MUDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
|
@@ -342087,11 +342892,19 @@ const baseCoordinationTypes = [
|
|
342087
342892
|
new PluginCoordinationType(CoordinationType$1.HEATMAP_TARGET_Y, 0, z.number()),
|
342088
342893
|
new PluginCoordinationType(CoordinationType$1.OBS_FILTER, null, z.array(z.string()).nullable()),
|
342089
342894
|
new PluginCoordinationType(CoordinationType$1.OBS_HIGHLIGHT, null, z.string().nullable()),
|
342895
|
+
new PluginCoordinationType(CoordinationType$1.OBS_SELECTION, null, z.array(z.string()).nullable()),
|
342090
342896
|
new PluginCoordinationType(
|
342091
342897
|
CoordinationType$1.OBS_SET_SELECTION,
|
342092
342898
|
null,
|
342093
342899
|
z.array(obsSetPath).nullable()
|
342094
342900
|
),
|
342901
|
+
new PluginCoordinationType(CoordinationType$1.OBS_SELECTION_MODE, null, z.enum(["obsSelection", "obsSetSelection"]).nullable()),
|
342902
|
+
new PluginCoordinationType(
|
342903
|
+
CoordinationType$1.OBS_SET_FILTER,
|
342904
|
+
null,
|
342905
|
+
z.array(obsSetPath).nullable()
|
342906
|
+
),
|
342907
|
+
new PluginCoordinationType(CoordinationType$1.OBS_FILTER_MODE, null, z.enum(["obsFilter", "obsSetFilter"]).nullable()),
|
342095
342908
|
new PluginCoordinationType(
|
342096
342909
|
CoordinationType$1.OBS_SET_EXPANSION,
|
342097
342910
|
null,
|
@@ -342118,6 +342931,18 @@ const baseCoordinationTypes = [
|
|
342118
342931
|
null,
|
342119
342932
|
z.array(z.string()).nullable()
|
342120
342933
|
),
|
342934
|
+
new PluginCoordinationType(
|
342935
|
+
CoordinationType$1.FEATURE_SET_SELECTION,
|
342936
|
+
null,
|
342937
|
+
z.array(obsSetPath).nullable()
|
342938
|
+
),
|
342939
|
+
new PluginCoordinationType(CoordinationType$1.FEATURE_SELECTION_MODE, null, z.enum(["featureSelection", "featureSetSelection"]).nullable()),
|
342940
|
+
new PluginCoordinationType(
|
342941
|
+
CoordinationType$1.FEATURE_SET_FILTER,
|
342942
|
+
null,
|
342943
|
+
z.array(obsSetPath).nullable()
|
342944
|
+
),
|
342945
|
+
new PluginCoordinationType(CoordinationType$1.FEATURE_FILTER_MODE, null, z.enum(["featureFilter", "featureSetFilter"]).nullable()),
|
342121
342946
|
new PluginCoordinationType(
|
342122
342947
|
CoordinationType$1.FEATURE_VALUE_TRANSFORM,
|
342123
342948
|
null,
|
@@ -342206,7 +343031,12 @@ const baseCoordinationTypes = [
|
|
342206
343031
|
new PluginCoordinationType(CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
|
342207
343032
|
new PluginCoordinationType(CoordinationType$1.SAMPLE_TYPE, "sample", z.string().nullable()),
|
342208
343033
|
// TODO: remove one array level and use multi-coordination for sampleSetSelection?
|
343034
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_FILTER, null, z.array(z.string()).nullable()),
|
343035
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_SELECTION, null, z.array(z.string()).nullable()),
|
342209
343036
|
new PluginCoordinationType(CoordinationType$1.SAMPLE_SET_SELECTION, null, z.array(z.array(z.string())).nullable()),
|
343037
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_SET_FILTER, null, z.array(z.array(z.string())).nullable()),
|
343038
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_SELECTION_MODE, null, z.enum(["sampleSelection", "sampleSetSelection"]).nullable()),
|
343039
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_FILTER_MODE, null, z.enum(["sampleFilter", "sampleSetFilter"]).nullable()),
|
342210
343040
|
new PluginCoordinationType(
|
342211
343041
|
CoordinationType$1.SAMPLE_SET_COLOR,
|
342212
343042
|
null,
|
@@ -342215,12 +343045,14 @@ const baseCoordinationTypes = [
|
|
342215
343045
|
color: rgbArray
|
342216
343046
|
})).nullable()
|
342217
343047
|
),
|
343048
|
+
new PluginCoordinationType(CoordinationType$1.SAMPLE_HIGHLIGHT, null, z.string().nullable()),
|
342218
343049
|
new PluginCoordinationType(CoordinationType$1.EMBEDDING_POINTS_VISIBLE, true, z.boolean()),
|
342219
343050
|
new PluginCoordinationType(CoordinationType$1.EMBEDDING_CONTOURS_VISIBLE, false, z.boolean()),
|
342220
343051
|
new PluginCoordinationType(CoordinationType$1.EMBEDDING_CONTOURS_FILLED, true, z.boolean()),
|
342221
343052
|
new PluginCoordinationType(CoordinationType$1.EMBEDDING_CONTOUR_PERCENTILES, null, z.array(z.number()).nullable()),
|
342222
343053
|
new PluginCoordinationType(CoordinationType$1.CONTOUR_COLOR_ENCODING, "cellSetSelection", z.enum(["cellSetSelection", "sampleSetSelection", "contourColor"])),
|
342223
|
-
new PluginCoordinationType(CoordinationType$1.CONTOUR_COLOR, null, rgbArray.nullable())
|
343054
|
+
new PluginCoordinationType(CoordinationType$1.CONTOUR_COLOR, null, rgbArray.nullable()),
|
343055
|
+
new PluginCoordinationType(CoordinationType$1.HIERARCHY_LEVELS, null, z.array(z.enum(["sampleSet", "obsSet"])).nullable())
|
342224
343056
|
];
|
342225
343057
|
const baseAsyncFunctions = [
|
342226
343058
|
new PluginAsyncFunction(AsyncFunctionType.AUTOCOMPLETE_FEATURE, autocompleteFeature),
|
@@ -342246,7 +343078,7 @@ function Vitessce(props) {
|
|
342246
343078
|
const validConfig = upgradeAndParse(config3, onConfigUpgrade);
|
342247
343079
|
return [validConfig, true];
|
342248
343080
|
} catch (e3) {
|
342249
|
-
|
343081
|
+
log$c.error(e3);
|
342250
343082
|
return [
|
342251
343083
|
{
|
342252
343084
|
title: "Config validation or upgrade failed.",
|