---
# System prepended metadata

title: OME-Zarr Table Spec Sprint
tags: [scverse, ' ome', ' spatial data formats']

---

---
tags: scverse, ome, spatial data formats
---

# OME-Zarr Table Spec Sprint

## Resources/ previous discussion

* [Notes from April 1st call w/ Kevin, Giovanni, Isaac](https://hackmd.io/jymXvb-1RJOm2Mp0UFpPgg)
* napari-ome-zarr reader plugin: https://github.com/ome/napari-ome-zarr
* Some examples of reading/writing data
    * how napari-ome-zarr reader plugin iterates through the dataset: https://github.com/ome/napari-ome-zarr/blob/bc265ca10ac6ef0fd3895d780572d59b4def37cf/napari_ome_zarr/_reader.py#L106-L170
    * gist example from Constatin Pape: https://gist.github.com/constantinpape/69e3cb8e0401621365d814b4d6fda0bc
    * writing data: https://ome-zarr.readthedocs.io/en/stable/python.html#writing-ome-ngff-images
    * writer convenience functions: https://github.com/ome/ome-zarr-py/blob/86bb63e8b6a214fc30c01d3f242de5b1f8ad2bac/ome_zarr/writer.py#L17
    * quick and dirty example of adding anndata to a ome-ngff dataset (not true integration - no metadata or attrs linking the images to points): https://github.com/kevinyamauchi/ome-ngff-tables-prototype
* VizGen notebooks (interactive plotting + polygon analysis)
    * [Mouse brain](https://colab.research.google.com/drive/1OxJRO19cPsDW0JGAh4tLJjgOl7EMxQbP)
    * [Mouse liver](https://colab.research.google.com/drive/1GnDgMAzRc9RbAOAimsfBO96mdDY8Sk_Y)

## Goals

Here is a tentative set of goals, we should still prioritize/ finalize

* Save an AnnData in a OME-zarr file
* Use an AnnData + OME-zarr in napari OME-zarr viewer
* Talk about some stuff:
    * Multi slide
    * Multi mode
* Referencing other files/datasets (perhaps related to multi slide and metadata)
* Slicing image using queries on AnnData
* Put AnnData points rep inside a OME-zarr file
* Going from points -> table
* Metadata connecting images and tables
* Squidpy plotting from a OME + AnnData?
    * Pyramidal image support?

Kevin's proposed prioritization
1. Save an AnnData in a OME-zarr file
    1. summarized cell points
    2. molecule points (e.g., MERFISH)
3. Use an AnnData + OME-zarr in napari OME-zarr viewer
    1. For rapid prototyping, I think we can demonstrate by writing functions to setup the viewer rather than make a full integration with napari-ome-zarr. Perhaps we can build on this: https://github.com/kevinyamauchi/ome-ngff-tables-prototype
5. Plotting from OME + AnnData
    1. Slicing image using queries on AnnData
    2. static plots of X, encoded by obs (e.g., color by cluster)
6. Discuss multi slide / multi mode

Tong's suggestion
1. Instead of just Anndata, should we also think about the data structure from muon project?(https://gtca.github.io/muon/) [+1]