@vitessce/all 3.3.2 → 3.3.3
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-71cf29f7.js → deflate-ff8e0389.js} +1 -1
- package/dist/{hglib-872ad77b.js → hglib-6e6aad2d.js} +1 -1
- package/dist/{index-e1f3ff32.js → index-e7182d2c.js} +662 -92
- package/dist/index.js +1 -1
- package/dist/{jpeg-b2781c48.js → jpeg-dc640134.js} +1 -1
- package/dist/{lerc-69270d36.js → lerc-42f701c0.js} +1 -1
- package/dist/{lzw-3f41da4f.js → lzw-846a70ec.js} +1 -1
- package/dist/{packbits-19b767c9.js → packbits-8a313c48.js} +1 -1
- package/dist/{raw-bd484be0.js → raw-81ed6601.js} +1 -1
- package/dist/{webimage-c810ada2.js → webimage-72021080.js} +1 -1
- package/dist-tsc/base-plugins.d.ts +187 -0
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +7 -6
- package/dist-tsc/joint-file-types.d.ts +27 -0
- package/dist-tsc/joint-file-types.d.ts.map +1 -1
- package/dist-tsc/joint-file-types.js +77 -0
- package/package.json +22 -22
- package/src/base-plugins.ts +9 -3
- package/src/joint-file-types.ts +78 -0
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-e7182d2c.js";
|
3
3
|
import "react";
|
4
4
|
import "@vitessce/vit-s";
|
5
5
|
import "react-dom";
|
@@ -213,6 +213,193 @@ export declare const baseJointFileTypes: (PluginJointFileType<z.ZodObject<{
|
|
213
213
|
embeddingType: string;
|
214
214
|
dims?: number[] | undefined;
|
215
215
|
}[] | undefined;
|
216
|
+
}>> | PluginJointFileType<z.ZodObject<{
|
217
|
+
image: z.ZodOptional<z.ZodObject<{
|
218
|
+
coordinateTransformations: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
219
|
+
type: z.ZodLiteral<"identity">;
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
221
|
+
type: "identity";
|
222
|
+
}, {
|
223
|
+
type: "identity";
|
224
|
+
}>, z.ZodObject<{
|
225
|
+
type: z.ZodLiteral<"translation">;
|
226
|
+
translation: z.ZodArray<z.ZodNumber, "many">;
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
228
|
+
type: "translation";
|
229
|
+
translation: number[];
|
230
|
+
}, {
|
231
|
+
type: "translation";
|
232
|
+
translation: number[];
|
233
|
+
}>, z.ZodObject<{
|
234
|
+
type: z.ZodLiteral<"scale">;
|
235
|
+
scale: z.ZodArray<z.ZodNumber, "many">;
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
237
|
+
type: "scale";
|
238
|
+
scale: number[];
|
239
|
+
}, {
|
240
|
+
type: "scale";
|
241
|
+
scale: number[];
|
242
|
+
}>]>, "many">>;
|
243
|
+
path: z.ZodString;
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
245
|
+
path: string;
|
246
|
+
coordinateTransformations?: ({
|
247
|
+
type: "identity";
|
248
|
+
} | {
|
249
|
+
type: "translation";
|
250
|
+
translation: number[];
|
251
|
+
} | {
|
252
|
+
type: "scale";
|
253
|
+
scale: number[];
|
254
|
+
})[] | undefined;
|
255
|
+
}, {
|
256
|
+
path: string;
|
257
|
+
coordinateTransformations?: ({
|
258
|
+
type: "identity";
|
259
|
+
} | {
|
260
|
+
type: "translation";
|
261
|
+
translation: number[];
|
262
|
+
} | {
|
263
|
+
type: "scale";
|
264
|
+
scale: number[];
|
265
|
+
})[] | undefined;
|
266
|
+
}>>;
|
267
|
+
labels: z.ZodOptional<z.ZodObject<{
|
268
|
+
path: z.ZodString;
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
270
|
+
path: string;
|
271
|
+
}, {
|
272
|
+
path: string;
|
273
|
+
}>>;
|
274
|
+
obsFeatureMatrix: z.ZodOptional<z.ZodObject<{
|
275
|
+
path: z.ZodString;
|
276
|
+
featureFilterPath: z.ZodOptional<z.ZodString>;
|
277
|
+
initialFeatureFilterPath: z.ZodOptional<z.ZodString>;
|
278
|
+
region: z.ZodOptional<z.ZodString>;
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
280
|
+
path: string;
|
281
|
+
featureFilterPath?: string | undefined;
|
282
|
+
initialFeatureFilterPath?: string | undefined;
|
283
|
+
region?: string | undefined;
|
284
|
+
}, {
|
285
|
+
path: string;
|
286
|
+
featureFilterPath?: string | undefined;
|
287
|
+
initialFeatureFilterPath?: string | undefined;
|
288
|
+
region?: string | undefined;
|
289
|
+
}>>;
|
290
|
+
obsSpots: z.ZodOptional<z.ZodObject<{
|
291
|
+
path: z.ZodString;
|
292
|
+
tablePath: z.ZodOptional<z.ZodString>;
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
294
|
+
path: string;
|
295
|
+
tablePath?: string | undefined;
|
296
|
+
}, {
|
297
|
+
path: string;
|
298
|
+
tablePath?: string | undefined;
|
299
|
+
}>>;
|
300
|
+
obsSets: z.ZodOptional<z.ZodObject<{
|
301
|
+
region: z.ZodOptional<z.ZodString>;
|
302
|
+
tablePath: z.ZodOptional<z.ZodString>;
|
303
|
+
obsSets: z.ZodArray<z.ZodObject<{
|
304
|
+
name: z.ZodString;
|
305
|
+
path: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
306
|
+
scorePath: z.ZodOptional<z.ZodString>;
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
308
|
+
path: (string | string[]) & (string | string[] | undefined);
|
309
|
+
name: string;
|
310
|
+
scorePath?: string | undefined;
|
311
|
+
}, {
|
312
|
+
path: (string | string[]) & (string | string[] | undefined);
|
313
|
+
name: string;
|
314
|
+
scorePath?: string | undefined;
|
315
|
+
}>, "many">;
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
317
|
+
obsSets: {
|
318
|
+
path: (string | string[]) & (string | string[] | undefined);
|
319
|
+
name: string;
|
320
|
+
scorePath?: string | undefined;
|
321
|
+
}[];
|
322
|
+
region?: string | undefined;
|
323
|
+
tablePath?: string | undefined;
|
324
|
+
}, {
|
325
|
+
obsSets: {
|
326
|
+
path: (string | string[]) & (string | string[] | undefined);
|
327
|
+
name: string;
|
328
|
+
scorePath?: string | undefined;
|
329
|
+
}[];
|
330
|
+
region?: string | undefined;
|
331
|
+
tablePath?: string | undefined;
|
332
|
+
}>>;
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
334
|
+
image?: {
|
335
|
+
path: string;
|
336
|
+
coordinateTransformations?: ({
|
337
|
+
type: "identity";
|
338
|
+
} | {
|
339
|
+
type: "translation";
|
340
|
+
translation: number[];
|
341
|
+
} | {
|
342
|
+
type: "scale";
|
343
|
+
scale: number[];
|
344
|
+
})[] | undefined;
|
345
|
+
} | undefined;
|
346
|
+
labels?: {
|
347
|
+
path: string;
|
348
|
+
} | undefined;
|
349
|
+
obsFeatureMatrix?: {
|
350
|
+
path: string;
|
351
|
+
featureFilterPath?: string | undefined;
|
352
|
+
initialFeatureFilterPath?: string | undefined;
|
353
|
+
region?: string | undefined;
|
354
|
+
} | undefined;
|
355
|
+
obsSpots?: {
|
356
|
+
path: string;
|
357
|
+
tablePath?: string | undefined;
|
358
|
+
} | undefined;
|
359
|
+
obsSets?: {
|
360
|
+
obsSets: {
|
361
|
+
path: (string | string[]) & (string | string[] | undefined);
|
362
|
+
name: string;
|
363
|
+
scorePath?: string | undefined;
|
364
|
+
}[];
|
365
|
+
region?: string | undefined;
|
366
|
+
tablePath?: string | undefined;
|
367
|
+
} | undefined;
|
368
|
+
}, {
|
369
|
+
image?: {
|
370
|
+
path: string;
|
371
|
+
coordinateTransformations?: ({
|
372
|
+
type: "identity";
|
373
|
+
} | {
|
374
|
+
type: "translation";
|
375
|
+
translation: number[];
|
376
|
+
} | {
|
377
|
+
type: "scale";
|
378
|
+
scale: number[];
|
379
|
+
})[] | undefined;
|
380
|
+
} | undefined;
|
381
|
+
labels?: {
|
382
|
+
path: string;
|
383
|
+
} | undefined;
|
384
|
+
obsFeatureMatrix?: {
|
385
|
+
path: string;
|
386
|
+
featureFilterPath?: string | undefined;
|
387
|
+
initialFeatureFilterPath?: string | undefined;
|
388
|
+
region?: string | undefined;
|
389
|
+
} | undefined;
|
390
|
+
obsSpots?: {
|
391
|
+
path: string;
|
392
|
+
tablePath?: string | undefined;
|
393
|
+
} | undefined;
|
394
|
+
obsSets?: {
|
395
|
+
obsSets: {
|
396
|
+
path: (string | string[]) & (string | string[] | undefined);
|
397
|
+
name: string;
|
398
|
+
scorePath?: string | undefined;
|
399
|
+
}[];
|
400
|
+
region?: string | undefined;
|
401
|
+
tablePath?: string | undefined;
|
402
|
+
} | undefined;
|
216
403
|
}>> | PluginJointFileType<z.ZodObject<{
|
217
404
|
xy: z.ZodOptional<z.ZodString>;
|
218
405
|
poly: z.ZodOptional<z.ZodString>;
|
@@ -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,
|
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,EAwCF,MAAM,mBAAmB,CAAC;AAmH3B,eAAO,MAAM,aAAa,kBAiBzB,CAAC;AAEF,eAAO,MAAM,aAAa,wDA+DzB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAe9B,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4WAmLjC,CAAC"}
|
package/dist-tsc/base-plugins.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FileType, DataType, ViewType, CoordinationType, COMPONENT_COORDINATION_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, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, rasterJsonSchema, anndataZarrSchema, anndataCellsZarrSchema, anndataCellSetsZarrSchema, anndataExpressionMatrixZarrSchema, cellsJsonSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsSetsSpatialdataSchema, obsSetPath, rgbArray, obsSetsSchema, imageLayerObj, cellsLayerObj, neighborhoodsLayerObj, moleculesLayerObj, } from '@vitessce/schemas';
|
3
|
+
import { z, obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, obsSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, 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';
|
4
4
|
// Register view type plugins
|
5
5
|
import { DescriptionSubscriber } from '@vitessce/description';
|
6
6
|
import { ObsSetsManagerSubscriber } from '@vitessce/obs-sets-manager';
|
@@ -30,14 +30,14 @@ AnnDataSource, ObsFeatureMatrixAnndataLoader, ObsEmbeddingAnndataLoader, ObsSpot
|
|
30
30
|
// MuData
|
31
31
|
MuDataSource,
|
32
32
|
// OME
|
33
|
-
OmeZarrLoader,
|
33
|
+
OmeZarrLoader, OmeZarrAsObsSegmentationsLoader,
|
34
34
|
// SpatialData
|
35
35
|
SpatialDataTableSource, SpatialDataShapesSource, SpatialDataImageLoader, SpatialDataLabelsLoader, SpatialDataObsSpotsLoader, SpatialDataObsSetsLoader,
|
36
36
|
// Legacy
|
37
37
|
ZarrDataSource, MatrixZarrAsObsFeatureMatrixLoader, GenomicProfilesZarrLoader, } from '@vitessce/zarr';
|
38
38
|
import { OmeTiffAsObsSegmentationsLoader, OmeTiffLoader, OmeTiffSource, } from '@vitessce/ome-tiff';
|
39
39
|
// Joint file types
|
40
|
-
import { expandAnndataZarr, } from './joint-file-types.js';
|
40
|
+
import { expandAnndataZarr, expandSpatialdataZarr, } from './joint-file-types.js';
|
41
41
|
import { expandAnndataCellSetsZarr, expandAnndataCellsZarr, expandAnndataExpressionMatrixZarr, expandCellSetsJson, expandCellsJson, expandClustersJson, expandExpressionMatrixZarr, expandGenesJson, expandMoleculesJson, expandRasterJson, expandRasterOmeZarr, } from './joint-file-types-legacy.js';
|
42
42
|
// Helper function to use COMPONENT_COORDINATION_TYPES.
|
43
43
|
function makeViewType(name, component) {
|
@@ -100,7 +100,8 @@ export const baseFileTypes = [
|
|
100
100
|
// All OME file types
|
101
101
|
makeFileType(FileType.IMAGE_OME_ZARR, DataType.IMAGE, OmeZarrLoader, ZarrDataSource, imageOmeZarrSchema),
|
102
102
|
makeFileType(FileType.IMAGE_OME_TIFF, DataType.IMAGE, OmeTiffLoader, OmeTiffSource, imageOmeTiffSchema),
|
103
|
-
makeFileType(FileType.
|
103
|
+
makeFileType(FileType.OBS_SEGMENTATIONS_OME_ZARR, DataType.OBS_SEGMENTATIONS, OmeZarrAsObsSegmentationsLoader, ZarrDataSource, obsSegmentationsOmeZarrSchema),
|
104
|
+
makeFileType(FileType.OBS_SEGMENTATIONS_OME_TIFF, DataType.OBS_SEGMENTATIONS, OmeTiffAsObsSegmentationsLoader, OmeTiffSource, obsSegmentationsOmeTiffSchema),
|
104
105
|
// SpatialData file types
|
105
106
|
makeFileType(FileType.IMAGE_SPATIALDATA_ZARR, DataType.IMAGE, SpatialDataImageLoader, ZarrDataSource, imageSpatialdataSchema),
|
106
107
|
// TODO: create a new loader for labels that returns obsSegmentations with obsSegmentationsType: 'bitmask'
|
@@ -129,7 +130,7 @@ export const baseFileTypes = [
|
|
129
130
|
];
|
130
131
|
export const baseJointFileTypes = [
|
131
132
|
new PluginJointFileType(FileType.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
|
132
|
-
|
133
|
+
new PluginJointFileType(FileType.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
|
133
134
|
// For legacy file types:
|
134
135
|
new PluginJointFileType(FileType.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
|
135
136
|
new PluginJointFileType(FileType.ANNDATA_CELL_SETS_ZARR, expandAnndataCellSetsZarr, anndataCellSetsZarrSchema),
|
@@ -229,7 +230,7 @@ export const baseCoordinationTypes = [
|
|
229
230
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_VISIBLE, true, z.boolean()),
|
230
231
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_OPACITY, 1.0, z.number()),
|
231
232
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_WINDOW, null, z.array(z.number()).length(2).nullable()),
|
232
|
-
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_COLOR,
|
233
|
+
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_COLOR, [255, 255, 255], z.array(z.number()).length(3).nullable()),
|
233
234
|
new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_FILLED, true, z.boolean()),
|
234
235
|
new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_STROKE_WIDTH, 1.0, z.number()),
|
235
236
|
// Reference: https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html
|
@@ -1,4 +1,31 @@
|
|
1
1
|
import type { z } from 'zod';
|
2
2
|
import type { latestFileDefSchema } from '@vitessce/schemas';
|
3
3
|
export declare function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>): any[];
|
4
|
+
export declare function expandSpatialdataZarr(fileDef: z.infer<typeof latestFileDefSchema>): ({
|
5
|
+
fileType: string;
|
6
|
+
options: any;
|
7
|
+
coordinationValues: {
|
8
|
+
obsType: string;
|
9
|
+
featureType: string;
|
10
|
+
featureValueType: string;
|
11
|
+
};
|
12
|
+
url?: string | undefined;
|
13
|
+
requestInit?: any;
|
14
|
+
} | {
|
15
|
+
fileType: string;
|
16
|
+
options: any;
|
17
|
+
coordinationValues: {
|
18
|
+
obsType: string;
|
19
|
+
};
|
20
|
+
url?: string | undefined;
|
21
|
+
requestInit?: any;
|
22
|
+
} | {
|
23
|
+
fileType: string;
|
24
|
+
options: any;
|
25
|
+
coordinationValues: {
|
26
|
+
featureType: string;
|
27
|
+
};
|
28
|
+
url?: string | undefined;
|
29
|
+
requestInit?: any;
|
30
|
+
})[];
|
4
31
|
//# sourceMappingURL=joint-file-types.d.ts.map
|
@@ -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"}
|
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"}
|
@@ -166,3 +166,80 @@ export function expandAnndataZarr(fileDef) {
|
|
166
166
|
}]) : []),
|
167
167
|
];
|
168
168
|
}
|
169
|
+
export function expandSpatialdataZarr(fileDef) {
|
170
|
+
const baseFileDef = {
|
171
|
+
url: fileDef.url,
|
172
|
+
requestInit: fileDef.requestInit,
|
173
|
+
coordinationValues: {
|
174
|
+
...fileDef.coordinationValues,
|
175
|
+
obsType: fileDef.coordinationValues?.obsType || 'cell',
|
176
|
+
featureType: fileDef.coordinationValues?.featureType || 'gene',
|
177
|
+
featureValueType: fileDef.coordinationValues?.featureValueType || 'expression',
|
178
|
+
},
|
179
|
+
};
|
180
|
+
const extraCoordinationValues = {};
|
181
|
+
Object.entries(baseFileDef.coordinationValues).forEach(([key, value]) => {
|
182
|
+
if (!expectedCoordinationTypes.includes(key)) {
|
183
|
+
extraCoordinationValues[key] = value;
|
184
|
+
}
|
185
|
+
});
|
186
|
+
const { options = {} } = fileDef;
|
187
|
+
return [
|
188
|
+
// obsFeatureMatrix
|
189
|
+
...(options.obsFeatureMatrix ? [{
|
190
|
+
...baseFileDef,
|
191
|
+
fileType: FileType.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR,
|
192
|
+
options: options.obsFeatureMatrix,
|
193
|
+
coordinationValues: {
|
194
|
+
...extraCoordinationValues,
|
195
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
196
|
+
featureType: baseFileDef.coordinationValues.featureType,
|
197
|
+
featureValueType: baseFileDef.coordinationValues.featureValueType,
|
198
|
+
},
|
199
|
+
}] : []),
|
200
|
+
// obsSets
|
201
|
+
...(options.obsSets ? [{
|
202
|
+
...baseFileDef,
|
203
|
+
fileType: FileType.OBS_SETS_SPATIALDATA_ZARR,
|
204
|
+
options: options.obsSets,
|
205
|
+
coordinationValues: {
|
206
|
+
...extraCoordinationValues,
|
207
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
208
|
+
},
|
209
|
+
}] : []),
|
210
|
+
// obsSpots
|
211
|
+
...(options.obsSpots ? [{
|
212
|
+
...baseFileDef,
|
213
|
+
fileType: FileType.OBS_SPOTS_SPATIALDATA_ZARR,
|
214
|
+
options: options.obsSpots,
|
215
|
+
coordinationValues: {
|
216
|
+
...extraCoordinationValues,
|
217
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
218
|
+
},
|
219
|
+
}] : []),
|
220
|
+
// TODO: obsPoints?
|
221
|
+
// TODO: obsLocations?
|
222
|
+
// image
|
223
|
+
...(options.image ? [{
|
224
|
+
...baseFileDef,
|
225
|
+
fileType: FileType.IMAGE_SPATIALDATA_ZARR,
|
226
|
+
options: options.image,
|
227
|
+
coordinationValues: {
|
228
|
+
...extraCoordinationValues,
|
229
|
+
featureType: baseFileDef.coordinationValues.featureType,
|
230
|
+
// TODO: fileUid?
|
231
|
+
},
|
232
|
+
}] : []),
|
233
|
+
// labels
|
234
|
+
...(options.labels ? [{
|
235
|
+
...baseFileDef,
|
236
|
+
fileType: FileType.LABELS_SPATIALDATA_ZARR,
|
237
|
+
options: options.labels,
|
238
|
+
coordinationValues: {
|
239
|
+
...extraCoordinationValues,
|
240
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
241
|
+
// TODO: fileUid?
|
242
|
+
},
|
243
|
+
}] : []),
|
244
|
+
];
|
245
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/all",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.3",
|
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/
|
22
|
-
"@vitessce/
|
23
|
-
"@vitessce/
|
24
|
-
"@vitessce/feature-list": "3.3.
|
25
|
-
"@vitessce/
|
26
|
-
"@vitessce/
|
27
|
-
"@vitessce/
|
28
|
-
"@vitessce/layer-controller": "3.3.
|
29
|
-
"@vitessce/
|
30
|
-
"@vitessce/
|
31
|
-
"@vitessce/
|
32
|
-
"@vitessce/plugins": "3.3.
|
33
|
-
"@vitessce/
|
34
|
-
"@vitessce/scatterplot-gating": "3.3.
|
35
|
-
"@vitessce/schemas": "3.3.
|
36
|
-
"@vitessce/spatial": "3.3.
|
37
|
-
"@vitessce/
|
38
|
-
"@vitessce/
|
39
|
-
"@vitessce/status": "3.3.
|
40
|
-
"@vitessce/vit-s": "3.3.
|
41
|
-
"@vitessce/zarr": "3.3.
|
21
|
+
"@vitessce/csv": "3.3.3",
|
22
|
+
"@vitessce/description": "3.3.3",
|
23
|
+
"@vitessce/genomic-profiles": "3.3.3",
|
24
|
+
"@vitessce/feature-list": "3.3.3",
|
25
|
+
"@vitessce/heatmap": "3.3.3",
|
26
|
+
"@vitessce/json": "3.3.3",
|
27
|
+
"@vitessce/layer-controller": "3.3.3",
|
28
|
+
"@vitessce/layer-controller-beta": "3.3.3",
|
29
|
+
"@vitessce/obs-sets-manager": "3.3.3",
|
30
|
+
"@vitessce/ome-tiff": "3.3.3",
|
31
|
+
"@vitessce/scatterplot-embedding": "3.3.3",
|
32
|
+
"@vitessce/plugins": "3.3.3",
|
33
|
+
"@vitessce/constants-internal": "3.3.3",
|
34
|
+
"@vitessce/scatterplot-gating": "3.3.3",
|
35
|
+
"@vitessce/schemas": "3.3.3",
|
36
|
+
"@vitessce/spatial-beta": "3.3.3",
|
37
|
+
"@vitessce/statistical-plots": "3.3.3",
|
38
|
+
"@vitessce/spatial": "3.3.3",
|
39
|
+
"@vitessce/status": "3.3.3",
|
40
|
+
"@vitessce/vit-s": "3.3.3",
|
41
|
+
"@vitessce/zarr": "3.3.3"
|
42
42
|
},
|
43
43
|
"devDependencies": {
|
44
44
|
"@types/react": "^18.0.28",
|
package/src/base-plugins.ts
CHANGED
@@ -37,6 +37,7 @@ import {
|
|
37
37
|
featureLabelsAnndataSchema,
|
38
38
|
rasterJsonSchema,
|
39
39
|
anndataZarrSchema,
|
40
|
+
spatialdataZarrSchema,
|
40
41
|
anndataCellsZarrSchema,
|
41
42
|
anndataCellSetsZarrSchema,
|
42
43
|
anndataExpressionMatrixZarrSchema,
|
@@ -44,6 +45,8 @@ import {
|
|
44
45
|
imageOmeZarrSchema,
|
45
46
|
imageOmeTiffSchema,
|
46
47
|
imageSpatialdataSchema,
|
48
|
+
obsSegmentationsOmeTiffSchema,
|
49
|
+
obsSegmentationsOmeZarrSchema,
|
47
50
|
obsSegmentationsSpatialdataSchema,
|
48
51
|
obsFeatureMatrixSpatialdataSchema,
|
49
52
|
obsSpotsSpatialdataSchema,
|
@@ -123,6 +126,7 @@ import {
|
|
123
126
|
MuDataSource,
|
124
127
|
// OME
|
125
128
|
OmeZarrLoader,
|
129
|
+
OmeZarrAsObsSegmentationsLoader,
|
126
130
|
// SpatialData
|
127
131
|
SpatialDataTableSource,
|
128
132
|
SpatialDataShapesSource,
|
@@ -144,6 +148,7 @@ import {
|
|
144
148
|
// Joint file types
|
145
149
|
import {
|
146
150
|
expandAnndataZarr,
|
151
|
+
expandSpatialdataZarr,
|
147
152
|
} from './joint-file-types.js';
|
148
153
|
import {
|
149
154
|
expandAnndataCellSetsZarr,
|
@@ -223,7 +228,8 @@ export const baseFileTypes = [
|
|
223
228
|
// All OME file types
|
224
229
|
makeFileType(FileType.IMAGE_OME_ZARR, DataType.IMAGE, OmeZarrLoader, ZarrDataSource, imageOmeZarrSchema),
|
225
230
|
makeFileType(FileType.IMAGE_OME_TIFF, DataType.IMAGE, OmeTiffLoader, OmeTiffSource, imageOmeTiffSchema),
|
226
|
-
makeFileType(FileType.
|
231
|
+
makeFileType(FileType.OBS_SEGMENTATIONS_OME_ZARR, DataType.OBS_SEGMENTATIONS, OmeZarrAsObsSegmentationsLoader, ZarrDataSource, obsSegmentationsOmeZarrSchema),
|
232
|
+
makeFileType(FileType.OBS_SEGMENTATIONS_OME_TIFF, DataType.OBS_SEGMENTATIONS, OmeTiffAsObsSegmentationsLoader, OmeTiffSource, obsSegmentationsOmeTiffSchema),
|
227
233
|
// SpatialData file types
|
228
234
|
makeFileType(FileType.IMAGE_SPATIALDATA_ZARR, DataType.IMAGE, SpatialDataImageLoader, ZarrDataSource, imageSpatialdataSchema),
|
229
235
|
// TODO: create a new loader for labels that returns obsSegmentations with obsSegmentationsType: 'bitmask'
|
@@ -253,7 +259,7 @@ export const baseFileTypes = [
|
|
253
259
|
|
254
260
|
export const baseJointFileTypes = [
|
255
261
|
new PluginJointFileType(FileType.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
|
256
|
-
|
262
|
+
new PluginJointFileType(FileType.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
|
257
263
|
// For legacy file types:
|
258
264
|
new PluginJointFileType(FileType.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
|
259
265
|
new PluginJointFileType(FileType.ANNDATA_CELL_SETS_ZARR, expandAnndataCellSetsZarr, anndataCellSetsZarrSchema),
|
@@ -426,7 +432,7 @@ export const baseCoordinationTypes = [
|
|
426
432
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_VISIBLE, true, z.boolean()),
|
427
433
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_OPACITY, 1.0, z.number()),
|
428
434
|
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_WINDOW, null, z.array(z.number()).length(2).nullable()),
|
429
|
-
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_COLOR,
|
435
|
+
new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_COLOR, [255, 255, 255], z.array(z.number()).length(3).nullable()),
|
430
436
|
new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_FILLED, true, z.boolean()),
|
431
437
|
new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_STROKE_WIDTH, 1.0, z.number()),
|
432
438
|
// Reference: https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html
|
package/src/joint-file-types.ts
CHANGED
@@ -182,3 +182,81 @@ export function expandAnndataZarr(fileDef: z.infer<typeof latestFileDefSchema>)
|
|
182
182
|
) : []),
|
183
183
|
];
|
184
184
|
}
|
185
|
+
|
186
|
+
export function expandSpatialdataZarr(fileDef: z.infer<typeof latestFileDefSchema>) {
|
187
|
+
const baseFileDef: BaseFileDef = {
|
188
|
+
url: fileDef.url,
|
189
|
+
requestInit: fileDef.requestInit,
|
190
|
+
coordinationValues: {
|
191
|
+
...fileDef.coordinationValues,
|
192
|
+
obsType: fileDef.coordinationValues?.obsType || 'cell',
|
193
|
+
featureType: fileDef.coordinationValues?.featureType || 'gene',
|
194
|
+
featureValueType: fileDef.coordinationValues?.featureValueType || 'expression',
|
195
|
+
},
|
196
|
+
};
|
197
|
+
const extraCoordinationValues: Record<string, any> = {};
|
198
|
+
Object.entries(baseFileDef.coordinationValues).forEach(([key, value]) => {
|
199
|
+
if (!expectedCoordinationTypes.includes(key)) {
|
200
|
+
extraCoordinationValues[key] = value;
|
201
|
+
}
|
202
|
+
});
|
203
|
+
const { options = {} } = fileDef;
|
204
|
+
return [
|
205
|
+
// obsFeatureMatrix
|
206
|
+
...(options.obsFeatureMatrix ? [{
|
207
|
+
...baseFileDef,
|
208
|
+
fileType: FileType.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR,
|
209
|
+
options: options.obsFeatureMatrix,
|
210
|
+
coordinationValues: {
|
211
|
+
...extraCoordinationValues,
|
212
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
213
|
+
featureType: baseFileDef.coordinationValues.featureType,
|
214
|
+
featureValueType: baseFileDef.coordinationValues.featureValueType,
|
215
|
+
},
|
216
|
+
}] : []),
|
217
|
+
// obsSets
|
218
|
+
...(options.obsSets ? [{
|
219
|
+
...baseFileDef,
|
220
|
+
fileType: FileType.OBS_SETS_SPATIALDATA_ZARR,
|
221
|
+
options: options.obsSets,
|
222
|
+
coordinationValues: {
|
223
|
+
...extraCoordinationValues,
|
224
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
225
|
+
},
|
226
|
+
}] : []),
|
227
|
+
// obsSpots
|
228
|
+
...(options.obsSpots ? [{
|
229
|
+
...baseFileDef,
|
230
|
+
fileType: FileType.OBS_SPOTS_SPATIALDATA_ZARR,
|
231
|
+
options: options.obsSpots,
|
232
|
+
coordinationValues: {
|
233
|
+
...extraCoordinationValues,
|
234
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
235
|
+
},
|
236
|
+
}] : []),
|
237
|
+
// TODO: obsPoints?
|
238
|
+
// TODO: obsLocations?
|
239
|
+
// image
|
240
|
+
...(options.image ? [{
|
241
|
+
...baseFileDef,
|
242
|
+
fileType: FileType.IMAGE_SPATIALDATA_ZARR,
|
243
|
+
options: options.image,
|
244
|
+
coordinationValues: {
|
245
|
+
...extraCoordinationValues,
|
246
|
+
featureType: baseFileDef.coordinationValues.featureType,
|
247
|
+
// TODO: fileUid?
|
248
|
+
},
|
249
|
+
}] : []),
|
250
|
+
// labels
|
251
|
+
...(options.labels ? [{
|
252
|
+
...baseFileDef,
|
253
|
+
fileType: FileType.LABELS_SPATIALDATA_ZARR,
|
254
|
+
options: options.labels,
|
255
|
+
coordinationValues: {
|
256
|
+
...extraCoordinationValues,
|
257
|
+
obsType: baseFileDef.coordinationValues.obsType,
|
258
|
+
// TODO: fileUid?
|
259
|
+
},
|
260
|
+
}] : []),
|
261
|
+
];
|
262
|
+
}
|