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

Getting started with DFE for MusMus #1556

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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/MusMus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
"""
from . import species # noqa: F401
from . import demographic_models # noqa: F401
from . import dfes # noqa: F401
51 changes: 51 additions & 0 deletions stdpopsim/catalog/MusMus/dfes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import stdpopsim

_species = stdpopsim.get_species("MusMus")

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


def _BookerDFE():
id = "Gamma_B21"
description = "Deleterious Gamma DFE CDS"
long_description = """
Return negative MutationType()s representing a Mus
musculus subsp. castaneous DFE for protein coded exons or CDS. Booker et al. (2021),
https://doi.org/10.1101/2021.06.10.447924
DFE parameters are based on an analysis of the unfolded site frequency spectrum
(uSFS) using polyDFE v2 (Tataru and Bataillon 2019) as presented in Booker
et al. (2021).
"""
citations = [
stdpopsim.Citation(
author="Booker et al.",
year=2021,
doi="https://doi.org/10.1101/2021.06.10.447924",
reasons={stdpopsim.CiteReason.DFE}, # include the dfe_model reason
)
]
neutral = stdpopsim.MutationType()
gamma_shape = 0.186 # shape
gamma_mean = -5.96e-02 # 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.334, 0.666],
citations=citations,
)


_species.add_dfe(_BookerDFE())
Loading