Skip to content

Commit

Permalink
Fixed GSEA bug
Browse files Browse the repository at this point in the history
  • Loading branch information
earmingol committed Apr 20, 2023
1 parent f71c786 commit 76b6481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cell2cell/external/gseapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def run_gsea(loadings, lr_set, output_folder, weight=1, min_size=15, permutation
scores = gsea_df.pivot(index="Term", columns="Factor", values="NES").fillna(0)

# Sort factors
sorted_columns = [f for f in loadings.columns[1:] if (f in pvals.columns) & (f in scores.columns)]
sorted_columns = [f for f in df.columns[1:] if (f in pvals.columns) & (f in scores.columns)]
pvals = pvals[sorted_columns]
scores = scores[sorted_columns]
return pvals, scores, gsea_df
Expand Down

0 comments on commit 76b6481

Please sign in to comment.