Skip to content

Commit

Permalink
fix issue with branch_specific, added check when all genes are filter…
Browse files Browse the repository at this point in the history
…ed out
  • Loading branch information
LouisFaure committed Oct 31, 2024
1 parent d6d9640 commit fee00c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Release Notes
=============

Version 1.0.8 :small:`October 23, 2566/2024`
Version 1.0.9 :small:`October 31, 2566/2024`
--------------------------------------------
- Future proofing scFates by allowing pandas>2.0
- Fixed most Deprecation warnings.
- Fix issue with branch_specific, added check when all genes are filtered out

Version 1.0.8 :small:`June 19, 2566/2024`
--------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion scFates/tools/bifurcation_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,12 @@ def branch_specific(
df = adata.uns[name]["fork"]

df = df[(df.up_A > up_A) & (df.up_p < up_p) & (df.signi_fdr > stf_cut)]
df = df[((df.iloc[:, : len(milestones)] + effect) > 0).sum(axis=1) == 1]
df = df[((df.iloc[:, : len(milestones)] + effect) >= 0).sum(axis=1) == 1]
df["branch"] = df.iloc[:, : len(milestones)].idxmax(axis=1)

if df.shape[0] == 0:
raise Exception("The current filtering removed all genes!")

logg.info(
" "
+ "branch specific features: "
Expand Down

0 comments on commit fee00c6

Please sign in to comment.