setPhenoGCA {AlphaSimR} | R Documentation |
Calculates general combining ability from a set of testers and returns these values as phenotypes for a population.
setPhenoGCA(pop, testers, use = "pheno", varE = NULL, reps = 1, fixEff = 1L, p = 0.5, inbred = FALSE, onlyPheno = FALSE, simParam = NULL)
pop |
an object of |
testers |
an object of |
use |
true genetic value ( |
varE |
error variances for phenotype if |
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 |
onlyPheno |
should only the phenotype be returned, see return |
simParam |
an object of |
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.
Returns an object of Pop-class
or
a matrix if onlyPheno=TRUE
#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)