Learn R Programming

AlphaSimR (version 0.11.1)

SimParam: Simulation parameters

Description

Container for global simulation parameters. Saving this object as SP will allow it to be accessed by function defaults.

Arguments

Public fields

recombRatio

ratio of genetic recombination in females relative to male

nThreads

number of threads used on platforms with OpenMP support

Active bindings

nChr

number of chromosomes

nTraits

number of traits

nSnpChips

number of SNP chips

segSites

segregating sites per chromosome

gender

is gender used for mating

genMap

"matrix" of chromosome genetic maps

femaleMap

"matrix" of chromosome genetic maps for females

maleMap

"matrix" of chromosome genetic maps for males

sepMap

are there seperate genetic maps for males and females

femaleCentromere

position of centromere on female genetic map

maleCentromere

position of centromere on male genetic map

recombRatio

ratio of genetic recombination in females relative to male

traits

list of trait

snpChips

list of SNP chips

potQtl

list of potential QTL segregating sites

potSnp

list of potential SNP segregating sites

lastId

last ID number assigned

isTrackPed

is pedigree being tracked

pedigree

pedigree matrix for all individuals

isTrackRec

is recombination being tracked

recHist

list of historic recombination events

varA

additive genetic variance in founderPop

varG

total genetic variance in founderPop

varE

default error variance

founderPop

the founder population used for scaling traits

v

the interference parameter for a gamma model of recombination

quadProb

the probability of quadrivalent formation

version

the version of AlphaSimR used to generate this object

Methods

Public methods

Method new()

Usage

SimParam$new(founderPop)

Method updateLastId()

Usage

SimParam$updateLastId(lastId)

Method setTrackPed()

Usage

SimParam$setTrackPed(isTrackPed, force = FALSE)

Method setTrackRec()

Usage

SimParam$setTrackRec(isTrackRec, force = FALSE)

Method resetPed()

Usage

SimParam$resetPed(lastId = 0L)

Method restrSegSites()

Usage

SimParam$restrSegSites(
  maxQtl = 0,
  maxSnp = 0,
  overlap = FALSE,
  minSnpFreq = NULL,
  force = FALSE
)

Method setGender()

Usage

SimParam$setGender(gender, force = FALSE)

Method setMeiosis()

Usage

SimParam$setMeiosis(v = NULL, ratio = NULL, quadProb = NULL, force = FALSE)

Method setVarE()

Usage

SimParam$setVarE(h2 = NULL, H2 = NULL, varE = NULL)

Method setCorE()

Usage

SimParam$setCorE(corE)

Method addSnpChip()

Usage

SimParam$addSnpChip(nSnpPerChr, minSnpFreq = NULL, refPop = NULL)

Method addStructuredSnpChip()

Usage

SimParam$addStructuredSnpChip(nSnpPerChr, structure, force = FALSE)

Method removeSnpChip()

Usage

SimParam$removeSnpChip(chips, force = FALSE)

Method switchSnpChip()

Usage

SimParam$switchSnpChip(lociMap, chip, force = FALSE)

Method manAddSnpChip()

Usage

SimParam$manAddSnpChip(lociMap, force = FALSE)

Method addTraitA()

Usage

SimParam$addTraitA(
  nQtlPerChr,
  mean = 0,
  var = 1,
  corA = NULL,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitAD()

Usage

SimParam$addTraitAD(
  nQtlPerChr,
  mean = 0,
  var = 1,
  meanDD = 0,
  varDD = 0,
  corA = NULL,
  corDD = NULL,
  useVarA = TRUE,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitAG()

Usage

SimParam$addTraitAG(
  nQtlPerChr,
  mean = 0,
  var = 1,
  varGxE = 1e-06,
  varEnv = 0,
  corA = NULL,
  corGxE = NULL,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitADG()

Usage

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

Method addTraitAE()

Usage

SimParam$addTraitAE(
  nQtlPerChr,
  mean = 0,
  var = 1,
  relAA = 0,
  corA = NULL,
  corAA = NULL,
  useVarA = TRUE,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitADE()

Usage

SimParam$addTraitADE(
  nQtlPerChr,
  mean = 0,
  var = 1,
  meanDD = 0,
  varDD = 0,
  relAA = 0,
  corA = NULL,
  corDD = NULL,
  corAA = NULL,
  useVarA = TRUE,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitAEG()

Usage

SimParam$addTraitAEG(
  nQtlPerChr,
  mean = 0,
  var = 1,
  relAA = 0,
  varGxE = 1e-06,
  varEnv = 0,
  corA = NULL,
  corAA = NULL,
  corGxE = NULL,
  useVarA = TRUE,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method addTraitADEG()

Usage

SimParam$addTraitADEG(
  nQtlPerChr,
  mean = 0,
  var = 1,
  varEnv = 1e-06,
  varGxE = 1e-06,
  meanDD = 0,
  varDD = 0,
  relAA = 0,
  corA = NULL,
  corDD = NULL,
  corAA = NULL,
  corGxE = NULL,
  useVarA = TRUE,
  gamma = FALSE,
  shape = 1,
  force = FALSE
)

Method removeTrait()

Usage

SimParam$removeTrait(traits, force = FALSE)

Method switchTrait()

Usage

SimParam$switchTrait(lociMap, trait, varA = NULL, varG = NULL, force = FALSE)

Method manAddTrait()

Usage

SimParam$manAddTrait(
  lociMap,
  varA = NA_real_,
  varG = NA_real_,
  varE = NA_real_,
  force = FALSE
)

Method rescaleTraits()

Usage

SimParam$rescaleTraits(
  mean = 0,
  var = 1,
  varEnv = 0,
  varGxE = 1e-06,
  useVarA = TRUE
)

Method switchFounderPop()

Usage

SimParam$switchFounderPop(founderPop)

Method removeFounderPop()

Usage

SimParam$removeFounderPop()

Method addToPed()

Usage

SimParam$addToPed(lastId, mother, father, isDH)

Method addToRec()

Usage

SimParam$addToRec(hist)

Method switchGenMap()

Usage

SimParam$switchGenMap(genMap, centromere = NULL)

Method switchFemaleMap()

Usage

SimParam$switchFemaleMap(genMap, centromere = NULL)

Method switchMaleMap()

Usage

SimParam$switchMaleMap(genMap, centromere = NULL)

Method clone()

The objects of this class are cloneable with this method.

Usage

SimParam$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.