Skip to content

Commit

Permalink
fix: filter nan in CSs (#855)
Browse files Browse the repository at this point in the history
* fix: filter nan in CSs

* fix: fix v1
  • Loading branch information
addramir authored Oct 17, 2024
1 parent d33f66a commit 9c52397
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gentropy/susie_finemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def susie_inf_to_studylocus( # noqa: C901
df = pd.DataFrame(
{
"credibleSetIndex": cred_set_index,
"purityMeanR2": purity_mean_r2,
"purityMinR2": purity_min_r2,
"purityMeanR2": list_purity_mean_r2,
"purityMinR2": list_purity_min_r2,
"zScore": z_values,
"neglogpval": neglogpval,
}
Expand Down Expand Up @@ -357,6 +357,7 @@ def susie_inf_to_studylocus( # noqa: C901
cred_sets = cred_sets.filter(
(f.col("neglogpval") >= -np.log10(lead_pval_threshold))
& (f.col("credibleSetlog10BF") >= cs_lbf_thr * 0.4342944819)
& (~f.isnan(f.col("credibleSetlog10BF")))
& (f.col("purityMinR2") >= purity_min_r2_threshold)
& (f.col("purityMeanR2") >= purity_mean_r2_threshold)
)
Expand Down

0 comments on commit 9c52397

Please sign in to comment.