Skip to content

Commit

Permalink
adjust offset/scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
bfclarke committed Nov 8, 2024
1 parent cbf432d commit 3fd01d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions deeprvat/deeprvat/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,12 @@ def make_regenie_input_(
continue

# Rescale scores to fill out range [0, 1] (making dosages in [0, 2])
min_burden = np.min(this_burdens)
max_burden = np.max(this_burdens)
this_burdens = (this_burdens - min_burden) / (max_burden - min_burden)
# TODO:
# 1. Warn if burdens are censored to remain > 0
# 2. Offset/scale more intelligently to fill out [0, 1] better
# 3. (maybe) Allow for setting offset/scale as parameter
offset = 0.251
this_burdens = np.max(this_burdens - offset, 0)

# REGENIE assumes by default genotypes are stored alt-first
genotypes = np.stack(
Expand Down

0 comments on commit 3fd01d2

Please sign in to comment.