@vitessce/config 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 +277 -2
- package/dist-tsc/VitessceAutoConfig.js +2 -1
- package/package.json +4 -3
- package/src/VitessceAutoConfig.js +2 -2
package/dist/index.js
CHANGED
|
@@ -34,6 +34,11 @@ const FileType = {
|
|
|
34
34
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
35
35
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
36
36
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
|
37
|
+
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
|
38
|
+
COMPARISON_METADATA_ANNDATA_ZARR: "comparisonMetadata.anndata.zarr",
|
|
39
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR: "comparativeFeatureStats.anndata.zarr",
|
|
40
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR: "comparativeFeatureSetStats.anndata.zarr",
|
|
41
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR: "comparativeObsSetStats.anndata.zarr",
|
|
37
42
|
// AnnData - zipped
|
|
38
43
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
|
39
44
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
|
@@ -46,6 +51,11 @@ const FileType = {
|
|
|
46
51
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
|
47
52
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
48
53
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
54
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
|
55
|
+
COMPARISON_METADATA_ANNDATA_ZARR_ZIP: "comparisonMetadata.anndata.zarr.zip",
|
|
56
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureStats.anndata.zarr.zip",
|
|
57
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureSetStats.anndata.zarr.zip",
|
|
58
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeObsSetStats.anndata.zarr.zip",
|
|
49
59
|
// AnnData - h5ad via reference spec
|
|
50
60
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
51
61
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
@@ -58,6 +68,11 @@ const FileType = {
|
|
|
58
68
|
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
|
59
69
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
60
70
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
71
|
+
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
|
72
|
+
COMPARISON_METADATA_ANNDATA_H5AD: "comparisonMetadata.anndata.h5ad",
|
|
73
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_H5AD: "comparativeFeatureStats.anndata.h5ad",
|
|
74
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_H5AD: "comparativeFeatureSetStats.anndata.h5ad",
|
|
75
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_H5AD: "comparativeObsSetStats.anndata.h5ad",
|
|
61
76
|
// SpatialData
|
|
62
77
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
63
78
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -249,12 +264,20 @@ const CoordinationType = {
|
|
|
249
264
|
SAMPLE_SET_FILTER: "sampleSetFilter",
|
|
250
265
|
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
|
251
266
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
|
267
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
|
252
268
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
|
253
269
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
|
254
270
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
|
255
271
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
256
272
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
257
|
-
CONTOUR_COLOR: "contourColor"
|
|
273
|
+
CONTOUR_COLOR: "contourColor",
|
|
274
|
+
// For volcano plot:
|
|
275
|
+
FEATURE_POINT_SIGNIFICANCE_THRESHOLD: "featurePointSignificanceThreshold",
|
|
276
|
+
FEATURE_LABEL_SIGNIFICANCE_THRESHOLD: "featureLabelSignificanceThreshold",
|
|
277
|
+
FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
|
|
278
|
+
FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
|
|
279
|
+
// Treemap
|
|
280
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
258
281
|
};
|
|
259
282
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
260
283
|
function getDefaultExportFromCjs(x) {
|
|
@@ -664,6 +687,258 @@ function getInitialCoordinationScopeName(datasetUid, dataType, i = null) {
|
|
|
664
687
|
const prefix = getInitialCoordinationScopePrefix(datasetUid, dataType);
|
|
665
688
|
return `${prefix}${i === null ? 0 : i}`;
|
|
666
689
|
}
|
|
690
|
+
var loglevel = { exports: {} };
|
|
691
|
+
(function(module) {
|
|
692
|
+
(function(root, definition) {
|
|
693
|
+
if (module.exports) {
|
|
694
|
+
module.exports = definition();
|
|
695
|
+
} else {
|
|
696
|
+
root.log = definition();
|
|
697
|
+
}
|
|
698
|
+
})(commonjsGlobal, function() {
|
|
699
|
+
var noop = function() {
|
|
700
|
+
};
|
|
701
|
+
var undefinedType = "undefined";
|
|
702
|
+
var isIE = typeof window !== undefinedType && typeof window.navigator !== undefinedType && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
|
703
|
+
var logMethods = [
|
|
704
|
+
"trace",
|
|
705
|
+
"debug",
|
|
706
|
+
"info",
|
|
707
|
+
"warn",
|
|
708
|
+
"error"
|
|
709
|
+
];
|
|
710
|
+
var _loggersByName = {};
|
|
711
|
+
var defaultLogger = null;
|
|
712
|
+
function bindMethod(obj, methodName) {
|
|
713
|
+
var method = obj[methodName];
|
|
714
|
+
if (typeof method.bind === "function") {
|
|
715
|
+
return method.bind(obj);
|
|
716
|
+
} else {
|
|
717
|
+
try {
|
|
718
|
+
return Function.prototype.bind.call(method, obj);
|
|
719
|
+
} catch (e) {
|
|
720
|
+
return function() {
|
|
721
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function traceForIE() {
|
|
727
|
+
if (console.log) {
|
|
728
|
+
if (console.log.apply) {
|
|
729
|
+
console.log.apply(console, arguments);
|
|
730
|
+
} else {
|
|
731
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
if (console.trace)
|
|
735
|
+
console.trace();
|
|
736
|
+
}
|
|
737
|
+
function realMethod(methodName) {
|
|
738
|
+
if (methodName === "debug") {
|
|
739
|
+
methodName = "log";
|
|
740
|
+
}
|
|
741
|
+
if (typeof console === undefinedType) {
|
|
742
|
+
return false;
|
|
743
|
+
} else if (methodName === "trace" && isIE) {
|
|
744
|
+
return traceForIE;
|
|
745
|
+
} else if (console[methodName] !== void 0) {
|
|
746
|
+
return bindMethod(console, methodName);
|
|
747
|
+
} else if (console.log !== void 0) {
|
|
748
|
+
return bindMethod(console, "log");
|
|
749
|
+
} else {
|
|
750
|
+
return noop;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function replaceLoggingMethods() {
|
|
754
|
+
var level = this.getLevel();
|
|
755
|
+
for (var i = 0; i < logMethods.length; i++) {
|
|
756
|
+
var methodName = logMethods[i];
|
|
757
|
+
this[methodName] = i < level ? noop : this.methodFactory(methodName, level, this.name);
|
|
758
|
+
}
|
|
759
|
+
this.log = this.debug;
|
|
760
|
+
if (typeof console === undefinedType && level < this.levels.SILENT) {
|
|
761
|
+
return "No console available for logging";
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
765
|
+
return function() {
|
|
766
|
+
if (typeof console !== undefinedType) {
|
|
767
|
+
replaceLoggingMethods.call(this);
|
|
768
|
+
this[methodName].apply(this, arguments);
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
773
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
774
|
+
}
|
|
775
|
+
function Logger(name, factory) {
|
|
776
|
+
var self2 = this;
|
|
777
|
+
var inheritedLevel;
|
|
778
|
+
var defaultLevel;
|
|
779
|
+
var userLevel;
|
|
780
|
+
var storageKey = "loglevel";
|
|
781
|
+
if (typeof name === "string") {
|
|
782
|
+
storageKey += ":" + name;
|
|
783
|
+
} else if (typeof name === "symbol") {
|
|
784
|
+
storageKey = void 0;
|
|
785
|
+
}
|
|
786
|
+
function persistLevelIfPossible(levelNum) {
|
|
787
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
|
788
|
+
if (typeof window === undefinedType || !storageKey)
|
|
789
|
+
return;
|
|
790
|
+
try {
|
|
791
|
+
window.localStorage[storageKey] = levelName;
|
|
792
|
+
return;
|
|
793
|
+
} catch (ignore) {
|
|
794
|
+
}
|
|
795
|
+
try {
|
|
796
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
797
|
+
} catch (ignore) {
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
function getPersistedLevel() {
|
|
801
|
+
var storedLevel;
|
|
802
|
+
if (typeof window === undefinedType || !storageKey)
|
|
803
|
+
return;
|
|
804
|
+
try {
|
|
805
|
+
storedLevel = window.localStorage[storageKey];
|
|
806
|
+
} catch (ignore) {
|
|
807
|
+
}
|
|
808
|
+
if (typeof storedLevel === undefinedType) {
|
|
809
|
+
try {
|
|
810
|
+
var cookie = window.document.cookie;
|
|
811
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
812
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
813
|
+
if (location !== -1) {
|
|
814
|
+
storedLevel = /^([^;]+)/.exec(
|
|
815
|
+
cookie.slice(location + cookieName.length + 1)
|
|
816
|
+
)[1];
|
|
817
|
+
}
|
|
818
|
+
} catch (ignore) {
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (self2.levels[storedLevel] === void 0) {
|
|
822
|
+
storedLevel = void 0;
|
|
823
|
+
}
|
|
824
|
+
return storedLevel;
|
|
825
|
+
}
|
|
826
|
+
function clearPersistedLevel() {
|
|
827
|
+
if (typeof window === undefinedType || !storageKey)
|
|
828
|
+
return;
|
|
829
|
+
try {
|
|
830
|
+
window.localStorage.removeItem(storageKey);
|
|
831
|
+
} catch (ignore) {
|
|
832
|
+
}
|
|
833
|
+
try {
|
|
834
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
835
|
+
} catch (ignore) {
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
function normalizeLevel(input) {
|
|
839
|
+
var level = input;
|
|
840
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
|
841
|
+
level = self2.levels[level.toUpperCase()];
|
|
842
|
+
}
|
|
843
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
|
844
|
+
return level;
|
|
845
|
+
} else {
|
|
846
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
self2.name = name;
|
|
850
|
+
self2.levels = {
|
|
851
|
+
"TRACE": 0,
|
|
852
|
+
"DEBUG": 1,
|
|
853
|
+
"INFO": 2,
|
|
854
|
+
"WARN": 3,
|
|
855
|
+
"ERROR": 4,
|
|
856
|
+
"SILENT": 5
|
|
857
|
+
};
|
|
858
|
+
self2.methodFactory = factory || defaultMethodFactory;
|
|
859
|
+
self2.getLevel = function() {
|
|
860
|
+
if (userLevel != null) {
|
|
861
|
+
return userLevel;
|
|
862
|
+
} else if (defaultLevel != null) {
|
|
863
|
+
return defaultLevel;
|
|
864
|
+
} else {
|
|
865
|
+
return inheritedLevel;
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
self2.setLevel = function(level, persist) {
|
|
869
|
+
userLevel = normalizeLevel(level);
|
|
870
|
+
if (persist !== false) {
|
|
871
|
+
persistLevelIfPossible(userLevel);
|
|
872
|
+
}
|
|
873
|
+
return replaceLoggingMethods.call(self2);
|
|
874
|
+
};
|
|
875
|
+
self2.setDefaultLevel = function(level) {
|
|
876
|
+
defaultLevel = normalizeLevel(level);
|
|
877
|
+
if (!getPersistedLevel()) {
|
|
878
|
+
self2.setLevel(level, false);
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
self2.resetLevel = function() {
|
|
882
|
+
userLevel = null;
|
|
883
|
+
clearPersistedLevel();
|
|
884
|
+
replaceLoggingMethods.call(self2);
|
|
885
|
+
};
|
|
886
|
+
self2.enableAll = function(persist) {
|
|
887
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
|
888
|
+
};
|
|
889
|
+
self2.disableAll = function(persist) {
|
|
890
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
|
891
|
+
};
|
|
892
|
+
self2.rebuild = function() {
|
|
893
|
+
if (defaultLogger !== self2) {
|
|
894
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
895
|
+
}
|
|
896
|
+
replaceLoggingMethods.call(self2);
|
|
897
|
+
if (defaultLogger === self2) {
|
|
898
|
+
for (var childName in _loggersByName) {
|
|
899
|
+
_loggersByName[childName].rebuild();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
inheritedLevel = normalizeLevel(
|
|
904
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
905
|
+
);
|
|
906
|
+
var initialLevel = getPersistedLevel();
|
|
907
|
+
if (initialLevel != null) {
|
|
908
|
+
userLevel = normalizeLevel(initialLevel);
|
|
909
|
+
}
|
|
910
|
+
replaceLoggingMethods.call(self2);
|
|
911
|
+
}
|
|
912
|
+
defaultLogger = new Logger();
|
|
913
|
+
defaultLogger.getLogger = function getLogger(name) {
|
|
914
|
+
if (typeof name !== "symbol" && typeof name !== "string" || name === "") {
|
|
915
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
916
|
+
}
|
|
917
|
+
var logger = _loggersByName[name];
|
|
918
|
+
if (!logger) {
|
|
919
|
+
logger = _loggersByName[name] = new Logger(
|
|
920
|
+
name,
|
|
921
|
+
defaultLogger.methodFactory
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
return logger;
|
|
925
|
+
};
|
|
926
|
+
var _log = typeof window !== undefinedType ? window.log : void 0;
|
|
927
|
+
defaultLogger.noConflict = function() {
|
|
928
|
+
if (typeof window !== undefinedType && window.log === defaultLogger) {
|
|
929
|
+
window.log = _log;
|
|
930
|
+
}
|
|
931
|
+
return defaultLogger;
|
|
932
|
+
};
|
|
933
|
+
defaultLogger.getLoggers = function getLoggers() {
|
|
934
|
+
return _loggersByName;
|
|
935
|
+
};
|
|
936
|
+
defaultLogger["default"] = defaultLogger;
|
|
937
|
+
return defaultLogger;
|
|
938
|
+
});
|
|
939
|
+
})(loglevel);
|
|
940
|
+
var loglevelExports = loglevel.exports;
|
|
941
|
+
const log = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
|
|
667
942
|
class VitessceConfigDatasetFile {
|
|
668
943
|
/**
|
|
669
944
|
* Construct a new file definition instance.
|
|
@@ -1975,7 +2250,7 @@ async function generateViewDefinition(url, vc, dataset, hintsConfig) {
|
|
|
1975
2250
|
fileConfig = await configInstance.composeFileConfig();
|
|
1976
2251
|
viewsConfig = await configInstance.composeViewsConfig(hintsConfig);
|
|
1977
2252
|
} catch (error) {
|
|
1978
|
-
|
|
2253
|
+
log.error(error);
|
|
1979
2254
|
return Promise.reject(error);
|
|
1980
2255
|
}
|
|
1981
2256
|
dataset.addFile(fileConfig);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoordinationType as ct, FileType } from '@vitessce/constants-internal';
|
|
2
|
+
import { log } from '@vitessce/globals';
|
|
2
3
|
import { VitessceConfig, } from './VitessceConfig.js';
|
|
3
4
|
import { HINTS_CONFIG, HINT_TYPE_TO_FILE_TYPE_MAP } from './constants.js';
|
|
4
5
|
/**
|
|
@@ -450,7 +451,7 @@ async function generateViewDefinition(url, vc, dataset, hintsConfig) {
|
|
|
450
451
|
viewsConfig = await configInstance.composeViewsConfig(hintsConfig);
|
|
451
452
|
}
|
|
452
453
|
catch (error) {
|
|
453
|
-
|
|
454
|
+
log.error(error);
|
|
454
455
|
return Promise.reject(error);
|
|
455
456
|
}
|
|
456
457
|
dataset.addFile(fileConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/config",
|
|
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": {
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
"dist-tsc"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@vitessce/constants-internal": "3.5.
|
|
20
|
-
"@vitessce/utils": "3.5.
|
|
19
|
+
"@vitessce/constants-internal": "3.5.8",
|
|
20
|
+
"@vitessce/utils": "3.5.8",
|
|
21
|
+
"@vitessce/globals": "3.5.8"
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
23
24
|
"bundle": "pnpm exec vite build -c ../../scripts/vite.config.js",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CoordinationType as ct, FileType } from '@vitessce/constants-internal';
|
|
2
|
+
import { log } from '@vitessce/globals';
|
|
2
3
|
import {
|
|
3
4
|
VitessceConfig,
|
|
4
5
|
} from './VitessceConfig.js';
|
|
5
6
|
|
|
6
7
|
import { HINTS_CONFIG, HINT_TYPE_TO_FILE_TYPE_MAP } from './constants.js';
|
|
7
|
-
|
|
8
8
|
/**
|
|
9
9
|
* @param {Object} hintsConfig. The hints config for the given dataset.
|
|
10
10
|
*
|
|
@@ -526,7 +526,7 @@ async function generateViewDefinition(url, vc, dataset, hintsConfig) {
|
|
|
526
526
|
fileConfig = await configInstance.composeFileConfig();
|
|
527
527
|
viewsConfig = await configInstance.composeViewsConfig(hintsConfig);
|
|
528
528
|
} catch (error) {
|
|
529
|
-
|
|
529
|
+
log.error(error);
|
|
530
530
|
return Promise.reject(error);
|
|
531
531
|
}
|
|
532
532
|
|