Skip to content

Commit

Permalink
🐛 newer versions of numpy need explicit type
Browse files Browse the repository at this point in the history
- NA can lead to float columns instead of 0. to investigate
  • Loading branch information
enryH committed Nov 26, 2024
1 parent e63f937 commit 4adc624
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acore/enrichment_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions docs/api_examples/enrichment_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4adc624

Please sign in to comment.