Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 = NULL,
  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 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 newPop using inbred founders or by the makeDH function

onlyPheno

should only the phenotype be returned, see return

simParam

an object of SimParam

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.

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)

AlphaSimR

Breeding Program Simulations

v0.13.0
MIT + file LICENSE
Authors
Chris Gaynor [aut, cre] (<https://orcid.org/0000-0003-0558-6656>), Gregor Gorjanc [aut] (<https://orcid.org/0000-0001-8008-2787>), John Hickey [aut] (<https://orcid.org/0000-0001-5675-3974>), Daniel Money [ctb] (<https://orcid.org/0000-0001-5151-3648>), David Wilson [ctb]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.