pedIBDatN: Calculates the Pedigree Based Kinship at Native Alleles

pedIBDatNR Documentation

Calculates the Pedigree Based Kinship at Native Alleles

Description

Calculates the kinship at native alleles, which is the pedigree based probability of native alleles to be IBD.

Usage

pedIBDatN(Pedig, thisBreed=NA, keep.only=NULL, keep=keep.only, nGen=NA, quiet=FALSE)

Arguments

Pedig

Data frame containing the pedigree with Indiv (Individual ID), Sire, and Dam in the first 3 columns, column Breed with breed names, and possibly column Sex. Missing parents are coded as NA, 0, or "0".

thisBreed

Name of the breed 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.

nGen

Number of generations taken into account for estimating the native effective size. The default means that the native effective size is not estimated, which requires less memory.

quiet

Should console output be suppressed?

Details

Calculates a list containing matrices needed to compute pedigree based kinships at native alleles, defined as the conditional probability that two randomly chosen alleles are IBD, given that both originate from native founders. A native founder is an individual with unkown parents belonging to thisBreed.

The kinship at native alleles between individuals i and j is Q1[i,j]/Q2[i,j].

The mean kinship at native alleles in the offspring is (x'Q1x+d1)/(x'Q2x+d2), where x is the vector with genetic contributions of the selection candidates.

The native effective size is estimated from nGen generations only if nGen is not NA.

Value

A list of class ratioFun including components:

Q1

matrix with Q1[i,j] = Probability that two alleles chosen from individuals i and j are IBD and are native.

Q2

matrix with Q2[i,j] = Probability that two alleles chosen from individuals i and j are both native.

d1

The value by which the probability that two alleles chosen from the offspring are IBD and native increases due to genetic drift.

d2

The value by which the probability that two alleles chosen from the offspring are native increases due to genetic drift.

id

IDs of the individuals for which the probabilites have been computed.

mean

Mean kinship at native alleles of the individuals specified in argument keep.only. Note that 1-mean is the genetic diversity at native segments of the specified individuals from thisBreed

Author(s)

Robin Wellmann

Examples

data(PedigWithErrors)
data(Phen)
keep  <- Phen$Indiv
Pedig <- prePed(PedigWithErrors, keep=keep, thisBreed="Hinterwaelder", lastNative=1970)
pKinatN <- pedIBDatN(Pedig, thisBreed="Hinterwaelder", keep.only=keep, nGen=6)

#Number of Migrant Founders: 237
#Number of Native  Founders: 150
#Individuals in Pedigree   : 1658
#Native effective size     : 49.5

## Mean kinship at native segments:
pKinatN$mean
#[1] 0.0776925

## Note that this can not be computed as mean(pKinatN$of).

## Results for individuals:
pKinatN$of <- pKinatN$Q1/pKinatN$Q2
pKinatN$of["276000812497583","276000812496823"]
#[1] 0.05941229



optiSel documentation built on Sept. 11, 2024, 7:19 p.m.