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

move PhoSin QC where it should go #1561

Merged
merged 2 commits into from
May 8, 2024
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
72 changes: 0 additions & 72 deletions qc/PhoSin.py

This file was deleted.

2 changes: 1 addition & 1 deletion stdpopsim/catalog/PhoSin/dfes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _RobinsonDFE():
# is defined in fitDadi and in SLiM ]
# Since the inferred value of Na is not reported in the supplement, we use
# here the value of the mean as reported in the supp info
gamma_mean = -0.00971 # mean of gamma (see bottom of page 12 in supp)
gamma_mean = -0.0257 # mean of gamma (see bottom of page 12 in supp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is correct. Thanks, @petrelharp for fixing this.


# dominance coefficient assumed in fitDadi inference was fully additive (h=0.5).
# However, in the simulations described by Robinson et al. (2022), they used
Expand Down
27 changes: 27 additions & 0 deletions stdpopsim/qc/PhoSin.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,30 @@ def Robinson2022_TwoEpoch():
_species.get_demographic_model("Vaquita2Epoch_1R22").register_qc(
Robinson2022_TwoEpoch()
)


def Robinson2022():
"""
Gamma DFE from Robinson et al. 2022 Science.
"""

id = "Robinson2022_gamma_dfe"
neutral = stdpopsim.MutationType()

negative = stdpopsim.MutationType(
dominance_coeff_list=[0.0, 0.01, 0.1, 0.4],
dominance_coeff_breaks=[-0.1, -0.01, -0.001],
distribution_type="g", # gamma distribution
distribution_args=[-0.0257, 0.131],
)

return stdpopsim.DFE(
id=id,
description=id,
long_description=id,
mutation_types=[neutral, negative],
proportions=[0.3, 0.7],
)


_species.get_dfe("Gamma_R22").register_qc(Robinson2022())
Loading