Learn R Programming

nprcgenekeepr (version 1.0.5)

getGenoDefinedParentGenotypes: Assigns parental genotype contributions to an IDs genotype by attributing alleles to sire or dam

Description

Assigns parental genotype contributions to an IDs genotype by attributing alleles to sire or dam

Usage

getGenoDefinedParentGenotypes(alleles, genotype, id, sire, dam, n)

Arguments

alleles

data.frame id, parent, V1 ... Vn A data.frame providing the maternal and paternal alleles for an animal for each iteration. The first two columns provide the animal's ID and whether the allele came from the sire or dam. These are followed by n columns indicating the allele for that iteration.

genotype

A dataframe containing known genotypes. It has three columns: id, first, and second. The second and third columns contain the integers indicating the observed genotypes.

id

A character vector of length one having the ID of interest

sire

character vector with unique identifier for an individual's father (NA if unknown).

dam

character vector with unique identifier for an individual's mother (NA if unknown).

n

integer indicating the number of iterations to simulate.

Value

data.frame id, parent, V1 ... Vn A data.frame providing the maternal and paternal alleles for an animal for each iteration. The first two columns provide the animal's ID and whether the allele came from the sire or dam. These are followed by n columns indicating the allele for that iteration.

This is not correct for situations where one haplotype is not known.