Skip to content

Commit

Permalink
skip seak association testing if all burdens are constant (#142)
Browse files Browse the repository at this point in the history
* skip seak association testing if all burdens are constant

* fixup! Format Python code with psf/black pull_request

---------

Co-authored-by: PMBio <[email protected]>
  • Loading branch information
HolEv and PMBio authored Oct 28, 2024
1 parent 54e9057 commit 113fa72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deeprvat/deeprvat/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,9 @@ def regress_on_gene_scoretest(
logger.warning(f"Burden for gene {gene} is 0 for all samples; skipping")
return None

if np.unique(burdens).shape[0] == 1:
logger.warning(f"Burdens for gene {gene} are all constant; skipping")
return None
pv = model_score.pv_alt_model(burdens)

logger.info(f"p-value: {pv}")
Expand Down

0 comments on commit 113fa72

Please sign in to comment.