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

Is "polygon_query" function working properly? #327

Open
yt723 opened this issue Oct 23, 2024 · 1 comment
Open

Is "polygon_query" function working properly? #327

yt723 opened this issue Oct 23, 2024 · 1 comment

Comments

@yt723
Copy link

yt723 commented Oct 23, 2024

Hi,

I'm using napari_spatialdata to segment regions of interest.
It seems the filtered table doesn't include the correct cell IDs.
I noticed all polygon shapes changed into rectangles.
I attached an example below. The triangle is the ROI I placed and the blue rectangle area shows cells obtained by polygon_query.
I'm using Seurat for clustering etc. So, I export the filtered table and add annotations as metadata.
This happens no matter what shapes of polygon I create.
However, "sdata.pl.render_images().pl.render_shapes(color='annotation').pl.show(coordinate_systems=["x"])" displays the actual polygon.

Why does this discrepancy happen (is this happening only to me?) and is there any way to solve this problem?
Thank you so much for your help!

Image

@LucaMarconato
Copy link
Member

Hi @yt723 thanks for reporting and happy to look into this but I will need some help in reproducing the bug please.

  1. Does the bug appear also with the latest main of spatialdata and napari-spatialdata?

  2. Could you please try reproducing the bug with the following dataset:

from spatialdata.datasets import blobs_annotating_element

sdata = blobs_annotating_element('blobs_polygons')
  1. If you can't reproduce with the dataset above, is there any change you could share the dataset you are using in your screenshot?

Thanks!

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

No branches or pull requests

2 participants