AlphaPart {AlphaPart}R Documentation

AlphaPart.R

Description

A function to partition breeding values by a path variable. The partition method is described in García-Cortés et al., 2008: Partition of the genetic trend to validate multiple selection decisions. Animal : an international journal of animal bioscience. DOI: doi: 10.1017/S175173110800205X

Usage

AlphaPart(x, pathNA, recode, unknown, sort, verbose, profile,
  printProfile, pedType, colId, colFid, colMid, colPath, colBV,
  colBy, center, scaleEBV)

Arguments

x

data.frame , with (at least) the following columns: individual, father, and mother identif ication, and year of birth; see arguments colId, colFid, colMid, colPath, and colBV; see also details about the validity of pedigree.

pathNA

Logical, set dummy path (to "XXX") where path information is unknown (missing).

recode

Logical, internally recode individual, father and, mother identification to 1:n codes, while missing parents are defined with 0; this option must be used if identif ications in x are not already given as 1:n codes, see also argument sort.

unknown

Value(s) used for representing unknown (missing) parent in x; this options has an effect only when recode=FALSE as it is only needed in that situation.

sort

Logical, initially sort x using orderPed() so that children follow parents in order to make imputation as optimal as possible (imputation is performed within a loop from the first to the last unknown birth year); at the end original order is restored.

verbose

Numeric, print additional information: 0 - print nothing, 1 - print some summaries about the data.

profile

Logical, collect timings and size of objects.

printProfile

Character, print profile info on the fly ("fly") or at the end ("end").

pedType

Character, pedigree type: the most common form is "IPP" for Individual, Parent 1 (say father), and Parent 2 (say mother) data; the second form is "IPG" for Individual, Parent 1 (say father), and one of Grandparents of Parent 2 (say maternal grandfather).

colId

Numeric or character, position or name of a column holding individual identif ication.

colFid

Numeric or character, position or name of a column holding father identif ication.

colMid

Numeric or character, position or name of a column holding mother identif ication or maternal grandparent identif ication if pedType="IPG" .

colPath

Numeric or character, position or name of a column holding path information.

colBV

Numeric or character, position(s) or name(s) of column(s) holding breeding Values.

colBy

Numeric or character, position or name of a column holding group information (see details).

center

Logical, if center=TRUE detect a shift in base population mean and attributes it as parent average effect rather than Mendelian sampling effect, otherwise, if center=FALSE, the base population values are only accounted as Mendelian sampling effect. Default is center = TRUE.

scaleEBV

a list with two arguments defining whether is appropriate to center and/or scale the colBV columns in respect to the base population. The list may contain the following components:

  • center: a logical value

  • scale: a logical value. If center = TRUE and scale = TRUE then the base population is set to has zero mean and unit variance.

Details

Pedigree in x must be valid in a sense that there are:

Unknown (missing) values for breeding values are propagated down the pedigree to provide all available values from genetic evaluation. Another option is to cut pedigree links - set parents to unknown and remove them from pedigree prior to using this function - see pedSetBase function. Warning is issued in the case of unknown (missing) values.

In animal breeding/genetics literature the model with the underlying pedigree type "IPP" is often called animal model, while the model for pedigree type "IPG" is often called sire - maternal grandsire model. With a combination of colFid and colMid mother - paternal grandsire model can be accomodated as well.

Argument colBy can be used to directly perform a summary analysis by group, i.e., summary(AlphaPart(...), by="group"). See summary.AlphaPart for more. This can save some CPU time by skipping intermediate steps. However, only means can be obtained, while summary method gives more flexibility.

Value

An object of class AlphaPart, which can be used in further analyses - there is a handy summary method (summary.AlphaPart works on objects of AlphaPart class) and a plot method for its output (plot.summaryAlphaPart works on objects of summaryAlphaPart class). Class AlphaPart is a list. The first length(colBV) components (one for each trait and named with trait label, say trt) are data frames. Each data.frame contains:

The last component of returned object is also a list named info with the following components holding meta information about the analysis:

If colBy!=NULL the resulting object is of a class summaryAlphaPart, see summary.AlphaPart for details.

If profile=TRUE, profiling info is printed on screen to spot any computational bottlenecks.

References

Garcia-Cortes, L. A. et al. (2008) Partition of the genetic trend to validate multiple selection decisions. Animal, 2(6):821-824. doi: 10.1017/S175173110800205X

See Also

summary.AlphaPart for summary method that works on output of AlphaPart, pedSetBase for setting base population, pedFixBirthYear for imputing unknown (missing) birth years, orderPed in pedigree package for sorting pedigree

Examples

## Small pedigree with additive genetic (=breeding) values
ped <- data.frame(  id=c(  1,   2,   3,   4,   5,   6),
                   fid=c(  0,   0,   2,   0,   4,   0),
                   mid=c(  0,   0,   1,   0,   3,   3),
                   loc=c("A", "B", "A", "B", "A", "A"),
                   gen=c(  1,   1,   2,   2,   3,   3),
                  trt1=c(100, 120, 115, 130, 125, 125),
                  trt2=c(100, 110, 105, 100,  85, 110))

## Partition additive genetic values
tmp <- AlphaPart(x=ped, colBV=c("trt1", "trt2"))
print(tmp)

## Summarize by generation (genetic mean)
summary(tmp, by="gen")

## Summarize by generation (genetic variance)
summary(tmp, by="gen", FUN = var)



## There are also two demos
  demo(topic="AlphaPart_deterministic", package="AlphaPart",
       ask=interactive())
  demo(topic="AlphaPart_stochastic",     package="AlphaPart",
       ask=interactive())


[Package AlphaPart version 0.9.8 Index]