Skip to content
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

Read tables using anndata._io.read_zarr for local data #256

Closed
wants to merge 4 commits into from

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Mar 3, 2023

This creates a Node for each table listed under image.zarr/tables/.zattrs and adds a node.table AnnData object to the node. The node.metadata dict is populated with the image.zarr/tables/my_table/.zattrs data.

These tables can be used by e.g. napari-ome-zarr as needed to read "regions" or "tracking" data etc.

We read remote anndata using anndata.experimental methods so the anndata requirement is pinned to an exact version.

@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.64 ⚠️

Comparison is base (9540832) 84.54% compared to head (17414e3) 83.91%.

❗ Current head 17414e3 differs from pull request most recent head 29eb30c. Consider uploading reports for the commit 29eb30c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
- Coverage   84.54%   83.91%   -0.64%     
==========================================
  Files          13       13              
  Lines        1475     1498      +23     
==========================================
+ Hits         1247     1257      +10     
- Misses        228      241      +13     
Impacted Files Coverage Δ
ome_zarr/reader.py 83.91% <50.00%> (-2.15%) ⬇️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@will-moore
Copy link
Member Author

@joshmoore/@sbesson If this approach looks good to you, I'll start to add tests?
The only bit of metadata that isn't easily accessible by API is the "name" of the table, e.g. image.zarr/tables/table_name/ which is available at the end of the node's path. I could add to this to the node.metadata, which would "pollute" the anndata metadata: e.g.

{
    "table-name": "table_name",
    "encoding-type": "anndata",
    "encoding-version": "0.1.0",
    "type": "ngff:points_table"
}

but I'll probably hold off for now, since it's not needed, and can be got from path.

@jburel jburel closed this Apr 6, 2023
@jburel jburel reopened this Apr 6, 2023
@joshmoore joshmoore modified the milestone: 0.8.0 May 3, 2023
@will-moore
Copy link
Member Author

Closing since tables spec is not changing just now...

@will-moore will-moore closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants