diff --git a/src/find_interaction_cluster/community_figures/fig_functions.py b/src/find_interaction_cluster/community_figures/fig_functions.py index 09fbfdcfaaf6ddca05e5668031a9b783b31bfd38..dc755a6507671337b803d5a293dcbd144615fcb1 100644 --- a/src/find_interaction_cluster/community_figures/fig_functions.py +++ b/src/find_interaction_cluster/community_figures/fig_functions.py @@ -110,6 +110,9 @@ def lm_with_ctrl(df: pd.DataFrame, list of feature. """ df['community'] = df['community'].fillna("C-CTRL") + size = df.loc[df["community"] == "C-CTRL", :].shape[0] + df['community_size'] = df['community_size'].fillna(size) + df['community_size'] = df['community_size'].astype(int) return df, lm_maker_summary(df, outfile, target_col)