scverse / scverse/napari-spatialdata

Is "polygon_query" function working properly?

Open
#327 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
90
Forks
25
Avg merge
22m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the polygon_query entry point and reproduce the discrepancy with the attached ROI example. Compare its selected cell IDs and polygon geometry with the polygon shown by sdata.pl.render_images().pl.render_shapes() and the exported table. Done means polygon_query preserves the ROI shape and returns the correct cell IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.