Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding DFE for Arabidopsis #1324

Merged
merged 4 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions stdpopsim/catalog/AraTha/dfes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import stdpopsim

_species = stdpopsim.get_species("AraTha")

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


def _HuberDFE():
id = "Gamma_H18"
description = "Deleterious Gamma DFE"
long_description = """
Return neutral and negative MutationType()s representing an Arabidopsis DFE.
From Huber et al. (2018), https://doi.org/10.1038/s41467-018-05281-7.
Gamma parameters are based on the additive-only model for A. thaliana described in
Supplementary Table 4.
"""
citations = [
stdpopsim.Citation(
author="Huber et al.",
year=2018,
doi="https://doi.org/10.1038/s41467-018-05281-7",
reasons="to be defined", # include the dfe_model reason
chriscrsmith marked this conversation as resolved.
Show resolved Hide resolved
)
]
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())