@vitessce/sets-utils 3.5.6 → 3.5.8
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/index.js +331 -7
- package/dist-tsc/expr-utils.d.ts.map +1 -1
- package/dist-tsc/expr-utils.js +2 -1
- package/package.json +4 -3
- package/src/expr-utils.js +2 -1
package/dist/index.js
CHANGED
|
@@ -2458,6 +2458,258 @@ function getNextScope(prevScopes) {
|
|
|
2458
2458
|
} while (prevScopes.includes(nextScope));
|
|
2459
2459
|
return nextScope;
|
|
2460
2460
|
}
|
|
2461
|
+
var loglevel = { exports: {} };
|
|
2462
|
+
(function(module2) {
|
|
2463
|
+
(function(root2, definition) {
|
|
2464
|
+
if (module2.exports) {
|
|
2465
|
+
module2.exports = definition();
|
|
2466
|
+
} else {
|
|
2467
|
+
root2.log = definition();
|
|
2468
|
+
}
|
|
2469
|
+
})(commonjsGlobal, function() {
|
|
2470
|
+
var noop = function() {
|
|
2471
|
+
};
|
|
2472
|
+
var undefinedType2 = "undefined";
|
|
2473
|
+
var isIE = typeof window !== undefinedType2 && typeof window.navigator !== undefinedType2 && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
|
2474
|
+
var logMethods = [
|
|
2475
|
+
"trace",
|
|
2476
|
+
"debug",
|
|
2477
|
+
"info",
|
|
2478
|
+
"warn",
|
|
2479
|
+
"error"
|
|
2480
|
+
];
|
|
2481
|
+
var _loggersByName = {};
|
|
2482
|
+
var defaultLogger = null;
|
|
2483
|
+
function bindMethod(obj, methodName) {
|
|
2484
|
+
var method = obj[methodName];
|
|
2485
|
+
if (typeof method.bind === "function") {
|
|
2486
|
+
return method.bind(obj);
|
|
2487
|
+
} else {
|
|
2488
|
+
try {
|
|
2489
|
+
return Function.prototype.bind.call(method, obj);
|
|
2490
|
+
} catch (e) {
|
|
2491
|
+
return function() {
|
|
2492
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
function traceForIE() {
|
|
2498
|
+
if (console.log) {
|
|
2499
|
+
if (console.log.apply) {
|
|
2500
|
+
console.log.apply(console, arguments);
|
|
2501
|
+
} else {
|
|
2502
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
if (console.trace)
|
|
2506
|
+
console.trace();
|
|
2507
|
+
}
|
|
2508
|
+
function realMethod(methodName) {
|
|
2509
|
+
if (methodName === "debug") {
|
|
2510
|
+
methodName = "log";
|
|
2511
|
+
}
|
|
2512
|
+
if (typeof console === undefinedType2) {
|
|
2513
|
+
return false;
|
|
2514
|
+
} else if (methodName === "trace" && isIE) {
|
|
2515
|
+
return traceForIE;
|
|
2516
|
+
} else if (console[methodName] !== void 0) {
|
|
2517
|
+
return bindMethod(console, methodName);
|
|
2518
|
+
} else if (console.log !== void 0) {
|
|
2519
|
+
return bindMethod(console, "log");
|
|
2520
|
+
} else {
|
|
2521
|
+
return noop;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
function replaceLoggingMethods() {
|
|
2525
|
+
var level = this.getLevel();
|
|
2526
|
+
for (var i = 0; i < logMethods.length; i++) {
|
|
2527
|
+
var methodName = logMethods[i];
|
|
2528
|
+
this[methodName] = i < level ? noop : this.methodFactory(methodName, level, this.name);
|
|
2529
|
+
}
|
|
2530
|
+
this.log = this.debug;
|
|
2531
|
+
if (typeof console === undefinedType2 && level < this.levels.SILENT) {
|
|
2532
|
+
return "No console available for logging";
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
2536
|
+
return function() {
|
|
2537
|
+
if (typeof console !== undefinedType2) {
|
|
2538
|
+
replaceLoggingMethods.call(this);
|
|
2539
|
+
this[methodName].apply(this, arguments);
|
|
2540
|
+
}
|
|
2541
|
+
};
|
|
2542
|
+
}
|
|
2543
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
2544
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
2545
|
+
}
|
|
2546
|
+
function Logger(name, factory) {
|
|
2547
|
+
var self2 = this;
|
|
2548
|
+
var inheritedLevel;
|
|
2549
|
+
var defaultLevel;
|
|
2550
|
+
var userLevel;
|
|
2551
|
+
var storageKey = "loglevel";
|
|
2552
|
+
if (typeof name === "string") {
|
|
2553
|
+
storageKey += ":" + name;
|
|
2554
|
+
} else if (typeof name === "symbol") {
|
|
2555
|
+
storageKey = void 0;
|
|
2556
|
+
}
|
|
2557
|
+
function persistLevelIfPossible(levelNum) {
|
|
2558
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
|
2559
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
2560
|
+
return;
|
|
2561
|
+
try {
|
|
2562
|
+
window.localStorage[storageKey] = levelName;
|
|
2563
|
+
return;
|
|
2564
|
+
} catch (ignore) {
|
|
2565
|
+
}
|
|
2566
|
+
try {
|
|
2567
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
2568
|
+
} catch (ignore) {
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
function getPersistedLevel() {
|
|
2572
|
+
var storedLevel;
|
|
2573
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
2574
|
+
return;
|
|
2575
|
+
try {
|
|
2576
|
+
storedLevel = window.localStorage[storageKey];
|
|
2577
|
+
} catch (ignore) {
|
|
2578
|
+
}
|
|
2579
|
+
if (typeof storedLevel === undefinedType2) {
|
|
2580
|
+
try {
|
|
2581
|
+
var cookie = window.document.cookie;
|
|
2582
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
2583
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
2584
|
+
if (location !== -1) {
|
|
2585
|
+
storedLevel = /^([^;]+)/.exec(
|
|
2586
|
+
cookie.slice(location + cookieName.length + 1)
|
|
2587
|
+
)[1];
|
|
2588
|
+
}
|
|
2589
|
+
} catch (ignore) {
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
if (self2.levels[storedLevel] === void 0) {
|
|
2593
|
+
storedLevel = void 0;
|
|
2594
|
+
}
|
|
2595
|
+
return storedLevel;
|
|
2596
|
+
}
|
|
2597
|
+
function clearPersistedLevel() {
|
|
2598
|
+
if (typeof window === undefinedType2 || !storageKey)
|
|
2599
|
+
return;
|
|
2600
|
+
try {
|
|
2601
|
+
window.localStorage.removeItem(storageKey);
|
|
2602
|
+
} catch (ignore) {
|
|
2603
|
+
}
|
|
2604
|
+
try {
|
|
2605
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
2606
|
+
} catch (ignore) {
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
function normalizeLevel(input) {
|
|
2610
|
+
var level = input;
|
|
2611
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
|
2612
|
+
level = self2.levels[level.toUpperCase()];
|
|
2613
|
+
}
|
|
2614
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
|
2615
|
+
return level;
|
|
2616
|
+
} else {
|
|
2617
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
self2.name = name;
|
|
2621
|
+
self2.levels = {
|
|
2622
|
+
"TRACE": 0,
|
|
2623
|
+
"DEBUG": 1,
|
|
2624
|
+
"INFO": 2,
|
|
2625
|
+
"WARN": 3,
|
|
2626
|
+
"ERROR": 4,
|
|
2627
|
+
"SILENT": 5
|
|
2628
|
+
};
|
|
2629
|
+
self2.methodFactory = factory || defaultMethodFactory;
|
|
2630
|
+
self2.getLevel = function() {
|
|
2631
|
+
if (userLevel != null) {
|
|
2632
|
+
return userLevel;
|
|
2633
|
+
} else if (defaultLevel != null) {
|
|
2634
|
+
return defaultLevel;
|
|
2635
|
+
} else {
|
|
2636
|
+
return inheritedLevel;
|
|
2637
|
+
}
|
|
2638
|
+
};
|
|
2639
|
+
self2.setLevel = function(level, persist) {
|
|
2640
|
+
userLevel = normalizeLevel(level);
|
|
2641
|
+
if (persist !== false) {
|
|
2642
|
+
persistLevelIfPossible(userLevel);
|
|
2643
|
+
}
|
|
2644
|
+
return replaceLoggingMethods.call(self2);
|
|
2645
|
+
};
|
|
2646
|
+
self2.setDefaultLevel = function(level) {
|
|
2647
|
+
defaultLevel = normalizeLevel(level);
|
|
2648
|
+
if (!getPersistedLevel()) {
|
|
2649
|
+
self2.setLevel(level, false);
|
|
2650
|
+
}
|
|
2651
|
+
};
|
|
2652
|
+
self2.resetLevel = function() {
|
|
2653
|
+
userLevel = null;
|
|
2654
|
+
clearPersistedLevel();
|
|
2655
|
+
replaceLoggingMethods.call(self2);
|
|
2656
|
+
};
|
|
2657
|
+
self2.enableAll = function(persist) {
|
|
2658
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
|
2659
|
+
};
|
|
2660
|
+
self2.disableAll = function(persist) {
|
|
2661
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
|
2662
|
+
};
|
|
2663
|
+
self2.rebuild = function() {
|
|
2664
|
+
if (defaultLogger !== self2) {
|
|
2665
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
2666
|
+
}
|
|
2667
|
+
replaceLoggingMethods.call(self2);
|
|
2668
|
+
if (defaultLogger === self2) {
|
|
2669
|
+
for (var childName in _loggersByName) {
|
|
2670
|
+
_loggersByName[childName].rebuild();
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
};
|
|
2674
|
+
inheritedLevel = normalizeLevel(
|
|
2675
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
2676
|
+
);
|
|
2677
|
+
var initialLevel = getPersistedLevel();
|
|
2678
|
+
if (initialLevel != null) {
|
|
2679
|
+
userLevel = normalizeLevel(initialLevel);
|
|
2680
|
+
}
|
|
2681
|
+
replaceLoggingMethods.call(self2);
|
|
2682
|
+
}
|
|
2683
|
+
defaultLogger = new Logger();
|
|
2684
|
+
defaultLogger.getLogger = function getLogger(name) {
|
|
2685
|
+
if (typeof name !== "symbol" && typeof name !== "string" || name === "") {
|
|
2686
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
2687
|
+
}
|
|
2688
|
+
var logger = _loggersByName[name];
|
|
2689
|
+
if (!logger) {
|
|
2690
|
+
logger = _loggersByName[name] = new Logger(
|
|
2691
|
+
name,
|
|
2692
|
+
defaultLogger.methodFactory
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2695
|
+
return logger;
|
|
2696
|
+
};
|
|
2697
|
+
var _log = typeof window !== undefinedType2 ? window.log : void 0;
|
|
2698
|
+
defaultLogger.noConflict = function() {
|
|
2699
|
+
if (typeof window !== undefinedType2 && window.log === defaultLogger) {
|
|
2700
|
+
window.log = _log;
|
|
2701
|
+
}
|
|
2702
|
+
return defaultLogger;
|
|
2703
|
+
};
|
|
2704
|
+
defaultLogger.getLoggers = function getLoggers() {
|
|
2705
|
+
return _loggersByName;
|
|
2706
|
+
};
|
|
2707
|
+
defaultLogger["default"] = defaultLogger;
|
|
2708
|
+
return defaultLogger;
|
|
2709
|
+
});
|
|
2710
|
+
})(loglevel);
|
|
2711
|
+
var loglevelExports = loglevel.exports;
|
|
2712
|
+
const log = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
|
|
2461
2713
|
const DEFAULT_DARK_COLOR = [50, 50, 50];
|
|
2462
2714
|
const DEFAULT_LIGHT_COLOR = [200, 200, 200];
|
|
2463
2715
|
const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
|
@@ -6886,7 +7138,7 @@ function upgradeFrom1_0_14(config) {
|
|
|
6886
7138
|
Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
|
|
6887
7139
|
var _a;
|
|
6888
7140
|
if ((_a = viewDef.props) == null ? void 0 : _a[oldProp]) {
|
|
6889
|
-
|
|
7141
|
+
log.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
|
|
6890
7142
|
}
|
|
6891
7143
|
});
|
|
6892
7144
|
});
|
|
@@ -6909,7 +7161,7 @@ function upgradeFrom1_0_15(config) {
|
|
|
6909
7161
|
Object.entries(coordinationScopes).forEach(([coordinationType, coordinationScope]) => {
|
|
6910
7162
|
if (!Array.isArray(coordinationScope) && typeof coordinationScope === "object") {
|
|
6911
7163
|
if (coordinationType === "dataset") {
|
|
6912
|
-
|
|
7164
|
+
log.error("Expected coordinationScopes.dataset value to be either string or string[], but got object.");
|
|
6913
7165
|
}
|
|
6914
7166
|
coordinationScopesBy.dataset[coordinationType] = coordinationScope;
|
|
6915
7167
|
} else if (Array.isArray(coordinationScope) || typeof coordinationScope === "string") {
|
|
@@ -9120,9 +9372,15 @@ const ViewType$1 = {
|
|
|
9120
9372
|
FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
|
|
9121
9373
|
DOT_PLOT: "dotPlot",
|
|
9122
9374
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
9375
|
+
VOLCANO_PLOT: "volcanoPlot",
|
|
9376
|
+
OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
|
|
9377
|
+
FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
|
|
9123
9378
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
9379
|
+
COMPARATIVE_HEADING: "comparativeHeading",
|
|
9124
9380
|
LINK_CONTROLLER: "linkController",
|
|
9125
|
-
|
|
9381
|
+
NEUROGLANCER: "neuroglancer",
|
|
9382
|
+
DUAL_SCATTERPLOT: "dualScatterplot",
|
|
9383
|
+
TREEMAP: "treemap"
|
|
9126
9384
|
};
|
|
9127
9385
|
const DataType$1 = {
|
|
9128
9386
|
OBS_LABELS: "obsLabels",
|
|
@@ -9138,7 +9396,11 @@ const DataType$1 = {
|
|
|
9138
9396
|
OBS_POINTS: "obsPoints",
|
|
9139
9397
|
OBS_LOCATIONS: "obsLocations",
|
|
9140
9398
|
SAMPLE_SETS: "sampleSets",
|
|
9141
|
-
SAMPLE_EDGES: "sampleEdges"
|
|
9399
|
+
SAMPLE_EDGES: "sampleEdges",
|
|
9400
|
+
COMPARISON_METADATA: "comparisonMetadata",
|
|
9401
|
+
FEATURE_STATS: "featureStats",
|
|
9402
|
+
FEATURE_SET_STATS: "featureSetStats",
|
|
9403
|
+
OBS_SET_STATS: "obsSetStats"
|
|
9142
9404
|
};
|
|
9143
9405
|
const FileType$1 = {
|
|
9144
9406
|
// Joint file types
|
|
@@ -9176,6 +9438,11 @@ const FileType$1 = {
|
|
|
9176
9438
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
9177
9439
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
9178
9440
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
|
9441
|
+
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
|
9442
|
+
COMPARISON_METADATA_ANNDATA_ZARR: "comparisonMetadata.anndata.zarr",
|
|
9443
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR: "comparativeFeatureStats.anndata.zarr",
|
|
9444
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR: "comparativeFeatureSetStats.anndata.zarr",
|
|
9445
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR: "comparativeObsSetStats.anndata.zarr",
|
|
9179
9446
|
// AnnData - zipped
|
|
9180
9447
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
|
9181
9448
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
|
@@ -9188,6 +9455,11 @@ const FileType$1 = {
|
|
|
9188
9455
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
|
9189
9456
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
9190
9457
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
9458
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
|
9459
|
+
COMPARISON_METADATA_ANNDATA_ZARR_ZIP: "comparisonMetadata.anndata.zarr.zip",
|
|
9460
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureStats.anndata.zarr.zip",
|
|
9461
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureSetStats.anndata.zarr.zip",
|
|
9462
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeObsSetStats.anndata.zarr.zip",
|
|
9191
9463
|
// AnnData - h5ad via reference spec
|
|
9192
9464
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
9193
9465
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
@@ -9200,6 +9472,11 @@ const FileType$1 = {
|
|
|
9200
9472
|
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
|
9201
9473
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
9202
9474
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
9475
|
+
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
|
9476
|
+
COMPARISON_METADATA_ANNDATA_H5AD: "comparisonMetadata.anndata.h5ad",
|
|
9477
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_H5AD: "comparativeFeatureStats.anndata.h5ad",
|
|
9478
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_H5AD: "comparativeFeatureSetStats.anndata.h5ad",
|
|
9479
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_H5AD: "comparativeObsSetStats.anndata.h5ad",
|
|
9203
9480
|
// SpatialData
|
|
9204
9481
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
9205
9482
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -9391,12 +9668,20 @@ const CoordinationType$1 = {
|
|
|
9391
9668
|
SAMPLE_SET_FILTER: "sampleSetFilter",
|
|
9392
9669
|
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
|
9393
9670
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
|
9671
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
|
9394
9672
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
|
9395
9673
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
|
9396
9674
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
|
9397
9675
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
9398
9676
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
9399
|
-
CONTOUR_COLOR: "contourColor"
|
|
9677
|
+
CONTOUR_COLOR: "contourColor",
|
|
9678
|
+
// For volcano plot:
|
|
9679
|
+
FEATURE_POINT_SIGNIFICANCE_THRESHOLD: "featurePointSignificanceThreshold",
|
|
9680
|
+
FEATURE_LABEL_SIGNIFICANCE_THRESHOLD: "featureLabelSignificanceThreshold",
|
|
9681
|
+
FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
|
|
9682
|
+
FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
|
|
9683
|
+
// Treemap
|
|
9684
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
9400
9685
|
};
|
|
9401
9686
|
const ViewType = {
|
|
9402
9687
|
GENES: [
|
|
@@ -9564,7 +9849,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
9564
9849
|
const oldKeys = Object.keys(oldObj);
|
|
9565
9850
|
const propKey = String(prop);
|
|
9566
9851
|
if (oldKeys.includes(propKey)) {
|
|
9567
|
-
|
|
9852
|
+
log.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
|
9568
9853
|
${oldObj[propKey][1]}`);
|
|
9569
9854
|
return oldObj[propKey];
|
|
9570
9855
|
}
|
|
@@ -9643,6 +9928,42 @@ const annDataConvenienceObsEmbeddingItem = z.object({
|
|
|
9643
9928
|
dims: z.array(z.number()).optional(),
|
|
9644
9929
|
embeddingType: z.string()
|
|
9645
9930
|
});
|
|
9931
|
+
z.object({
|
|
9932
|
+
path: z.string().describe("Path to the comparison metadata, such as /uns/comparison_metadata")
|
|
9933
|
+
});
|
|
9934
|
+
z.object({
|
|
9935
|
+
// TODO: implement a featureStats.anndata.zarr loader
|
|
9936
|
+
// which does not depend on comparisonMetadata
|
|
9937
|
+
// (instead, would point directly to the root of
|
|
9938
|
+
// the dataframe containing a set of diff exp results)
|
|
9939
|
+
// path: z.string().describe('Path to the dataframe containing the results.'),
|
|
9940
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9941
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the feature index, if different than the default dataframe index."),
|
|
9942
|
+
pValueColumn: z.string(),
|
|
9943
|
+
foldChangeColumn: z.string(),
|
|
9944
|
+
pValueTransformation: z.enum(["minuslog10"]).optional(),
|
|
9945
|
+
pValueAdjusted: z.boolean().optional(),
|
|
9946
|
+
foldChangeTransformation: z.enum(["log2"]).optional()
|
|
9947
|
+
});
|
|
9948
|
+
z.object({
|
|
9949
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9950
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the feature set index, if different than the default dataframe index."),
|
|
9951
|
+
termColumn: z.string().optional(),
|
|
9952
|
+
pValueColumn: z.string(),
|
|
9953
|
+
pValueAdjusted: z.boolean().optional(),
|
|
9954
|
+
analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, pertpy_hypergeometric.")
|
|
9955
|
+
});
|
|
9956
|
+
z.object({
|
|
9957
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9958
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the obs set index, if different than the default dataframe index."),
|
|
9959
|
+
interceptExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
|
|
9960
|
+
effectExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
|
|
9961
|
+
foldChangeColumn: z.string().describe("The log-fold change is then calculated between this expected sample and the expected sample with no active covariates from the intercept section."),
|
|
9962
|
+
foldChangeTransformation: z.enum(["log2"]).optional(),
|
|
9963
|
+
isCredibleEffectColumn: z.string().describe("Column which annotates effects as being credible or not (boolean)."),
|
|
9964
|
+
covariateColumn: z.string().describe("Column which defines the covariate used in the analysis."),
|
|
9965
|
+
analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, sccoda_df.")
|
|
9966
|
+
});
|
|
9646
9967
|
const annDataObsLabels = annDataObs;
|
|
9647
9968
|
const annDataFeatureLabels = annDataObs;
|
|
9648
9969
|
const annDataSampleEdges = annDataObs;
|
|
@@ -9662,6 +9983,9 @@ const annDataObsSetsArr = z.array(z.object({
|
|
|
9662
9983
|
z.object({
|
|
9663
9984
|
obsSets: annDataObsSetsArr
|
|
9664
9985
|
});
|
|
9986
|
+
z.object({
|
|
9987
|
+
sampleSets: annDataObsSetsArr
|
|
9988
|
+
});
|
|
9665
9989
|
const annDataObsFeatureColumnsArr = z.array(z.object({
|
|
9666
9990
|
path: z.string()
|
|
9667
9991
|
}));
|
|
@@ -17518,7 +17842,7 @@ function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sampleSetS
|
|
|
17518
17842
|
sampleSetKeys.forEach((sampleSetKey) => {
|
|
17519
17843
|
const finalInsertionIndex = result.get(cellSetKey).get(sampleSetKey).get("i");
|
|
17520
17844
|
if (finalInsertionIndex !== result.get(cellSetKey).get(sampleSetKey).get("obsIndex").length) {
|
|
17521
|
-
|
|
17845
|
+
log.warn("The final insertion index is lower than expected.");
|
|
17522
17846
|
}
|
|
17523
17847
|
result.get(cellSetKey).get(sampleSetKey).delete("i");
|
|
17524
17848
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expr-utils.d.ts","sourceRoot":"","sources":["../src/expr-utils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expr-utils.d.ts","sourceRoot":"","sources":["../src/expr-utils.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,4CAbW,GAAC,wCACD,GAAC,sBACD,GAAC,YAED,GAAC,kBACD,GAAC,oBAED,GAAC,8BAoIX;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,oDAbW,GAAC,cACD,GAAC,sBACD,GAAC,kBACD,GAAC,YACD,GAAC,kBACD,GAAC,iBACD,GAAC,oBACD,GAAC,gBACD,GAAC,yBACD,GAAC,oCACD,GAAC,SAiFX;AAED;;;;;;;;;;GAUG;AACH,oEAJW,GAAC,iBACD,GAAC,OAiBX"}
|
package/dist-tsc/expr-utils.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { InternMap } from 'internmap';
|
|
3
3
|
import { getValueTransformFunction } from '@vitessce/utils';
|
|
4
4
|
import { isEqual } from 'lodash-es';
|
|
5
|
+
import { log } from '@vitessce/globals';
|
|
5
6
|
import { treeToSelectedSetMap, treeToObsIdsBySetNames, } from './cell-set-utils.js';
|
|
6
7
|
/**
|
|
7
8
|
* Input: selections and data.
|
|
@@ -123,7 +124,7 @@ export function stratifyArrays(sampleEdges, sampleIdToObsIdsMap, sampleSets, sam
|
|
|
123
124
|
sampleSetKeys.forEach((sampleSetKey) => {
|
|
124
125
|
const finalInsertionIndex = result.get(cellSetKey).get(sampleSetKey).get('i');
|
|
125
126
|
if (finalInsertionIndex !== result.get(cellSetKey).get(sampleSetKey).get('obsIndex').length) {
|
|
126
|
-
|
|
127
|
+
log.warn('The final insertion index is lower than expected.');
|
|
127
128
|
}
|
|
128
129
|
result.get(cellSetKey).get(sampleSetKey).delete('i');
|
|
129
130
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/sets-utils",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.8",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"lodash-es": "^4.17.21",
|
|
26
26
|
"tinycolor2": "^1.4.1",
|
|
27
27
|
"uuid": "^9.0.0",
|
|
28
|
-
"@vitessce/schemas": "3.5.
|
|
29
|
-
"@vitessce/utils": "3.5.
|
|
28
|
+
"@vitessce/schemas": "3.5.8",
|
|
29
|
+
"@vitessce/utils": "3.5.8",
|
|
30
|
+
"@vitessce/globals": "3.5.8"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
package/src/expr-utils.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { InternMap } from 'internmap';
|
|
3
3
|
import { getValueTransformFunction } from '@vitessce/utils';
|
|
4
4
|
import { isEqual } from 'lodash-es';
|
|
5
|
+
import { log } from '@vitessce/globals';
|
|
5
6
|
import {
|
|
6
7
|
treeToSelectedSetMap,
|
|
7
8
|
treeToObsIdsBySetNames,
|
|
@@ -150,7 +151,7 @@ export function stratifyArrays(
|
|
|
150
151
|
sampleSetKeys.forEach((sampleSetKey) => {
|
|
151
152
|
const finalInsertionIndex = result.get(cellSetKey).get(sampleSetKey).get('i');
|
|
152
153
|
if (finalInsertionIndex !== result.get(cellSetKey).get(sampleSetKey).get('obsIndex').length) {
|
|
153
|
-
|
|
154
|
+
log.warn('The final insertion index is lower than expected.');
|
|
154
155
|
}
|
|
155
156
|
result.get(cellSetKey).get(sampleSetKey).delete('i');
|
|
156
157
|
});
|