@vitessce/sets-utils 3.6.7 → 3.6.9
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 +70 -15
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6559,6 +6559,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
|
|
|
6559
6559
|
const configSchema1_0_17 = configSchema1_0_16.extend({
|
|
6560
6560
|
version: z.literal("1.0.17")
|
|
6561
6561
|
});
|
|
6562
|
+
const configSchema1_0_18 = configSchema1_0_17.extend({
|
|
6563
|
+
version: z.literal("1.0.18")
|
|
6564
|
+
});
|
|
6562
6565
|
configSchema1_0_0.shape.coordinationSpace.unwrap();
|
|
6563
6566
|
configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
|
|
6564
6567
|
function upgradeReplaceViewProp(prefix, view, coordinationSpace) {
|
|
@@ -7066,7 +7069,54 @@ function upgradeFrom1_0_16(config) {
|
|
|
7066
7069
|
version: "1.0.17"
|
|
7067
7070
|
};
|
|
7068
7071
|
}
|
|
7069
|
-
|
|
7072
|
+
function upgradeFrom1_0_17(config) {
|
|
7073
|
+
const newConfig = cloneDeep(config);
|
|
7074
|
+
const { datasets } = newConfig;
|
|
7075
|
+
const newDatasets = datasets.map((datasetDef) => {
|
|
7076
|
+
const { files } = datasetDef;
|
|
7077
|
+
const newFiles = files.map((fileDef) => {
|
|
7078
|
+
const { fileType, options } = fileDef;
|
|
7079
|
+
if (fileType === "spatialdata.zarr" || fileType === "spatialdata.zarr.zip") {
|
|
7080
|
+
if (options.labels && options.shapes) {
|
|
7081
|
+
throw new Error("Cannot upgrade both labels and shapes at the same time. For now, a workaround is to include two separate spatialdata.zarr file definitions, one for labels and one for shapes.");
|
|
7082
|
+
}
|
|
7083
|
+
if (options.labels) {
|
|
7084
|
+
const newOptions = {
|
|
7085
|
+
...options,
|
|
7086
|
+
obsSegmentations: options.labels
|
|
7087
|
+
};
|
|
7088
|
+
delete newOptions.labels;
|
|
7089
|
+
return {
|
|
7090
|
+
...fileDef,
|
|
7091
|
+
options: newOptions
|
|
7092
|
+
};
|
|
7093
|
+
}
|
|
7094
|
+
if (options.shapes) {
|
|
7095
|
+
const newOptions = {
|
|
7096
|
+
...options,
|
|
7097
|
+
obsSegmentations: options.shapes
|
|
7098
|
+
};
|
|
7099
|
+
delete newOptions.shapes;
|
|
7100
|
+
return {
|
|
7101
|
+
...fileDef,
|
|
7102
|
+
options: newOptions
|
|
7103
|
+
};
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
return fileDef;
|
|
7107
|
+
});
|
|
7108
|
+
return {
|
|
7109
|
+
...datasetDef,
|
|
7110
|
+
files: newFiles
|
|
7111
|
+
};
|
|
7112
|
+
});
|
|
7113
|
+
return {
|
|
7114
|
+
...newConfig,
|
|
7115
|
+
datasets: newDatasets,
|
|
7116
|
+
version: "1.0.18"
|
|
7117
|
+
};
|
|
7118
|
+
}
|
|
7119
|
+
const latestConfigSchema = configSchema1_0_18;
|
|
7070
7120
|
const SCHEMA_HANDLERS = [
|
|
7071
7121
|
[configSchema0_1_0, upgradeFrom0_1_0],
|
|
7072
7122
|
[configSchema1_0_0, upgradeFrom1_0_0],
|
|
@@ -7085,7 +7135,8 @@ const SCHEMA_HANDLERS = [
|
|
|
7085
7135
|
[configSchema1_0_13, upgradeFrom1_0_13],
|
|
7086
7136
|
[configSchema1_0_14, upgradeFrom1_0_14],
|
|
7087
7137
|
[configSchema1_0_15, upgradeFrom1_0_15],
|
|
7088
|
-
[configSchema1_0_16, upgradeFrom1_0_16]
|
|
7138
|
+
[configSchema1_0_16, upgradeFrom1_0_16],
|
|
7139
|
+
[configSchema1_0_17, upgradeFrom1_0_17]
|
|
7089
7140
|
];
|
|
7090
7141
|
var re = { exports: {} };
|
|
7091
7142
|
var constants;
|
|
@@ -9117,9 +9168,7 @@ const FileType$1 = {
|
|
|
9117
9168
|
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
9118
9169
|
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
9119
9170
|
FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
|
|
9120
|
-
|
|
9121
|
-
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
9122
|
-
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
9171
|
+
OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
|
|
9123
9172
|
// SpatialData - zipped
|
|
9124
9173
|
IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
|
|
9125
9174
|
LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
|
|
@@ -9128,6 +9177,7 @@ const FileType$1 = {
|
|
|
9128
9177
|
OBS_SETS_SPATIALDATA_ZARR_ZIP: "obsSets.spatialdata.zarr.zip",
|
|
9129
9178
|
OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
|
|
9130
9179
|
FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
|
|
9180
|
+
OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
|
|
9131
9181
|
// MuData
|
|
9132
9182
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
9133
9183
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -9374,6 +9424,7 @@ const CoordinationType$1 = {
|
|
|
9374
9424
|
[FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR]: DataType$1.OBS_FEATURE_MATRIX,
|
|
9375
9425
|
[FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$1.OBS_SETS,
|
|
9376
9426
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$1.FEATURE_LABELS,
|
|
9427
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$1.OBS_POINTS,
|
|
9377
9428
|
// For new file types to support old file types
|
|
9378
9429
|
[FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$1.OBS_EMBEDDING,
|
|
9379
9430
|
[FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$1.OBS_LOCATIONS,
|
|
@@ -9547,6 +9598,9 @@ const CoordinationType$1 = {
|
|
|
9547
9598
|
},
|
|
9548
9599
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: {
|
|
9549
9600
|
zip: FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR_ZIP
|
|
9601
|
+
},
|
|
9602
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
|
|
9603
|
+
zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
|
|
9550
9604
|
}
|
|
9551
9605
|
});
|
|
9552
9606
|
[
|
|
@@ -10566,10 +10620,14 @@ const imageSpatialdataSchema = z.object({
|
|
|
10566
10620
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
10567
10621
|
});
|
|
10568
10622
|
const obsSegmentationsSpatialdataSchema = z.object({
|
|
10569
|
-
// TODO:
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10623
|
+
// TODO: support obsTypesFromElementNames?
|
|
10624
|
+
path: z.string().describe("The path to the segmentation data, stored in either shapes/ or labels/."),
|
|
10625
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the labels or shapes. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
10626
|
+
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
10627
|
+
});
|
|
10628
|
+
const obsPointsSpatialdataSchema = z.object({
|
|
10629
|
+
path: z.string().describe("The path to the point data."),
|
|
10630
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the points. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
10573
10631
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
10574
10632
|
});
|
|
10575
10633
|
z.object({
|
|
@@ -10689,13 +10747,10 @@ z.object({
|
|
|
10689
10747
|
image: imageSpatialdataSchema,
|
|
10690
10748
|
// TODO: should this be a special schema
|
|
10691
10749
|
// to allow specifying fileUid (like for embeddingType)?
|
|
10692
|
-
// TODO: allow multiple labels?
|
|
10693
|
-
|
|
10750
|
+
// TODO: allow multiple labels/shapes?
|
|
10751
|
+
obsSegmentations: obsSegmentationsSpatialdataSchema,
|
|
10752
|
+
obsPoints: obsPointsSpatialdataSchema,
|
|
10694
10753
|
// TODO: allow multiple shapes?
|
|
10695
|
-
// TODO: unify labels and shapes to obsSegmentations,
|
|
10696
|
-
// then distinguish in expand function based on
|
|
10697
|
-
// "labels/*" vs. "shapes/*" in path?
|
|
10698
|
-
shapes: obsSegmentationsSpatialdataSchema,
|
|
10699
10754
|
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
10700
10755
|
obsSpots: obsSpotsSpatialdataSchema,
|
|
10701
10756
|
// TODO: obsPoints
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/sets-utils",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.9",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -25,9 +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.6.
|
|
29
|
-
"@vitessce/utils": "3.6.
|
|
30
|
-
"@vitessce/globals": "3.6.
|
|
28
|
+
"@vitessce/schemas": "3.6.9",
|
|
29
|
+
"@vitessce/utils": "3.6.9",
|
|
30
|
+
"@vitessce/globals": "3.6.9"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|