fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Cellpose output ROI tables miss encoding zattrs values #560

Closed jluethi closed 10 months ago

jluethi commented 10 months ago

Typical ROI tables have the following zattrs:

    "encoding-type": "anndata",
    "encoding-version": "0.1.0"

But output ROI tables have:

    "instance_key": "label",
    "region": {
        "path": "../labels/organoids"
    },
    "type": "ngff:region_table"

We should add encoding-type & encoding-version to its .zattrs

I guess we could just hard-code this here: https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/3dc010d32d70bd7fb38e1ec1e3a810ca4526221c/fractal_tasks_core/tasks/cellpose_segmentation.py#L637C9-L637C20 ? But how is that getting set for the other tables? Does the anndata write write those values as a default if we provide nothing else? Let's work towards being consistent here and having the encoding types defined everywhere