Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
JPatrickPett committed Mar 10, 2024
1 parent 7fd9276 commit 0c4fb79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snp2cell/snp2cell_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def adata_add_de_scores(
if "method" in kwargs and kwargs["method"] == "logreg":
query_str = f"group == '{grp}'"
else:
query_str = f"group == '{grp}' and pvals_adj < 0.05 and logfoldchanges > 0"
query_str = f"group == '{grp}' and pvals_adj < 0.05 and scores > 0"
scr = de_df.query(query_str).set_index("names")["scores"][:topn].to_dict()

scr_key = f"DE_{grp}__score"
Expand Down
2 changes: 1 addition & 1 deletion snp2cell/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def get_snp_score(df):
snp_bf = (
np.log(1 - snp_r) / 2 + (snp_beta / snp_se) ** 2 * snp_r / 2
) # log BF
return np.exp(snp_bf - snp_ld/4)
return np.exp(snp_bf - snp_ld / 4)
except Exception as e:
raise ValueError(f"could not compute score using {df} \n{e}")

Expand Down

0 comments on commit 0c4fb79

Please sign in to comment.