Skip to content

Commit

Permalink
fixing rounding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
clararehmann committed Feb 26, 2025
1 parent 3f752fc commit a37cf56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions stdpopsim/catalog/DroMel/dfes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ def _ZhenDFE():
]
neutral = stdpopsim.MutationType()
gamma_shape = 0.33 # shape
gamma_mean = -3.96e-04 # expected value
gamma_scale = 6.01e-4
gamma_mean = gamma_shape * gamma_scale
h = 0.5 # dominance coefficient
negative = stdpopsim.MutationType(
dominance_coeff=h,
distribution_type="g", # gamma distribution
distribution_args=[gamma_mean, gamma_shape],
distribution_args=[round(-2 * gamma_mean, 7), gamma_shape],
)
# p. 2 in supplement says that the total sequence length of synonymous sites LS
# related to the total sequence length of nonsynonymous sites LNS
Expand Down
2 changes: 1 addition & 1 deletion stdpopsim/qc/DroMel.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def ZhenPos():
# prop_synonymous = 1/(1+2.85) = 0.26
prop_synonymous = 0.26
prop_beneficial = (1 - prop_synonymous) * 6.75e-4
selection_coefficient = 1.58e-5
selection_coefficient = 10 ** (-4.801)
prop_deleterious = 1 - (prop_synonymous + prop_beneficial)
positive = stdpopsim.MutationType(
dominance_coeff=0.5,
Expand Down

0 comments on commit a37cf56

Please sign in to comment.