Simulates recombination and returns vector of 0-1 indicating ancestry.
Intended for intenal use with the generate_offspring
function.
generate_ancestry(d, lambda = 0.012)
d | Vector of genetic distances between sites. Should be the length of the haplotype. |
---|---|
lambda | Recombination rate per unit of genetic distance. Return value: |
A vector of length equal to x1 with each entry 0 or 1, corresponding to the ancestry at each location.