Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Oct 28, 2020
1 parent 78fbdd7 commit dce7ada
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/pages/regiontypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Setting up genomic intervals

.. automethod:: mv

.. autoclass:: fwdpy11.DiscreteDESD

.. autoclass:: fwdpy11.mvDES

.. autoclass:: fwdpy11.GeneticMapUnit
Expand Down
1 change: 1 addition & 0 deletions doc/pages/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Built-in distributions of effect sizes
* :class:`fwdpy11.GaussianS`
* :class:`fwdpy11.MultivariateGaussianEffects`
* :class:`fwdpy11.LogNormalS`
* :class:`fwdpy11.DiscreteDESD`

Labelling mutations from different regions
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
32 changes: 32 additions & 0 deletions fwdpy11/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,38 @@ def __attrs_post_init__(self):
@attr_class_to_from_dict_no_recurse
@attr.s(eq=False, **_common_attr_attribs)
class DiscreteDESD(fwdpy11._fwdpy11._ll_DiscreteDESD):
"""
Discretized distribution of effect sizes and dominance.
This class allows you to specify a discrete joint
distrubtion of effect size and dominance.
The distribution is specified by a list of tuples.
Each tuple contains (effect size, dominance, weight).
The weights must all be >= 0 and all values must fe finite.
This class has the following attributes, whose names
are also ``kwargs`` for intitialization. The attribute names
also determine the order of positional arguments:
:param beg: Beginning of the region
:type beg: float
:param end: End of the region
:type end: float
:param weight: Weight on the region
:type weight: float
:param joint_dist: The joint distribution + weights
:type joint_dist: list
:param coupled: Specify if weight is function of end-beg or not. Defaults to True
:type coupled: bool
:param label: Fill :attr:`fwdpy11.Mutation.label` with this value.
:type label: numpy.uint16
:param scaling: The scaling of the DFE
:type scaling: float
.. versionadded:: 0.10.0
"""

beg: float
end: float
weight: float
Expand Down

0 comments on commit dce7ada

Please sign in to comment.