Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit a2722b2

Browse files
get right polygons when table filtered or sorted #2
1 parent 311230c commit a2722b2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

spatialdata_xenium_explorer/converter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ def write(
9595
shapes_key, geo_df = get_element(sdata, "shapes", shapes_key, return_key=True)
9696

9797
if _should_save(mode, "b") and geo_df is not None:
98+
if sdata.table is not None:
99+
geo_df = geo_df.loc[adata.obs[adata.uns["spatialdata_attrs"]["instance_key"]]]
100+
98101
geo_df = to_intrinsic(sdata, geo_df, image_key)
99102
write_polygons(path, geo_df.geometry, polygon_max_vertices)
100103

0 commit comments

Comments
 (0)