Learn R Programming

AlphaSimR (version 0.10.0)

setPhenoGCA: Set GCA as phenotype

Description

Calculates general combining ability from a set of testers and returns these values as phenotypes for a population.

Usage

setPhenoGCA(pop, testers, use = "pheno", varE = NULL, reps = 1,
  fixEff = 1L, p = 0.5, inbred = FALSE, onlyPheno = FALSE,
  simParam = NULL)

Arguments

pop

an object of Pop-class

testers

an object of Pop-class

use

true genetic value (gv) or phenotypes (pheno, default)

varE

error variances for phenotype if use="pheno". A vector of length nTraits for independent error or a square matrix of dimensions nTraits for correlated errors.

reps

number of replications for phenotype. See details.

fixEff

fixed effect to assign to the population. Used by genomic selection models only.

p

the p-value for the environmental covariate

inbred

are both pop and testers fully inbred. They are only fully inbred if created by newPop using inbred founders or by the makeDH function

onlyPheno

should only the phenotype be returned, see return

simParam

an object of SimParam

Value

Returns an object of Pop-class or a matrix if onlyPheno=TRUE

Details

The reps parameter is for convient representation of replicated data. It was intended for representation of replicated yield trials in plant breeding programs. In this case, varE is set to the plot error and reps is set to the number plots per entry. The resulting phenotype would reflect the mean of all replications.

Examples

Run this code
# NOT RUN {
#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10, inbred=TRUE)

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addTraitA(10)

#Create population
pop = newPop(founderPop, simParam=SP)

#Set phenotype to average per
pop2 = setPhenoGCA(pop, pop, use="gv", inbred=TRUE, simParam=SP)

# }

Run the code above in your browser using DataLab