We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd7b4dd commit 1a3c7e9Copy full SHA for 1a3c7e9
src/cellmapper/model/evaluate.py
@@ -45,7 +45,7 @@ def _get_category_colors(
45
colors_key = f"{label_key}_colors"
46
colors_dict: dict[str, str] = {}
47
48
- if adata is not None and colors_key in adata.uns:
+ if adata is not None and hasattr(adata, "uns") and colors_key in adata.uns:
49
full_categories = adata.obs[label_key].cat.categories
50
full_colors = adata.uns[colors_key]
51
for i, cat in enumerate(full_categories):
0 commit comments