From 1b1eaa8237fe8c60bdf189967c85860c354fb2a3 Mon Sep 17 00:00:00 2001 From: chriscrsmith Date: Fri, 18 Aug 2023 18:11:18 +0000 Subject: [PATCH] updates to new dfe --- .github/workflows/tests.yml | 2 +- stdpopsim/catalog/HomSap/dfes.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7210b75f2..7c17e7f4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,7 @@ jobs: uses: actions/cache@v2 env: # Increase this to reset the cache if the key hasn't changed. - CACHE_NUM: 4 + CACHE_NUM: 5 with: path: | ${{ steps.find-conda.outputs.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} diff --git a/stdpopsim/catalog/HomSap/dfes.py b/stdpopsim/catalog/HomSap/dfes.py index 2493c884c..133ed105f 100644 --- a/stdpopsim/catalog/HomSap/dfes.py +++ b/stdpopsim/catalog/HomSap/dfes.py @@ -153,13 +153,11 @@ def _KyriazisDFE(): id = "Mixed_K23" description = "Deleterious Gamma DFE with additional lethals" long_description = """ - The DFE estimated from human data recommended in - Kyriazis et al. (2023), https://doi.org/10.1086/726736 - for general use + The DFE estimated from human data recommended in Kyriazis et al. + (2023), https://doi.org/10.1086/726736, for general use This model is similar to the Kim et al. (2017) DFE based on human - genetic data, modified to include the dominance distribution from Henn et al. (2016). - One difference is an increased deleterious mutation rate per diploid of - 0.63, informed by the analysis of 30Mb of human coding sequence. + genetic data, modified to include the dominance distribution from + Henn et al. (2016). The model is also augmented with an additional proportion of 0.3% of recessive lethals, based on the analysis of Wade et al. (2023). """ @@ -184,11 +182,13 @@ def _KyriazisDFE(): ) lethal = stdpopsim.MutationType( distribution_type="f", # fixed value - distribution_args=[-1], # fitness in SLiM for homozygotes is multiiplied by 1+ s + distribution_args=[ + -1 + ], # fitness in SLiM for homozygotes is multiiplied by 1+ s dominance_coeff=0, ) - proportion_deleterious = 0.7 # ratio 2.31:1 - lethal_prop = proportion_deleterious * 0.003 # 0.03% lethals + proportion_deleterious = 2.31 / (1 + 2.31) + lethal_prop = proportion_deleterious * 0.003 # 0.3% lethals gamma_prop = proportion_deleterious - lethal_prop neutral_prop = 1 - proportion_deleterious return stdpopsim.DFE(