child_gen: Generator of genotypes for children

View source: R/child_gen.R

child_genR Documentation

Generator of genotypes for children

Description

This function is an internal helper function used to calculate the genotypes of children given the parents genotypes.

Usage

child_gen(p1, p2)

Arguments

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.

Details

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.

Value

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.


Best-Nicklas/Dataprojekt documentation built on June 7, 2022, 12:08 a.m.