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

Consider using nuclei locations for Xenium data when cells_as_circles is True #123

Closed
LucaMarconato opened this issue Mar 18, 2024 · 1 comment · Fixed by #179
Closed
Labels

Comments

@LucaMarconato
Copy link
Member

LucaMarconato commented Mar 18, 2024

For Xenium data we have a parameter cells_as_circles to improve the speed of visualization by representing cells as circles instead of polygons.

Since the Xenium boundary segmentation is computed as the maximum expansion of the nuclei segmentation, using the cells radii would lead to a cluttered view where cells overlap on each other. So currently we are using the nuclei radii. This can be a bit confusing. Also, the nuclei centroids do not correspond to the cells centroids.

We should therefore consider one of the following.

  • Keep using the cells centroids and the nuclei radii
  • Use the nuclei centroids and nuclei radii
  • Use the nuclei centroids and nuclei radii with a new parameter nuclei_as_circles and then use the cells centroids with cells radii with cells_as_circles

I think the last approach is the best.

@LucaMarconato
Copy link
Member Author

LucaMarconato commented Jul 16, 2024

See this: #173

Proposed fix:

  • use the cell centroids and cell radii (stop using the nuclei radii as they can be missing).
  • also, by default assign the table to the cell labels (better visualization performance, even better than circles, but not than points)
  • add in the docstring a note saying that the table can be assigned to circle using set_table_annotates_spatialelement(); and put a code example, either in the docstring of xenium() or of set_table_annotates_spatialelement().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant