Learn R Programming

sommer (version 4.1.4)

DT_cpdata: Genotypic and Phenotypic data for a CP population

Description

A CP population or F1 cross is the designation for a cross between 2 highly heterozygote individuals; i.e. humans, fruit crops, bredding populations in recurrent selection.

This dataset contains phenotpic data for 363 siblings for an F1 cross. These are averages over 2 environments evaluated for 4 traits; color, yield, fruit average weight, and firmness. The columns in the CPgeno file are the markers whereas the rows are the individuals. The CPpheno data frame contains the measurements for the 363 siblings, and as mentioned before are averages over 2 environments.

Usage

data("DT_cpdata")

Arguments

Format

The format is: chr "DT_cpdata"

References

Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744

See Also

The core functions of the package mmer

Examples

Run this code
# NOT RUN {
####=========================================####
#### For CRAN time limitations most lines in the 
#### examples are silenced with one '#' mark, 
#### remove them and run the examples using
#### command + shift + C |OR| control + shift + C
####=========================================####
# 
# data(DT_cpdata)
# DT <- DT_cpdata
# GT <- GT_cpdata
# MP <- MP_cpdata
# #### create the variance-covariance matrix
# A <- A.mat(GT) # additive relationship matrix
# #### look at the data and fit the model
# head(DT)
# mix1 <- mmer(Yield~1,
#               random=~vs(id,Gu=A)
#                       + Rowf + Colf,
#               rcov=~units,
#               data=DT)
# summary(mix1)$varcomp
# 
# ####=========================================####
# #### adding dominance and forcing the other VC's
# ####=========================================####
# 
# DT$idd <- DT$id;
# A <- A.mat(GT) # additive relationship matrix
# D <- D.mat(GT) # dominance relationship matrix
# mm <- matrix(3,1,1);mm ## matrix to fix the var comp
# mix2 <- mmer(Yield~1,
#               random=~vs(id, Gu=A, Gti=mix1$sigma_scaled$`u:id`, Gtc=mm)
#                       + vs(Rowf,Gti=mix1$sigma_scaled$Rowf, Gtc=mm)
#                       + vs(Colf,Gti=mix1$sigma_scaled$Colf, Gtc=mm)
#                       + vs(idd, Gu=D, Gtc=unsm(1)),
#               rcov=~vs(units,Gti=mix1$sigma_scaled$units, Gtc=mm),
#               data=DT)
# summary(mix2)$varcomp
# 
# ####=========================================####
# #### adding dominance and forcing the other VC's  
# #### to customized values you may want to
# ####=========================================####
# 
# DT$idd <- DT$id;
# A <- A.mat(GT) # additive relationship matrix
# D <- D.mat(GT) # dominance relationship matrix
# mm <- matrix(3,1,1);mm ## matrix to fix the var comp
# varY <- var(DT[,"Yield"], na.rm = TRUE)
# mix3 <- mmer(Yield~1,
#              random=~vs(id, Gu=A, Gti=matrix(400/varY), Gtc=mm)
#              + vs(Rowf,Gti=matrix(500/varY), Gtc=mm)
#              + vs(Colf,Gti=mix1$sigma_scaled$Colf, Gtc=mm)
#              + vs(idd, Gu=D, Gtc=unsm(1)),
#              rcov=~vs(units,Gti=mix1$sigma_scaled$units, Gtc=mm),
#              data=DT)
# summary(mix3)$varcomp
# 
# ####====================####
# #### multivariate model ####
# ####     2 traits       ####
# ####====================####
# #### be patient take some time
# ans.m <- mmer(cbind(Yield,color)~1,
#                random=~ vs(id, Gu=A)
#                + vs(Rowf,Gtc=diag(2))
#                + vs(Colf,Gtc=diag(2)),
#                rcov=~ vs(units),
#                data=DT)
# cov2cor(ans.m$sigma$`u:id`)
# 
# }

Run the code above in your browser using DataLab