Skip to content

Transfering data in Shape layer to AnnData.obs #448

Answered by LucaMarconato
tawaunl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @tawaunl, you can achieve this using the polygon_query() function, which is available in the latest version. It will return shapes and the table whose rows are contained inside the polygon used for the query.

The function had a bug leading to poor performance when working with different coordinate system and large raster data, or when querying by multiple polygons; if you experience such problems please use this PR with gh pr checkout 422.

Please let me know if it works for you.

EDIT: I have added an example on this in the documentation now: https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks/examples/napari_rois.html.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tawaunl
Comment options

Answer selected by LucaMarconato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants