@vitessce/csv 3.9.4 → 3.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -441,6 +441,7 @@ const FileType$1 = {
441
441
  // Neuroglancer
442
442
  // Precomputed (mesh) format
443
443
  OBS_SEGMENTATIONS_NG_PRECOMPUTED: "obsSegmentations.ng-precomputed",
444
+ OBS_POINTS_NG_ANNOTATIONS: "obsPoints.ng-annotations",
444
445
  // New file types to support old file types:
445
446
  // - cells.json
446
447
  OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
@@ -669,6 +670,7 @@ const CoordinationType$1 = {
669
670
  [FileType$1.FEATURE_LABELS_MUDATA_ZARR]: DataType$1.FEATURE_LABELS,
670
671
  [FileType$1.OBS_SEGMENTATIONS_GLB]: DataType$1.OBS_SEGMENTATIONS,
671
672
  [FileType$1.OBS_SEGMENTATIONS_NG_PRECOMPUTED]: DataType$1.OBS_SEGMENTATIONS,
673
+ [FileType$1.OBS_POINTS_NG_ANNOTATIONS]: DataType$1.OBS_POINTS,
672
674
  [FileType$1.IMAGE_SPATIALDATA_ZARR]: DataType$1.IMAGE,
673
675
  [FileType$1.LABELS_SPATIALDATA_ZARR]: DataType$1.OBS_SEGMENTATIONS,
674
676
  [FileType$1.SHAPES_SPATIALDATA_ZARR]: DataType$1.OBS_SEGMENTATIONS,
@@ -888,6 +890,8 @@ const CoordinationType$1 = {
888
890
  ];
889
891
  ({
890
892
  [ViewType$1.NEUROGLANCER]: [
893
+ CoordinationType$1.META_COORDINATION_SCOPES,
894
+ CoordinationType$1.META_COORDINATION_SCOPES_BY,
891
895
  CoordinationType$1.DATASET,
892
896
  CoordinationType$1.SPATIAL_TARGET_X,
893
897
  CoordinationType$1.SPATIAL_TARGET_Y,
@@ -909,7 +913,26 @@ const CoordinationType$1 = {
909
913
  CoordinationType$1.OBS_COLOR_ENCODING,
910
914
  CoordinationType$1.EMBEDDING_TYPE,
911
915
  CoordinationType$1.ADDITIONAL_OBS_SETS,
912
- CoordinationType$1.TOOLTIPS_VISIBLE
916
+ CoordinationType$1.TOOLTIPS_VISIBLE,
917
+ CoordinationType$1.FILE_UID,
918
+ CoordinationType$1.IMAGE_LAYER,
919
+ CoordinationType$1.SEGMENTATION_LAYER,
920
+ CoordinationType$1.IMAGE_CHANNEL,
921
+ CoordinationType$1.SEGMENTATION_CHANNEL,
922
+ CoordinationType$1.POINT_LAYER,
923
+ CoordinationType$1.FEATURE_COLOR,
924
+ CoordinationType$1.FEATURE_FILTER_MODE,
925
+ CoordinationType$1.FEATURE_HIGHLIGHT,
926
+ CoordinationType$1.FEATURE_SELECTION,
927
+ CoordinationType$1.FEATURE_VALUE_COLORMAP,
928
+ CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
929
+ CoordinationType$1.SPATIAL_LAYER_COLOR,
930
+ CoordinationType$1.SPATIAL_LAYER_OPACITY,
931
+ CoordinationType$1.SPATIAL_LAYER_VISIBLE,
932
+ CoordinationType$1.SPATIAL_CHANNEL_COLOR,
933
+ CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
934
+ CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
935
+ CoordinationType$1.LEGEND_VISIBLE
913
936
  ],
914
937
  [ViewType$1.SCATTERPLOT]: [
915
938
  CoordinationType$1.DATASET,
@@ -2498,7 +2521,7 @@ class ObsSpotsCsvLoader extends CsvLoader {
2498
2521
  const payload = await this.getSourceData();
2499
2522
  const coordinationValues = {
2500
2523
  spotLayer: CL({
2501
- obsType: "spot",
2524
+ obsType: this.coordinationValues?.obsType ?? "spot",
2502
2525
  // obsColorEncoding: 'spatialLayerColor',
2503
2526
  // spatialLayerColor: [255, 255, 255],
2504
2527
  spatialLayerVisible: true,
@@ -2542,7 +2565,7 @@ class ObsPointsCsvLoader extends CsvLoader {
2542
2565
  const payload = await this.getSourceData();
2543
2566
  const coordinationValues = {
2544
2567
  pointLayer: CL({
2545
- obsType: "point",
2568
+ obsType: this.coordinationValues?.obsType ?? "point",
2546
2569
  // obsColorEncoding: 'spatialLayerColor',
2547
2570
  // spatialLayerColor: [255, 255, 255],
2548
2571
  spatialLayerVisible: true,
@@ -11156,14 +11179,23 @@ z.object({
11156
11179
  z.object({
11157
11180
  // TODO: Should this explicitly specify sharded vs. unsharded?
11158
11181
  // Or can/should that be inferred from the data?
11159
- dimensionX: z.number(),
11160
- dimensionY: z.number(),
11161
- dimensionZ: z.number(),
11162
- dimensionUnit: z.enum(["nm", "um", "µm", "mm", "cm", "m"]),
11182
+ // Note: None of these make sense to specify at the file level, since they
11183
+ // are global camera settings that would apply to all layers.
11184
+ // Intead, initial values should be set via the usual coordination space mechanism,
11185
+ // and the NeuroglancerSubscriber should handle conversion into values to pass to Neuroglancer.
11186
+ // dimensionX: z.number(),
11187
+ // dimensionY: z.number(),
11188
+ // dimensionZ: z.number(),
11189
+ // dimensionUnit: z.enum(['nm', 'um', 'µm', 'mm', 'cm', 'm']),
11163
11190
  // TODO: should the following be passed via coordination types instead?
11164
- projectionScale: z.number(),
11165
- position: z.array(z.number()).length(3),
11166
- projectionOrientation: z.array(z.number()).length(4)
11191
+ // projectionScale: z.number(),
11192
+ // position: z.array(z.number()).length(3),
11193
+ // projectionOrientation: z.array(z.number()).length(4),
11194
+ }).partial().nullable();
11195
+ z.object({
11196
+ projectionAnnotationSpacing: z.number(),
11197
+ featureIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify 'gene' to use prop_gene() in the Neuroglancer shader code."),
11198
+ pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code.")
11167
11199
  }).partial().nullable();
11168
11200
  z.object({
11169
11201
  obsIndex: z.string(),
@@ -21,7 +21,7 @@ export default class ObsPointsCsvLoader extends CsvLoader {
21
21
  const payload = await this.getSourceData();
22
22
  const coordinationValues = {
23
23
  pointLayer: CL({
24
- obsType: 'point',
24
+ obsType: this.coordinationValues?.obsType ?? 'point',
25
25
  // obsColorEncoding: 'spatialLayerColor',
26
26
  // spatialLayerColor: [255, 255, 255],
27
27
  spatialLayerVisible: true,
@@ -21,7 +21,7 @@ export default class ObsSpotsCsvLoader extends CsvLoader {
21
21
  const payload = await this.getSourceData();
22
22
  const coordinationValues = {
23
23
  spotLayer: CL({
24
- obsType: 'spot',
24
+ obsType: this.coordinationValues?.obsType ?? 'spot',
25
25
  // obsColorEncoding: 'spatialLayerColor',
26
26
  // spatialLayerColor: [255, 255, 255],
27
27
  spatialLayerVisible: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/csv",
3
- "version": "3.9.4",
3
+ "version": "3.9.6",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,11 +18,11 @@
18
18
  "dependencies": {
19
19
  "d3-array": "^2.4.0",
20
20
  "d3-dsv": "^1.1.1",
21
- "@vitessce/constants-internal": "3.9.4",
22
- "@vitessce/abstract": "3.9.4",
23
- "@vitessce/sets-utils": "3.9.4",
24
- "@vitessce/config": "3.9.4",
25
- "@vitessce/error": "3.9.4"
21
+ "@vitessce/sets-utils": "3.9.6",
22
+ "@vitessce/constants-internal": "3.9.6",
23
+ "@vitessce/abstract": "3.9.6",
24
+ "@vitessce/error": "3.9.6",
25
+ "@vitessce/config": "3.9.6"
26
26
  },
27
27
  "scripts": {
28
28
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
@@ -24,7 +24,7 @@ export default class ObsPointsCsvLoader extends CsvLoader {
24
24
 
25
25
  const coordinationValues = {
26
26
  pointLayer: CL({
27
- obsType: 'point',
27
+ obsType: this.coordinationValues?.obsType ?? 'point',
28
28
  // obsColorEncoding: 'spatialLayerColor',
29
29
  // spatialLayerColor: [255, 255, 255],
30
30
  spatialLayerVisible: true,
@@ -24,7 +24,7 @@ export default class ObsSpotsCsvLoader extends CsvLoader {
24
24
 
25
25
  const coordinationValues = {
26
26
  spotLayer: CL({
27
- obsType: 'spot',
27
+ obsType: this.coordinationValues?.obsType ?? 'spot',
28
28
  // obsColorEncoding: 'spatialLayerColor',
29
29
  // spatialLayerColor: [255, 255, 255],
30
30
  spatialLayerVisible: true,