@vitessce/config 3.0.1 → 3.1.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 +515 -59
- package/dist-tsc/VitessceAutoConfig.d.ts +13 -1
- package/dist-tsc/VitessceAutoConfig.d.ts.map +1 -1
- package/dist-tsc/VitessceAutoConfig.js +233 -57
- package/dist-tsc/VitessceAutoConfig.test.js +533 -76
- package/dist-tsc/VitessceConfig.d.ts +46 -0
- package/dist-tsc/VitessceConfig.d.ts.map +1 -1
- package/dist-tsc/VitessceConfig.js +353 -0
- package/dist-tsc/VitessceConfig.test.js +328 -1
- package/dist-tsc/constants.d.ts +247 -0
- package/dist-tsc/constants.d.ts.map +1 -0
- package/dist-tsc/constants.js +87 -0
- package/dist-tsc/index.d.ts +2 -1
- package/dist-tsc/index.js +2 -1
- package/package.json +3 -3
- package/src/VitessceAutoConfig.js +271 -65
- package/src/VitessceAutoConfig.test.js +561 -78
- package/src/VitessceConfig.js +393 -0
- package/src/VitessceConfig.test.js +338 -0
- package/src/constants.js +94 -0
- package/src/index.js +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { CoordinationType } from '@vitessce/constants-internal';
|
|
3
|
-
import { VitessceConfig, hconcat, vconcat, } from './VitessceConfig.js';
|
|
3
|
+
import { VitessceConfig, hconcat, vconcat, CL, } from './VitessceConfig.js';
|
|
4
4
|
describe('src/api/VitessceConfig.js', () => {
|
|
5
5
|
describe('VitessceConfig', () => {
|
|
6
6
|
it('can be instantiated in the old way for backwards compatibility', () => {
|
|
@@ -238,6 +238,333 @@ describe('src/api/VitessceConfig.js', () => {
|
|
|
238
238
|
version: '1.0.4',
|
|
239
239
|
});
|
|
240
240
|
});
|
|
241
|
+
it('can add complex coordination', () => {
|
|
242
|
+
const config = new VitessceConfig({
|
|
243
|
+
schemaVersion: '1.0.16',
|
|
244
|
+
name: 'My config',
|
|
245
|
+
});
|
|
246
|
+
config.addComplexCoordination({
|
|
247
|
+
spatialImageLayer: CL([
|
|
248
|
+
{
|
|
249
|
+
image: 'S-1905-017737_bf',
|
|
250
|
+
spatialLayerVisible: true,
|
|
251
|
+
spatialLayerOpacity: 1,
|
|
252
|
+
spatialImageChannel: CL([
|
|
253
|
+
{
|
|
254
|
+
spatialTargetC: 0,
|
|
255
|
+
spatialChannelColor: [255, 0, 0],
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
spatialTargetC: 1,
|
|
259
|
+
spatialChannelColor: [0, 255, 0],
|
|
260
|
+
},
|
|
261
|
+
]),
|
|
262
|
+
},
|
|
263
|
+
]),
|
|
264
|
+
spatialSegmentationLayer: CL([
|
|
265
|
+
{
|
|
266
|
+
image: 'S-1905-017737',
|
|
267
|
+
spatialLayerVisible: true,
|
|
268
|
+
spatialLayerOpacity: 1,
|
|
269
|
+
spatialSegmentationChannel: CL([
|
|
270
|
+
{
|
|
271
|
+
obsType: 'Cortical Interstitia',
|
|
272
|
+
spatialTargetC: 0,
|
|
273
|
+
spatialChannelColor: [255, 0, 0],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
obsType: 'Non-Globally Sclerotic Glomeruli',
|
|
277
|
+
spatialTargetC: 1,
|
|
278
|
+
spatialChannelColor: [255, 0, 0],
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
obsType: 'Globally Sclerotic Glomeruli',
|
|
282
|
+
spatialTargetC: 2,
|
|
283
|
+
spatialChannelColor: [255, 0, 0],
|
|
284
|
+
},
|
|
285
|
+
]),
|
|
286
|
+
},
|
|
287
|
+
]),
|
|
288
|
+
});
|
|
289
|
+
const configJSON = config.toJSON();
|
|
290
|
+
expect(configJSON.coordinationSpace).toEqual({
|
|
291
|
+
spatialImageLayer: { A: '__dummy__' },
|
|
292
|
+
image: { A: 'S-1905-017737_bf', B: 'S-1905-017737' },
|
|
293
|
+
spatialLayerVisible: { A: true, B: true },
|
|
294
|
+
spatialLayerOpacity: { A: 1, B: 1 },
|
|
295
|
+
spatialImageChannel: { A: '__dummy__', B: '__dummy__' },
|
|
296
|
+
spatialTargetC: {
|
|
297
|
+
A: 0, B: 1, C: 0, D: 1, E: 2,
|
|
298
|
+
},
|
|
299
|
+
spatialChannelColor: {
|
|
300
|
+
A: [255, 0, 0], B: [0, 255, 0], C: [255, 0, 0], D: [255, 0, 0], E: [255, 0, 0],
|
|
301
|
+
},
|
|
302
|
+
spatialSegmentationLayer: { A: '__dummy__' },
|
|
303
|
+
spatialSegmentationChannel: { A: '__dummy__', B: '__dummy__', C: '__dummy__' },
|
|
304
|
+
obsType: {
|
|
305
|
+
A: 'Cortical Interstitia',
|
|
306
|
+
B: 'Non-Globally Sclerotic Glomeruli',
|
|
307
|
+
C: 'Globally Sclerotic Glomeruli',
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
it('can add _and use_ complex coordination', () => {
|
|
312
|
+
const config = new VitessceConfig({
|
|
313
|
+
schemaVersion: '1.0.16',
|
|
314
|
+
name: 'My config',
|
|
315
|
+
});
|
|
316
|
+
const dataset = config.addDataset('My dataset');
|
|
317
|
+
const scopes = config.addComplexCoordination({
|
|
318
|
+
spatialImageLayer: CL([
|
|
319
|
+
{
|
|
320
|
+
image: 'S-1905-017737_bf',
|
|
321
|
+
spatialLayerVisible: true,
|
|
322
|
+
spatialLayerOpacity: 1,
|
|
323
|
+
spatialImageChannel: CL([
|
|
324
|
+
{
|
|
325
|
+
spatialTargetC: 0,
|
|
326
|
+
spatialChannelColor: [255, 0, 0],
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
spatialTargetC: 1,
|
|
330
|
+
spatialChannelColor: [0, 255, 0],
|
|
331
|
+
},
|
|
332
|
+
]),
|
|
333
|
+
},
|
|
334
|
+
]),
|
|
335
|
+
spatialSegmentationLayer: CL([
|
|
336
|
+
{
|
|
337
|
+
image: 'S-1905-017737',
|
|
338
|
+
spatialLayerVisible: true,
|
|
339
|
+
spatialLayerOpacity: 1,
|
|
340
|
+
spatialSegmentationChannel: CL([
|
|
341
|
+
{
|
|
342
|
+
obsType: 'Cortical Interstitia',
|
|
343
|
+
spatialTargetC: 0,
|
|
344
|
+
spatialChannelColor: [255, 0, 0],
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
obsType: 'Non-Globally Sclerotic Glomeruli',
|
|
348
|
+
spatialTargetC: 1,
|
|
349
|
+
spatialChannelColor: [255, 0, 0],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
obsType: 'Globally Sclerotic Glomeruli',
|
|
353
|
+
spatialTargetC: 2,
|
|
354
|
+
spatialChannelColor: [255, 0, 0],
|
|
355
|
+
},
|
|
356
|
+
]),
|
|
357
|
+
},
|
|
358
|
+
]),
|
|
359
|
+
});
|
|
360
|
+
const spatialView = config.addView(dataset, 'spatial');
|
|
361
|
+
spatialView.useComplexCoordination(scopes);
|
|
362
|
+
const configJSON = config.toJSON();
|
|
363
|
+
expect(configJSON).toEqual({
|
|
364
|
+
version: '1.0.16',
|
|
365
|
+
name: 'My config',
|
|
366
|
+
datasets: [{ uid: 'A', name: 'My dataset', files: [] }],
|
|
367
|
+
coordinationSpace: {
|
|
368
|
+
dataset: { A: 'A' },
|
|
369
|
+
spatialImageLayer: { A: '__dummy__' },
|
|
370
|
+
image: { A: 'S-1905-017737_bf', B: 'S-1905-017737' },
|
|
371
|
+
spatialLayerVisible: { A: true, B: true },
|
|
372
|
+
spatialLayerOpacity: { A: 1, B: 1 },
|
|
373
|
+
spatialImageChannel: { A: '__dummy__', B: '__dummy__' },
|
|
374
|
+
spatialTargetC: {
|
|
375
|
+
A: 0, B: 1, C: 0, D: 1, E: 2,
|
|
376
|
+
},
|
|
377
|
+
spatialChannelColor: {
|
|
378
|
+
A: [255, 0, 0],
|
|
379
|
+
B: [0, 255, 0],
|
|
380
|
+
C: [255, 0, 0],
|
|
381
|
+
D: [255, 0, 0],
|
|
382
|
+
E: [255, 0, 0],
|
|
383
|
+
},
|
|
384
|
+
spatialSegmentationLayer: { A: '__dummy__' },
|
|
385
|
+
spatialSegmentationChannel: { A: '__dummy__', B: '__dummy__', C: '__dummy__' },
|
|
386
|
+
obsType: {
|
|
387
|
+
A: 'Cortical Interstitia',
|
|
388
|
+
B: 'Non-Globally Sclerotic Glomeruli',
|
|
389
|
+
C: 'Globally Sclerotic Glomeruli',
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
layout: [{
|
|
393
|
+
component: 'spatial',
|
|
394
|
+
coordinationScopes: {
|
|
395
|
+
dataset: 'A',
|
|
396
|
+
spatialImageLayer: ['A'],
|
|
397
|
+
spatialSegmentationLayer: ['A'],
|
|
398
|
+
},
|
|
399
|
+
coordinationScopesBy: {
|
|
400
|
+
spatialImageLayer: {
|
|
401
|
+
image: { A: 'A' },
|
|
402
|
+
spatialLayerVisible: { A: 'A' },
|
|
403
|
+
spatialLayerOpacity: { A: 'A' },
|
|
404
|
+
spatialImageChannel: { A: ['A', 'B'] },
|
|
405
|
+
},
|
|
406
|
+
spatialImageChannel: {
|
|
407
|
+
spatialTargetC: { A: 'A', B: 'B' },
|
|
408
|
+
spatialChannelColor: { A: 'A', B: 'B' },
|
|
409
|
+
},
|
|
410
|
+
spatialSegmentationLayer: {
|
|
411
|
+
image: { A: 'B' },
|
|
412
|
+
spatialLayerVisible: { A: 'B' },
|
|
413
|
+
spatialLayerOpacity: { A: 'B' },
|
|
414
|
+
spatialSegmentationChannel: { A: ['A', 'B', 'C'] },
|
|
415
|
+
},
|
|
416
|
+
spatialSegmentationChannel: {
|
|
417
|
+
obsType: { A: 'A', B: 'B', C: 'C' },
|
|
418
|
+
spatialTargetC: { A: 'C', B: 'D', C: 'E' },
|
|
419
|
+
spatialChannelColor: { A: 'C', B: 'D', C: 'E' },
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
x: 0,
|
|
423
|
+
y: 0,
|
|
424
|
+
w: 1,
|
|
425
|
+
h: 1,
|
|
426
|
+
}],
|
|
427
|
+
initStrategy: 'auto',
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
it('can use _meta_ complex coordination', () => {
|
|
431
|
+
const config = new VitessceConfig({
|
|
432
|
+
schemaVersion: '1.0.16',
|
|
433
|
+
name: 'My config',
|
|
434
|
+
});
|
|
435
|
+
const dataset = config.addDataset('My dataset');
|
|
436
|
+
const scopes = config.addComplexCoordination({
|
|
437
|
+
spatialImageLayer: CL([
|
|
438
|
+
{
|
|
439
|
+
image: 'S-1905-017737_bf',
|
|
440
|
+
spatialLayerVisible: true,
|
|
441
|
+
spatialLayerOpacity: 1,
|
|
442
|
+
spatialImageChannel: CL([
|
|
443
|
+
{
|
|
444
|
+
spatialTargetC: 0,
|
|
445
|
+
spatialChannelColor: [255, 0, 0],
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
spatialTargetC: 1,
|
|
449
|
+
spatialChannelColor: [0, 255, 0],
|
|
450
|
+
},
|
|
451
|
+
]),
|
|
452
|
+
},
|
|
453
|
+
]),
|
|
454
|
+
spatialSegmentationLayer: CL([
|
|
455
|
+
{
|
|
456
|
+
image: 'S-1905-017737',
|
|
457
|
+
spatialLayerVisible: true,
|
|
458
|
+
spatialLayerOpacity: 1,
|
|
459
|
+
spatialSegmentationChannel: CL([
|
|
460
|
+
{
|
|
461
|
+
obsType: 'Cortical Interstitia',
|
|
462
|
+
spatialTargetC: 0,
|
|
463
|
+
spatialChannelColor: [255, 0, 0],
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
obsType: 'Non-Globally Sclerotic Glomeruli',
|
|
467
|
+
spatialTargetC: 1,
|
|
468
|
+
spatialChannelColor: [255, 0, 0],
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
obsType: 'Globally Sclerotic Glomeruli',
|
|
472
|
+
spatialTargetC: 2,
|
|
473
|
+
spatialChannelColor: [255, 0, 0],
|
|
474
|
+
},
|
|
475
|
+
]),
|
|
476
|
+
},
|
|
477
|
+
]),
|
|
478
|
+
});
|
|
479
|
+
const metaCoordinationScope = config.addMetaCoordination();
|
|
480
|
+
metaCoordinationScope.useComplexCoordination(scopes);
|
|
481
|
+
const spatialView = config.addView(dataset, 'spatial');
|
|
482
|
+
const lcView = config.addView(dataset, 'layerController');
|
|
483
|
+
spatialView.useMetaCoordination(metaCoordinationScope);
|
|
484
|
+
lcView.useMetaCoordination(metaCoordinationScope);
|
|
485
|
+
const configJSON = config.toJSON();
|
|
486
|
+
expect(configJSON).toEqual({
|
|
487
|
+
version: '1.0.16',
|
|
488
|
+
name: 'My config',
|
|
489
|
+
datasets: [{ uid: 'A', name: 'My dataset', files: [] }],
|
|
490
|
+
coordinationSpace: {
|
|
491
|
+
dataset: { A: 'A' },
|
|
492
|
+
spatialImageLayer: { A: '__dummy__' },
|
|
493
|
+
image: { A: 'S-1905-017737_bf', B: 'S-1905-017737' },
|
|
494
|
+
spatialLayerVisible: { A: true, B: true },
|
|
495
|
+
spatialLayerOpacity: { A: 1, B: 1 },
|
|
496
|
+
spatialImageChannel: { A: '__dummy__', B: '__dummy__' },
|
|
497
|
+
spatialTargetC: {
|
|
498
|
+
A: 0, B: 1, C: 0, D: 1, E: 2,
|
|
499
|
+
},
|
|
500
|
+
spatialChannelColor: {
|
|
501
|
+
A: [255, 0, 0],
|
|
502
|
+
B: [0, 255, 0],
|
|
503
|
+
C: [255, 0, 0],
|
|
504
|
+
D: [255, 0, 0],
|
|
505
|
+
E: [255, 0, 0],
|
|
506
|
+
},
|
|
507
|
+
spatialSegmentationLayer: { A: '__dummy__' },
|
|
508
|
+
spatialSegmentationChannel: { A: '__dummy__', B: '__dummy__', C: '__dummy__' },
|
|
509
|
+
obsType: {
|
|
510
|
+
A: 'Cortical Interstitia',
|
|
511
|
+
B: 'Non-Globally Sclerotic Glomeruli',
|
|
512
|
+
C: 'Globally Sclerotic Glomeruli',
|
|
513
|
+
},
|
|
514
|
+
metaCoordinationScopes: {
|
|
515
|
+
A: {
|
|
516
|
+
spatialImageLayer: ['A'],
|
|
517
|
+
spatialSegmentationLayer: ['A'],
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
metaCoordinationScopesBy: {
|
|
521
|
+
A: {
|
|
522
|
+
spatialImageLayer: {
|
|
523
|
+
image: { A: 'A' },
|
|
524
|
+
spatialLayerVisible: { A: 'A' },
|
|
525
|
+
spatialLayerOpacity: { A: 'A' },
|
|
526
|
+
spatialImageChannel: { A: ['A', 'B'] },
|
|
527
|
+
},
|
|
528
|
+
spatialImageChannel: {
|
|
529
|
+
spatialTargetC: { A: 'A', B: 'B' },
|
|
530
|
+
spatialChannelColor: { A: 'A', B: 'B' },
|
|
531
|
+
},
|
|
532
|
+
spatialSegmentationLayer: {
|
|
533
|
+
image: { A: 'B' },
|
|
534
|
+
spatialLayerVisible: { A: 'B' },
|
|
535
|
+
spatialLayerOpacity: { A: 'B' },
|
|
536
|
+
spatialSegmentationChannel: { A: ['A', 'B', 'C'] },
|
|
537
|
+
},
|
|
538
|
+
spatialSegmentationChannel: {
|
|
539
|
+
obsType: { A: 'A', B: 'B', C: 'C' },
|
|
540
|
+
spatialTargetC: { A: 'C', B: 'D', C: 'E' },
|
|
541
|
+
spatialChannelColor: { A: 'C', B: 'D', C: 'E' },
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
layout: [{
|
|
547
|
+
component: 'spatial',
|
|
548
|
+
coordinationScopes: {
|
|
549
|
+
dataset: 'A',
|
|
550
|
+
metaCoordinationScopes: ['A'],
|
|
551
|
+
metaCoordinationScopesBy: ['A'],
|
|
552
|
+
},
|
|
553
|
+
// eslint-disable-next-line object-property-newline
|
|
554
|
+
x: 0, y: 0, w: 1, h: 1,
|
|
555
|
+
}, {
|
|
556
|
+
component: 'layerController',
|
|
557
|
+
coordinationScopes: {
|
|
558
|
+
dataset: 'A',
|
|
559
|
+
metaCoordinationScopes: ['A'],
|
|
560
|
+
metaCoordinationScopesBy: ['A'],
|
|
561
|
+
},
|
|
562
|
+
// eslint-disable-next-line object-property-newline
|
|
563
|
+
x: 0, y: 0, w: 1, h: 1,
|
|
564
|
+
}],
|
|
565
|
+
initStrategy: 'auto',
|
|
566
|
+
});
|
|
567
|
+
});
|
|
241
568
|
it('can add a coordination scope using the link views convenience function', () => {
|
|
242
569
|
const config = new VitessceConfig({
|
|
243
570
|
schemaVersion: '1.0.4',
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
export namespace NO_HINTS_CONFIG {
|
|
2
|
+
const views: {};
|
|
3
|
+
const coordinationValues: {};
|
|
4
|
+
}
|
|
5
|
+
export const HINTS_CONFIG: {
|
|
6
|
+
'No hints are available. Generate config with no hints.': {
|
|
7
|
+
views: {};
|
|
8
|
+
coordinationValues: {};
|
|
9
|
+
};
|
|
10
|
+
Basic: {
|
|
11
|
+
views: {};
|
|
12
|
+
coordinationValues: {};
|
|
13
|
+
};
|
|
14
|
+
'Transcriptomics / scRNA-seq (with heatmap)': {
|
|
15
|
+
views: {
|
|
16
|
+
obsSets: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
w: number;
|
|
20
|
+
h: number;
|
|
21
|
+
};
|
|
22
|
+
obsSetSizes: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
w: number;
|
|
26
|
+
h: number;
|
|
27
|
+
};
|
|
28
|
+
scatterplot: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
w: number;
|
|
32
|
+
h: number;
|
|
33
|
+
};
|
|
34
|
+
heatmap: {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
w: number;
|
|
38
|
+
h: number;
|
|
39
|
+
};
|
|
40
|
+
featureList: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
w: number;
|
|
44
|
+
h: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
'Transcriptomics / scRNA-seq (without heatmap)': {
|
|
49
|
+
views: {
|
|
50
|
+
obsSets: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
w: number;
|
|
54
|
+
h: number;
|
|
55
|
+
};
|
|
56
|
+
obsSetSizes: {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
w: number;
|
|
60
|
+
h: number;
|
|
61
|
+
};
|
|
62
|
+
scatterplot: {
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
w: number;
|
|
66
|
+
h: number;
|
|
67
|
+
};
|
|
68
|
+
featureList: {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
w: number;
|
|
72
|
+
h: number;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
'Spatial transcriptomics (with polygon cell segmentations)': {
|
|
77
|
+
views: {
|
|
78
|
+
scatterplot: {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
w: number;
|
|
82
|
+
h: number;
|
|
83
|
+
};
|
|
84
|
+
spatial: {
|
|
85
|
+
x: number;
|
|
86
|
+
y: number;
|
|
87
|
+
w: number;
|
|
88
|
+
h: number;
|
|
89
|
+
};
|
|
90
|
+
obsSets: {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
w: number;
|
|
94
|
+
h: number;
|
|
95
|
+
};
|
|
96
|
+
featureList: {
|
|
97
|
+
x: number;
|
|
98
|
+
y: number;
|
|
99
|
+
w: number;
|
|
100
|
+
h: number;
|
|
101
|
+
};
|
|
102
|
+
heatmap: {
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
w: number;
|
|
106
|
+
h: number;
|
|
107
|
+
};
|
|
108
|
+
obsSetFeatureValueDistribution: {
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
w: number;
|
|
112
|
+
h: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
'Chromatin accessibility / scATAC-seq (with heatmap)': {
|
|
117
|
+
views: {
|
|
118
|
+
obsSets: {
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
w: number;
|
|
122
|
+
h: number;
|
|
123
|
+
};
|
|
124
|
+
obsSetSizes: {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
w: number;
|
|
128
|
+
h: number;
|
|
129
|
+
};
|
|
130
|
+
scatterplot: {
|
|
131
|
+
x: number;
|
|
132
|
+
y: number;
|
|
133
|
+
w: number;
|
|
134
|
+
h: number;
|
|
135
|
+
};
|
|
136
|
+
heatmap: {
|
|
137
|
+
x: number;
|
|
138
|
+
y: number;
|
|
139
|
+
w: number;
|
|
140
|
+
h: number;
|
|
141
|
+
};
|
|
142
|
+
featureList: {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
w: number;
|
|
146
|
+
h: number;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
coordinationValues: {
|
|
150
|
+
featureType: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
'Chromatin accessibility / scATAC-seq (without heatmap)': {
|
|
154
|
+
views: {
|
|
155
|
+
obsSets: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
w: number;
|
|
159
|
+
h: number;
|
|
160
|
+
};
|
|
161
|
+
obsSetSizes: {
|
|
162
|
+
x: number;
|
|
163
|
+
y: number;
|
|
164
|
+
w: number;
|
|
165
|
+
h: number;
|
|
166
|
+
};
|
|
167
|
+
scatterplot: {
|
|
168
|
+
x: number;
|
|
169
|
+
y: number;
|
|
170
|
+
w: number;
|
|
171
|
+
h: number;
|
|
172
|
+
};
|
|
173
|
+
featureList: {
|
|
174
|
+
x: number;
|
|
175
|
+
y: number;
|
|
176
|
+
w: number;
|
|
177
|
+
h: number;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
coordinationValues: {
|
|
181
|
+
featureType: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
'Spatial transcriptomics (with histology image and polygon cell segmentations)': {
|
|
185
|
+
views: {
|
|
186
|
+
spatial: {
|
|
187
|
+
x: number;
|
|
188
|
+
y: number;
|
|
189
|
+
w: number;
|
|
190
|
+
h: number;
|
|
191
|
+
};
|
|
192
|
+
heatmap: {
|
|
193
|
+
x: number;
|
|
194
|
+
y: number;
|
|
195
|
+
w: number;
|
|
196
|
+
h: number;
|
|
197
|
+
};
|
|
198
|
+
layerController: {
|
|
199
|
+
x: number;
|
|
200
|
+
y: number;
|
|
201
|
+
w: number;
|
|
202
|
+
h: number;
|
|
203
|
+
};
|
|
204
|
+
obsSets: {
|
|
205
|
+
x: number;
|
|
206
|
+
y: number;
|
|
207
|
+
w: number;
|
|
208
|
+
h: number;
|
|
209
|
+
};
|
|
210
|
+
featureList: {
|
|
211
|
+
x: number;
|
|
212
|
+
y: number;
|
|
213
|
+
w: number;
|
|
214
|
+
h: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
coordinationSpaceRequired: boolean;
|
|
218
|
+
};
|
|
219
|
+
Image: {
|
|
220
|
+
views: {
|
|
221
|
+
spatial: {
|
|
222
|
+
x: number;
|
|
223
|
+
y: number;
|
|
224
|
+
w: number;
|
|
225
|
+
h: number;
|
|
226
|
+
};
|
|
227
|
+
layerController: {
|
|
228
|
+
x: number;
|
|
229
|
+
y: number;
|
|
230
|
+
w: number;
|
|
231
|
+
h: number;
|
|
232
|
+
};
|
|
233
|
+
description: {
|
|
234
|
+
x: number;
|
|
235
|
+
y: number;
|
|
236
|
+
w: number;
|
|
237
|
+
h: number;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
export const HINT_TYPE_TO_FILE_TYPE_MAP: {
|
|
243
|
+
'AnnData-Zarr': string[];
|
|
244
|
+
'OME-TIFF': string[];
|
|
245
|
+
'AnnData-Zarr,OME-TIFF': string[];
|
|
246
|
+
};
|
|
247
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.js"],"names":[],"mappings":";;;;AA2CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF;;;;EAiBE"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const SINGLE_CELL_WITH_HEATMAP_VIEWS = {
|
|
2
|
+
obsSets: { x: 4, y: 0, w: 4, h: 4 },
|
|
3
|
+
obsSetSizes: { x: 8, y: 0, w: 4, h: 4 },
|
|
4
|
+
scatterplot: { x: 0, y: 0, w: 4, h: 4 },
|
|
5
|
+
heatmap: { x: 0, y: 4, w: 8, h: 4 },
|
|
6
|
+
featureList: { x: 8, y: 4, w: 4, h: 4 },
|
|
7
|
+
};
|
|
8
|
+
const SINGLE_CELL_WITHOUT_HEATMAP_VIEWS = {
|
|
9
|
+
obsSets: { x: 10, y: 6, w: 2, h: 6 },
|
|
10
|
+
obsSetSizes: { x: 8, y: 1, w: 4, h: 6 },
|
|
11
|
+
scatterplot: { x: 0, y: 0, w: 8, h: 12 },
|
|
12
|
+
featureList: { x: 8, y: 6, w: 2, h: 6 },
|
|
13
|
+
};
|
|
14
|
+
const SPATIAL_TRANSCRIPTOMICS_VIEWS = {
|
|
15
|
+
scatterplot: { x: 0, y: 0, w: 3, h: 4 },
|
|
16
|
+
spatial: { x: 3, y: 0, w: 5, h: 4 },
|
|
17
|
+
obsSets: { x: 8, y: 0, w: 4, h: 2 },
|
|
18
|
+
featureList: { x: 8, y: 0, w: 4, h: 2 },
|
|
19
|
+
heatmap: { x: 0, y: 4, w: 6, h: 4 },
|
|
20
|
+
obsSetFeatureValueDistribution: { x: 6, y: 4, w: 6, h: 4 },
|
|
21
|
+
};
|
|
22
|
+
const SPATIAL_TRANSCRIPTOMICS_WITH_HSITOLOGY_VIEWS = {
|
|
23
|
+
spatial: { x: 0, y: 0, w: 6, h: 6 },
|
|
24
|
+
heatmap: { x: 0, y: 6, w: 8, h: 6 },
|
|
25
|
+
layerController: { x: 8, y: 6, w: 4, h: 6 },
|
|
26
|
+
obsSets: { x: 9, y: 0, w: 3, h: 6 },
|
|
27
|
+
featureList: { x: 6, y: 0, w: 3, h: 6 },
|
|
28
|
+
};
|
|
29
|
+
const IMAGE_VIEWS = {
|
|
30
|
+
spatial: { x: 0, y: 0, w: 8, h: 12 },
|
|
31
|
+
layerController: { x: 8, y: 0, w: 4, h: 7 },
|
|
32
|
+
description: { x: 8, y: 9, w: 4, h: 5 },
|
|
33
|
+
};
|
|
34
|
+
export const NO_HINTS_CONFIG = {
|
|
35
|
+
views: {},
|
|
36
|
+
coordinationValues: {},
|
|
37
|
+
};
|
|
38
|
+
export const HINTS_CONFIG = {
|
|
39
|
+
'No hints are available. Generate config with no hints.': NO_HINTS_CONFIG,
|
|
40
|
+
Basic: NO_HINTS_CONFIG,
|
|
41
|
+
'Transcriptomics / scRNA-seq (with heatmap)': {
|
|
42
|
+
views: SINGLE_CELL_WITH_HEATMAP_VIEWS,
|
|
43
|
+
},
|
|
44
|
+
'Transcriptomics / scRNA-seq (without heatmap)': {
|
|
45
|
+
views: SINGLE_CELL_WITHOUT_HEATMAP_VIEWS,
|
|
46
|
+
},
|
|
47
|
+
'Spatial transcriptomics (with polygon cell segmentations)': {
|
|
48
|
+
views: SPATIAL_TRANSCRIPTOMICS_VIEWS,
|
|
49
|
+
},
|
|
50
|
+
'Chromatin accessibility / scATAC-seq (with heatmap)': {
|
|
51
|
+
views: SINGLE_CELL_WITH_HEATMAP_VIEWS,
|
|
52
|
+
coordinationValues: {
|
|
53
|
+
featureType: 'peak',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
'Chromatin accessibility / scATAC-seq (without heatmap)': {
|
|
57
|
+
views: SINGLE_CELL_WITHOUT_HEATMAP_VIEWS,
|
|
58
|
+
coordinationValues: {
|
|
59
|
+
featureType: 'peak',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
'Spatial transcriptomics (with histology image and polygon cell segmentations)': {
|
|
63
|
+
views: SPATIAL_TRANSCRIPTOMICS_WITH_HSITOLOGY_VIEWS,
|
|
64
|
+
coordinationSpaceRequired: true,
|
|
65
|
+
},
|
|
66
|
+
Image: {
|
|
67
|
+
views: IMAGE_VIEWS,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
export const HINT_TYPE_TO_FILE_TYPE_MAP = {
|
|
71
|
+
'AnnData-Zarr': [
|
|
72
|
+
'Basic',
|
|
73
|
+
'Transcriptomics / scRNA-seq (with heatmap)',
|
|
74
|
+
'Transcriptomics / scRNA-seq (without heatmap)',
|
|
75
|
+
'Spatial transcriptomics (with polygon cell segmentations)',
|
|
76
|
+
'Chromatin accessibility / scATAC-seq (with heatmap)',
|
|
77
|
+
'Chromatin accessibility / scATAC-seq (without heatmap)',
|
|
78
|
+
],
|
|
79
|
+
'OME-TIFF': [
|
|
80
|
+
'Basic',
|
|
81
|
+
'Image',
|
|
82
|
+
],
|
|
83
|
+
'AnnData-Zarr,OME-TIFF': [
|
|
84
|
+
'Basic',
|
|
85
|
+
'Spatial transcriptomics (with histology image and polygon cell segmentations)',
|
|
86
|
+
],
|
|
87
|
+
};
|
package/dist-tsc/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { generateConfigs } from "./VitessceAutoConfig.js";
|
|
2
1
|
export { VitessceConfig, vconcat, hconcat } from "./VitessceConfig.js";
|
|
2
|
+
export { generateConfig, getHintOptions } from "./VitessceAutoConfig.js";
|
|
3
|
+
export { HINTS_CONFIG, HINT_TYPE_TO_FILE_TYPE_MAP } from "./constants.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-tsc/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { VitessceConfig, vconcat, hconcat } from './VitessceConfig.js';
|
|
2
|
-
export {
|
|
2
|
+
export { generateConfig, getHintOptions } from './VitessceAutoConfig.js';
|
|
3
|
+
export { HINTS_CONFIG, HINT_TYPE_TO_FILE_TYPE_MAP } from './constants.js';
|