@vitessce/all 3.1.3 → 3.2.0
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-e164f5b4.js → deflate-6b735acc.js} +1 -1
- package/dist/{hglib-27190533.js → hglib-2b8cd9d8.js} +1 -1
- package/dist/{index-61ee101c.js → index-d4cd1fef.js} +6296 -894
- package/dist/index.js +1 -1
- package/dist/{jpeg-eaa82c98.js → jpeg-3b40fe93.js} +1 -1
- package/dist/{lerc-0c45509f.js → lerc-e0d6f9e6.js} +1 -1
- package/dist/{lzw-8aa1e0b3.js → lzw-2b4715b3.js} +1 -1
- package/dist/{packbits-ad4b66a3.js → packbits-494352d8.js} +1 -1
- package/dist/{raw-cb4a4ae9.js → raw-ed9deb25.js} +1 -1
- package/dist/{webimage-3d222f28.js → webimage-f9e0ebc3.js} +1 -1
- package/dist-tsc/base-plugins.d.ts +38 -2
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +56 -7
- package/dist-tsc/joint-file-types.d.ts.map +1 -1
- package/dist-tsc/joint-file-types.js +41 -0
- package/package.json +22 -20
- package/src/base-plugins.ts +61 -4
- package/src/joint-file-types.ts +42 -0
package/src/joint-file-types.ts
CHANGED
@@ -8,6 +8,12 @@ type BaseFileDef = {
|
|
8
8
|
coordinationValues: Record<string, string>;
|
9
9
|
};
|
10
10
|
|
11
|
+
const expectedCoordinationTypes = [
|
12
|
+
'obsType', 'featureType', 'featureValueType',
|
13
|
+
'featureLabelsType', 'obsLabelsType',
|
14
|
+
'embeddingType',
|
15
|
+
];
|
16
|
+
|
11
17
|
export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>) {
|
12
18
|
const baseFileDef: BaseFileDef = {
|
13
19
|
url: fileDef.url,
|
@@ -19,6 +25,12 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
19
25
|
featureValueType: fileDef.coordinationValues?.featureValueType || 'expression',
|
20
26
|
},
|
21
27
|
};
|
28
|
+
const extraCoordinationValues: Record<string, any> = {};
|
29
|
+
Object.entries(baseFileDef.coordinationValues).forEach(([key, value]) => {
|
30
|
+
if (!expectedCoordinationTypes.includes(key)) {
|
31
|
+
extraCoordinationValues[key] = value;
|
32
|
+
}
|
33
|
+
});
|
22
34
|
const { options = {} } = fileDef;
|
23
35
|
return [
|
24
36
|
// obsFeatureMatrix
|
@@ -27,6 +39,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
27
39
|
fileType: FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
|
28
40
|
options: options.obsFeatureMatrix,
|
29
41
|
coordinationValues: {
|
42
|
+
...extraCoordinationValues,
|
30
43
|
obsType: baseFileDef.coordinationValues.obsType,
|
31
44
|
featureType: baseFileDef.coordinationValues.featureType,
|
32
45
|
featureValueType: baseFileDef.coordinationValues.featureValueType,
|
@@ -38,6 +51,27 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
38
51
|
fileType: FileType.OBS_SETS_ANNDATA_ZARR,
|
39
52
|
options: options.obsSets,
|
40
53
|
coordinationValues: {
|
54
|
+
...extraCoordinationValues,
|
55
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
56
|
+
},
|
57
|
+
}] : []),
|
58
|
+
// obsSpots
|
59
|
+
...(options.obsSpots ? [{
|
60
|
+
...baseFileDef,
|
61
|
+
fileType: FileType.OBS_SPOTS_ANNDATA_ZARR,
|
62
|
+
options: options.obsSpots,
|
63
|
+
coordinationValues: {
|
64
|
+
...extraCoordinationValues,
|
65
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
66
|
+
},
|
67
|
+
}] : []),
|
68
|
+
// obsPoints
|
69
|
+
...(options.obsPoints ? [{
|
70
|
+
...baseFileDef,
|
71
|
+
fileType: FileType.OBS_POINTS_ANNDATA_ZARR,
|
72
|
+
options: options.obsPoints,
|
73
|
+
coordinationValues: {
|
74
|
+
...extraCoordinationValues,
|
41
75
|
obsType: baseFileDef.coordinationValues.obsType,
|
42
76
|
},
|
43
77
|
}] : []),
|
@@ -47,6 +81,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
47
81
|
fileType: FileType.OBS_LOCATIONS_ANNDATA_ZARR,
|
48
82
|
options: options.obsLocations,
|
49
83
|
coordinationValues: {
|
84
|
+
...extraCoordinationValues,
|
50
85
|
obsType: baseFileDef.coordinationValues.obsType,
|
51
86
|
},
|
52
87
|
}] : []),
|
@@ -56,6 +91,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
56
91
|
fileType: FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR,
|
57
92
|
options: options.obsSegmentations,
|
58
93
|
coordinationValues: {
|
94
|
+
...extraCoordinationValues,
|
59
95
|
obsType: baseFileDef.coordinationValues.obsType,
|
60
96
|
},
|
61
97
|
}] : []),
|
@@ -71,6 +107,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
71
107
|
dims: oe.dims,
|
72
108
|
},
|
73
109
|
coordinationValues: {
|
110
|
+
...extraCoordinationValues,
|
74
111
|
obsType: baseFileDef.coordinationValues.obsType,
|
75
112
|
// Move embedding type property out of options and into coordinationValues.
|
76
113
|
embeddingType: oe.embeddingType,
|
@@ -81,6 +118,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
81
118
|
fileType: FileType.OBS_EMBEDDING_ANNDATA_ZARR,
|
82
119
|
options: options.obsEmbedding,
|
83
120
|
coordinationValues: {
|
121
|
+
...extraCoordinationValues,
|
84
122
|
obsType: baseFileDef.coordinationValues.obsType,
|
85
123
|
embeddingType: baseFileDef.coordinationValues.embeddingType,
|
86
124
|
},
|
@@ -97,6 +135,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
97
135
|
path: ol.path,
|
98
136
|
},
|
99
137
|
coordinationValues: {
|
138
|
+
...extraCoordinationValues,
|
100
139
|
obsType: baseFileDef.coordinationValues.obsType,
|
101
140
|
// Move obsLabels type property out of options and into coordinationValues.
|
102
141
|
obsLabelsType: ol.obsLabelsType,
|
@@ -107,6 +146,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
107
146
|
fileType: FileType.OBS_LABELS_ANNDATA_ZARR,
|
108
147
|
options: options.obsLabels,
|
109
148
|
coordinationValues: {
|
149
|
+
...extraCoordinationValues,
|
110
150
|
obsType: baseFileDef.coordinationValues.obsType,
|
111
151
|
obsLabelsType: baseFileDef.coordinationValues.obsLabelsType,
|
112
152
|
},
|
@@ -123,6 +163,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
123
163
|
path: fl.path,
|
124
164
|
},
|
125
165
|
coordinationValues: {
|
166
|
+
...extraCoordinationValues,
|
126
167
|
featureType: baseFileDef.coordinationValues.featureType,
|
127
168
|
// Move featureLabels type property out of options and into coordinationValues.
|
128
169
|
featureLabelsType: fl.featureLabelsType,
|
@@ -133,6 +174,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
133
174
|
fileType: FileType.FEATURE_LABELS_ANNDATA_ZARR,
|
134
175
|
options: options.featureLabels,
|
135
176
|
coordinationValues: {
|
177
|
+
...extraCoordinationValues,
|
136
178
|
featureType: baseFileDef.coordinationValues.featureType,
|
137
179
|
featureLabelsType: baseFileDef.coordinationValues.featureLabelsType,
|
138
180
|
},
|