Feature request
render_labels(color=...) currently resolves keys from .obs columns and .var_names only. It would be useful to also support .obsm keys (or columns within obsm DataFrames).
Use case
In squidpy's tiling QC (sq.experimental.tl.calculate_tiling_qc), we compute several per-cell scores that logically belong in .obsm rather than polluting .obs:
# Current workaround: scores stored in .obs because sdata-plot can't read .obsm
# Ideally these would live in adata.obsm["tiling_qc"]
for col in combined.columns:
adata.obs[col] = combined[col].values
Where the limitation lives
_validate_col_for_column_table() in src/spatialdata_plot/pl/utils.py (around line 2850) only checks:
col_for_color not in sdata[table_name].obs.columns and col_for_color not in sdata[table_name].var_names
No .obsm lookup is attempted.
Suggested behavior
Allow color="obsm_key:column" or similar syntax to reference a column within an .obsm DataFrame/array.
Feature request
render_labels(color=...)currently resolves keys from.obscolumns and.var_namesonly. It would be useful to also support.obsmkeys (or columns within obsm DataFrames).Use case
In squidpy's tiling QC (
sq.experimental.tl.calculate_tiling_qc), we compute several per-cell scores that logically belong in.obsmrather than polluting.obs:Where the limitation lives
_validate_col_for_column_table()insrc/spatialdata_plot/pl/utils.py(around line 2850) only checks:No
.obsmlookup is attempted.Suggested behavior
Allow
color="obsm_key:column"or similar syntax to reference a column within an.obsmDataFrame/array.