From b42e63d17d29e9b1fb58dd58e94a6fd60d13aabd Mon Sep 17 00:00:00 2001 From: Zewen Kelvin Tuong Date: Fri, 18 Aug 2023 09:25:58 +1000 Subject: [PATCH] Update _sc.py (#12) --- tools/sc/_sc.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/sc/_sc.py b/tools/sc/_sc.py index be3783f..dff20bc 100644 --- a/tools/sc/_sc.py +++ b/tools/sc/_sc.py @@ -140,10 +140,15 @@ def returnDEres( dfs = [scores, lfc, pvals, padj, pts, ptsx] except: dfs = [scores, lfc, pvals, padj] - df_final = functools.reduce( - lambda left, right: pd.merge(left, right, left_index=True, right_index=True), - dfs, - ) + try: + df_final = functools.reduce( + lambda left, right: pd.merge( + left, right, left_index=True, right_index=True + ), + dfs, + ) + except: + df_final = pd.concat(dfs, axis=1) try: df_final.columns = [ "scores",