Skip to content

Commit

Permalink
Add clear error when HESS-estimated prior-var is >=1
Browse files Browse the repository at this point in the history
  • Loading branch information
omerwe committed Mar 5, 2024
1 parent de147d6 commit 0a6a863
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions finemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ def finemap(self, locus_start, locus_end, num_causal_snps, use_prior_causal_prob
prior_var = h2_hess / num_causal_snps
if prior_var <= 0:
raise ValueError('HESS estimates that the locus causally explains zero heritability')
if prior_var >= 1:
raise ValueError('HESS-estimated prior-var >1. The HESS estimator cannot be used in this locus.')
logging.info('HESS estimated causal effect size variance: %0.4e'%(prior_var))

if hess_resvar:
Expand Down

0 comments on commit 0a6a863

Please sign in to comment.