Skip to content

Commit

Permalink
Add in condition column check
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswzou committed Sep 17, 2024
1 parent 9094282 commit 6a47854
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions screenpro/phenoscore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def runPhenoScore(adata, cond_ref, cond_test, score_level, var_names='target', t
"""
adat = adata.copy()

if 'condition' not in adat.obs.columns:
raise ValueError("The AnnData object must have a 'condition' column in its obs.")

# format result name
result_name = f'{cond_test}_vs_{cond_ref}'
print(f'\t{cond_test} vs {cond_ref}')
Expand Down

0 comments on commit 6a47854

Please sign in to comment.