Skip to content

Commit

Permalink
better error message for highlight_cells_on_umap with string
Browse files Browse the repository at this point in the history
  • Loading branch information
katosh committed Apr 4, 2024
1 parent 906bddf commit 0b3e33c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/palantir/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0b3e33c

Please sign in to comment.