conttac: Calculates *Cont*ributions *T*o *A*ge *C*ohorts

Description Usage Arguments Details Value Author(s) Examples

Description

Calculates genetic contributions of other breeds to age cohorts

Usage

1
conttac(cont, cohort, use=rep(TRUE,length(cohort)), mincont=0.05, long=TRUE)

Arguments

cont

Data frame containing the genetic contributions of several ancestors or breeds to all individuals. This is typically the output of function pedBreedComp.

cohort

Numeric vector indicating for every individual the age cohort to which it belongs (typically year of birth).

use

Logical vector indicating for every individual whether it should be included in an age cohort (typically TRUE for individuals belonging to the breed of interest).

mincont

Contributions of breeeds with average contribution smaller than mincont will be summarized in one row

long

Should the resutling data frame be melted for easy plotting?

Details

The genetic contributions from other breeds to all age cohorts are computed. The genetic contribution from a breed is the fraction of genes in the gene pool originating from the respective breed.

Value

Data frame containing the genetic contribution from every breed to every age cohort.

Author(s)

Robin Wellmann

Examples

1
2
3
4
5
6
7
8
data(ExamplePed)
Pedig      <- prePed(ExamplePed, thisBreed="Hinterwaelder", lastNative=1970)
cont       <- pedBreedComp(Pedig, thisBreed="Hinterwaelder")
contByYear <- conttac(cont, Pedig$Born, use=Pedig$Breed=="Hinterwaelder", mincont=0.04, long=FALSE)
round(contByYear,2)

barplot(contByYear, ylim=c(0,1), col=1:10, ylab="genetic contribution",
        legend=TRUE, args.legend=list(x="bottomleft",cex=0.5))

optiSel documentation built on May 1, 2019, 10:29 p.m.