-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tables
to metadata
#347
Comments
Let's also check whether with the current writer we use we get the relevant metadata in the obs & var folders etc :) |
We currently write anndata tables to disk via the anndata.experimental.write_elem function, which does not handle anything but the table - as far as I understand. # (1) DEFINE ZARR GROUP
group_tables = zarr.group(f"{in_path}/{component}/tables/")
# (2) WRITE ANNDATA TABLE
write_elem(group_tables, bounding_box_ROI_table_name, bbox_table)
# (3) WRITE OME-NGFF METADATA
if "tables" in group_tables.attrs.keys(): # FIXME: simplify this if/else
current_tables = group_tables.attrs["tables"]
else:
current_tables = []
if bounding_box_ROI_table_name in current_tables: # FIXME: move this check to an earlier stage of the task
raise ValueError(
f"{in_path}/{component}/tables/ already includes "
f"{bounding_box_ROI_table_name=} in {current_tables=}"
)
new_tables = current_tables + [bounding_box_ROI_table_name]
group_tables.attrs["tables"] = new_tables If we need to add zarr attrs for other hierarchy levels (e.g. inside It seems to me that the anndata |
Ok. Let's see if ome-zarr-py comes up with useful wrappers for table writing and otherwise, once the spec is fully defined, manually write those .zattrs :) |
As per ome/ngff#64, there should be a
tables
key in.../tables/.zattrs
.The text was updated successfully, but these errors were encountered: