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
Copy file name to clipboardExpand all lines: QtSLiM/help/SLiMHelpFunctions.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -117,9 +117,9 @@
117
117
<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>
118
118
<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>
119
119
<pclass="p3">The <spanclass="s3">initializeRecombinationRateFromFile()</span> function is a useful convenience function if you wish to read the recombination rate map from a file.</p>
<pclass="p4">(void)initializeRecombinationRateFromFile(string$ path, integer$ lastPosition, [float$ scale = 1.0e-08], [string$ sep = "\t"], [string$ dec = "."], [string$ sex = "*"])</p>
121
121
<pclass="p3">Set a recombination rate map from data read from the file at <spanclass="s3">path</span>.<spanclass="Apple-converted-space"></span>This function is essentially a wrapper for <spanclass="s3">initializeRecombinationRate()</span> that uses <spanclass="s3">readCSV()</span> and passes the data through.<spanclass="Apple-converted-space"></span>The file is expected to contain two columns of data.<spanclass="Apple-converted-space"></span>The first column must be <spanclass="s3">integer</span> start positions for rate map regions; the first region should start at position <spanclass="s3">0</span> if the map’s positions are <spanclass="s3">0</span>-based, or at position <spanclass="s3">1</span> if the map’s positions are <spanclass="s3">1</span>-based; in the latter case, <spanclass="s3">1</span> will be subtracted from every position since SLiM uses <spanclass="s3">0</span>-based positions.<spanclass="Apple-converted-space"></span>The second column must be <spanclass="s3">float</span> rates, relative to the scaling factor specified in <spanclass="s3">scale</span>; for example, if a given rate is <spanclass="s3">1.2</span> and <spanclass="s3">scale</span> is <spanclass="s3">1e-8</span> (the default), the rate used will be <spanclass="s3">1.2e-8</span>.<spanclass="Apple-converted-space"></span>No column header line should be present; the file should start immediately with numerical data.<spanclass="Apple-converted-space"></span>The expected separator between columns is a tab character by default, but may be passed in <spanclass="s3">sep</span>; the expected decimal separator is a period by default, but may be passed in <spanclass="s3">dec</span>.<spanclass="Apple-converted-space"></span>Once read, the map is converted into a rate map specified with end positions, rather than start positions, and the position given by <spanclass="s3">lastPosition</span> is used as the end of the last rate region; it should be the last position of the chromosome.</p>
122
-
<pclass="p3">See <spanclass="s3">readCSV()</span> for further details on <spanclass="s3">sep</span> and <spanclass="s3">dec</span>, which are passed through to it; and see <spanclass="s3">initializeRecombinationRate()</span> for details on how the rate map is validated and used.</p>
122
+
<pclass="p3">See <spanclass="s3">readCSV()</span> for further details on <spanclass="s3">sep</span> and <spanclass="s3">dec</span>, which are passed through to it; and see <spanclass="s3">initializeRecombinationRate()</span> for details on how the rate map is validated and used, and how the <spanclass="s3">sex</span> parameter is used.</p>
123
123
<pclass="p3">This function is written in Eidos, and its source code can be viewed with <spanclass="s3">functionSource()</span>, so you can copy and modify its code if you need to modify its functionality.</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 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>
Note that by default in WF models, all mutations of a given mutation type will be converted into
936
937
\f1\fs18 Substitution
937
938
\f2\fs20 objects when they reach fixation, for efficiency reasons. If you need to disable this conversion, to keep mutations of a given type active in the simulation even after they have fixed, you can do so by setting the
@@ -1043,7 +1044,7 @@ The
1043
1044
\f2\fs20 function is a useful convenience function if you wish to read the recombination rate map from a file.\
\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
@@ -8,6 +8,7 @@ Note that not every commit will be logged here; that is what the Github commit h
8
8
development head (in the master branch):
9
9
add recipe 16.11, life-long monogamous mating
10
10
add the ability to suppress the header line of a LogFile, with a new [logical$ header = T] parameter to createLogFile() (#516), and adding [Nl$ header = NULL] for setFilePath()
11
+
add [string$ sex = "*"] parameter to initializeRecombinationRateFromFile(), passed through to initializeRecombinationRate(); fixing an oversight
0 commit comments