setPhenoGCA {AlphaSimR} | R Documentation |
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",
h2 = NULL,
H2 = NULL,
varE = NULL,
corE = NULL,
reps = 1,
fixEff = 1L,
p = NULL,
inbred = FALSE,
onlyPheno = FALSE,
simParam = NULL
)
Arguments
pop |
an object of |
testers |
an object of |
use |
true genetic value ( |
h2 |
a vector of desired narrow-sense heritabilities for
each trait. See details in |
H2 |
a vector of desired broad-sense heritabilities for
each trait. See details in |
varE |
error (co)variances for traits.
See details in |
corE |
an optional matrix for correlations between errors.
See details in |
reps |
number of replications for phenotype.
See details in |
fixEff |
fixed effect to assign to the population. Used by genomic selection models only. |
p |
the p-value for the environmental covariate used by GxE traits. If NULL, a value is sampled at random. |
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 |
Value
Returns an object of Pop-class
or
a matrix if onlyPheno=TRUE
Examples
#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)