From 0b3e33c7bc5fca7ab552ced9af8c47d6e04c3336 Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 4 Apr 2024 11:03:03 -0700 Subject: [PATCH] better error message for highlight_cells_on_umap with string --- src/palantir/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/palantir/plot.py b/src/palantir/plot.py index 0432e347..796cdffe 100644 --- a/src/palantir/plot.py +++ b/src/palantir/plot.py @@ -229,7 +229,7 @@ def highlight_cells_on_umap( if not isinstance(cells, (pd.Series, np.ndarray, pd.Index, list)): if isinstance(cells, str): if cells not in data.obs.columns: - raise KeyError(f"'{cells}' not found in .obs.") + raise KeyError(f"The column '{cells}' was not found in .obs.") mask = data.obs[cells].astype(bool).values cells = {cell: "" for cell in data.obs[mask].index} elif not isinstance(cells, dict):