# pedIBDorM: Calculates Kinships taking Allele Origin into Account In optiSel: Optimum Contribution Selection and Population Genetics

## Description

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.

## Usage

 1 pedIBDorM(Pedig, thisBreed=NA, keep.only=NULL, keep=keep.only)

## Arguments

 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 is provided then kinships are computed only for these animals and their ancestors. keep.only If keep.only is provided then kinships are computed only for these animals.

## Details

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.

## Value

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 method) 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 method)

Robin Wellmann

## Examples

 1 2 3 4 5 6 7 8 9 10 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

optiSel documentation built on Jan. 16, 2021, 5:30 p.m.