Skip to content

Commit e635c9a

Browse files
committed
.
1 parent 7b885fd commit e635c9a

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

stdpopsim/dfe.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from traits import MultivariateMutationType
1010

1111

12-
#TODO: need to add trait index to get passed up to MultivariateMutationType
12+
# TODO: need to add trait index to get passed up to MultivariateMutationType
1313
# and also do all of the subclassing stuff.
1414
# Default index should probably be 0 to keep
1515
class MutationType(MultivariateMutationType):
@@ -49,7 +49,7 @@ class MutationType(MultivariateMutationType):
4949
list of dominance coefficients.
5050
5151
:ivar distribution_type: A str abbreviation for the distribution of
52-
fitness effects that each new mutation of this type draws from (see below).
52+
fitness effects that each new mutation of this type draws from (see above).
5353
:vartype distribution_type: str
5454
:ivar distribution_args: Arguments for the distribution type.
5555
:vartype distribution_type: list
@@ -76,13 +76,13 @@ class MutationType(MultivariateMutationType):
7676
def __init__(self, **kwargs):
7777
super_kwargs = {}
7878
for k, v in kwargs.items():
79-
if k != 'convert_to_substitution':
80-
super_kwargs['fitness_' + k] = v
79+
if k != "convert_to_substitution":
80+
super_kwargs["fitness_" + k] = v
8181
else:
8282
super_kwargs[k] = v
8383
super().__init__(**super_kwargs)
8484

85-
#TODO: we have broken everything in here by appending fitness_ in front of
85+
# TODO: we have broken everything in here by appending fitness_ in front of
8686
# the name in the superclass (MultivariateMutationType) maybe we can add
8787
# accessors here to keep back compatibility
8888

stdpopsim/traits.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,28 @@ class MultivariateMutationType(object):
375375
fitness and/or trait(s). This design closely mirrors SLiM's MutationType
376376
class.
377377
378-
TODO: write a good docstring
378+
:ivar distribution_type: A str abbreviation for the distribution of
379+
effects that each new mutation of this type draws from (see above).
380+
:vartype distribution_type: str
381+
:ivar distribution_args: Arguments for the distribution type.
382+
:vartype distribution_type: list
383+
:ivar dominance_coeff: The dominance coefficient (negative = underdominance,
384+
0 = recessive, 0.5 = additive, 1.0 = completely dominant, > 1.0 = overdominant)
385+
Default: 0.5.
386+
:vartype dominance_coeff: float
387+
:ivar convert_to_substitution: Whether to retain any fixed mutations in the
388+
simulation: if not, we cannot ask about their frequency once fixed.
389+
(Either way, they will remain in the tree sequence).
390+
:vartype convert_to_substitution: bool
391+
:ivar dominance_coeff_list: Either None (the default) or a list of floats describing
392+
a list of dominance coefficients, to apply to different selection coefficients
393+
(see details). Cannot be specified along with dominance_coeff.
394+
:vartype dominance_coeff_list: list of floats
395+
:ivar dominance_coeff_breaks: Either None (the default) or a list of floats
396+
describing the intervals of selection coefficient over which each of the entries
397+
of dominance_coeff_list applies (see details). Must be of length one shorter than
398+
dominance_coeff_list.
399+
:vartype dominance_coeff_breaks: list of floats
379400
"""
380401

381402
trait_distribution_type = attr.ib(default=None, type=str)

0 commit comments

Comments
 (0)