@vitessce/constants-internal 2.0.3-beta.0 → 3.0.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/index.js CHANGED
@@ -1,4 +1,516 @@
1
- export { ViewType, DataType, FileType, CoordinationType, STATUS, } from './constants';
2
- export { FILE_TYPE_DATA_TYPE_MAPPING, DATA_TYPE_COORDINATION_VALUE_USAGE } from './constant-relationships';
3
- export { DEFAULT_COORDINATION_VALUES, AUTO_INDEPENDENT_COORDINATION_TYPES, COMPONENT_COORDINATION_TYPES } from './coordination';
4
- export { default as META_VERSION } from './version.json';
1
+ const ViewType = {
2
+ DESCRIPTION: "description",
3
+ STATUS: "status",
4
+ SCATTERPLOT: "scatterplot",
5
+ SPATIAL: "spatial",
6
+ HEATMAP: "heatmap",
7
+ LAYER_CONTROLLER: "layerController",
8
+ GENOMIC_PROFILES: "genomicProfiles",
9
+ GATING: "gating",
10
+ FEATURE_LIST: "featureList",
11
+ OBS_SETS: "obsSets",
12
+ OBS_SET_SIZES: "obsSetSizes",
13
+ OBS_SET_FEATURE_VALUE_DISTRIBUTION: "obsSetFeatureValueDistribution",
14
+ FEATURE_VALUE_HISTOGRAM: "featureValueHistogram"
15
+ };
16
+ const DataType = {
17
+ OBS_LABELS: "obsLabels",
18
+ OBS_EMBEDDING: "obsEmbedding",
19
+ OBS_LOCATIONS: "obsLocations",
20
+ OBS_FEATURE_MATRIX: "obsFeatureMatrix",
21
+ OBS_SETS: "obsSets",
22
+ FEATURE_LABELS: "featureLabels",
23
+ IMAGE: "image",
24
+ OBS_SEGMENTATIONS: "obsSegmentations",
25
+ NEIGHBORHOODS: "neighborhoods",
26
+ GENOMIC_PROFILES: "genomic-profiles"
27
+ };
28
+ const FileType = {
29
+ // Joint file types
30
+ ANNDATA_ZARR: "anndata.zarr",
31
+ // Atomic file types
32
+ OBS_EMBEDDING_CSV: "obsEmbedding.csv",
33
+ OBS_LOCATIONS_CSV: "obsLocations.csv",
34
+ OBS_LABELS_CSV: "obsLabels.csv",
35
+ FEATURE_LABELS_CSV: "featureLabels.csv",
36
+ OBS_FEATURE_MATRIX_CSV: "obsFeatureMatrix.csv",
37
+ OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
38
+ OBS_SETS_CSV: "obsSets.csv",
39
+ OBS_SETS_JSON: "obsSets.json",
40
+ IMAGE_OME_ZARR: "image.ome-zarr",
41
+ // AnnData
42
+ OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
43
+ OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
44
+ OBS_EMBEDDING_ANNDATA_ZARR: "obsEmbedding.anndata.zarr",
45
+ OBS_LOCATIONS_ANNDATA_ZARR: "obsLocations.anndata.zarr",
46
+ OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
47
+ OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
48
+ FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
49
+ // MuData
50
+ OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
51
+ OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
52
+ OBS_EMBEDDING_MUDATA_ZARR: "obsEmbedding.mudata.zarr",
53
+ OBS_LOCATIONS_MUDATA_ZARR: "obsLocations.mudata.zarr",
54
+ OBS_SEGMENTATIONS_MUDATA_ZARR: "obsSegmentations.mudata.zarr",
55
+ OBS_LABELS_MUDATA_ZARR: "obsLabels.mudata.zarr",
56
+ FEATURE_LABELS_MUDATA_ZARR: "featureLabels.mudata.zarr",
57
+ GENOMIC_PROFILES_ZARR: "genomic-profiles.zarr",
58
+ NEIGHBORHOODS_JSON: "neighborhoods.json",
59
+ // OME-TIFF
60
+ IMAGE_OME_TIFF: "image.ome-tiff",
61
+ OBS_SEGMENTATIONS_OME_TIFF: "obsSegmentations.ome-tiff",
62
+ // New file types to support old file types:
63
+ // - cells.json
64
+ OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
65
+ OBS_SEGMENTATIONS_CELLS_JSON: "obsSegmentations.cells.json",
66
+ OBS_LOCATIONS_CELLS_JSON: "obsLocations.cells.json",
67
+ OBS_LABELS_CELLS_JSON: "obsLabels.cells.json",
68
+ // - cell-sets.json
69
+ OBS_SETS_CELL_SETS_JSON: "obsSets.cell-sets.json",
70
+ // - genes.json
71
+ OBS_FEATURE_MATRIX_GENES_JSON: "obsFeatureMatrix.genes.json",
72
+ // - clusters.json
73
+ OBS_FEATURE_MATRIX_CLUSTERS_JSON: "obsFeatureMatrix.clusters.json",
74
+ // - expression-matrix.zarr
75
+ OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR: "obsFeatureMatrix.expression-matrix.zarr",
76
+ // - raster.json
77
+ IMAGE_RASTER_JSON: "image.raster.json",
78
+ OBS_SEGMENTATIONS_RASTER_JSON: "obsSegmentations.raster.json",
79
+ // - molecules.json
80
+ OBS_LOCATIONS_MOLECULES_JSON: "obsLocations.molecules.json",
81
+ OBS_LABELS_MOLECULES_JSON: "obsLabels.molecules.json",
82
+ // Legacy joint file types
83
+ CELLS_JSON: "cells.json",
84
+ CELL_SETS_JSON: "cell-sets.json",
85
+ ANNDATA_CELL_SETS_ZARR: "anndata-cell-sets.zarr",
86
+ ANNDATA_CELLS_ZARR: "anndata-cells.zarr",
87
+ EXPRESSION_MATRIX_ZARR: "expression-matrix.zarr",
88
+ MOLECULES_JSON: "molecules.json",
89
+ RASTER_JSON: "raster.json",
90
+ RASTER_OME_ZARR: "raster.ome-zarr",
91
+ CLUSTERS_JSON: "clusters.json",
92
+ GENES_JSON: "genes.json",
93
+ ANNDATA_EXPRESSION_MATRIX_ZARR: "anndata-expression-matrix.zarr"
94
+ };
95
+ const CoordinationType = {
96
+ DATASET: "dataset",
97
+ // Entity types
98
+ OBS_TYPE: "obsType",
99
+ FEATURE_TYPE: "featureType",
100
+ FEATURE_VALUE_TYPE: "featureValueType",
101
+ OBS_LABELS_TYPE: "obsLabelsType",
102
+ // Other types
103
+ EMBEDDING_TYPE: "embeddingType",
104
+ EMBEDDING_ZOOM: "embeddingZoom",
105
+ EMBEDDING_ROTATION: "embeddingRotation",
106
+ EMBEDDING_TARGET_X: "embeddingTargetX",
107
+ EMBEDDING_TARGET_Y: "embeddingTargetY",
108
+ EMBEDDING_TARGET_Z: "embeddingTargetZ",
109
+ EMBEDDING_OBS_SET_POLYGONS_VISIBLE: "embeddingObsSetPolygonsVisible",
110
+ EMBEDDING_OBS_SET_LABELS_VISIBLE: "embeddingObsSetLabelsVisible",
111
+ EMBEDDING_OBS_SET_LABEL_SIZE: "embeddingObsSetLabelSize",
112
+ EMBEDDING_OBS_RADIUS: "embeddingObsRadius",
113
+ EMBEDDING_OBS_RADIUS_MODE: "embeddingObsRadiusMode",
114
+ EMBEDDING_OBS_OPACITY: "embeddingObsOpacity",
115
+ EMBEDDING_OBS_OPACITY_MODE: "embeddingObsOpacityMode",
116
+ SPATIAL_ZOOM: "spatialZoom",
117
+ SPATIAL_ROTATION: "spatialRotation",
118
+ SPATIAL_TARGET_X: "spatialTargetX",
119
+ SPATIAL_TARGET_Y: "spatialTargetY",
120
+ SPATIAL_TARGET_Z: "spatialTargetZ",
121
+ SPATIAL_ROTATION_X: "spatialRotationX",
122
+ SPATIAL_ROTATION_Y: "spatialRotationY",
123
+ SPATIAL_ROTATION_Z: "spatialRotationZ",
124
+ SPATIAL_ROTATION_ORBIT: "spatialRotationOrbit",
125
+ SPATIAL_ORBIT_AXIS: "spatialOrbitAxis",
126
+ SPATIAL_AXIS_FIXED: "spatialAxisFixed",
127
+ HEATMAP_ZOOM_X: "heatmapZoomX",
128
+ HEATMAP_ZOOM_Y: "heatmapZoomY",
129
+ HEATMAP_TARGET_X: "heatmapTargetX",
130
+ HEATMAP_TARGET_Y: "heatmapTargetY",
131
+ OBS_FILTER: "obsFilter",
132
+ OBS_HIGHLIGHT: "obsHighlight",
133
+ OBS_SET_SELECTION: "obsSetSelection",
134
+ OBS_SET_HIGHLIGHT: "obsSetHighlight",
135
+ OBS_SET_EXPANSION: "obsSetExpansion",
136
+ OBS_SET_COLOR: "obsSetColor",
137
+ FEATURE_FILTER: "featureFilter",
138
+ FEATURE_HIGHLIGHT: "featureHighlight",
139
+ FEATURE_SELECTION: "featureSelection",
140
+ FEATURE_VALUE_COLORMAP: "featureValueColormap",
141
+ FEATURE_VALUE_TRANSFORM: "featureValueTransform",
142
+ FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
143
+ OBS_COLOR_ENCODING: "obsColorEncoding",
144
+ SPATIAL_IMAGE_LAYER: "spatialImageLayer",
145
+ SPATIAL_SEGMENTATION_LAYER: "spatialSegmentationLayer",
146
+ SPATIAL_POINT_LAYER: "spatialPointLayer",
147
+ SPATIAL_NEIGHBORHOOD_LAYER: "spatialNeighborhoodLayer",
148
+ GENOMIC_ZOOM_X: "genomicZoomX",
149
+ GENOMIC_ZOOM_Y: "genomicZoomY",
150
+ GENOMIC_TARGET_X: "genomicTargetX",
151
+ GENOMIC_TARGET_Y: "genomicTargetY",
152
+ ADDITIONAL_OBS_SETS: "additionalObsSets",
153
+ // TODO: use obsHighlight rather than moleculeHighlight.
154
+ MOLECULE_HIGHLIGHT: "moleculeHighlight",
155
+ GATING_FEATURE_SELECTION_X: "gatingFeatureSelectionX",
156
+ GATING_FEATURE_SELECTION_Y: "gatingFeatureSelectionY",
157
+ FEATURE_VALUE_TRANSFORM_COEFFICIENT: "featureValueTransformCoefficient",
158
+ TOOLTIPS_VISIBLE: "tooltipsVisible"
159
+ };
160
+ const STATUS = {
161
+ LOADING: "loading",
162
+ SUCCESS: "success",
163
+ ERROR: "error"
164
+ };
165
+ const FILE_TYPE_DATA_TYPE_MAPPING = {
166
+ // For new file types
167
+ [FileType.OBS_EMBEDDING_CSV]: DataType.OBS_EMBEDDING,
168
+ [FileType.OBS_LOCATIONS_CSV]: DataType.OBS_LOCATIONS,
169
+ [FileType.OBS_LABELS_CSV]: DataType.OBS_LABELS,
170
+ [FileType.FEATURE_LABELS_CSV]: DataType.FEATURE_LABELS,
171
+ [FileType.OBS_FEATURE_MATRIX_CSV]: DataType.OBS_FEATURE_MATRIX,
172
+ [FileType.OBS_SEGMENTATIONS_JSON]: DataType.OBS_SEGMENTATIONS,
173
+ [FileType.OBS_SETS_CSV]: DataType.OBS_SETS,
174
+ [FileType.OBS_SETS_JSON]: DataType.OBS_SETS,
175
+ [FileType.IMAGE_OME_ZARR]: DataType.IMAGE,
176
+ [FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR]: DataType.OBS_FEATURE_MATRIX,
177
+ [FileType.OBS_SETS_ANNDATA_ZARR]: DataType.OBS_SETS,
178
+ [FileType.OBS_EMBEDDING_ANNDATA_ZARR]: DataType.OBS_EMBEDDING,
179
+ [FileType.OBS_LOCATIONS_ANNDATA_ZARR]: DataType.OBS_LOCATIONS,
180
+ [FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR]: DataType.OBS_SEGMENTATIONS,
181
+ [FileType.OBS_LABELS_ANNDATA_ZARR]: DataType.OBS_LABELS,
182
+ [FileType.FEATURE_LABELS_ANNDATA_ZARR]: DataType.FEATURE_LABELS,
183
+ [FileType.IMAGE_OME_TIFF]: DataType.IMAGE,
184
+ [FileType.OBS_SEGMENTATIONS_OME_TIFF]: DataType.OBS_SEGMENTATIONS,
185
+ [FileType.OBS_FEATURE_MATRIX_MUDATA_ZARR]: DataType.OBS_FEATURE_MATRIX,
186
+ [FileType.OBS_SETS_MUDATA_ZARR]: DataType.OBS_SETS,
187
+ [FileType.OBS_EMBEDDING_MUDATA_ZARR]: DataType.OBS_EMBEDDING,
188
+ [FileType.OBS_LOCATIONS_MUDATA_ZARR]: DataType.OBS_LOCATIONS,
189
+ [FileType.OBS_SEGMENTATIONS_MUDATA_ZARR]: DataType.OBS_SEGMENTATIONS,
190
+ [FileType.OBS_LABELS_MUDATA_ZARR]: DataType.OBS_LABELS,
191
+ [FileType.FEATURE_LABELS_MUDATA_ZARR]: DataType.FEATURE_LABELS,
192
+ // For new file types to support old file types
193
+ [FileType.OBS_EMBEDDING_CELLS_JSON]: DataType.OBS_EMBEDDING,
194
+ [FileType.OBS_LOCATIONS_CELLS_JSON]: DataType.OBS_LOCATIONS,
195
+ [FileType.OBS_SEGMENTATIONS_CELLS_JSON]: DataType.OBS_SEGMENTATIONS,
196
+ [FileType.OBS_LABELS_CELLS_JSON]: DataType.OBS_LABELS,
197
+ [FileType.OBS_SETS_CELL_SETS_JSON]: DataType.OBS_SETS,
198
+ [FileType.OBS_FEATURE_MATRIX_GENES_JSON]: DataType.OBS_FEATURE_MATRIX,
199
+ [FileType.OBS_FEATURE_MATRIX_CLUSTERS_JSON]: DataType.OBS_FEATURE_MATRIX,
200
+ [FileType.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR]: DataType.OBS_FEATURE_MATRIX,
201
+ [FileType.IMAGE_RASTER_JSON]: DataType.IMAGE,
202
+ [FileType.OBS_SEGMENTATIONS_RASTER_JSON]: DataType.OBS_SEGMENTATIONS,
203
+ [FileType.OBS_LOCATIONS_MOLECULES_JSON]: DataType.OBS_LOCATIONS,
204
+ [FileType.OBS_LABELS_MOLECULES_JSON]: DataType.OBS_LABELS,
205
+ // For old file types
206
+ [FileType.GENOMIC_PROFILES_ZARR]: DataType.GENOMIC_PROFILES,
207
+ [FileType.NEIGHBORHOODS_JSON]: DataType.NEIGHBORHOODS
208
+ };
209
+ const DATA_TYPE_COORDINATION_VALUE_USAGE = {
210
+ [DataType.OBS_SEGMENTATIONS]: [
211
+ CoordinationType.OBS_TYPE
212
+ ],
213
+ [DataType.OBS_EMBEDDING]: [
214
+ CoordinationType.OBS_TYPE,
215
+ CoordinationType.EMBEDDING_TYPE
216
+ ],
217
+ [DataType.OBS_LOCATIONS]: [
218
+ CoordinationType.OBS_TYPE
219
+ ],
220
+ [DataType.OBS_LABELS]: [
221
+ CoordinationType.OBS_TYPE,
222
+ CoordinationType.OBS_LABELS_TYPE
223
+ ],
224
+ [DataType.FEATURE_LABELS]: [
225
+ CoordinationType.FEATURE_TYPE
226
+ ],
227
+ [DataType.OBS_SETS]: [
228
+ CoordinationType.OBS_TYPE
229
+ ],
230
+ [DataType.OBS_FEATURE_MATRIX]: [
231
+ CoordinationType.OBS_TYPE,
232
+ CoordinationType.FEATURE_TYPE,
233
+ CoordinationType.FEATURE_VALUE_TYPE
234
+ ],
235
+ [DataType.GENOMIC_PROFILES]: [],
236
+ [DataType.IMAGE]: [],
237
+ [DataType.NEIGHBORHOODS]: []
238
+ };
239
+ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
240
+ CoordinationType.HEATMAP_ZOOM_X,
241
+ CoordinationType.HEATMAP_ZOOM_Y,
242
+ CoordinationType.HEATMAP_TARGET_X,
243
+ CoordinationType.HEATMAP_TARGET_Y,
244
+ CoordinationType.EMBEDDING_ZOOM,
245
+ CoordinationType.EMBEDDING_TARGET_X,
246
+ CoordinationType.EMBEDDING_TARGET_Y,
247
+ CoordinationType.EMBEDDING_TARGET_Z,
248
+ CoordinationType.EMBEDDING_OBS_SET_POLYGONS_VISIBLE,
249
+ CoordinationType.EMBEDDING_OBS_SET_LABELS_VISIBLE,
250
+ CoordinationType.EMBEDDING_OBS_SET_LABEL_SIZE,
251
+ CoordinationType.EMBEDDING_OBS_RADIUS,
252
+ CoordinationType.EMBEDDING_OBS_OPACITY
253
+ ];
254
+ const COMPONENT_COORDINATION_TYPES = {
255
+ [ViewType.SCATTERPLOT]: [
256
+ CoordinationType.DATASET,
257
+ CoordinationType.OBS_TYPE,
258
+ CoordinationType.FEATURE_TYPE,
259
+ CoordinationType.FEATURE_VALUE_TYPE,
260
+ CoordinationType.OBS_LABELS_TYPE,
261
+ CoordinationType.EMBEDDING_TYPE,
262
+ CoordinationType.EMBEDDING_ZOOM,
263
+ CoordinationType.EMBEDDING_ROTATION,
264
+ CoordinationType.EMBEDDING_TARGET_X,
265
+ CoordinationType.EMBEDDING_TARGET_Y,
266
+ CoordinationType.EMBEDDING_TARGET_Z,
267
+ CoordinationType.EMBEDDING_OBS_SET_POLYGONS_VISIBLE,
268
+ CoordinationType.EMBEDDING_OBS_SET_LABELS_VISIBLE,
269
+ CoordinationType.EMBEDDING_OBS_SET_LABEL_SIZE,
270
+ CoordinationType.EMBEDDING_OBS_RADIUS,
271
+ CoordinationType.EMBEDDING_OBS_RADIUS_MODE,
272
+ CoordinationType.EMBEDDING_OBS_OPACITY,
273
+ CoordinationType.EMBEDDING_OBS_OPACITY_MODE,
274
+ CoordinationType.OBS_FILTER,
275
+ CoordinationType.OBS_HIGHLIGHT,
276
+ CoordinationType.OBS_SET_SELECTION,
277
+ CoordinationType.OBS_SET_HIGHLIGHT,
278
+ CoordinationType.OBS_SET_COLOR,
279
+ CoordinationType.FEATURE_HIGHLIGHT,
280
+ CoordinationType.FEATURE_SELECTION,
281
+ CoordinationType.FEATURE_VALUE_COLORMAP,
282
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
283
+ CoordinationType.OBS_COLOR_ENCODING,
284
+ CoordinationType.ADDITIONAL_OBS_SETS,
285
+ CoordinationType.TOOLTIPS_VISIBLE
286
+ ],
287
+ [ViewType.GATING]: [
288
+ CoordinationType.DATASET,
289
+ CoordinationType.OBS_TYPE,
290
+ CoordinationType.FEATURE_TYPE,
291
+ CoordinationType.FEATURE_VALUE_TYPE,
292
+ CoordinationType.EMBEDDING_TYPE,
293
+ CoordinationType.EMBEDDING_ZOOM,
294
+ CoordinationType.EMBEDDING_ROTATION,
295
+ CoordinationType.EMBEDDING_TARGET_X,
296
+ CoordinationType.EMBEDDING_TARGET_Y,
297
+ CoordinationType.EMBEDDING_TARGET_Z,
298
+ CoordinationType.EMBEDDING_OBS_SET_POLYGONS_VISIBLE,
299
+ CoordinationType.EMBEDDING_OBS_SET_LABELS_VISIBLE,
300
+ CoordinationType.EMBEDDING_OBS_SET_LABEL_SIZE,
301
+ CoordinationType.EMBEDDING_OBS_RADIUS,
302
+ CoordinationType.EMBEDDING_OBS_RADIUS_MODE,
303
+ CoordinationType.EMBEDDING_OBS_OPACITY,
304
+ CoordinationType.EMBEDDING_OBS_OPACITY_MODE,
305
+ CoordinationType.OBS_FILTER,
306
+ CoordinationType.OBS_HIGHLIGHT,
307
+ CoordinationType.OBS_SET_SELECTION,
308
+ CoordinationType.OBS_SET_HIGHLIGHT,
309
+ CoordinationType.OBS_SET_COLOR,
310
+ CoordinationType.FEATURE_HIGHLIGHT,
311
+ CoordinationType.FEATURE_SELECTION,
312
+ CoordinationType.FEATURE_VALUE_COLORMAP,
313
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
314
+ CoordinationType.OBS_COLOR_ENCODING,
315
+ CoordinationType.ADDITIONAL_OBS_SETS,
316
+ CoordinationType.FEATURE_VALUE_TRANSFORM,
317
+ CoordinationType.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
318
+ CoordinationType.GATING_FEATURE_SELECTION_X,
319
+ CoordinationType.GATING_FEATURE_SELECTION_Y
320
+ ],
321
+ [ViewType.SPATIAL]: [
322
+ CoordinationType.DATASET,
323
+ CoordinationType.OBS_TYPE,
324
+ CoordinationType.OBS_LABELS_TYPE,
325
+ CoordinationType.FEATURE_TYPE,
326
+ CoordinationType.FEATURE_VALUE_TYPE,
327
+ CoordinationType.SPATIAL_ZOOM,
328
+ CoordinationType.SPATIAL_ROTATION,
329
+ CoordinationType.SPATIAL_IMAGE_LAYER,
330
+ CoordinationType.SPATIAL_SEGMENTATION_LAYER,
331
+ CoordinationType.SPATIAL_POINT_LAYER,
332
+ CoordinationType.SPATIAL_NEIGHBORHOOD_LAYER,
333
+ CoordinationType.SPATIAL_TARGET_X,
334
+ CoordinationType.SPATIAL_TARGET_Y,
335
+ CoordinationType.SPATIAL_TARGET_Z,
336
+ CoordinationType.SPATIAL_ROTATION_X,
337
+ CoordinationType.SPATIAL_ROTATION_Y,
338
+ CoordinationType.SPATIAL_ROTATION_Z,
339
+ CoordinationType.SPATIAL_ROTATION_ORBIT,
340
+ CoordinationType.SPATIAL_ORBIT_AXIS,
341
+ CoordinationType.SPATIAL_AXIS_FIXED,
342
+ CoordinationType.OBS_FILTER,
343
+ CoordinationType.OBS_HIGHLIGHT,
344
+ CoordinationType.OBS_SET_SELECTION,
345
+ CoordinationType.OBS_SET_HIGHLIGHT,
346
+ CoordinationType.OBS_SET_COLOR,
347
+ CoordinationType.FEATURE_HIGHLIGHT,
348
+ CoordinationType.FEATURE_SELECTION,
349
+ CoordinationType.FEATURE_VALUE_COLORMAP,
350
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
351
+ CoordinationType.OBS_COLOR_ENCODING,
352
+ CoordinationType.ADDITIONAL_OBS_SETS,
353
+ CoordinationType.MOLECULE_HIGHLIGHT,
354
+ CoordinationType.TOOLTIPS_VISIBLE
355
+ ],
356
+ [ViewType.HEATMAP]: [
357
+ CoordinationType.DATASET,
358
+ CoordinationType.OBS_TYPE,
359
+ CoordinationType.OBS_LABELS_TYPE,
360
+ CoordinationType.FEATURE_TYPE,
361
+ CoordinationType.FEATURE_VALUE_TYPE,
362
+ CoordinationType.HEATMAP_ZOOM_X,
363
+ CoordinationType.HEATMAP_ZOOM_Y,
364
+ CoordinationType.HEATMAP_TARGET_X,
365
+ CoordinationType.HEATMAP_TARGET_Y,
366
+ CoordinationType.OBS_FILTER,
367
+ CoordinationType.OBS_HIGHLIGHT,
368
+ CoordinationType.OBS_SET_SELECTION,
369
+ CoordinationType.OBS_SET_HIGHLIGHT,
370
+ CoordinationType.OBS_SET_COLOR,
371
+ CoordinationType.FEATURE_FILTER,
372
+ CoordinationType.FEATURE_HIGHLIGHT,
373
+ CoordinationType.FEATURE_SELECTION,
374
+ CoordinationType.FEATURE_VALUE_COLORMAP,
375
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
376
+ CoordinationType.OBS_COLOR_ENCODING,
377
+ CoordinationType.ADDITIONAL_OBS_SETS,
378
+ CoordinationType.TOOLTIPS_VISIBLE
379
+ ],
380
+ [ViewType.OBS_SETS]: [
381
+ CoordinationType.DATASET,
382
+ CoordinationType.OBS_TYPE,
383
+ CoordinationType.OBS_SET_SELECTION,
384
+ CoordinationType.OBS_SET_EXPANSION,
385
+ CoordinationType.OBS_SET_HIGHLIGHT,
386
+ CoordinationType.OBS_SET_COLOR,
387
+ CoordinationType.OBS_COLOR_ENCODING,
388
+ CoordinationType.ADDITIONAL_OBS_SETS,
389
+ CoordinationType.FEATURE_SELECTION
390
+ ],
391
+ [ViewType.OBS_SET_SIZES]: [
392
+ CoordinationType.DATASET,
393
+ CoordinationType.OBS_TYPE,
394
+ CoordinationType.OBS_SET_SELECTION,
395
+ CoordinationType.OBS_SET_EXPANSION,
396
+ CoordinationType.OBS_SET_HIGHLIGHT,
397
+ CoordinationType.OBS_SET_COLOR,
398
+ CoordinationType.ADDITIONAL_OBS_SETS
399
+ ],
400
+ [ViewType.STATUS]: [
401
+ CoordinationType.DATASET,
402
+ CoordinationType.OBS_HIGHLIGHT,
403
+ CoordinationType.FEATURE_HIGHLIGHT,
404
+ CoordinationType.OBS_SET_HIGHLIGHT,
405
+ CoordinationType.MOLECULE_HIGHLIGHT
406
+ ],
407
+ [ViewType.FEATURE_LIST]: [
408
+ CoordinationType.DATASET,
409
+ CoordinationType.OBS_TYPE,
410
+ CoordinationType.FEATURE_TYPE,
411
+ CoordinationType.FEATURE_VALUE_TYPE,
412
+ CoordinationType.FEATURE_FILTER,
413
+ CoordinationType.FEATURE_HIGHLIGHT,
414
+ CoordinationType.FEATURE_SELECTION,
415
+ CoordinationType.OBS_COLOR_ENCODING,
416
+ CoordinationType.OBS_SET_SELECTION
417
+ ],
418
+ [ViewType.OBS_SET_FEATURE_VALUE_DISTRIBUTION]: [
419
+ CoordinationType.DATASET,
420
+ CoordinationType.OBS_TYPE,
421
+ CoordinationType.FEATURE_TYPE,
422
+ CoordinationType.FEATURE_VALUE_TYPE,
423
+ CoordinationType.FEATURE_SELECTION,
424
+ CoordinationType.FEATURE_VALUE_TRANSFORM,
425
+ CoordinationType.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
426
+ CoordinationType.OBS_SET_SELECTION,
427
+ CoordinationType.OBS_SET_HIGHLIGHT,
428
+ CoordinationType.OBS_SET_COLOR,
429
+ CoordinationType.ADDITIONAL_OBS_SETS
430
+ ],
431
+ [ViewType.FEATURE_VALUE_HISTOGRAM]: [
432
+ CoordinationType.DATASET,
433
+ CoordinationType.OBS_TYPE,
434
+ CoordinationType.FEATURE_TYPE,
435
+ CoordinationType.FEATURE_VALUE_TYPE,
436
+ CoordinationType.FEATURE_SELECTION,
437
+ CoordinationType.ADDITIONAL_OBS_SETS,
438
+ CoordinationType.OBS_SET_COLOR,
439
+ CoordinationType.OBS_COLOR_ENCODING,
440
+ CoordinationType.OBS_SET_SELECTION
441
+ ],
442
+ [ViewType.LAYER_CONTROLLER]: [
443
+ CoordinationType.DATASET,
444
+ CoordinationType.OBS_TYPE,
445
+ CoordinationType.FEATURE_TYPE,
446
+ CoordinationType.FEATURE_VALUE_TYPE,
447
+ CoordinationType.SPATIAL_IMAGE_LAYER,
448
+ CoordinationType.SPATIAL_SEGMENTATION_LAYER,
449
+ CoordinationType.SPATIAL_POINT_LAYER,
450
+ CoordinationType.SPATIAL_NEIGHBORHOOD_LAYER,
451
+ CoordinationType.SPATIAL_ZOOM,
452
+ CoordinationType.SPATIAL_TARGET_X,
453
+ CoordinationType.SPATIAL_TARGET_Y,
454
+ CoordinationType.SPATIAL_TARGET_Z,
455
+ CoordinationType.SPATIAL_ROTATION_X,
456
+ CoordinationType.SPATIAL_ROTATION_Y,
457
+ CoordinationType.SPATIAL_ROTATION_Z,
458
+ CoordinationType.SPATIAL_ROTATION_ORBIT,
459
+ CoordinationType.SPATIAL_ORBIT_AXIS
460
+ ],
461
+ [ViewType.GENOMIC_PROFILES]: [
462
+ CoordinationType.DATASET,
463
+ CoordinationType.OBS_TYPE,
464
+ CoordinationType.FEATURE_TYPE,
465
+ CoordinationType.FEATURE_VALUE_TYPE,
466
+ CoordinationType.GENOMIC_ZOOM_X,
467
+ CoordinationType.GENOMIC_ZOOM_Y,
468
+ CoordinationType.GENOMIC_TARGET_X,
469
+ CoordinationType.GENOMIC_TARGET_Y,
470
+ CoordinationType.FEATURE_FILTER,
471
+ CoordinationType.FEATURE_HIGHLIGHT,
472
+ CoordinationType.FEATURE_SELECTION,
473
+ CoordinationType.OBS_SET_SELECTION,
474
+ CoordinationType.OBS_SET_HIGHLIGHT,
475
+ CoordinationType.OBS_SET_COLOR,
476
+ CoordinationType.ADDITIONAL_OBS_SETS
477
+ ],
478
+ [ViewType.DESCRIPTION]: [
479
+ CoordinationType.DATASET,
480
+ CoordinationType.SPATIAL_IMAGE_LAYER
481
+ ],
482
+ higlass: [
483
+ CoordinationType.DATASET,
484
+ CoordinationType.GENOMIC_ZOOM_X,
485
+ CoordinationType.GENOMIC_ZOOM_Y,
486
+ CoordinationType.GENOMIC_TARGET_X,
487
+ CoordinationType.GENOMIC_TARGET_Y,
488
+ CoordinationType.FEATURE_FILTER,
489
+ CoordinationType.FEATURE_HIGHLIGHT,
490
+ CoordinationType.FEATURE_SELECTION
491
+ ]
492
+ };
493
+ const note = "This file is regenerated by push-demo.sh.";
494
+ const version = "3.0.0";
495
+ const branch = "release-v3.0.0";
496
+ const date = "2023-06-05";
497
+ const hash = "74d01aab";
498
+ const version$1 = {
499
+ note,
500
+ version,
501
+ branch,
502
+ date,
503
+ hash
504
+ };
505
+ export {
506
+ AUTO_INDEPENDENT_COORDINATION_TYPES,
507
+ COMPONENT_COORDINATION_TYPES,
508
+ CoordinationType,
509
+ DATA_TYPE_COORDINATION_VALUE_USAGE,
510
+ DataType,
511
+ FILE_TYPE_DATA_TYPE_MAPPING,
512
+ FileType,
513
+ version$1 as META_VERSION,
514
+ STATUS,
515
+ ViewType
516
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Mapping from file types to data types. Each file type
3
+ * should correspond to one data type. Multiple file types
4
+ * can map onto the same data type.
5
+ */
6
+ export const FILE_TYPE_DATA_TYPE_MAPPING: {
7
+ [x: string]: string;
8
+ };
9
+ /**
10
+ * Store a mapping from data types to the coordination types used
11
+ * for matching using the coordinationValues field of file definitions.
12
+ * This enables inferring default values, simplifying view config writing.
13
+ */
14
+ export const DATA_TYPE_COORDINATION_VALUE_USAGE: {
15
+ [x: string]: string[];
16
+ };
17
+ //# sourceMappingURL=constant-relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-relationships.d.ts","sourceRoot":"","sources":["../src/constant-relationships.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH;;EA2CE;AAEF;;;;GAIG;AACH;;EA6BE"}
@@ -1,4 +1,4 @@
1
- import { FileType, DataType, CoordinationType } from './constants';
1
+ import { FileType, DataType, CoordinationType } from './constants.js';
2
2
  /**
3
3
  * Mapping from file types to data types. Each file type
4
4
  * should correspond to one data type. Multiple file types
@@ -22,6 +22,15 @@ export const FILE_TYPE_DATA_TYPE_MAPPING = {
22
22
  [FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR]: DataType.OBS_SEGMENTATIONS,
23
23
  [FileType.OBS_LABELS_ANNDATA_ZARR]: DataType.OBS_LABELS,
24
24
  [FileType.FEATURE_LABELS_ANNDATA_ZARR]: DataType.FEATURE_LABELS,
25
+ [FileType.IMAGE_OME_TIFF]: DataType.IMAGE,
26
+ [FileType.OBS_SEGMENTATIONS_OME_TIFF]: DataType.OBS_SEGMENTATIONS,
27
+ [FileType.OBS_FEATURE_MATRIX_MUDATA_ZARR]: DataType.OBS_FEATURE_MATRIX,
28
+ [FileType.OBS_SETS_MUDATA_ZARR]: DataType.OBS_SETS,
29
+ [FileType.OBS_EMBEDDING_MUDATA_ZARR]: DataType.OBS_EMBEDDING,
30
+ [FileType.OBS_LOCATIONS_MUDATA_ZARR]: DataType.OBS_LOCATIONS,
31
+ [FileType.OBS_SEGMENTATIONS_MUDATA_ZARR]: DataType.OBS_SEGMENTATIONS,
32
+ [FileType.OBS_LABELS_MUDATA_ZARR]: DataType.OBS_LABELS,
33
+ [FileType.FEATURE_LABELS_MUDATA_ZARR]: DataType.FEATURE_LABELS,
25
34
  // For new file types to support old file types
26
35
  [FileType.OBS_EMBEDDING_CELLS_JSON]: DataType.OBS_EMBEDDING,
27
36
  [FileType.OBS_LOCATIONS_CELLS_JSON]: DataType.OBS_LOCATIONS,
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constant-relationships.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-relationships.test.d.ts","sourceRoot":"","sources":["../src/constant-relationships.test.js"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
- import { DataType } from './constants';
2
- import { DATA_TYPE_COORDINATION_VALUE_USAGE, } from './constant-relationships';
1
+ import { DataType } from './constants.js';
2
+ import { DATA_TYPE_COORDINATION_VALUE_USAGE, } from './constant-relationships.js';
3
3
  describe('src/app/constant-relationships.js', () => {
4
4
  describe('DataType-to-CoordinationType usage mapping', () => {
5
5
  it('every data type is mapped to an array of coordination types', () => {