diff --git a/src/find_interaction_cluster/community_figures/fig_functions.py b/src/find_interaction_cluster/community_figures/fig_functions.py index 15083450b78daacaa7ee9adc88c4045136617253..bc836380ced46fa0a32d6f20a086e50d3e73537f 100644 --- a/src/find_interaction_cluster/community_figures/fig_functions.py +++ b/src/find_interaction_cluster/community_figures/fig_functions.py @@ -304,7 +304,8 @@ def expand_results_perm(df: pd.DataFrame, rdf: pd.DataFrame, target_col: str, "community", "community_size"]].copy() ctrl_df = rdf[[f"{target_col}_mean_{iteration}_ctrl", f"{target_col}_std_{iteration}_ctrl", "community"]].copy() - rdf = rdf[["community", "community_size", target_col, "p-adj"]].copy() + rdf = rdf[["community", "community_size", target_col, "p-adj", + "reg-adj"]].copy() rdf.rename({target_col: f"mean_{target_col}"}, axis=1, inplace=True) df = df.merge(rdf, how="left", on=["community", "community_size"]) df.sort_values(f"mean_{target_col}", ascending=True, inplace=True)