spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

Annotating coordinate systems

Open LucaMarconato opened this issue 1 year ago • 1 comments

          Just a random note on this: I agree that having SpatialData - level attributes would be super helpful. Beyond that, I think it would be great to be able to annotate coordinate systems - these often correspond to samples, conditions, time-points etc. I can of course annotate all elements within a coordinate system through tables, but I think it would be more direct to somehow directly provide metadata for an entire coordinate system.

Originally posted by @Marius1311 in https://github.com/scverse/spatialdata/issues/711#issuecomment-2447931741

LucaMarconato avatar Nov 13 '24 06:11 LucaMarconato

We will be working on this, but we will only support the metadata that are available via the NGFF specification for coordinate systems: https://github.com/bogovicj/ngff/blob/3a7e76fff2941a3287873a5848bca3add83d1fd3/latest/index.bs#L320.

If you need more metadata I suggest one of the following:

  1. adding a new table, not attached to any element, where the obs_names are the names of the coordinate systems, and where obs, X, obsm contains your annotations. This can be done already from today, but please keep in mind that none of the spatialdata API will expect/operate such a table, so for instance if you add or remove a coordinate system, nothing will update the table.
  2. open a feature request in NGFF, suggesting a change in the proposal. I would do this after experimenting with the approach in 1, and (when available) after experimenting with the metadata that the specification linked above allows for coordinate systems.

LucaMarconato avatar Nov 13 '24 06:11 LucaMarconato