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
Show file tree
Hide file tree
Changes from all commits
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
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