Skip to content

Commit 113fa72

Browse files
HolEvPMBio
and
PMBio
authored
skip seak association testing if all burdens are constant (#142)
* skip seak association testing if all burdens are constant * fixup! Format Python code with psf/black pull_request --------- Co-authored-by: PMBio <PMBio@users.noreply.github.com>
1 parent 54e9057 commit 113fa72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deeprvat/deeprvat/associate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,9 @@ def regress_on_gene_scoretest(
11521152
logger.warning(f"Burden for gene {gene} is 0 for all samples; skipping")
11531153
return None
11541154

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

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

0 commit comments

Comments
 (0)