Learn R Programming

AlphaSimR (version 0.10.0)

SimParam_addTraitADG: Add an additive and dominance GxE trait

Description

Randomly assigns eligble QTLs for a trait with dominance and GxE.

Arguments

nQtlPerChr

number of QTLs per chromosome. Can be a single value or nChr values.

mean

a vector of desired mean genetic values for one or more traits

var

a vector of desired genetic variances for one or more traits

varGxE

a vector of total genotype-by-environment variances for the traits

varEnv

a vector of environmental variances for one or more traits

meanDD

mean dominance degree

varDD

variance of dominance degree

corA

a matrix of correlations between additive effects

corDD

a matrix of correlations between dominance degrees

corGxE

a matrix of correlations between GxE effects

useVarA

tune according to additive genetic variance if true

gamma

should a gamma distribution be used instead of normal

shape

the shape parameter for the gamma distribution

force

should the check for a running simulation be ignored. Only set to TRUE if you know what you are doing.

Usage

SP$addTraitADG(nQtlPerChr, mean = 0, var = 1, varGxE = 1e-6, varEnv = 0, meanDD = 0, varDD = 0, corA = NULL, corDD = NULL, corGxE = NULL, useVarA = TRUE, gamma = FALSE, shape = 1, force = FALSE)

Examples

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

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addTraitADG(10, meanDD=0.5, varGxE=2)

# }

Run the code above in your browser using DataLab