genecont: Calculates Genetic Contributions using Pedigrees.

genecontR Documentation

Calculates Genetic Contributions using Pedigrees.

Description

Calculates the genetic contributions each individual has from specified ancestors.

Usage

genecont(Pedig, from=NULL, to=NULL)

Arguments

Pedig

Data frame containing the pedigree, where the first columns are Indiv (Individual ID), Sire, and Dam.

from

Vector with ancestors whose contributions to the individuals should be calculated. By default, the contributions from all individuals will be calculated.

to

Vector with individuals for which the contributions from ancestors should be calculated. By default, the contributions are calculated for all individuals.

Details

This function calculates genetic contributions of specified ancestors to each individual.

Value

Lower triangular matrix with genetic contributions for each pair of individuals. Column i contains the genetic contribution of ancestor i to all individuals.

Author(s)

Robin Wellmann

Examples


data(ExamplePed)
Pedig <- prePed(ExamplePed)
cont  <- genecont(Pedig)

plot(Pedig$Born, cont[,"276000803611144"], pch=18, ylim=c(0,1))
Pedig["276000803611144",]

#faster:
cont  <- genecont(Pedig, from="276000803611144")
head(cont)
plot(Pedig$Born, cont[,"276000803611144"], pch=18, ylim=c(0,1))

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