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, "defaultDominanceForTrait()", "The `dominanceCoeff` property of MutationType has become the method `defaultDominanceForTrait()`.", terminationMessage);
2140
2140
2141
+
// the above autofix is imperfect; if the user is assigning into dominanceCoeff, it really needs to be corrected to be a call to setDefaultDominanceForTrait()
2142
+
2143
+
if (terminationMessage.contains("property hemizygousDominanceCoeff is not defined for object element type MutationType") &&
2144
+
(selectionString == "hemizygousDominanceCoeff"))
2145
+
returnofferAndExecuteAutofix(selection, "defaultHemizygousDominanceForTrait()", "The `hemizygousDominanceCoeff` property of MutationType has become the method `defaultHemizygousDominanceForTrait()`.", terminationMessage);
2146
+
2147
+
// the above autofix is imperfect; if the user is assigning into hemizygousDominanceCoeff, it really needs to be corrected to be a call to setDefaultHemizygousDominanceForTrait()
2148
+
2141
2149
if (terminationMessage.contains("property distributionType is not defined for object element type MutationType") &&
2142
2150
(selectionString == "distributionType"))
2143
2151
returnofferAndExecuteAutofix(selection, "effectDistributionTypeForTrait()", "The `distributionType` property of MutationType has become the method `effectDistributionTypeForTrait()`.", terminationMessage);
@@ -6012,7 +6012,7 @@ Note that dominance coefficients in SLiM have a quirk: they are stored internall
6012
6012
\f4\fs20 \'92s dominance coefficient to some number
6013
6013
\f3\fs18 x
6014
6014
\f4\fs20 ,
6015
-
\f3\fs18 mut.dominanceCoeff==x
6015
+
\f3\fs18 mut.dominance==x
6016
6016
\f4\fs20 may be
6017
6017
\f3\fs18 F
6018
6018
\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.\
@@ -6045,6 +6045,33 @@ Note that effect sizes in SLiM have a quirk: they are stored internally in SLiM
6045
6045
\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 hemizygous dominance coefficient(s) of the mutation, taken from the default hemizygous dominance coefficient(s) of its
6052
+
\f3\fs18 MutationType
6053
+
\f4\fs20 . In a multi-trait model, this property provides the hemizygous dominance coefficients for all of the traits (in the order in which the traits were defined). For more control, see the
6054
+
\f3\fs18 hemizygousDominanceForTrait()
6055
+
\f4\fs20 method. Also note that dynamic properties are defined for each trait in the model; if there is a trait named
6056
+
\f3\fs18 height
6057
+
\f4\fs20 , for example, then
6058
+
\f3\fs18 Mutation
6059
+
\f4\fs20 objects will have a dynamic property named
6060
+
\f3\fs18 heightHemizygousDominance
6061
+
\f4\fs20 to access the hemizygous dominance for that trait. The hemizygous dominance coefficient(s) of a mutation can be changed with the
6062
+
\f3\fs18 setHemizygousDominanceForTrait()
6063
+
\f4\fs20 method.\
6064
+
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
6065
+
\f3\fs18 mut
6066
+
\f4\fs20 \'92s hemizygous dominance coefficient to some number
6067
+
\f3\fs18 x
6068
+
\f4\fs20 ,
6069
+
\f3\fs18 mut.hemizygousDominance==x
6070
+
\f4\fs20 may be
6071
+
\f3\fs18 F
6072
+
\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 Returns the mutation\'92s hemizygous dominance coefficient for the trait(s) specified by
6245
+
\f3\fs18 trait
6246
+
\f4\fs20 ; for both multiplicative traits and additive traits this is the hemizygous dominance coefficient
6247
+
\f1\i h
6248
+
\f4\i0\fs13\fsmilli6667 \sub hemi
6249
+
\fs20 \nosupersub . The traits can be specified as
6250
+
\f3\fs18 integer
6251
+
\f4\fs20 indices of traits in the species, or directly as
6252
+
\f3\fs18 Trait
6253
+
\f4\fs20 objects;
6254
+
\f3\fs18 NULL
6255
+
\f4\fs20 represents all of the traits in the species, in the order in which they were defined. Hemizygous dominance coefficients for a given target mutation will be returned consecutively in the order in which the traits are specified by
\f4\fs20 \cf2 Sets the mutation\'92s hemizygous dominance coefficient(s) for the trait(s) specified by
6326
+
\f3\fs18 trait
6327
+
\f4\fs20 . The traits can be specified as
6328
+
\f3\fs18 integer
6329
+
\f4\fs20 indices of traits in the species, or directly as
6330
+
\f3\fs18 Trait
6331
+
\f4\fs20 objects;
6332
+
\f3\fs18 NULL
6333
+
\f4\fs20 represents all of the traits in the species, in the order in which they were defined.\
6334
+
The parameter
6335
+
\f3\fs18 dominance
6336
+
\f4\fs20 must follow one of four patterns. In the first pattern,
6337
+
\f3\fs18 dominance
6338
+
\f4\fs20 is
6339
+
\f3\fs18 NULL
6340
+
\f4\fs20 ; this sets the dominance for each of the specified traits to the default hemizygous dominance coefficient from the mutation type of the mutation in each target mutation. (Note that mutation hemizygous dominance coefficients are automatically set to these defaults when a mutation is created; this re-sets default hemizygous dominance values.) In the second pattern,
6341
+
\f3\fs18 dominance
6342
+
\f4\fs20 is a singleton value; this sets the given hemizygous dominance for each of the specified traits in each target mutation. In the third pattern,
6343
+
\f3\fs18 dominance
6344
+
\f4\fs20 is of length equal to the number of specified traits; this sets the hemizygous dominance for each of the specified traits to the corresponding dominance value in each target mutation. In the fourth pattern,
6345
+
\f3\fs18 dominance
6346
+
\f4\fs20 is of length equal to the number of specified traits times the number of target mutations; this uses
6347
+
\f3\fs18 dominance
6348
+
\f4\fs20 to provide a different hemizygous dominance coefficient for each trait in each mutation, using consecutive values from
6349
+
\f3\fs18 dominance
6350
+
\f4\fs20 to set the hemizygous dominance for each of the specified traits in one mutation before moving to the next mutation.\
\f4\fs20 \cf2 The dominance coefficient used for mutations of this type when they occur opposite a null haplosome (as can occur in sex-chromosome models and models involving a mix of haploids and diploids). This defaults to
6387
-
\f3\fs18 1.0
6388
-
\f4\fs20 , and is used only in models where null haplosomes are present; the
6389
-
\f3\fs18 dominanceCoeff
6390
-
\f4\fs20 property is the dominance coefficient used in most circumstances. 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
6391
-
\f3\fs18 Species
6392
-
\f4\fs20 method
6393
-
\f3\fs18 recalculateFitness()
6394
-
\f4\fs20 \'96 but see the documentation of that method for caveats.\
6395
-
As with the
6396
-
\f3\fs18 dominanceCoeff
6397
-
\f4\fs20 property, this is stored internally using a single-precision float; see the documentation for
\f4\fs20 \cf2 Returns the default dominance coefficient used for the specified trait or traits, for mutations of this type when heterozygous. The traits can be specified as
@@ -6526,7 +6584,7 @@ The species to which the target object belongs.\
6526
6584
\f4\fs20 objects;
6527
6585
\f3\fs18 NULL
6528
6586
\f4\fs20 represents all of the traits in the species. The default dominance coefficient is taken by new mutations of this mutation type when they are created, as the value of their
6529
-
\f3\fs18 dominanceCoeff
6587
+
\f3\fs18 dominance
6530
6588
\f4\fs20 property, but that can be changed later with the
6531
6589
\f3\fs18 Mutation
6532
6590
\f4\fs20 method
@@ -6542,6 +6600,32 @@ Also note that dominance coefficients have a quirk: they are stored internally i
6542
6600
\f4\fs20 type normally used by Eidos. This means that comparisons of dominance coefficients for exact equality might fail unexpectedly, due to roundoff.\
\f4\fs20 \cf2 Returns the default hemizygous dominance coefficient used for the specified trait or traits, for mutations of this type when hemizygous (i.e., when present in only one copy because they are facing a null haplosome, such as for an X chromosome in a male). The traits can be specified as
6607
+
\f3\fs18 integer
6608
+
\f4\fs20 indices of traits in the species, or directly as
6609
+
\f3\fs18 Trait
6610
+
\f4\fs20 objects;
6611
+
\f3\fs18 NULL
6612
+
\f4\fs20 represents all of the traits in the species. The default hemizygous dominance coefficient is taken by new mutations of this mutation type when they are created, as the value of their
6613
+
\f3\fs18 hemizygousDominance
6614
+
\f4\fs20 property, but that can be changed later with the
6615
+
\f3\fs18 Mutation
6616
+
\f4\fs20 method
6617
+
\f3\fs18 setHemizygousDominanceForTrait()
6618
+
\f4\fs20 .\
6619
+
Note that dominance coefficients are not bounded. A dominance coefficient greater than
6620
+
\f3\fs18 1.0
6621
+
\f4\fs20 may be used to achieve an overdominance effect. By making the selection coefficient very small and the dominance coefficient very large, an overdominance scenario in which both homozygotes have the same fitness may be approximated, to a nearly arbitrary degree of precision.\
6622
+
Also note that dominance coefficients have a quirk: they are stored internally in SLiM as a single-precision
6623
+
\f3\fs18 float
6624
+
\f4\fs20 , not the double-precision
6625
+
\f3\fs18 float
6626
+
\f4\fs20 type normally used by Eidos. This means that comparisons of dominance coefficients for exact equality might fail unexpectedly, due to roundoff.\
\f4\fs20 \cf2 Returns the type of distribution of effects for the specified trait or traits. The traits can be specified as
@@ -6616,12 +6700,28 @@ Also note that dominance coefficients have a quirk: they are stored internally i
6616
6700
\f4\fs20 objects;
6617
6701
\f3\fs18 NULL
6618
6702
\f4\fs20 represents all of the traits in the species. The value of
6619
-
\f3\fs18 defaultDominance
6703
+
\f3\fs18 dominance
6620
6704
\f4\fs20 must either be singleton (in which case it is set as the default dominance for all specified traits), or must match the number of specified traits (in which case one element of
\f4\fs20 \cf2 Set the default hemizygous dominance coefficient for a specified trait or traits, for the target mutation type. The traits can be specified as
6713
+
\f3\fs18 integer
6714
+
\f4\fs20 indices of traits in the species, or directly as
6715
+
\f3\fs18 Trait
6716
+
\f4\fs20 objects;
6717
+
\f3\fs18 NULL
6718
+
\f4\fs20 represents all of the traits in the species. The value of
6719
+
\f3\fs18 dominance
6720
+
\f4\fs20 must either be singleton (in which case it is set as the default hemizygous dominance for all specified traits), or must match the number of specified traits (in which case one element of
\f4\fs20 \cf2 The hemizygous dominance coefficient(s) of the mutation, carried over from the original mutation object. In a multi-trait model, this property provides the hemizygous dominance coefficients for all of the traits (in the order in which the traits were defined). For more control, see the
14023
+
\f3\fs18 hemizygousDominanceForTrait()
14024
+
\f4\fs20 method. Also note that dynamic properties are defined for each trait in the model; if there is a trait named
14025
+
\f3\fs18 height
14026
+
\f4\fs20 , for example, then
14027
+
\f3\fs18 Substitution
14028
+
\f4\fs20 objects will have a dynamic property named
\f4\fs20 represents all of the traits in the species, in the order in which they were defined. Effects for a given target substitution will be returned consecutively in the order in which the traits are specified by
\f4\fs20 \cf2 Returns the substitution\'92s hemizygous dominance coefficient for the trait(s) specified by
14183
+
\f3\fs18 trait
14184
+
\f4\fs20 , carried over from the original mutation object. For both multiplicative traits and additive traits this is the hemizygous dominance coefficient
14185
+
\f1\i h
14186
+
\f4\i0\fs13\fsmilli6667 \sub hemi
14187
+
\fs20 \nosupersub . The traits can be specified as
14188
+
\f3\fs18 integer
14189
+
\f4\fs20 indices of traits in the species, or directly as
14190
+
\f3\fs18 Trait
14191
+
\f4\fs20 objects;
14192
+
\f3\fs18 NULL
14193
+
\f4\fs20 represents all of the traits in the species, in the order in which they were defined. Hemizygous dominance coefficients for a given target substitution will be returned consecutively in the order in which the traits are specified by
0 commit comments