SimParam_addTraitA {AlphaSimR}R Documentation

Add additive traits

Description

Randomly assigns eligble QTLs for one or more additive traits. If simulating more than one trait, all traits will be pleiotrophic with correlated additive effects.

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

corA

a matrix of correlations between additive effects

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$addTraitA(nQtlPerChr, mean = 0, var = 1, corA = NULL, gamma = FALSE, shape = 1, force = FALSE)

Examples

#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)

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


[Package AlphaSimR version 0.10.0 Index]