Skip to content

Commit

Permalink
improve indexing in compareByTargetGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
abearab committed Aug 8, 2024
1 parent c558a32 commit b5675d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion screenpro/phenoscore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def runPhenoScore(adata, cond_ref, cond_test, score_level, var_names='target', t
test=test,
ctrl_label=ctrl_label,
growth_rate=growth_rate,
).set_index(var_names)
)

else:
raise ValueError(f'score_level "{score_level}" not recognized. Currently, "compare_reps" and "compare_guides" are supported.')
Expand Down
3 changes: 3 additions & 0 deletions screenpro/phenoscore/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def compareByTargetGroup(adata, df_cond_ref, df_cond_test, keep_top_n, var_names

# add targets information
result = pd.concat([targets_df, result], axis=1)

# set index
result.index = result[var_names].apply(lambda x: '-'.join(x), axis=1)

return result

Expand Down

0 comments on commit b5675d0

Please sign in to comment.