|
5 | 5 | <meta http-equiv="Content-Style-Type" content="text/css"> |
6 | 6 | <title></title> |
7 | 7 | <meta name="Generator" content="Cocoa HTML Writer"> |
8 | | - <meta name="CocoaVersion" content="1894.6"> |
| 8 | + <meta name="CocoaVersion" content="1894.7"> |
9 | 9 | <style type="text/css"> |
10 | 10 | p.p1 {margin: 18.0px 0.0px 3.0px 0.0px; font: 11.0px Optima} |
11 | 11 | p.p2 {margin: 6.0px 0.0px 3.0px 0.0px; font: 11.0px Optima} |
|
340 | 340 | <p class="p3">age <span class="s6"><–></span> (integer$)</p> |
341 | 341 | <p class="p6">The age of the individual, measured in cycles.<span class="Apple-converted-space"> </span>A newly generated offspring individual will have an age of <span class="s1">0</span> in the same tick in which it was created.<span class="Apple-converted-space"> </span>The age of every individual is incremented by one at the same point that its species cycle counter is incremented, at the end of the tick cycle, <i>if and only if</i> its species was active in that tick.<span class="Apple-converted-space"> </span>The age of individuals may be changed; usually this only makes sense when setting up the initial state of a model, however.</p> |
342 | 342 | <p class="p3">color <–> (string$)</p> |
343 | | -<p class="p4">The color used to display the individual in SLiMgui.<span class="Apple-converted-space"> </span>Outside of SLiMgui, this property still exists, but is not used by SLiM.<span class="Apple-converted-space"> </span>Colors may be specified by name, or with hexadecimal RGB values of the form <span class="s1">"#RRGGBB"</span>.<span class="Apple-converted-space"> </span>If <span class="s1">color</span> is the empty string, <span class="s1">""</span>, SLiMgui’s default (fitness-based) color scheme is used; this is the default for new <span class="s1">Individual</span> objects.</p> |
| 343 | +<p class="p6">The color used to display the individual in SLiMgui.<span class="Apple-converted-space"> </span>Outside of SLiMgui, this property still exists, but is not used by SLiM.<span class="Apple-converted-space"> </span>Colors may be specified by name, or with hexadecimal RGB values of the form <span class="s1">"#RRGGBB"</span> (see the Eidos manual).<span class="Apple-converted-space"> </span>If <span class="s1">color</span> is the empty string, <span class="s1">""</span>, SLiMgui’s default (fitness-based) color scheme is used; this is the default for new <span class="s1">Individual</span> objects.<span class="Apple-converted-space"> </span>Note that named colors will be converted to RGB internally, so the value of this property will always be a hexadecimal RGB color string (or <span class="s1">""</span>).</p> |
344 | 344 | <p class="p5"><span class="s3">fitnessScaling <–> (float$)</span></p> |
345 | 345 | <p class="p6"><span class="s3">A </span><span class="s4">float</span><span class="s3"> scaling factor applied to the individual’s fitness (i.e., the fitness value computed for the individual will be multiplied by this value).<span class="Apple-converted-space"> </span>This provides a simple, fast way to modify the fitness of an individual; conceptually it is similar to returning a fitness effect for the individual from a </span><span class="s4">fitnessEffect()</span><span class="s3"> callback, but without the complexity and performance overhead of implementing such a callback.<span class="Apple-converted-space"> </span>To scale the fitness of all individuals in a subpopulation by the same factor, see the </span><span class="s4">fitnessScaling</span><span class="s3"> property of </span><span class="s4">Subpopulation</span><span class="s3">.</span></p> |
346 | 346 | <p class="p6"><span class="s3">The value of </span><span class="s4">fitnessScaling</span><span class="s3"> is reset to </span><span class="s4">1.0</span><span class="s3"> every tick, so that any scaling factor set lasts for only a single tick.<span class="Apple-converted-space"> </span>This reset occurs immediately after fitness values are calculated, in both WF and nonWF models.</span></p> |
|
354 | 354 | <p class="p6"><span class="s3">The second </span><span class="s4">Genome</span><span class="s3"> object associated with this individual.<span class="Apple-converted-space"> </span>This property is particularly useful when you want the second genome from each of a vector of individuals, as often arises in haploid models.</span></p> |
355 | 355 | <p class="p3">index => (integer$)</p> |
356 | 356 | <p class="p4">The index of the individual in the <span class="s1">individuals</span> vector of its <span class="s1">Subpopulation</span><span class="s2">.</span></p> |
| 357 | +<p class="p3">meanParentAge => (float$)</p> |
| 358 | +<p class="p6">The average age of the parents of this individual, measured in cycles.<span class="Apple-converted-space"> </span>Parentless individuals will have a <span class="s1">meanParentAge</span> of <span class="s1">0.0</span>.<span class="Apple-converted-space"> </span>The mean parent age is determined when a new offspring is generated, from the <span class="s1">age</span> property of the parent or parents involved in generating the offspring.<span class="Apple-converted-space"> </span>For <span class="s1">addRecombinant()</span> that is somewhat complex; see that method for details.</p> |
357 | 359 | <p class="p5"><span class="s3">migrant => (logical$)</span></p> |
358 | 360 | <p class="p6"><span class="s3">Set to </span><span class="s8">T</span><span class="s3"> if the individual is a recent migrant, </span><span class="s8">F</span><span class="s3"> otherwise.<span class="Apple-converted-space"> </span>The definition of “recent” depends upon the model type (WF or nonWF).</span></p> |
359 | 361 | <p class="p6"><span class="s3">In WF models, this flag is set at the point when a new child is generated if it is a migrant (i.e., if its source subpopulation is not the same as its subpopulation), and remains valid, with the same value, for the rest of the individual’s lifetime.</span></p> |
|
847 | 849 | <p class="p6"><span class="s3">This method supports several possible configurations for </span><span class="s4">strand1</span><span class="s3">, </span><span class="s4">strand2</span><span class="s3">, and </span><span class="s4">breaks1</span><span class="s3"> (and the same applies for </span><span class="s4">strand3</span><span class="s3">, </span><span class="s4">strand4</span><span class="s3">, and </span><span class="s4">breaks2</span><span class="s3">).<span class="Apple-converted-space"> </span>If </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> are both </span><span class="s4">NULL</span><span class="s3">, the corresponding genome in the generated offspring will be empty, as from </span><span class="s4">addEmpty()</span><span class="s3">, with no parental genomes and no added mutations; in this case, </span><span class="s4">breaks1</span><span class="s3"> must be </span><span class="s4">NULL</span><span class="s3"> or zero-length.<span class="Apple-converted-space"> </span>If </span><span class="s4">strand1</span><span class="s3"> is non-</span><span class="s4">NULL</span><span class="s3"> but </span><span class="s4">strand2</span><span class="s3"> is </span><span class="s4">NULL</span><span class="s3">, the corresponding genome in the generated offspring will be a clonal copy of </span><span class="s4">strand1</span><span class="s3"> with mutations added, as from </span><span class="s4">addCloned()</span><span class="s3">; in this case, </span><span class="s4">breaks1</span><span class="s3"> must similarly be </span><span class="s4">NULL</span><span class="s3"> or zero-length.<span class="Apple-converted-space"> </span>If </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> are both non-</span><span class="s4">NULL</span><span class="s3">, the corresponding genome in the generated offspring will result from recombination between </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> with mutations added, as from </span><span class="s4">addCrossed()</span><span class="s3">, with </span><span class="s4">strand1</span><span class="s3"> being the initial copy strand; copying will switch between strands at each breakpoint in </span><span class="s4">breaks1</span><span class="s3">, which must be non-</span><span class="s4">NULL</span><span class="s3"> but need not be sorted or uniqued (SLiM will sort and unique the supplied breakpoints internally).<span class="Apple-converted-space"> </span>(It is not currently legal for </span><span class="s4">strand1</span><span class="s3"> to be </span><span class="s4">NULL</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> non-</span><span class="s4">NULL</span><span class="s3">; that variant may be assigned some meaning in future.)<span class="Apple-converted-space"> </span>Again, this discussion applies equally to </span><span class="s4">strand3</span><span class="s3">, </span><span class="s4">strand4</span><span class="s3">, and </span><span class="s4">breaks2</span><span class="s3">, <i>mutatis mutandis</i>.<span class="Apple-converted-space"> </span>Note that when new mutations are generated by </span><span class="s4">addRecombinant()</span><span class="s3">, their </span><span class="s4">subpopID</span><span class="s3"> property will be the </span><span class="s4">id</span><span class="s3"> of the offspring’s subpopulation, since the parental subpopulation is ambiguous; this behavior differs from the other </span><span class="s4">add...()</span><span class="s3"> methods.</span></p> |
848 | 850 | <p class="p6"><span class="s3">The </span><span class="s4">sex</span><span class="s3"> parameter is interpreted exactly as in </span><span class="s4">addCrossed()</span><span class="s3">; see that method for discussion.<span class="Apple-converted-space"> </span>If the offspring sex is specified in any way (i.e., if </span><span class="s4">sex</span><span class="s3"> is non-</span><span class="s4">NULL</span><span class="s3">), the strands provided must be compatible with the sex chosen.<span class="Apple-converted-space"> </span>If the offspring sex is not specified (i.e., if </span><span class="s4">sex</span><span class="s3"> is </span><span class="s4">NULL</span><span class="s3">), the sex will be inferred from the strands provided where possible (when modeling an X or Y chromosome), or will be chosen randomly otherwise (when modeling autosomes); it will <i>not</i> be inferred from the sex of the individuals possessing the parental strands, even when the reproductive mode is essentially clonal from a single parent, since such inference would be ambiguous in the general case.<span class="Apple-converted-space"> </span>Similarly, the offspring is considered to have no parents for the purposes of pedigree tracking, since there may be more than two “parents” in the general case.<span class="Apple-converted-space"> </span>When modeling the X or Y, </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> must be X genomes (or </span><span class="s4">NULL</span><span class="s3">), and </span><span class="s4">strand3</span><span class="s3"> and </span><span class="s4">strand4</span><span class="s3"> must both be X genomes or both be Y genomes (or </span><span class="s4">NULL</span><span class="s3">).</span></p> |
849 | 851 | <p class="p6"><span class="s3">These semantics allow several uses for </span><span class="s4">addRecombinant()</span><span class="s3">.<span class="Apple-converted-space"> </span>When all strands are non-</span><span class="s4">NULL</span><span class="s3">, it is similar to </span><span class="s4">addCrossed()</span><span class="s3"> except that the recombination breakpoints are specified explicitly, allowing very precise offspring generation without having to override SLiM’s breakpoint generation with a </span><span class="s4">recombination()</span><span class="s3"> callback.<span class="Apple-converted-space"> </span>When only </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand3</span><span class="s3"> are supplied, it is very similar to </span><span class="s4">addCloned()</span><span class="s3">, creating a clonal offspring, except that the two parental genomes need not belong to the same individual (whatever that might mean biologically).<span class="Apple-converted-space"> </span>Supplying only </span><span class="s4">strand1</span><span class="s3"> is useful for modeling clonally reproducing haploids; the second genome of every offspring will be kept empty and will not receive new mutations.<span class="Apple-converted-space"> </span>For a model of clonally reproducing haploids that undergo horizontal gene transfer (HGT), supplying only </span><span class="s4">strand1</span><span class="s3"> and </span><span class="s4">strand2</span><span class="s3"> will allow HGT from </span><span class="s4">strand2</span><span class="s3"> to replace segments of an otherwise clonal copy of </span><span class="s4">strand1</span><span class="s3">, while the second genome of the generated offspring will again be kept empty; this could be useful for modeling bacterial conjugation, for example.<span class="Apple-converted-space"> </span>Other variations are also possible.</span></p> |
| 852 | +<p class="p6">The value of the <span class="s1">meanParentAge</span> property of the generated offspring is calculated from the mean parent age of each of its two genomes (whether they turn out to be null genomes or not); that may be an average of two values (if both offspring genomes have at least one parent), a single value (if one offspring genome has no parent), or no values (if both offspring genomes have no parent, in which case <span class="s1">0.0</span> results).<span class="Apple-converted-space"> </span>The mean parent age of a given offspring genome is the mean of the ages of the parents of the two strands used to generate that offspring genome; if one strand is <span class="s1">NULL</span> then the mean parent age for that offspring genome is the age of the parent of the non-<span class="s1">NULL</span> strand, while if both strands are <span class="s1">NULL</span> then that offspring genome is parentless and is not used in the final calculation.<span class="Apple-converted-space"> </span>In other words, if one offspring genome has two parents with ages A and B, and the other offspring genome has one parent with age C, the <span class="s1">meanParentAge</span> of the offspring will be (A+B+C+C) / 4, not (A+B+C) / 3.</p> |
850 | 853 | <p class="p6"><span class="s3">Note that gene conversion tracts are not explicitly supported by this method; the </span><span class="s4">breaks</span><span class="s3"> vectors provide crossover breakpoints, which may be used to implement crossovers or simple gene conversion tracts.<span class="Apple-converted-space"> </span>There is no way to specify complex gene conversion tracts with heteroduplex mismatch repair.</span></p> |
851 | 854 | <p class="p6"><span class="s3">Note that this method is only for use in nonWF models.<span class="Apple-converted-space"> </span>See </span><span class="s4">addCrossed()</span><span class="s3"> for further general notes on the addition of new offspring individuals.</span></p> |
852 | 855 | <p class="p5"><span class="s3">– (No<Individual>$)addSelfed(object<Individual>$ parent)</span></p> |
|
0 commit comments