pedIBDorM | R Documentation |
Calculates the pedigree based probability of alleles to be IBD (identical by descent) or Migrant alleles: For each pair of individuals the probability is computed that two alleles taken at random are IBD or are migrant alleles.
pedIBDorM(Pedig, thisBreed=NA, keep.only=NULL, keep=keep.only)
Pedig |
Data frame containing the Pedigree. The data frame has columns (1) Individual, (2) Sire, (3) Dam, (4) Sex, and (5) Breed. Missing parents are coded as NA. Both parents must either be missing or present. If this is not the case use prePed. |
thisBreed |
Name of the breed in column (5) of the pedigree for which the kinships are to be computed. |
keep |
If |
keep.only |
If |
Computation of modified pedigree based kinship matrices taking allele origin into account.
A native founder is an individual with unkown parents belonging to thisBreed
. A migrant is an individual with unkown parents not belonging to thisBreed
.
A list with the following components:
pedIBDorM |
Matrix containing for individuals i and j the probability that two alleles chosen from the individuals are IBD or at least one of them is a migrant allele (only computed if 1 is in |
pedIBDorMM |
Matrix containing for individuals i and j the probability that two alleles chosen from the individuals are IBD or both are migrant alleles (only computed if 2 is in |
Robin Wellmann
data(PedigWithErrors)
data(Phen)
keep <- Phen$Indiv
Pedig <- prePed(PedigWithErrors, keep=keep, thisBreed="Hinterwaelder", lastNative=1970)
Kin <- pedIBDorM(Pedig, thisBreed="Hinterwaelder", keep.only=keep)
mean(Kin$pedIBDorM)
#[1] 0.8201792
mean(Kin$pedIBDorMM)
#[1] 0.335358
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.