fix: Handle non-categorical columns with colors + update deprecated AnnData API (#2758)

Yeah that makes sense! Mergingg
This commit is contained in:
rwbaber
2026-02-24 13:37:57 -08:00
committed by GitHub
parent 7c7203bdfe
commit 5eb3021752
4 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -228,6 +228,6 @@ def convert_anndata_category_colors_to_cxg_category_colors(data):
# create the cellxgene color entry for this category
cxg_colors[category_name] = dict(
zip(data.obs[category_name].cat.categories, [convert_color_to_hex_format(c) for c in data.uns[uns_key]])
zip(data.obs[category_name].astype('category').cat.categories, [convert_color_to_hex_format(c) for c in data.uns[uns_key]])
)
return cxg_colors