@vitessce/feature-list 3.5.6 → 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/index.js +284 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1294,6 +1294,256 @@ function cleanFeatureId(featureName) {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
return featureName;
|
|
1296
1296
|
}
|
|
1297
|
+
var loglevel = { exports: {} };
|
|
1298
|
+
(function(module2) {
|
|
1299
|
+
(function(root2, definition) {
|
|
1300
|
+
if (module2.exports) {
|
|
1301
|
+
module2.exports = definition();
|
|
1302
|
+
} else {
|
|
1303
|
+
root2.log = definition();
|
|
1304
|
+
}
|
|
1305
|
+
})(commonjsGlobal, function() {
|
|
1306
|
+
var noop2 = function() {
|
|
1307
|
+
};
|
|
1308
|
+
var undefinedType = "undefined";
|
|
1309
|
+
var isIE = typeof window !== undefinedType && typeof window.navigator !== undefinedType && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
|
1310
|
+
var logMethods = [
|
|
1311
|
+
"trace",
|
|
1312
|
+
"debug",
|
|
1313
|
+
"info",
|
|
1314
|
+
"warn",
|
|
1315
|
+
"error"
|
|
1316
|
+
];
|
|
1317
|
+
var _loggersByName = {};
|
|
1318
|
+
var defaultLogger = null;
|
|
1319
|
+
function bindMethod(obj, methodName) {
|
|
1320
|
+
var method = obj[methodName];
|
|
1321
|
+
if (typeof method.bind === "function") {
|
|
1322
|
+
return method.bind(obj);
|
|
1323
|
+
} else {
|
|
1324
|
+
try {
|
|
1325
|
+
return Function.prototype.bind.call(method, obj);
|
|
1326
|
+
} catch (e) {
|
|
1327
|
+
return function() {
|
|
1328
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
function traceForIE() {
|
|
1334
|
+
if (console.log) {
|
|
1335
|
+
if (console.log.apply) {
|
|
1336
|
+
console.log.apply(console, arguments);
|
|
1337
|
+
} else {
|
|
1338
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
if (console.trace)
|
|
1342
|
+
console.trace();
|
|
1343
|
+
}
|
|
1344
|
+
function realMethod(methodName) {
|
|
1345
|
+
if (methodName === "debug") {
|
|
1346
|
+
methodName = "log";
|
|
1347
|
+
}
|
|
1348
|
+
if (typeof console === undefinedType) {
|
|
1349
|
+
return false;
|
|
1350
|
+
} else if (methodName === "trace" && isIE) {
|
|
1351
|
+
return traceForIE;
|
|
1352
|
+
} else if (console[methodName] !== void 0) {
|
|
1353
|
+
return bindMethod(console, methodName);
|
|
1354
|
+
} else if (console.log !== void 0) {
|
|
1355
|
+
return bindMethod(console, "log");
|
|
1356
|
+
} else {
|
|
1357
|
+
return noop2;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
function replaceLoggingMethods() {
|
|
1361
|
+
var level = this.getLevel();
|
|
1362
|
+
for (var i = 0; i < logMethods.length; i++) {
|
|
1363
|
+
var methodName = logMethods[i];
|
|
1364
|
+
this[methodName] = i < level ? noop2 : this.methodFactory(methodName, level, this.name);
|
|
1365
|
+
}
|
|
1366
|
+
this.log = this.debug;
|
|
1367
|
+
if (typeof console === undefinedType && level < this.levels.SILENT) {
|
|
1368
|
+
return "No console available for logging";
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
1372
|
+
return function() {
|
|
1373
|
+
if (typeof console !== undefinedType) {
|
|
1374
|
+
replaceLoggingMethods.call(this);
|
|
1375
|
+
this[methodName].apply(this, arguments);
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
1380
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
1381
|
+
}
|
|
1382
|
+
function Logger(name, factory) {
|
|
1383
|
+
var self2 = this;
|
|
1384
|
+
var inheritedLevel;
|
|
1385
|
+
var defaultLevel;
|
|
1386
|
+
var userLevel;
|
|
1387
|
+
var storageKey = "loglevel";
|
|
1388
|
+
if (typeof name === "string") {
|
|
1389
|
+
storageKey += ":" + name;
|
|
1390
|
+
} else if (typeof name === "symbol") {
|
|
1391
|
+
storageKey = void 0;
|
|
1392
|
+
}
|
|
1393
|
+
function persistLevelIfPossible(levelNum) {
|
|
1394
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
|
1395
|
+
if (typeof window === undefinedType || !storageKey)
|
|
1396
|
+
return;
|
|
1397
|
+
try {
|
|
1398
|
+
window.localStorage[storageKey] = levelName;
|
|
1399
|
+
return;
|
|
1400
|
+
} catch (ignore) {
|
|
1401
|
+
}
|
|
1402
|
+
try {
|
|
1403
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
1404
|
+
} catch (ignore) {
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
function getPersistedLevel() {
|
|
1408
|
+
var storedLevel;
|
|
1409
|
+
if (typeof window === undefinedType || !storageKey)
|
|
1410
|
+
return;
|
|
1411
|
+
try {
|
|
1412
|
+
storedLevel = window.localStorage[storageKey];
|
|
1413
|
+
} catch (ignore) {
|
|
1414
|
+
}
|
|
1415
|
+
if (typeof storedLevel === undefinedType) {
|
|
1416
|
+
try {
|
|
1417
|
+
var cookie = window.document.cookie;
|
|
1418
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
1419
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
1420
|
+
if (location !== -1) {
|
|
1421
|
+
storedLevel = /^([^;]+)/.exec(
|
|
1422
|
+
cookie.slice(location + cookieName.length + 1)
|
|
1423
|
+
)[1];
|
|
1424
|
+
}
|
|
1425
|
+
} catch (ignore) {
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
if (self2.levels[storedLevel] === void 0) {
|
|
1429
|
+
storedLevel = void 0;
|
|
1430
|
+
}
|
|
1431
|
+
return storedLevel;
|
|
1432
|
+
}
|
|
1433
|
+
function clearPersistedLevel() {
|
|
1434
|
+
if (typeof window === undefinedType || !storageKey)
|
|
1435
|
+
return;
|
|
1436
|
+
try {
|
|
1437
|
+
window.localStorage.removeItem(storageKey);
|
|
1438
|
+
} catch (ignore) {
|
|
1439
|
+
}
|
|
1440
|
+
try {
|
|
1441
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
1442
|
+
} catch (ignore) {
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
function normalizeLevel(input) {
|
|
1446
|
+
var level = input;
|
|
1447
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
|
1448
|
+
level = self2.levels[level.toUpperCase()];
|
|
1449
|
+
}
|
|
1450
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
|
1451
|
+
return level;
|
|
1452
|
+
} else {
|
|
1453
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
self2.name = name;
|
|
1457
|
+
self2.levels = {
|
|
1458
|
+
"TRACE": 0,
|
|
1459
|
+
"DEBUG": 1,
|
|
1460
|
+
"INFO": 2,
|
|
1461
|
+
"WARN": 3,
|
|
1462
|
+
"ERROR": 4,
|
|
1463
|
+
"SILENT": 5
|
|
1464
|
+
};
|
|
1465
|
+
self2.methodFactory = factory || defaultMethodFactory;
|
|
1466
|
+
self2.getLevel = function() {
|
|
1467
|
+
if (userLevel != null) {
|
|
1468
|
+
return userLevel;
|
|
1469
|
+
} else if (defaultLevel != null) {
|
|
1470
|
+
return defaultLevel;
|
|
1471
|
+
} else {
|
|
1472
|
+
return inheritedLevel;
|
|
1473
|
+
}
|
|
1474
|
+
};
|
|
1475
|
+
self2.setLevel = function(level, persist) {
|
|
1476
|
+
userLevel = normalizeLevel(level);
|
|
1477
|
+
if (persist !== false) {
|
|
1478
|
+
persistLevelIfPossible(userLevel);
|
|
1479
|
+
}
|
|
1480
|
+
return replaceLoggingMethods.call(self2);
|
|
1481
|
+
};
|
|
1482
|
+
self2.setDefaultLevel = function(level) {
|
|
1483
|
+
defaultLevel = normalizeLevel(level);
|
|
1484
|
+
if (!getPersistedLevel()) {
|
|
1485
|
+
self2.setLevel(level, false);
|
|
1486
|
+
}
|
|
1487
|
+
};
|
|
1488
|
+
self2.resetLevel = function() {
|
|
1489
|
+
userLevel = null;
|
|
1490
|
+
clearPersistedLevel();
|
|
1491
|
+
replaceLoggingMethods.call(self2);
|
|
1492
|
+
};
|
|
1493
|
+
self2.enableAll = function(persist) {
|
|
1494
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
|
1495
|
+
};
|
|
1496
|
+
self2.disableAll = function(persist) {
|
|
1497
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
|
1498
|
+
};
|
|
1499
|
+
self2.rebuild = function() {
|
|
1500
|
+
if (defaultLogger !== self2) {
|
|
1501
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
1502
|
+
}
|
|
1503
|
+
replaceLoggingMethods.call(self2);
|
|
1504
|
+
if (defaultLogger === self2) {
|
|
1505
|
+
for (var childName in _loggersByName) {
|
|
1506
|
+
_loggersByName[childName].rebuild();
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
inheritedLevel = normalizeLevel(
|
|
1511
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
1512
|
+
);
|
|
1513
|
+
var initialLevel = getPersistedLevel();
|
|
1514
|
+
if (initialLevel != null) {
|
|
1515
|
+
userLevel = normalizeLevel(initialLevel);
|
|
1516
|
+
}
|
|
1517
|
+
replaceLoggingMethods.call(self2);
|
|
1518
|
+
}
|
|
1519
|
+
defaultLogger = new Logger();
|
|
1520
|
+
defaultLogger.getLogger = function getLogger(name) {
|
|
1521
|
+
if (typeof name !== "symbol" && typeof name !== "string" || name === "") {
|
|
1522
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
1523
|
+
}
|
|
1524
|
+
var logger = _loggersByName[name];
|
|
1525
|
+
if (!logger) {
|
|
1526
|
+
logger = _loggersByName[name] = new Logger(
|
|
1527
|
+
name,
|
|
1528
|
+
defaultLogger.methodFactory
|
|
1529
|
+
);
|
|
1530
|
+
}
|
|
1531
|
+
return logger;
|
|
1532
|
+
};
|
|
1533
|
+
var _log = typeof window !== undefinedType ? window.log : void 0;
|
|
1534
|
+
defaultLogger.noConflict = function() {
|
|
1535
|
+
if (typeof window !== undefinedType && window.log === defaultLogger) {
|
|
1536
|
+
window.log = _log;
|
|
1537
|
+
}
|
|
1538
|
+
return defaultLogger;
|
|
1539
|
+
};
|
|
1540
|
+
defaultLogger.getLoggers = function getLoggers() {
|
|
1541
|
+
return _loggersByName;
|
|
1542
|
+
};
|
|
1543
|
+
defaultLogger["default"] = defaultLogger;
|
|
1544
|
+
return defaultLogger;
|
|
1545
|
+
});
|
|
1546
|
+
})(loglevel);
|
|
1297
1547
|
const ViewType = {
|
|
1298
1548
|
DESCRIPTION: "description",
|
|
1299
1549
|
STATUS: "status",
|
|
@@ -1314,7 +1564,8 @@ const ViewType = {
|
|
|
1314
1564
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
1315
1565
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
1316
1566
|
LINK_CONTROLLER: "linkController",
|
|
1317
|
-
DUAL_SCATTERPLOT: "dualScatterplot"
|
|
1567
|
+
DUAL_SCATTERPLOT: "dualScatterplot",
|
|
1568
|
+
TREEMAP: "treemap"
|
|
1318
1569
|
};
|
|
1319
1570
|
const CoordinationType = {
|
|
1320
1571
|
META_COORDINATION_SCOPES: "metaCoordinationScopes",
|
|
@@ -1446,12 +1697,15 @@ const CoordinationType = {
|
|
|
1446
1697
|
SAMPLE_SET_FILTER: "sampleSetFilter",
|
|
1447
1698
|
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
|
1448
1699
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
|
1700
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
|
1449
1701
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
|
1450
1702
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
|
1451
1703
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
|
1452
1704
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
1453
1705
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
1454
|
-
CONTOUR_COLOR: "contourColor"
|
|
1706
|
+
CONTOUR_COLOR: "contourColor",
|
|
1707
|
+
// Treemap
|
|
1708
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
1455
1709
|
};
|
|
1456
1710
|
const ViewHelpMapping = {
|
|
1457
1711
|
SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
|
|
@@ -1468,7 +1722,8 @@ const ViewHelpMapping = {
|
|
|
1468
1722
|
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).",
|
|
1469
1723
|
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
|
1470
1724
|
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).",
|
|
1471
|
-
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."
|
|
1725
|
+
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.",
|
|
1726
|
+
TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering."
|
|
1472
1727
|
};
|
|
1473
1728
|
const COMPONENT_COORDINATION_TYPES = {
|
|
1474
1729
|
[ViewType.SCATTERPLOT]: [
|
|
@@ -1948,6 +2203,32 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1948
2203
|
CoordinationType.OBS_SET_SELECTION,
|
|
1949
2204
|
CoordinationType.OBS_SET_FILTER
|
|
1950
2205
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
2206
|
+
],
|
|
2207
|
+
[ViewType.TREEMAP]: [
|
|
2208
|
+
CoordinationType.DATASET,
|
|
2209
|
+
CoordinationType.OBS_TYPE,
|
|
2210
|
+
CoordinationType.FEATURE_TYPE,
|
|
2211
|
+
CoordinationType.FEATURE_VALUE_TYPE,
|
|
2212
|
+
CoordinationType.OBS_FILTER,
|
|
2213
|
+
CoordinationType.OBS_HIGHLIGHT,
|
|
2214
|
+
CoordinationType.OBS_SET_SELECTION,
|
|
2215
|
+
CoordinationType.OBS_SET_FILTER,
|
|
2216
|
+
CoordinationType.OBS_SELECTION,
|
|
2217
|
+
CoordinationType.OBS_SELECTION_MODE,
|
|
2218
|
+
CoordinationType.OBS_SET_HIGHLIGHT,
|
|
2219
|
+
CoordinationType.OBS_SET_COLOR,
|
|
2220
|
+
CoordinationType.OBS_COLOR_ENCODING,
|
|
2221
|
+
CoordinationType.ADDITIONAL_OBS_SETS,
|
|
2222
|
+
CoordinationType.SAMPLE_TYPE,
|
|
2223
|
+
CoordinationType.SAMPLE_SET_SELECTION,
|
|
2224
|
+
CoordinationType.SAMPLE_SET_FILTER,
|
|
2225
|
+
CoordinationType.SAMPLE_SET_COLOR,
|
|
2226
|
+
CoordinationType.SAMPLE_SELECTION,
|
|
2227
|
+
CoordinationType.SAMPLE_SELECTION_MODE,
|
|
2228
|
+
CoordinationType.SAMPLE_FILTER,
|
|
2229
|
+
CoordinationType.SAMPLE_FILTER_MODE,
|
|
2230
|
+
CoordinationType.SAMPLE_HIGHLIGHT,
|
|
2231
|
+
CoordinationType.HIERARCHY_LEVELS
|
|
1951
2232
|
]
|
|
1952
2233
|
};
|
|
1953
2234
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/feature-list",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"react-virtualized": "^9.22.2",
|
|
23
23
|
"uuid": "^9.0.0",
|
|
24
24
|
"react-aria": "^3.28.0",
|
|
25
|
-
"@vitessce/constants-internal": "3.5.
|
|
26
|
-
"@vitessce/utils": "3.5.
|
|
27
|
-
"@vitessce/vit-s": "3.5.
|
|
25
|
+
"@vitessce/constants-internal": "3.5.7",
|
|
26
|
+
"@vitessce/utils": "3.5.7",
|
|
27
|
+
"@vitessce/vit-s": "3.5.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^5.16.4",
|