Samples a population of offspring haplotypes with optional preferred mating.
create_offspring_population(parent_pop, d, n_offspring = 100, lambda = 0.012, scores = NULL, beta = 0)
parent_pop | n x p matrix of parental haplotypes |
---|---|
d | genetic distance |
n_offspring | number of offspring to sample. |
lambda | recombination rate (recombinations per unit genetic distance) |
scores | n-vector of scores for preferred mating (e.g. inner product with first PC) |
beta | intensity of preferred mating. |
ancestry: n_offspring x 2 matrix giving parents for each sampled offspring
children: n_offspring x p matrix giving the offspring haplotypes.