diff --git a/acore/enrichment_analysis.py b/acore/enrichment_analysis.py index 259fe73..f8ac681 100644 --- a/acore/enrichment_analysis.py +++ b/acore/enrichment_analysis.py @@ -308,7 +308,8 @@ def run_regulation_enrichment( method='fisher', ) """ - mask_rejected = regulation_data[reject_col] + # ? can we remove NA features in that column? + mask_rejected = regulation_data[reject_col].astype(bool) foreground_list = regulation_data.loc[mask_rejected, identifier].unique() background_list = regulation_data.loc[~mask_rejected, identifier].unique() foreground_pop = len(foreground_list) diff --git a/docs/api_examples/enrichment_analysis.py b/docs/api_examples/enrichment_analysis.py index d7dada2..598a12a 100644 --- a/docs/api_examples/enrichment_analysis.py +++ b/docs/api_examples/enrichment_analysis.py @@ -94,6 +94,7 @@ diff_reg.describe(exclude=["float"]) # %% +diff_reg["rejected"] = diff_reg["rejected"].astype(bool) # ! needs to be fixed in anova diff_reg.query("rejected == True") # %% [markdown]