Skip to content

Commit

Permalink
adding DFE for Arabidopsis (#1324)
Browse files Browse the repository at this point in the history
* adding DFE for Arabidopsis

* updated __init__.py, and HomSap dfe file
  • Loading branch information
chriscrsmith authored Aug 29, 2022
1 parent ec4fedd commit 3166ead
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
1 change: 1 addition & 0 deletions stdpopsim/catalog/AraTha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
from . import species # noqa: F401
from . import genetic_maps # noqa: F401
from . import demographic_models # noqa: F401
from . import dfes # noqa: F401
from . import annotations # noqa: F401
58 changes: 58 additions & 0 deletions stdpopsim/catalog/AraTha/dfes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import stdpopsim

_species = stdpopsim.get_species("AraTha")

###########################################################
#
# DFEs
#
###########################################################


def _HuberDFE():
id = "Gamma_H18"
description = "Deleterious Gamma DFE"
long_description = """
Return negative (no neutral, in this case) MutationType()s
representing an Arabidopsis DFE. From Huber et al. (2018).
Gamma parameters are based on Supplementary Table 4,
the genome-wide, additive-only model for A. LYRATA- due to
challenges with simulating with selfing for A. thaliana.
The Supplementary Table 4 DFEs are not noted to contain
any neutral mutations (in contrast, Supplementary Table 3
notes neutral proportions for two other DFEs), and in the
main text including neutral mutations seems like a
supplementary analysis rather than the main strategy.
"""
citations = [
stdpopsim.Citation(
author="Huber et al.",
year=2018,
doi="https://doi.org/10.1038/s41467-018-05281-7",
reasons=stdpopsim.CiteReason.DFE,
)
]
neutral = stdpopsim.MutationType()
gamma_shape = 0.27 # shape
gamma_mean = -0.0004 # expected value
h = 0.5 # dominance coefficient
negative = stdpopsim.MutationType(
dominance_coeff=h,
distribution_type="g", # gamma distribution
distribution_args=[gamma_mean, gamma_shape],
)

return stdpopsim.DFE(
id=id,
description=description,
long_description=long_description,
mutation_types=[neutral, negative],
proportions=[
0,
1.0,
],
citations=citations,
)


_species.add_dfe(_HuberDFE())
2 changes: 1 addition & 1 deletion stdpopsim/catalog/HomSap/dfes.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _HuberDFE():
author="Huber et al.",
year=2017,
doi="https://doi.org/10.1073/pnas.1619508114",
reasons="to be defined", # include the dfe_model reason
reasons=stdpopsim.CiteReason.DFE,
)
]
neutral = stdpopsim.MutationType()
Expand Down

0 comments on commit 3166ead

Please sign in to comment.