Documentation for SLiM function sharedParentCount, which is a method of the SLiM class Individual. Note that the R function is a stub, it does not do anything in R (except bring up this documentation). It will only do anything useful when used inside a slim_block function further nested in a slim_script function call, where it will be translated into valid SLiM code as part of a full SLiM script.

sharedParentCount(individuals)

Arguments

individuals

An object of type Individual object. See details for description.

Value

An object of type integer.

Details

Documentation for this function can be found in the official SLiM manual: page 684.

Returns a vector containing the number of parents shared between the receiver and each of the individuals in individuals. The number of shared parents between A and B is always 2 if A and B are actually the same individual; this facility works even if SLiM's optional pedigree tracking is not enabled (in which case all other relatedness values will be 0). Otherwise, if pedigree tracking is turned on with initializeSLiMOptions(keepPedigrees=T), this method will use the pedigree information described in section 25.7.1 to construct a relatedness estimate. More specifically, this method uses the parental pedigree IDs from the pedigree records of a pair of individuals to count the number of shared parents between them, such that full siblings (with all of the same parents) have a count of 2, and half siblings (with half of the same parents) have a count of 1. If possible parents of the two individuals are A, B, C, and D, then the shared parent count is as follows, for some illustrative examples. The first column showing the two parents of the first individual, the second column showing the two parents of the second individual; note that the two parents of an individual can be the same due to cloning or selfing: AB CD → 0 (no shared parents) AB CC → 0 (no shared parents) AB AC → 1 (half siblings) AB AA → 1 (half siblings) AA AB → 1 (half siblings) AB AB → 2 (full siblings) AB BA → 2 (full siblings) AA AA → 2 (full siblings) This method does not estimate consanguinity. For example, if one individual is itself a parent of the other individual, that is irrelevant for this method. Similarly, in simulations of sex chromosomes, the sexes of the parents are irrelevant, even if no genetic material would have been inherited from a given parent. See relatedness() for an assessment of pedigree-based relatedness that does estimate the consanguinity of individuals. The sharedParentCount() method is preferable if your exact question is simply whether individuals are full siblings, half siblings, or non-siblings; in other cases, relatedness() is probably more useful.

Author

Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)