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 anndata as napari points and tracks #81

Closed
wants to merge 14 commits into from

Conversation

will-moore
Copy link
Member

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

NB: this PR requires ome/ome-zarr-py#256
TODO: Once that PR has been merged and released, need to bump the requirement version for ome-zarr here.

This uses code borrowed from @kkyoda at https://github.com/openssbd/bdz/ to translate anndata tables into napari points and tracks.
AnnData tables must be in the format generated by openssbd/bdz#2
NB: the spec for tables is currently open PR at ome/ngff#64

To test:

$ napari wt-N2-081015-01.ome.zarr --plugin napari-ome-zarr

Screenshot 2023-03-03 at 10 15 57

@will-moore
Copy link
Member Author

will-moore commented Mar 9, 2023

@kkyoda - I've played around quite a bit with the anndata_to_napari_tracks() login here to try and get it to comply with the style of tracks expected by the "arboretum" plugin: https://www.napari-hub.org/plugins/napari-arboretum.
E.g. see example at https://raw.githubusercontent.com/lowe-lab-ucl/btrack-examples/main/examples/tracks.csv

This expects each point to only be in 1 track, and uses a "graph" dictionary to link the tracks.
I've also tried to handle cases of 2 or more tracks merging into 1.

With these changes, you can now view the lineage of the tree:

Screenshot 2023-03-09 at 09 59 31

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 17.85% and project coverage change: -16.20 ⚠️

Comparison is base (0da60a2) 87.56% compared to head (eb9de1a) 71.36%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #81       +/-   ##
===========================================
- Coverage   87.56%   71.36%   -16.20%     
===========================================
  Files           3        4        +1     
  Lines         185      241       +56     
===========================================
+ Hits          162      172       +10     
- Misses         23       69       +46     
Impacted Files Coverage Δ
napari_ome_zarr/table_utils.py 16.32% <16.32%> (ø)
napari_ome_zarr/_reader.py 84.76% <28.57%> (-4.02%) ⬇️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@will-moore
Copy link
Member Author

Closing since ome/ngff#64 is closed

@will-moore will-moore closed this Oct 24, 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.

2 participants