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
<p class="p6"><span class="s3">The species to which the target object belongs.</span></p>
132
132
<p class="p5">symbol => (string$)</p>
133
-
<p class="p6">The symbol for the chromosome, as given to <span class="s1">initializeChromosome()</span>.<span class="Apple-converted-space"> </span>For an implicitly defined chromosome, the <span class="s1">symbol</span> will be <span class="s1">"1"</span>.<span class="Apple-converted-space"> </span>The <span class="s1">symbol</span> can be used to refer to the chromosome; see also <span class="s1">id</span>.</p>
133
+
<p class="p6">The symbol for the chromosome, as given to <span class="s1">initializeChromosome()</span>; see the documentation for that function.<span class="Apple-converted-space"> </span>For an implicitly defined chromosome, the symbol is <span class="s1">"A"</span> for non-sexual models, and for sexual models (for historical reasons) is determined by the model type passed to <span class="s1">initializeSex()</span> as documented there.<span class="Apple-converted-space"> </span>The <span class="s1">symbol</span> can be used to refer to the chromosome; see also <span class="s1">id</span>.</p>
134
134
<p class="p3">tag <–> (integer$)</p>
135
135
<p class="p4">A user-defined <span class="s1">integer</span> value.<span class="Apple-converted-space"> </span>The value of <span class="s1">tag</span> is initially undefined<span class="s7">, and it is an error to try to read it</span>; if you wish it to have a defined value, you must arrange that yourself by explicitly setting its value prior to using it elsewhere in your code.<span class="Apple-converted-space"> </span>The value of <span class="s1">tag</span> is not used by SLiM; it is free for you to use.</p>
Copy file name to clipboardExpand all lines: QtSLiM/help/SLiMHelpFunctions.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -111,9 +111,9 @@
111
111
<pclass="p3">There are two ways to call this function.<spanclass="Apple-converted-space"></span>If the optional <spanclass="s3">ends</span> parameter is <spanclass="s3">NULL</span> (the default), then <spanclass="s3">rates</span> must be a singleton value that specifies a single recombination rate to be used along the entire chromosome.<spanclass="Apple-converted-space"></span>If, on the other hand, <spanclass="s3">ends</span> is supplied, then <spanclass="s3">rates</span> and <spanclass="s3">ends</span> must be the same length, and the values in <spanclass="s3">ends</span> must be specified in ascending order.<spanclass="Apple-converted-space"></span>In that case, <spanclass="s3">rates</span> and <spanclass="s3">ends</span> taken together specify the recombination rates to be used along successive contiguous stretches of the chromosome, from beginning to end; the last position specified in <spanclass="s3">ends</span> should extend to the end of the chromosome (i.e. at least to the end of the last genomic element, if not further).</p>
112
112
<pclass="p3">If the optional <spanclass="s3">sex</span> parameter is <spanclass="s3">"*"</span> (the default), then the supplied recombination rate map will be used for both sexes (which is the only option for hermaphroditic simulations).<spanclass="Apple-converted-space"></span>In sexual simulations <spanclass="s3">sex</span> may be <spanclass="s3">"M"</span> or <spanclass="s3">"F"</span> instead, in which case the supplied recombination map is used only for that sex.<spanclass="Apple-converted-space"></span>In this case, two calls must be made to <spanclass="s3">initializeRecombinationRate()</span>, one for each sex, even if a rate of zero is desired for the other sex; no default recombination map is supplied.</p>
<pclass="p3">Enable sex in the simulation.<spanclass="Apple-converted-space"></span>Beginning in SLiM 5, this method should generally be passed <spanclass="s3">NULL</span>, simply indicating that sex should be enabled: individuals will be male and female (rather than hermaphroditic), biparental crosses will be required to be between a female first parent and a male second parent, and selfing will not be allowed.<spanclass="Apple-converted-space"></span>There is no way to disable sex once it has been enabled; if you don’t want to have sex, don’t call this function.</p>
115
-
<pclass="p3">In this new configuration style, if a sexual simulation involving sex chromosomes is desired, the new <spanclass="s3">initializeChromosome()</span> call should be used to configure the chromosome setup for the simulation (see the <spanclass="s3">initializeChromosome()</span> documentation in section 25.1).</p>
116
-
<pclass="p3">For backward compatibility, the old style of configuring a sexual simulation is still supported, however.<spanclass="Apple-converted-space"></span>In this style, the argument <spanclass="s3">chromosomeType</span> gives the type of chromosome to be simulated; this should be <spanclass="s3">"A"</span>, <spanclass="s3">"X"</span>, or <spanclass="s3">"Y"</span>.<spanclass="Apple-converted-space"></span>These correspond to the new chromosome types <spanclass="s3">"A"</span>, <spanclass="s3">"X"</span>, and <spanclass="s3">"-Y"</span> (not <spanclass="s3">"Y"</span>), respectively, when using <spanclass="s3">initializeChromosome()</span>.<spanclass="Apple-converted-space"></span>This old style of chromosome configuration is much less flexible, however, allowing fewer chromosome types, and only allowing a single chromosome to be set up.<spanclass="Apple-converted-space"></span>This backward compatibility mode may be removed for SLiM in the future, and should be considered deprecated.</p>
114
+
<pclass="p3">Enable sex in the simulation.<spanclass="Apple-converted-space"></span>Beginning in SLiM 5, this method should generally be passed <spanclass="s3">NULL</span>, simply indicating that sex should be enabled: individuals will then be male and female (rather than hermaphroditic), biparental crosses will be required to be between a female first parent and a male second parent, and selfing will not be allowed.<spanclass="Apple-converted-space"></span>In this new configuration style, if a sexual simulation involving sex chromosomes is desired, the new <spanclass="s3">initializeChromosome()</span> call should be used to configure the chromosome setup for the simulation.</p>
115
+
<pclass="p3">For backward compatibility, the old style of configuring a sexual simulation is still supported, however.<spanclass="Apple-converted-space"></span>This implicitly defines a single chromosome, without a call to <spanclass="s3">initializeChromosome()</span>.<spanclass="Apple-converted-space"></span>With this old configuration approach, the <spanclass="s3">chromosomeType</span> parameter to <spanclass="s3">initializeSex()</span> gives the type of chromosome that should be simulated; this should be <spanclass="s3">"A"</span>, <spanclass="s3">"X"</span>, or <spanclass="s3">"Y"</span>, and this <spanclass="s3">chromosomeType</span> value will be used as the symbol (<spanclass="s3">"A"</span>, <spanclass="s3">"X"</span>, or <spanclass="s3">"Y"</span>) for the implicit chromosome.<spanclass="Apple-converted-space"></span>These legacy chromosome types correspond to the new chromosome types <spanclass="s3">"A"</span>, <spanclass="s3">"X"</span>, and <spanclass="s3">"-Y"</span> respectively (note that it is <i>not</i><spanclass="s3">"Y"</span>), when using <spanclass="s3">initializeChromosome()</span>.<spanclass="Apple-converted-space"></span>The implicit chromosome’s <spanclass="s3">id</span> property is always <spanclass="s3">1</span>.<spanclass="Apple-converted-space"></span>This old style of chromosome configuration is much less flexible, however, allowing only these three chromosome types, and only allowing a single chromosome to be set up.<spanclass="Apple-converted-space"></span>This backward compatibility mode may be removed for SLiM in the future, and should be considered deprecated; new models should call <spanclass="s3">initializeChromosome()</span> explicitly instead.</p>
116
+
<pclass="p3">There is no way to disable sex once it has been enabled; if you don’t want to have sex, don’t call this function.<spanclass="Apple-converted-space"></span>If you require more flexibility with mating types and reproductive strategies than SLiM’s built-in support for sex provides, do not call <spanclass="s3">initializeSex()</span>; instead, track the sex or mating type of individuals yourself in script (with the <spanclass="s3">tag</span> property of <spanclass="s3">Individual</span>, for example), and manage the consequences of that in your script yourself, in terms of which individuals can mate with which, and exactly how the offspring is produced.</p>
117
117
<pclass="p9"><spanclass="s8"><b>The </b></span><spanclass="s9"><b>xDominanceCoeff</b></span><spanclass="s8"><b> parameter has been deprecated and removed.</b><spanclass="Apple-converted-space"></span>In SLiM 5 and later, use the </span><spanclass="s9">hemizygousDominanceCoeff</span><spanclass="s8"> property of </span><spanclass="s9">MutationType</span><spanclass="s8"> instead.<spanclass="Apple-converted-space"></span></span>If the <spanclass="s3">chromosomeType</span> is <spanclass="s3">"X"</span>, the optional <spanclass="s3">xDominanceCoeff</span> parameter can supply the dominance coefficient used when a mutation is present in an XY male, and is thus “heterozygous” (but in a different sense than the heterozygosity of an XX female with one copy of the mutation).</p>
<pclass="p3"><spanclass="s1">Configure the type of SLiM model used for the simulation.<spanclass="Apple-converted-space"></span>At present, one of two model types may be selected.<spanclass="Apple-converted-space"></span>If </span><spanclass="s2">modelType</span><spanclass="s1"> is </span><spanclass="s2">"WF"</span><spanclass="s1">, SLiM will use a Wright-Fisher (WF) model; this is the model type that has always been supported by SLiM, and is the model type used if </span><spanclass="s2">initializeSLiMModelType()</span><spanclass="s1"> is not called.<spanclass="Apple-converted-space"></span>If </span><spanclass="s2">modelType</span><spanclass="s1"> is </span><spanclass="s2">"nonWF"</span><spanclass="s1">, SLiM will use a non-Wright-Fisher (nonWF) model instead; this is a new model type supported by SLiM 3.0 and above.</span></p>
Copy file name to clipboardExpand all lines: SLiMgui/SLiMHelpFunctions.rtf
+34-12Lines changed: 34 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -939,31 +939,55 @@ If the optional
939
939
940
940
\f2\fs20\cf2 Enable sex in the simulation. Beginning in SLiM 5, this method should generally be passed
941
941
\f1\fs18 NULL
942
-
\f2\fs20 , simply indicating that sex should be enabled: individuals will be male and female (rather than hermaphroditic), biparental crosses will be required to be between a female first parent and a male second parent, and selfing will not be allowed. There is no way to disable sex once it has been enabled; if you don\'92t want to have sex, don\'92t call this function.\
943
-
In this new configuration style, if a sexual simulation involving sex chromosomes is desired, the new
942
+
\f2\fs20 , simply indicating that sex should be enabled: individuals will then be male and female (rather than hermaphroditic), biparental crosses will be required to be between a female first parent and a male second parent, and selfing will not be allowed. In this new configuration style, if a sexual simulation involving sex chromosomes is desired, the new
944
943
\f1\fs18 initializeChromosome()
945
-
\f2\fs20 call should be used to configure the chromosome setup for the simulation (see the
944
+
\f2\fs20 call should be used to configure the chromosome setup for the simulation.\
945
+
For backward compatibility, the old style of configuring a sexual simulation is still supported, however. This implicitly defines a single chromosome, without a call to
946
946
\f1\fs18 initializeChromosome()
947
-
\f2\fs20 documentation in section 25.1).\
948
-
For backward compatibility, the old style of configuring a sexual simulation is still supported, however. In this style, the argument
947
+
\f2\fs20 . With this old configuration approach, the
949
948
\f1\fs18 chromosomeType
950
-
\f2\fs20 gives the type of chromosome to be simulated; this should be
949
+
\f2\fs20 parameter to
950
+
\f1\fs18 initializeSex()
951
+
\f2\fs20 gives the type of chromosome that should be simulated; this should be
952
+
\f1\fs18 "A"
953
+
\f2\fs20 ,
954
+
\f1\fs18 "X"
955
+
\f2\fs20 , or
956
+
\f1\fs18 "Y"
957
+
\f2\fs20 , and this
958
+
\f1\fs18 chromosomeType
959
+
\f2\fs20 value will be used as the symbol (
951
960
\f1\fs18 "A"
952
961
\f2\fs20 ,
953
962
\f1\fs18 "X"
954
963
\f2\fs20 , or
955
964
\f1\fs18 "Y"
956
-
\f2\fs20 . These correspond to the new chromosome types
965
+
\f2\fs20) for the implicit chromosome. These legacy chromosome types correspond to the new chromosome types
957
966
\f1\fs18 "A"
958
967
\f2\fs20 ,
959
968
\f1\fs18 "X"
960
969
\f2\fs20 , and
961
970
\f1\fs18 "-Y"
962
-
\f2\fs20 (not
971
+
\f2\fs20 respectively (note that it is
972
+
\f3\i not
973
+
\f2\i0
963
974
\f1\fs18 "Y"
964
-
\f2\fs20 ), respectively, when using
975
+
\f2\fs20 ), when using
965
976
\f1\fs18 initializeChromosome()
966
-
\f2\fs20 . This old style of chromosome configuration is much less flexible, however, allowing fewer chromosome types, and only allowing a single chromosome to be set up. This backward compatibility mode may be removed for SLiM in the future, and should be considered deprecated.\
977
+
\f2\fs20 . The implicit chromosome\'92s
978
+
\f1\fs18 id
979
+
\f2\fs20 property is always
980
+
\f1\fs18 1
981
+
\f2\fs20 . This old style of chromosome configuration is much less flexible, however, allowing only these three chromosome types, and only allowing a single chromosome to be set up. This backward compatibility mode may be removed for SLiM in the future, and should be considered deprecated; new models should call
982
+
\f1\fs18 initializeChromosome()
983
+
\f2\fs20 explicitly instead.\
984
+
There is no way to disable sex once it has been enabled; if you don\'92t want to have sex, don\'92t call this function. If you require more flexibility with mating types and reproductive strategies than SLiM\'92s built-in support for sex provides, do not call
985
+
\f1\fs18 initializeSex()
986
+
\f2\fs20 ; instead, track the sex or mating type of individuals yourself in script (with the
987
+
\f1\fs18 tag
988
+
\f2\fs20 property of
989
+
\f1\fs18 Individual
990
+
\f2\fs20 , for example), and manage the consequences of that in your script yourself, in terms of which individuals can mate with which, and exactly how the offspring is produced.\
\cf0 This function will likely be extended with further options in the future, added on to the end of the argument list. Using named arguments with this call is recommended for readability. Note that turning on optional features may increase the runtime and memory footprint of SLiM.\
Copy file name to clipboardExpand all lines: VERSIONS
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,7 @@ development head (in the master branch):
110
110
recombination() callbacks can now be optionally declared with a chromosome specifier (id or symbol), to apply to just one chromosome
111
111
registerRecombinationCallback() now takes an optional chromosome parameter to specify that focal chromosome
112
112
fix up the calc...() functions for multiple chromosomes, and to be robust to the case of zero mutations (existing at all, or within the supplied haplosomes), and to improve error-checking and documentation
113
+
the default symbol for implicit chromosomes should be "A", "X", or "Y", so output formats don't change for legacy models
0 commit comments