Skip to content

Commit

Permalink
skip seak association testing if all burdens are constant
Browse files Browse the repository at this point in the history
  • Loading branch information
HolEv committed Oct 21, 2024
1 parent 87d5f41 commit b9801d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deeprvat/deeprvat/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,10 @@ def regress_on_gene_scoretest(
if np.all(np.abs(burdens) < 1e-6):
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 b9801d7

Please sign in to comment.