You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnofferAndExecuteAutofix(selection, "drawEffectForTrait", "The `drawSelectionCoefficient()` method of MutationType has become the method `drawEffectForTrait()`.", terminationMessage);
2156
2156
2157
+
if ((afterSelection1String == "(") &&
2158
+
terminationMessage.contains("method setSelectionCoeff() is not defined on object element type Mutation") &&
returnofferAndExecuteAutofix(selectionPlus1After, "setEffectForTrait(NULL, ", "The `setSelectionCoeff()` method of Mutation has become the method `setEffectForTrait()`.", terminationMessage);
2161
+
2162
+
if (terminationMessage.contains("property selectionCoeff is not defined for object element type Mutation") &&
2163
+
(selectionString == "selectionCoeff"))
2164
+
returnofferAndExecuteAutofix(selection, "effect", "The `selectionCoeff` property of Mutation has become the property `effect`.", terminationMessage);
2165
+
2166
+
if (terminationMessage.contains("property selectionCoeff is not defined for object element type Substitution") &&
2167
+
(selectionString == "selectionCoeff"))
2168
+
returnofferAndExecuteAutofix(selection, "effect", "The `selectionCoeff` property of Substitution has become the property `effect`.", terminationMessage);
\f4\fs20 \cf2 The dominance coefficient of the mutation, taken from the default dominance coefficient of its
5954
+
\f4\fs20 \cf2 The dominance coefficient(s) of the mutation, taken from the default dominance coefficient(s) of its
5955
5955
\f3\fs18 MutationType
5956
-
\f4\fs20 . If a mutation has a
5957
-
\f3\fs18 selectionCoeff
5958
-
\f4\fs20 of
5959
-
\f1\i s
5960
-
\f4\i0 and a
5961
-
\f3\fs18 dominanceCoeff
5962
-
\f4\fs20 of
5963
-
\f1\i h
5964
-
\f4\i0 , the multiplicative fitness effect of the mutation in a homozygote is 1+
5965
-
\f1\i s
5966
-
\f4\i0 , and in a heterozygote is 1+
5967
-
\f1\i hs
5968
-
\f4\i0 . The dominance coefficient of a mutation can be changed with the
5969
-
\f3\fs18 setDominanceCoeff()
5956
+
\f4\fs20 . In a multi-trait model, this property provides the dominance coefficients for all of the traits (in the order in which the traits were defined). For more control, see the
5957
+
\f3\fs18 dominanceForTrait()
5958
+
\f4\fs20 method. Also note that dynamic properties are defined for each trait in the model; if there is a trait named
5959
+
\f3\fs18 height
5960
+
\f4\fs20 , for example, then
5961
+
\f3\fs18 Mutation
5962
+
\f4\fs20 objects will have a dynamic property named
5963
+
\f3\fs18 heightDominance
5964
+
\f4\fs20 to access the dominance for that trait. The dominance coefficient(s) of a mutation can be changed with the
5965
+
\f3\fs18 setDominanceForTrait()
5970
5966
\f4\fs20 method.\
5971
-
Note that this property has a quirk: it is stored internally in SLiM using a single-precision float, not the double-precision float type normally used by Eidos. This means that if you set a mutation
5967
+
Note that dominance coefficients in SLiM have a quirk: they are stored internally in SLiM using a single-precision float, not the double-precision float type normally used by Eidos. This means that if you set a mutation
5972
5968
\f3\fs18 mut
5973
5969
\f4\fs20 \'92s dominance coefficient to some number
5974
5970
\f3\fs18 x
5975
5971
\f4\fs20 ,
5976
5972
\f3\fs18 mut.dominanceCoeff==x
5977
5973
\f4\fs20 may be
5978
5974
\f3\fs18 F
5979
-
\f4\fs20 due to floating-point rounding error. Comparisons of floating-point numbers for exact equality is often a bad idea, but this is one case where it may fail unexpectedly. Instead, it is recommended to use the
5980
-
\f3\fs18 id
5981
-
\f4\fs20 or
5982
-
\f3\fs18 tag
5983
-
\f4\fs20 properties to identify particular mutations.\
5975
+
\f4\fs20 due to floating-point rounding error. Comparisons of floating-point numbers for exact equality is often a bad idea, but this is one case where it may fail unexpectedly.\
\f4\fs20 \cf2 The effect size(s) of the mutation, drawn from the distribution of effect sizes of its
5982
+
\f3\fs18 MutationType
5983
+
\f4\fs20 . In a multi-trait model, this property provides the effect sizes for all of the traits (in the order in which the traits were defined). For more control, see the
5984
+
\f3\fs18 effectForTrait()
5985
+
\f4\fs20 method. Also note that dynamic properties are defined for each trait in the model; if there is a trait named
5986
+
\f3\fs18 height
5987
+
\f4\fs20 , for example, then
5988
+
\f3\fs18 Mutation
5989
+
\f4\fs20 objects will have a dynamic property named
5990
+
\f3\fs18 heightEffect
5991
+
\f4\fs20 to access the effect for that trait. The effect size of a mutation can be changed with the
5992
+
\f3\fs18 setEffectForTrait()
5993
+
\f4\fs20 method.\
5994
+
Note that effect sizes in SLiM have a quirk: they are stored internally in SLiM using a single-precision float, not the double-precision float type normally used by Eidos. This means that if you set a mutation
5995
+
\f3\fs18 mut
5996
+
\f4\fs20 \'92s effect size to some number
5997
+
\f3\fs18 x
5998
+
\f4\fs20 ,
5999
+
\f3\fs18 mut.effect==x
6000
+
\f4\fs20 may be
6001
+
\f3\fs18 F
6002
+
\f4\fs20 due to floating-point rounding error. Comparisons of floating-point numbers for exact equality is often a bad idea, but this is one case where it may fail unexpectedly.\
\f4\fs20 \cf0 The selection coefficient of the mutation, drawn from the distribution of fitness effects of its
6083
-
\f3\fs18 MutationType
6084
-
\f5\fs20 .
6085
-
\f4 \cf2 \expnd0\expndtw0\kerning0
6086
-
If a mutation has a
6087
-
\f3\fs18 selectionCoeff
6088
-
\f4\fs20 of
6089
-
\f1\i s
6090
-
\f4\i0 , the multiplicative fitness effect of the mutation in a homozygote is 1+
6091
-
\f1\i s
6092
-
\f4\i0 ; in a heterozygote it is 1+
6093
-
\f1\i hs
6094
-
\f4\i0 , where
6095
-
\f1\i h
6096
-
\f4\i0 is the dominance coefficient kept by the mutation type.
6097
-
\f5 \cf0 \kerning1\expnd0\expndtw0 \
6098
-
6099
-
\f4 Note that this property has a quirk: it is stored internally in SLiM using a single-precision float, not the double-precision float type normally used by Eidos. This means that if you set a mutation
6100
-
\f3\fs18 mut
6101
-
\f4\fs20 \'92s selection coefficient to some number
6102
-
\f3\fs18 x
6103
-
\f4\fs20 ,
6104
-
\f3\fs18 mut.selectionCoeff==x
6105
-
\f4\fs20 may be
6106
-
\f3\fs18 F
6107
-
\f4\fs20 due to floating-point rounding error. Comparisons of floating-point numbers for exact equality is often a bad idea, but this is one case where it may fail unexpectedly. Instead, it is recommended to use the
6108
-
\f3\fs18 id
6109
-
\f4\fs20 or
6110
-
\f3\fs18 tag
6111
-
\f4\fs20 properties to identify particular mutations.
\f4\fs20 \cf2 Set the dominance coefficient of the mutation to
6192
-
\f3\fs18 dominanceCoeff
6193
-
\f4\fs20 . The dominance coefficient will be changed for all individuals that possess the mutation, since they all share a single
6194
-
\f3\fs18 Mutation
6195
-
\f4\fs20 object (note that the selection coefficient will remain unchanged).\
6196
-
Changing this will normally affect the fitness values calculated toward the end of the current tick; if you want current fitness values to be affected, you can call the
6197
-
\f3\fs18 Species
6198
-
\f4\fs20 method
6199
-
\f3\fs18 recalculateFitness()
6200
-
\f4\fs20 \'96 but see the documentation of that method for caveats.\
\f4\fs20 object). The selection coefficients and dominance coefficients of existing mutations are not changed, since they are properties of the mutation objects themselves; they can be changed explicitly using the
6275
-
\f3\fs18 setSelectionCoeff()
6242
+
\f4\fs20 object). The effects and dominance coefficients of existing mutations are not changed, since those are properties of the mutation objects themselves; they can be changed explicitly using the
6243
+
\f3\fs18 setEffectForTrait()
6276
6244
\f4\fs20 and
6277
-
\f3\fs18 setDominanceCoeff()
6245
+
\f3\fs18 setDominanceForTrait()
6278
6246
\f4\fs20 methods of
6279
6247
\f3\fs18 Mutation
6280
6248
\f4\fs20 if so desired.\
6281
6249
In nucleotide-based models, a restriction applies: nucleotide-based mutations may not be changed to a non-nucleotide-based mutation type, and non-nucleotide-based mutations may not be changed to a nucleotide-based mutation type.\
\f4\fs20 \cf2 Set the selection coefficient of the mutation to
6288
-
\f3\fs18 selectionCoeff
6289
-
\f4\fs20 . The selection coefficient will be changed for all individuals that possess the mutation, since they all share a single
6290
-
\f3\fs18 Mutation
6291
-
\f4\fs20 object (note that the dominance coefficient will remain unchanged).\
6292
-
Often setting up a
6293
-
\f3\fs18 mutationEffect()
6294
-
\f4\fs20 callback is preferable, in order to modify the selection coefficient in a more limited and controlled fashion. Changing this will normally affect the fitness values calculated toward the end of the current tick; if you want current fitness values to be affected, you can call the
6295
-
\f3\fs18 Species
6296
-
\f4\fs20 method
6297
-
\f3\fs18 recalculateFitness()
6298
-
\f4\fs20 \'96 but see the documentation of that method for caveats.\
\f4\fs20 \cf2 The dominance coefficient of the mutation, carried over from the original mutation object.\
13851
+
\f4\fs20 \cf2 The dominance coefficient(s) of the mutation, carried over from the original mutation object. In a multi-trait model, this property provides the dominance coefficients for all of the traits (in the order in which the traits were defined). For more control, see the
13852
+
\f3\fs18 dominanceForTrait()
13853
+
\f4\fs20 method. Also note that dynamic properties are defined for each trait in the model; if there is a trait named
13854
+
\f3\fs18 height
13855
+
\f4\fs20 , for example, then
13856
+
\f3\fs18 Substitution
13857
+
\f4\fs20 objects will have a dynamic property named
Copy file name to clipboardExpand all lines: VERSIONS
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,7 @@ multitrait branch:
38
38
add Community property allTraits => (object<Trait>)
39
39
make a single implicit trait with MakeImplicitTrait() (defaulting to kMultiplicative with a direct fitness effect) if initializeTrait() is not called before initializeMutationType() is called
40
40
add a C++ dominance_coeff_ property to Mutation, with a value inherited from MutationType's property (which is now just the default value)
41
-
add dominanceCoeff properties to Mutation and Substitution
42
-
add a setDominanceCoeff() method to Mutation, yay!
41
+
add dominance properties to Mutation and Substitution
43
42
fix calcInbreedingLoad() to use muts.dominanceCoeff instead of muts.mutationType.dominanceCoeff
44
43
revamp MutationType for multiple traits
45
44
remove MutationType properties dominanceCoeff, distributionType, and distributionParams properties
add <trait>Effect and <trait>Dominance properties to Mutation, both read-write float$
66
65
add <trait>Effect and <trait>Dominance properties to Substitution, both read-only float$
66
+
remove Mutation method setSelectionCoeff(), autofixing to setEffectForTrait(NULL, )
67
+
rename the selectionCoeff property to effect, for both Mutation and Substitution; it changes from float$ to float, and now returns all trait effects; and SLiMgui autofixes this change
0 commit comments