create_offspring_population: Simulate an offspring population

Description Usage Arguments Value

View source: R/offspring_generation.r

Description

Samples a population of offspring haplotypes with optional preferred mating.

Usage

1
2
create_offspring_population(parent_pop, d, n_offspring = 100,
  lambda = 0.012, scores = NULL, beta = 0)

Arguments

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.

Value

ancestry: n_offspring x 2 matrix giving parents for each sampled offspring

children: n_offspring x p matrix giving the offspring haplotypes.


stephenbates19/digitaltwins documentation built on Feb. 25, 2020, 12:41 a.m.