child_gen | R Documentation |
This function is an internal helper function used to calculate the genotypes of children given the parents genotypes.
child_gen(p1, p2)
p1 |
Matrix of genotypes where each row is the genotype of an individual. |
p2 |
Matrix of genotypes where each row is the genotype of an individual. |
The genotypes for a child are calculated by finding the average genotypes of the parents, and randomly rounding non-intergers. SNPs where both parents have 1 are sampled from 0,1, 2.
The function returns a matrix of childrens genotypes where each row is a childs genotype calculated based on the row on p1 and p2 at the same index.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.