@vitessce/all 3.3.6 → 3.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base-plugins.d.ts","sourceRoot":"","sources":["../src/base-plugins.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,CAAC,EAyCF,MAAM,mBAAmB,CAAC;AAoH3B,eAAO,MAAM,aAAa,kBAiBzB,CAAC;AAEF,eAAO,MAAM,aAAa,wDAgEzB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAe9B,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4WAmLjC,CAAC"}
1
+ {"version":3,"file":"base-plugins.d.ts","sourceRoot":"","sources":["../src/base-plugins.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,CAAC,EA2CF,MAAM,mBAAmB,CAAC;AA8H3B,eAAO,MAAM,aAAa,kBAiBzB,CAAC;AAEF,eAAO,MAAM,aAAa,wDAmEzB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgB9B,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4WAqLjC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { FileType, DataType, ViewType, CoordinationType, COMPONENT_COORDINATION_TYPES, } from '@vitessce/constants-internal';
1
+ import { FileType, DataType, ViewType, CoordinationType, COMPONENT_COORDINATION_TYPES, ALT_ZARR_STORE_TYPES, } from '@vitessce/constants-internal';
2
2
  import { PluginFileType, PluginJointFileType, PluginViewType, PluginCoordinationType, } from '@vitessce/plugins';
3
- import { z, obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, obsSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, rasterJsonSchema, anndataZarrSchema, spatialdataZarrSchema, anndataCellsZarrSchema, anndataCellSetsZarrSchema, anndataExpressionMatrixZarrSchema, cellsJsonSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsSetsSpatialdataSchema, obsSetPath, rgbArray, obsSetsSchema, imageLayerObj, cellsLayerObj, neighborhoodsLayerObj, moleculesLayerObj, } from '@vitessce/schemas';
3
+ import { z, obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, sampleSetsCsvSchema, obsSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, sampleEdgesAnndataSchema, rasterJsonSchema, anndataZarrSchema, spatialdataZarrSchema, anndataCellsZarrSchema, anndataCellSetsZarrSchema, anndataExpressionMatrixZarrSchema, cellsJsonSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsSetsSpatialdataSchema, obsSetPath, rgbArray, obsSetsSchema, imageLayerObj, cellsLayerObj, neighborhoodsLayerObj, moleculesLayerObj, } from '@vitessce/schemas';
4
4
  // Register view type plugins
5
5
  import { DescriptionSubscriber } from '@vitessce/description';
6
6
  import { ObsSetsManagerSubscriber } from '@vitessce/obs-sets-manager';
@@ -18,7 +18,7 @@ import { CellSetExpressionPlotSubscriber, CellSetSizesPlotSubscriber, Expression
18
18
  // Register file type plugins
19
19
  import {
20
20
  // CSV
21
- CsvSource, ObsSetsCsvLoader, ObsEmbeddingCsvLoader, ObsSpotsCsvLoader, ObsPointsCsvLoader, ObsLocationsCsvLoader, ObsLabelsCsvLoader, ObsFeatureMatrixCsvLoader, FeatureLabelsCsvLoader, } from '@vitessce/csv';
21
+ CsvSource, ObsSetsCsvLoader, ObsEmbeddingCsvLoader, ObsSpotsCsvLoader, ObsPointsCsvLoader, ObsLocationsCsvLoader, ObsLabelsCsvLoader, ObsFeatureMatrixCsvLoader, FeatureLabelsCsvLoader, SampleSetsCsvLoader, } from '@vitessce/csv';
22
22
  import {
23
23
  // JSON
24
24
  JsonSource, JsonLoader, ObsSegmentationsJsonLoader, ObsSetsJsonLoader,
@@ -26,7 +26,7 @@ JsonSource, JsonLoader, ObsSegmentationsJsonLoader, ObsSetsJsonLoader,
26
26
  RasterJsonAsImageLoader, RasterJsonAsObsSegmentationsLoader, ClustersJsonAsObsFeatureMatrixLoader, GenesJsonAsObsFeatureMatrixLoader, CellsJsonAsObsLabelsLoader, CellsJsonAsObsEmbeddingLoader, CellsJsonAsObsLocationsLoader, CellsJsonAsObsSegmentationsLoader, MoleculesJsonAsObsLocationsLoader, MoleculesJsonAsObsLabelsLoader, } from '@vitessce/json';
27
27
  import {
28
28
  // AnnData
29
- AnnDataSource, ObsFeatureMatrixAnndataLoader, ObsFeatureColumnsAnndataLoader, ObsEmbeddingAnndataLoader, ObsSpotsAnndataLoader, ObsPointsAnndataLoader, ObsLocationsAnndataLoader, ObsSegmentationsAnndataLoader, ObsSetsAnndataLoader, ObsLabelsAnndataLoader, FeatureLabelsAnndataLoader,
29
+ AnnDataSource, ObsFeatureMatrixAnndataLoader, ObsFeatureColumnsAnndataLoader, ObsEmbeddingAnndataLoader, ObsSpotsAnndataLoader, ObsPointsAnndataLoader, ObsLocationsAnndataLoader, ObsSegmentationsAnndataLoader, ObsSetsAnndataLoader, ObsLabelsAnndataLoader, FeatureLabelsAnndataLoader, SampleEdgesAnndataLoader,
30
30
  // MuData
31
31
  MuDataSource,
32
32
  // OME
@@ -46,6 +46,14 @@ function makeViewType(name, component) {
46
46
  function makeFileType(name, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
47
47
  return new PluginFileType(name, dataType, dataLoaderClass, dataSourceClass, optionsSchema);
48
48
  }
49
+ // For when we have multiple file types with the same data type and options schema.
50
+ function makeZarrFileTypes(name, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
51
+ const altFileTypes = Object.values(ALT_ZARR_STORE_TYPES[name]);
52
+ return [
53
+ new PluginFileType(name, dataType, dataLoaderClass, dataSourceClass, optionsSchema),
54
+ ...altFileTypes.map(n => new PluginFileType(n, dataType, dataLoaderClass, dataSourceClass, optionsSchema)),
55
+ ];
56
+ }
49
57
  export const baseViewTypes = [
50
58
  makeViewType(ViewType.DESCRIPTION, DescriptionSubscriber),
51
59
  makeViewType(ViewType.OBS_SETS, ObsSetsManagerSubscriber),
@@ -74,20 +82,22 @@ export const baseFileTypes = [
74
82
  makeFileType(FileType.OBS_LABELS_CSV, DataType.OBS_LABELS, ObsLabelsCsvLoader, CsvSource, obsLabelsCsvSchema),
75
83
  makeFileType(FileType.OBS_FEATURE_MATRIX_CSV, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixCsvLoader, CsvSource, z.null()),
76
84
  makeFileType(FileType.FEATURE_LABELS_CSV, DataType.FEATURE_LABELS, FeatureLabelsCsvLoader, CsvSource, featureLabelsCsvSchema),
85
+ makeFileType(FileType.SAMPLE_SETS_CSV, DataType.SAMPLE_SETS, SampleSetsCsvLoader, CsvSource, sampleSetsCsvSchema),
77
86
  // All JSON file types
78
87
  makeFileType(FileType.OBS_SEGMENTATIONS_JSON, DataType.OBS_SEGMENTATIONS, ObsSegmentationsJsonLoader, JsonSource, z.null()),
79
88
  makeFileType(FileType.OBS_SETS_JSON, DataType.OBS_SETS, ObsSetsJsonLoader, JsonSource, z.null()),
80
89
  // All AnnData file types
81
- makeFileType(FileType.OBS_SETS_ANNDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
82
- makeFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
83
- makeFileType(FileType.OBS_SPOTS_ANNDATA_ZARR, DataType.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
84
- makeFileType(FileType.OBS_POINTS_ANNDATA_ZARR, DataType.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
85
- makeFileType(FileType.OBS_LOCATIONS_ANNDATA_ZARR, DataType.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
86
- makeFileType(FileType.OBS_LABELS_ANNDATA_ZARR, DataType.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
87
- makeFileType(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
88
- makeFileType(FileType.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
89
- makeFileType(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
90
- makeFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
90
+ ...makeZarrFileTypes(FileType.OBS_SETS_ANNDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
91
+ ...makeZarrFileTypes(FileType.OBS_EMBEDDING_ANNDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
92
+ ...makeZarrFileTypes(FileType.OBS_SPOTS_ANNDATA_ZARR, DataType.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
93
+ ...makeZarrFileTypes(FileType.OBS_POINTS_ANNDATA_ZARR, DataType.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
94
+ ...makeZarrFileTypes(FileType.OBS_LOCATIONS_ANNDATA_ZARR, DataType.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
95
+ ...makeZarrFileTypes(FileType.OBS_LABELS_ANNDATA_ZARR, DataType.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
96
+ ...makeZarrFileTypes(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
97
+ ...makeZarrFileTypes(FileType.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
98
+ ...makeZarrFileTypes(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
99
+ ...makeZarrFileTypes(FileType.FEATURE_LABELS_ANNDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
100
+ ...makeZarrFileTypes(FileType.SAMPLE_EDGES_ANNDATA_ZARR, DataType.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
91
101
  // All MuData file types
92
102
  makeFileType(FileType.OBS_SETS_MUDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
93
103
  makeFileType(FileType.OBS_EMBEDDING_MUDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
@@ -113,6 +123,7 @@ export const baseFileTypes = [
113
123
  makeFileType(FileType.OBS_SPOTS_SPATIALDATA_ZARR, DataType.OBS_SPOTS, SpatialDataObsSpotsLoader, SpatialDataShapesSource, obsSpotsSpatialdataSchema),
114
124
  makeFileType(FileType.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, SpatialDataTableSource, obsFeatureMatrixSpatialdataSchema),
115
125
  makeFileType(FileType.OBS_SETS_SPATIALDATA_ZARR, DataType.OBS_SETS, SpatialDataObsSetsLoader, SpatialDataTableSource, obsSetsSpatialdataSchema),
126
+ makeFileType(FileType.FEATURE_LABELS_SPATIALDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, SpatialDataTableSource, featureLabelsAnndataSchema),
116
127
  // All legacy file types
117
128
  makeFileType(FileType.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR, DataType.OBS_FEATURE_MATRIX, MatrixZarrAsObsFeatureMatrixLoader, ZarrDataSource, z.null()),
118
129
  makeFileType(FileType.IMAGE_RASTER_JSON, DataType.IMAGE, RasterJsonAsImageLoader, JsonSource, rasterJsonSchema),
@@ -131,6 +142,7 @@ export const baseFileTypes = [
131
142
  ];
132
143
  export const baseJointFileTypes = [
133
144
  new PluginJointFileType(FileType.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
145
+ new PluginJointFileType(FileType.ANNDATA_ZARR_ZIP, expandAnndataZarr, anndataZarrSchema),
134
146
  new PluginJointFileType(FileType.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
135
147
  // For legacy file types:
136
148
  new PluginJointFileType(FileType.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
@@ -254,4 +266,6 @@ export const baseCoordinationTypes = [
254
266
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABELS_VISIBLE, true, z.boolean()),
255
267
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABELS_ORIENTATION, 'vertical', z.enum(['vertical', 'horizontal'])),
256
268
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
269
+ new PluginCoordinationType(CoordinationType.SAMPLE_TYPE, null, z.string().nullable()),
270
+ new PluginCoordinationType(CoordinationType.SAMPLE_SET_SELECTION, null, z.array(z.string()).nullable()),
257
271
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"joint-file-types.d.ts","sourceRoot":"","sources":["../src/joint-file-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAe7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,SAuK7E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA4EjF"}
1
+ {"version":3,"file":"joint-file-types.d.ts","sourceRoot":"","sources":["../src/joint-file-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA0B7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,SAwK7E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA4EjF"}
@@ -1,10 +1,20 @@
1
- import { FileType } from '@vitessce/constants-internal';
1
+ import { FileType, ALT_ZARR_STORE_TYPES } from '@vitessce/constants-internal';
2
2
  const expectedCoordinationTypes = [
3
3
  'obsType', 'featureType', 'featureValueType',
4
4
  'featureLabelsType', 'obsLabelsType',
5
5
  'embeddingType',
6
6
  ];
7
+ function createGetFileType(jointFileType) {
8
+ // Based on the jointFileType, return the appropriate fileType.
9
+ return (fileType) => {
10
+ if (jointFileType.endsWith('.zip') && ALT_ZARR_STORE_TYPES[fileType]?.zip) {
11
+ return ALT_ZARR_STORE_TYPES[fileType].zip;
12
+ }
13
+ return fileType;
14
+ };
15
+ }
7
16
  export function expandAnndataZarr(fileDef) {
17
+ const getFileType = createGetFileType(fileDef.fileType);
8
18
  const baseFileDef = {
9
19
  url: fileDef.url,
10
20
  requestInit: fileDef.requestInit,
@@ -26,7 +36,7 @@ export function expandAnndataZarr(fileDef) {
26
36
  // obsFeatureMatrix
27
37
  ...(options.obsFeatureMatrix ? [{
28
38
  ...baseFileDef,
29
- fileType: FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
39
+ fileType: getFileType(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR),
30
40
  options: options.obsFeatureMatrix,
31
41
  coordinationValues: {
32
42
  ...extraCoordinationValues,
@@ -38,7 +48,7 @@ export function expandAnndataZarr(fileDef) {
38
48
  // obsSets
39
49
  ...(options.obsSets ? [{
40
50
  ...baseFileDef,
41
- fileType: FileType.OBS_SETS_ANNDATA_ZARR,
51
+ fileType: getFileType(FileType.OBS_SETS_ANNDATA_ZARR),
42
52
  options: options.obsSets,
43
53
  coordinationValues: {
44
54
  ...extraCoordinationValues,
@@ -48,7 +58,7 @@ export function expandAnndataZarr(fileDef) {
48
58
  // obsSpots
49
59
  ...(options.obsSpots ? [{
50
60
  ...baseFileDef,
51
- fileType: FileType.OBS_SPOTS_ANNDATA_ZARR,
61
+ fileType: getFileType(FileType.OBS_SPOTS_ANNDATA_ZARR),
52
62
  options: options.obsSpots,
53
63
  coordinationValues: {
54
64
  ...extraCoordinationValues,
@@ -58,7 +68,7 @@ export function expandAnndataZarr(fileDef) {
58
68
  // obsPoints
59
69
  ...(options.obsPoints ? [{
60
70
  ...baseFileDef,
61
- fileType: FileType.OBS_POINTS_ANNDATA_ZARR,
71
+ fileType: getFileType(FileType.OBS_POINTS_ANNDATA_ZARR),
62
72
  options: options.obsPoints,
63
73
  coordinationValues: {
64
74
  ...extraCoordinationValues,
@@ -68,7 +78,7 @@ export function expandAnndataZarr(fileDef) {
68
78
  // obsLocations
69
79
  ...(options.obsLocations ? [{
70
80
  ...baseFileDef,
71
- fileType: FileType.OBS_LOCATIONS_ANNDATA_ZARR,
81
+ fileType: getFileType(FileType.OBS_LOCATIONS_ANNDATA_ZARR),
72
82
  options: options.obsLocations,
73
83
  coordinationValues: {
74
84
  ...extraCoordinationValues,
@@ -78,7 +88,7 @@ export function expandAnndataZarr(fileDef) {
78
88
  // obsSegmentations
79
89
  ...(options.obsSegmentations ? [{
80
90
  ...baseFileDef,
81
- fileType: FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR,
91
+ fileType: getFileType(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR),
82
92
  options: options.obsSegmentations,
83
93
  coordinationValues: {
84
94
  ...extraCoordinationValues,
@@ -90,7 +100,7 @@ export function expandAnndataZarr(fileDef) {
90
100
  ...(options.obsEmbedding ? (Array.isArray(options.obsEmbedding) ? options.obsEmbedding.map((oe) => ({
91
101
  // obsEmbedding was an array, process each element.
92
102
  ...baseFileDef,
93
- fileType: FileType.OBS_EMBEDDING_ANNDATA_ZARR,
103
+ fileType: getFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR),
94
104
  options: {
95
105
  path: oe.path,
96
106
  dims: oe.dims,
@@ -104,7 +114,7 @@ export function expandAnndataZarr(fileDef) {
104
114
  })) : [{
105
115
  // obsEmbedding was an object.
106
116
  ...baseFileDef,
107
- fileType: FileType.OBS_EMBEDDING_ANNDATA_ZARR,
117
+ fileType: getFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR),
108
118
  options: options.obsEmbedding,
109
119
  coordinationValues: {
110
120
  ...extraCoordinationValues,
@@ -117,7 +127,7 @@ export function expandAnndataZarr(fileDef) {
117
127
  ...(options.obsLabels ? (Array.isArray(options.obsLabels) ? options.obsLabels.map((ol) => ({
118
128
  // obsLabels was an array, process each element.
119
129
  ...baseFileDef,
120
- fileType: FileType.OBS_LABELS_ANNDATA_ZARR,
130
+ fileType: getFileType(FileType.OBS_LABELS_ANNDATA_ZARR),
121
131
  options: {
122
132
  path: ol.path,
123
133
  },
@@ -130,7 +140,7 @@ export function expandAnndataZarr(fileDef) {
130
140
  })) : [{
131
141
  // obsLabels was an object.
132
142
  ...baseFileDef,
133
- fileType: FileType.OBS_LABELS_ANNDATA_ZARR,
143
+ fileType: getFileType(FileType.OBS_LABELS_ANNDATA_ZARR),
134
144
  options: options.obsLabels,
135
145
  coordinationValues: {
136
146
  ...extraCoordinationValues,
@@ -143,7 +153,7 @@ export function expandAnndataZarr(fileDef) {
143
153
  ...(options.featureLabels ? (Array.isArray(options.featureLabels) ? options.featureLabels.map((fl) => ({
144
154
  // featureLabels was an array, process each element.
145
155
  ...baseFileDef,
146
- fileType: FileType.FEATURE_LABELS_ANNDATA_ZARR,
156
+ fileType: getFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR),
147
157
  options: {
148
158
  path: fl.path,
149
159
  },
@@ -156,7 +166,7 @@ export function expandAnndataZarr(fileDef) {
156
166
  })) : [{
157
167
  // featureLabels was an object.
158
168
  ...baseFileDef,
159
- fileType: FileType.FEATURE_LABELS_ANNDATA_ZARR,
169
+ fileType: getFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR),
160
170
  options: options.featureLabels,
161
171
  coordinationValues: {
162
172
  ...extraCoordinationValues,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/all",
3
- "version": "3.3.6",
3
+ "version": "3.3.8",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,27 +18,27 @@
18
18
  "dependencies": {
19
19
  "@material-ui/core": "~4.12.3",
20
20
  "zod": "^3.21.4",
21
- "@vitessce/constants-internal": "3.3.6",
22
- "@vitessce/csv": "3.3.6",
23
- "@vitessce/description": "3.3.6",
24
- "@vitessce/genomic-profiles": "3.3.6",
25
- "@vitessce/heatmap": "3.3.6",
26
- "@vitessce/json": "3.3.6",
27
- "@vitessce/layer-controller": "3.3.6",
28
- "@vitessce/feature-list": "3.3.6",
29
- "@vitessce/layer-controller-beta": "3.3.6",
30
- "@vitessce/obs-sets-manager": "3.3.6",
31
- "@vitessce/ome-tiff": "3.3.6",
32
- "@vitessce/plugins": "3.3.6",
33
- "@vitessce/scatterplot-embedding": "3.3.6",
34
- "@vitessce/scatterplot-gating": "3.3.6",
35
- "@vitessce/schemas": "3.3.6",
36
- "@vitessce/spatial": "3.3.6",
37
- "@vitessce/spatial-beta": "3.3.6",
38
- "@vitessce/statistical-plots": "3.3.6",
39
- "@vitessce/zarr": "3.3.6",
40
- "@vitessce/status": "3.3.6",
41
- "@vitessce/vit-s": "3.3.6"
21
+ "@vitessce/constants-internal": "3.3.8",
22
+ "@vitessce/description": "3.3.8",
23
+ "@vitessce/feature-list": "3.3.8",
24
+ "@vitessce/json": "3.3.8",
25
+ "@vitessce/csv": "3.3.8",
26
+ "@vitessce/genomic-profiles": "3.3.8",
27
+ "@vitessce/heatmap": "3.3.8",
28
+ "@vitessce/layer-controller-beta": "3.3.8",
29
+ "@vitessce/layer-controller": "3.3.8",
30
+ "@vitessce/obs-sets-manager": "3.3.8",
31
+ "@vitessce/ome-tiff": "3.3.8",
32
+ "@vitessce/plugins": "3.3.8",
33
+ "@vitessce/scatterplot-embedding": "3.3.8",
34
+ "@vitessce/scatterplot-gating": "3.3.8",
35
+ "@vitessce/spatial-beta": "3.3.8",
36
+ "@vitessce/statistical-plots": "3.3.8",
37
+ "@vitessce/spatial": "3.3.8",
38
+ "@vitessce/schemas": "3.3.8",
39
+ "@vitessce/status": "3.3.8",
40
+ "@vitessce/vit-s": "3.3.8",
41
+ "@vitessce/zarr": "3.3.8"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^18.0.28",
@@ -6,6 +6,7 @@ import {
6
6
  ViewType,
7
7
  CoordinationType,
8
8
  COMPONENT_COORDINATION_TYPES,
9
+ ALT_ZARR_STORE_TYPES,
9
10
  } from '@vitessce/constants-internal';
10
11
  import {
11
12
  PluginFileType,
@@ -26,6 +27,7 @@ import {
26
27
  obsLocationsCsvSchema,
27
28
  obsLabelsCsvSchema,
28
29
  featureLabelsCsvSchema,
30
+ sampleSetsCsvSchema,
29
31
  obsSetsAnndataSchema,
30
32
  obsEmbeddingAnndataSchema,
31
33
  obsSpotsAnndataSchema,
@@ -36,6 +38,7 @@ import {
36
38
  obsFeatureColumnsAnndataSchema,
37
39
  obsSegmentationsAnndataSchema,
38
40
  featureLabelsAnndataSchema,
41
+ sampleEdgesAnndataSchema,
39
42
  rasterJsonSchema,
40
43
  anndataZarrSchema,
41
44
  spatialdataZarrSchema,
@@ -92,6 +95,7 @@ import {
92
95
  ObsLabelsCsvLoader,
93
96
  ObsFeatureMatrixCsvLoader,
94
97
  FeatureLabelsCsvLoader,
98
+ SampleSetsCsvLoader,
95
99
  } from '@vitessce/csv';
96
100
  import {
97
101
  // JSON
@@ -124,6 +128,7 @@ import {
124
128
  ObsSetsAnndataLoader,
125
129
  ObsLabelsAnndataLoader,
126
130
  FeatureLabelsAnndataLoader,
131
+ SampleEdgesAnndataLoader,
127
132
  // MuData
128
133
  MuDataSource,
129
134
  // OME
@@ -174,6 +179,14 @@ function makeViewType(name: string, component: any) {
174
179
  function makeFileType<T1 extends DataLoader, T2 extends DataSource>(name: string, dataType: string, dataLoaderClass: any, dataSourceClass: any, optionsSchema: z.ZodTypeAny) {
175
180
  return new PluginFileType(name, dataType, dataLoaderClass as T1, dataSourceClass as T2, optionsSchema);
176
181
  }
182
+ // For when we have multiple file types with the same data type and options schema.
183
+ function makeZarrFileTypes<T1 extends DataLoader, T2 extends DataSource>(name: string, dataType: string, dataLoaderClass: any, dataSourceClass: any, optionsSchema: z.ZodTypeAny) {
184
+ const altFileTypes = Object.values(ALT_ZARR_STORE_TYPES[name]);
185
+ return [
186
+ new PluginFileType(name, dataType, dataLoaderClass as T1, dataSourceClass as T2, optionsSchema),
187
+ ...altFileTypes.map(n => new PluginFileType(n, dataType, dataLoaderClass as T1, dataSourceClass as T2, optionsSchema)),
188
+ ];
189
+ }
177
190
 
178
191
  export const baseViewTypes = [
179
192
  makeViewType(ViewType.DESCRIPTION, DescriptionSubscriber),
@@ -204,20 +217,22 @@ export const baseFileTypes = [
204
217
  makeFileType(FileType.OBS_LABELS_CSV, DataType.OBS_LABELS, ObsLabelsCsvLoader, CsvSource, obsLabelsCsvSchema),
205
218
  makeFileType(FileType.OBS_FEATURE_MATRIX_CSV, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixCsvLoader, CsvSource, z.null()),
206
219
  makeFileType(FileType.FEATURE_LABELS_CSV, DataType.FEATURE_LABELS, FeatureLabelsCsvLoader, CsvSource, featureLabelsCsvSchema),
220
+ makeFileType(FileType.SAMPLE_SETS_CSV, DataType.SAMPLE_SETS, SampleSetsCsvLoader, CsvSource, sampleSetsCsvSchema),
207
221
  // All JSON file types
208
222
  makeFileType(FileType.OBS_SEGMENTATIONS_JSON, DataType.OBS_SEGMENTATIONS, ObsSegmentationsJsonLoader, JsonSource, z.null()),
209
223
  makeFileType(FileType.OBS_SETS_JSON, DataType.OBS_SETS, ObsSetsJsonLoader, JsonSource, z.null()),
210
224
  // All AnnData file types
211
- makeFileType(FileType.OBS_SETS_ANNDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
212
- makeFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
213
- makeFileType(FileType.OBS_SPOTS_ANNDATA_ZARR, DataType.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
214
- makeFileType(FileType.OBS_POINTS_ANNDATA_ZARR, DataType.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
215
- makeFileType(FileType.OBS_LOCATIONS_ANNDATA_ZARR, DataType.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
216
- makeFileType(FileType.OBS_LABELS_ANNDATA_ZARR, DataType.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
217
- makeFileType(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
218
- makeFileType(FileType.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
219
- makeFileType(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
220
- makeFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
225
+ ...makeZarrFileTypes(FileType.OBS_SETS_ANNDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
226
+ ...makeZarrFileTypes(FileType.OBS_EMBEDDING_ANNDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
227
+ ...makeZarrFileTypes(FileType.OBS_SPOTS_ANNDATA_ZARR, DataType.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
228
+ ...makeZarrFileTypes(FileType.OBS_POINTS_ANNDATA_ZARR, DataType.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
229
+ ...makeZarrFileTypes(FileType.OBS_LOCATIONS_ANNDATA_ZARR, DataType.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
230
+ ...makeZarrFileTypes(FileType.OBS_LABELS_ANNDATA_ZARR, DataType.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
231
+ ...makeZarrFileTypes(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
232
+ ...makeZarrFileTypes(FileType.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
233
+ ...makeZarrFileTypes(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
234
+ ...makeZarrFileTypes(FileType.FEATURE_LABELS_ANNDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
235
+ ...makeZarrFileTypes(FileType.SAMPLE_EDGES_ANNDATA_ZARR, DataType.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
221
236
  // All MuData file types
222
237
  makeFileType(FileType.OBS_SETS_MUDATA_ZARR, DataType.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
223
238
  makeFileType(FileType.OBS_EMBEDDING_MUDATA_ZARR, DataType.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
@@ -243,6 +258,7 @@ export const baseFileTypes = [
243
258
  makeFileType(FileType.OBS_SPOTS_SPATIALDATA_ZARR, DataType.OBS_SPOTS, SpatialDataObsSpotsLoader, SpatialDataShapesSource, obsSpotsSpatialdataSchema),
244
259
  makeFileType(FileType.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR, DataType.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, SpatialDataTableSource, obsFeatureMatrixSpatialdataSchema),
245
260
  makeFileType(FileType.OBS_SETS_SPATIALDATA_ZARR, DataType.OBS_SETS, SpatialDataObsSetsLoader, SpatialDataTableSource, obsSetsSpatialdataSchema),
261
+ makeFileType(FileType.FEATURE_LABELS_SPATIALDATA_ZARR, DataType.FEATURE_LABELS, FeatureLabelsAnndataLoader, SpatialDataTableSource, featureLabelsAnndataSchema),
246
262
  // All legacy file types
247
263
  makeFileType(FileType.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR, DataType.OBS_FEATURE_MATRIX, MatrixZarrAsObsFeatureMatrixLoader, ZarrDataSource, z.null()),
248
264
  makeFileType(FileType.IMAGE_RASTER_JSON, DataType.IMAGE, RasterJsonAsImageLoader, JsonSource, rasterJsonSchema),
@@ -262,6 +278,7 @@ export const baseFileTypes = [
262
278
 
263
279
  export const baseJointFileTypes = [
264
280
  new PluginJointFileType(FileType.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
281
+ new PluginJointFileType(FileType.ANNDATA_ZARR_ZIP, expandAnndataZarr, anndataZarrSchema),
265
282
  new PluginJointFileType(FileType.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
266
283
  // For legacy file types:
267
284
  new PluginJointFileType(FileType.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
@@ -458,4 +475,6 @@ export const baseCoordinationTypes = [
458
475
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABELS_VISIBLE, true, z.boolean()),
459
476
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABELS_ORIENTATION, 'vertical', z.enum(['vertical', 'horizontal'])),
460
477
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
478
+ new PluginCoordinationType(CoordinationType.SAMPLE_TYPE, null, z.string().nullable()),
479
+ new PluginCoordinationType(CoordinationType.SAMPLE_SET_SELECTION, null, z.array(z.string()).nullable()),
461
480
  ];
@@ -1,6 +1,6 @@
1
1
  import type { z } from 'zod';
2
2
  import type { latestFileDefSchema } from '@vitessce/schemas';
3
- import { FileType } from '@vitessce/constants-internal';
3
+ import { FileType, ALT_ZARR_STORE_TYPES } from '@vitessce/constants-internal';
4
4
 
5
5
  type BaseFileDef = {
6
6
  url?: string;
@@ -14,7 +14,19 @@ const expectedCoordinationTypes = [
14
14
  'embeddingType',
15
15
  ];
16
16
 
17
+
18
+ function createGetFileType(jointFileType: string) {
19
+ // Based on the jointFileType, return the appropriate fileType.
20
+ return (fileType: string) => {
21
+ if (jointFileType.endsWith('.zip') && ALT_ZARR_STORE_TYPES[fileType]?.zip) {
22
+ return ALT_ZARR_STORE_TYPES[fileType].zip;
23
+ }
24
+ return fileType;
25
+ };
26
+ }
27
+
17
28
  export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>) {
29
+ const getFileType = createGetFileType(fileDef.fileType);
18
30
  const baseFileDef: BaseFileDef = {
19
31
  url: fileDef.url,
20
32
  requestInit: fileDef.requestInit,
@@ -36,7 +48,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
36
48
  // obsFeatureMatrix
37
49
  ...(options.obsFeatureMatrix ? [{
38
50
  ...baseFileDef,
39
- fileType: FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
51
+ fileType: getFileType(FileType.OBS_FEATURE_MATRIX_ANNDATA_ZARR),
40
52
  options: options.obsFeatureMatrix,
41
53
  coordinationValues: {
42
54
  ...extraCoordinationValues,
@@ -48,7 +60,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
48
60
  // obsSets
49
61
  ...(options.obsSets ? [{
50
62
  ...baseFileDef,
51
- fileType: FileType.OBS_SETS_ANNDATA_ZARR,
63
+ fileType: getFileType(FileType.OBS_SETS_ANNDATA_ZARR),
52
64
  options: options.obsSets,
53
65
  coordinationValues: {
54
66
  ...extraCoordinationValues,
@@ -58,7 +70,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
58
70
  // obsSpots
59
71
  ...(options.obsSpots ? [{
60
72
  ...baseFileDef,
61
- fileType: FileType.OBS_SPOTS_ANNDATA_ZARR,
73
+ fileType: getFileType(FileType.OBS_SPOTS_ANNDATA_ZARR),
62
74
  options: options.obsSpots,
63
75
  coordinationValues: {
64
76
  ...extraCoordinationValues,
@@ -68,7 +80,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
68
80
  // obsPoints
69
81
  ...(options.obsPoints ? [{
70
82
  ...baseFileDef,
71
- fileType: FileType.OBS_POINTS_ANNDATA_ZARR,
83
+ fileType: getFileType(FileType.OBS_POINTS_ANNDATA_ZARR),
72
84
  options: options.obsPoints,
73
85
  coordinationValues: {
74
86
  ...extraCoordinationValues,
@@ -78,7 +90,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
78
90
  // obsLocations
79
91
  ...(options.obsLocations ? [{
80
92
  ...baseFileDef,
81
- fileType: FileType.OBS_LOCATIONS_ANNDATA_ZARR,
93
+ fileType: getFileType(FileType.OBS_LOCATIONS_ANNDATA_ZARR),
82
94
  options: options.obsLocations,
83
95
  coordinationValues: {
84
96
  ...extraCoordinationValues,
@@ -88,7 +100,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
88
100
  // obsSegmentations
89
101
  ...(options.obsSegmentations ? [{
90
102
  ...baseFileDef,
91
- fileType: FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR,
103
+ fileType: getFileType(FileType.OBS_SEGMENTATIONS_ANNDATA_ZARR),
92
104
  options: options.obsSegmentations,
93
105
  coordinationValues: {
94
106
  ...extraCoordinationValues,
@@ -101,7 +113,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
101
113
  Array.isArray(options.obsEmbedding) ? options.obsEmbedding.map((oe: any) => ({
102
114
  // obsEmbedding was an array, process each element.
103
115
  ...baseFileDef,
104
- fileType: FileType.OBS_EMBEDDING_ANNDATA_ZARR,
116
+ fileType: getFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR),
105
117
  options: {
106
118
  path: oe.path,
107
119
  dims: oe.dims,
@@ -115,7 +127,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
115
127
  })) : [{
116
128
  // obsEmbedding was an object.
117
129
  ...baseFileDef,
118
- fileType: FileType.OBS_EMBEDDING_ANNDATA_ZARR,
130
+ fileType: getFileType(FileType.OBS_EMBEDDING_ANNDATA_ZARR),
119
131
  options: options.obsEmbedding,
120
132
  coordinationValues: {
121
133
  ...extraCoordinationValues,
@@ -130,7 +142,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
130
142
  Array.isArray(options.obsLabels) ? options.obsLabels.map((ol: any) => ({
131
143
  // obsLabels was an array, process each element.
132
144
  ...baseFileDef,
133
- fileType: FileType.OBS_LABELS_ANNDATA_ZARR,
145
+ fileType: getFileType(FileType.OBS_LABELS_ANNDATA_ZARR),
134
146
  options: {
135
147
  path: ol.path,
136
148
  },
@@ -143,7 +155,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
143
155
  })) : [{
144
156
  // obsLabels was an object.
145
157
  ...baseFileDef,
146
- fileType: FileType.OBS_LABELS_ANNDATA_ZARR,
158
+ fileType: getFileType(FileType.OBS_LABELS_ANNDATA_ZARR),
147
159
  options: options.obsLabels,
148
160
  coordinationValues: {
149
161
  ...extraCoordinationValues,
@@ -158,7 +170,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
158
170
  Array.isArray(options.featureLabels) ? options.featureLabels.map((fl: any) => ({
159
171
  // featureLabels was an array, process each element.
160
172
  ...baseFileDef,
161
- fileType: FileType.FEATURE_LABELS_ANNDATA_ZARR,
173
+ fileType: getFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR),
162
174
  options: {
163
175
  path: fl.path,
164
176
  },
@@ -171,7 +183,7 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
171
183
  })) : [{
172
184
  // featureLabels was an object.
173
185
  ...baseFileDef,
174
- fileType: FileType.FEATURE_LABELS_ANNDATA_ZARR,
186
+ fileType: getFileType(FileType.FEATURE_LABELS_ANNDATA_ZARR),
175
187
  options: options.featureLabels,
176
188
  coordinationValues: {
177
189
  ...extraCoordinationValues,