Skip to content

Commit

Permalink
Raise error when target is not cell or region.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeppeDeWinter authored Sep 10, 2024
1 parent fc91cfb commit 787ce42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pycisTopic/clust_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ def find_clusters(
if target == "cell":
data_mat = model.cell_topic_harmony if harmony else model.cell_topic
data_names = cistopic_obj.cell_names

if target == "region":
elif target == "region":
data_mat = model.topic_region.T
data_names = cistopic_obj.region_names
else:
raise VallueError(f"target should be 'cell' or 'region' not {target}.")

if selected_topics is not None:
data_mat = data_mat.loc[["Topic" + str(x) for x in selected_topics]]
Expand Down

0 comments on commit 787ce42

Please sign in to comment.