From f3ac5669397cdd81544f3c4c31da28c9ad005cf6 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 18 Jan 2025 20:37:58 -0800 Subject: [PATCH] positive selection for HomSap --- stdpopsim/catalog/HomSap/dfes.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/stdpopsim/catalog/HomSap/dfes.py b/stdpopsim/catalog/HomSap/dfes.py index 66e918230..448e4195f 100644 --- a/stdpopsim/catalog/HomSap/dfes.py +++ b/stdpopsim/catalog/HomSap/dfes.py @@ -234,6 +234,10 @@ def _ZhenDFE(): distribution_type="g", # gamma distribution distribution_args=[gamma_mean, gamma_shape], ) + # p. 2 in supplement says that the total sequence length of synonymous sites LS + # related to the total sequence length LNS by LNS = 2.31 * LS + prop_synonymous = 1 / (1 + 2.31) + sel_coeff = 10 ** (-3.949) prop_beneficial = 1.55e-2 positive = stdpopsim.MutationType( @@ -248,10 +252,10 @@ def _ZhenDFE(): long_description=long_description, mutation_types=[neutral, negative, positive], proportions=[ - 0.3, - 0.7 * (1 - prop_beneficial), - 0.7 * prop_beneficial, - ], # [0.3 and 0.7 are from Gamma_H17 + prop_synonymous, + (1 - prop_synonymous) * (1 - prop_beneficial), + (1 - prop_synonymous) * prop_beneficial, + ], citations=citations, )