| simEval | R Documentation |
simEval object store specific information of simulation results of breeding scheme.
simEvalName[character] Name of this simulation of breeding schemes
simBsList[list] list of simulation results of breeding scheme (see:simBs; simBsOpt)
verbose[logical] Display info (optional)
new()Create a new simEval object.
simEval$new(simEvalName = "Undefined", simBsList, verbose = TRUE)
simEvalName[character] Name of this evaluation of simulation results
simBsList[list] list of simulation results of breeding scheme (see:simBs; simBsOpt)
verbose[logical] Display info (optional)
A new 'simEval' object.
### create simulation information
mySimInfo <- simInfo$new(simName = "Simulation Example",
simGeno = TRUE,
simPheno = TRUE,
#' nSimGeno = 1,
#' nSimPheno = 3,
#' nCoreMax = 4,
#' nCorePerGeno = 1,
#' nCorePerPheno = 3,
saveDataFileName = NULL)
### create specie information
mySpec <- specie$new(nChr = 3,
lChr = c(100, 150, 200),
specName = "Example 1",
ploidy = 2,
mutRate = 10^-8,
recombRate = 10^-6,
chrNames = c("C1", "C2", "C3"),
nLoci = 100,
recombRateOneVal = FALSE,
effPopSize = 100,
simInfo = mySimInfo,
verbose = TRUE)
### create lociInfo object
myLoci <- lociInfo$new(genoMap = NULL, specie = mySpec)
plot(myLoci, alpha = 0.1)
### create traitInfo object
myTrait <- traitInfo$new(lociInfo = myLoci,
nMarkers = 80,
nTraits = 3,
nQTLs = c(4, 8, 3),
actionTypeEpiSimple = TRUE,
qtlOverlap = TRUE,
nOverlap = c(2, 3, 0),
effCor = 0.1,
propDomi = 0.2,
interactionMean = c(4, 1, 2))
myTrait$plot(alphaMarker = 0.1)
### create bsInfo object
myBsInfo <- bsInfo$new(simInfo = mySimInfo,
specie = mySpec,
lociInfo = myLoci,
traitInfo = myTrait,
geno = NULL,
haplo = NULL,
founderIsInitPop = TRUE,
popNameBase = "Population",
initIndNames = NULL,
verbose = TRUE)
### create cross information object
for (i in 1:10) {
myCrossInfo <- crossInfo$new(parentPopulation = myBsInfo$populations[[myBsInfo$generation]],
method = "randomMate",
nNextPop = 100)
myBsInfo$nextGeneration(crossInfo = myCrossInfo)
}
geno <- myBsInfo$overGeneration()$genoMat
myBsInfo$print()
myBsInfo$plot(plotTarget = "trueAGV",
targetTrait = 1:3,
targetPopulation = 1:11,
plotType = "jitter")
prepareSimRes()start simulation & summary results of breeding scheme
simEval$prepareSimRes()
print()Display information about the object
simEval$print()
plot()Draw figures for visualization of simulation results for summary statistics to compare strategies
simEval$plot( targetTrait = 1, targetPopulation = NULL, plotType = "box", plotTarget = "max", returnGain = TRUE, plotGVMethod = "true", adjust = 1e-05 )
targetTrait[numeric] Target trait. character is OK, but numeric vector corresponding to target traits is preferred. It should be a vector with length 1.
targetPopulation[numeric] Target populations. character is OK, but numeric vector corresponding to target traits is preferred.
plotType[character] We offer "box", "violin", "lines", "density" to draw figures for simulation results.
plotTarget[character] You should select which summary statistics will be plotted. It should be a vector with length 1.
returnGain[logical] Return genetic gain (difference against initial population) or not
plotGVMethod[character] Which type of GV (true GV or estimated GV) will be used for plotting the simulation results
adjust[numeric] the bandwidth used is actually adjust*bw. This makes it easy to specify values like ‘half the default’ bandwidth. (see: 'adjust' in density)
clone()The objects of this class are cloneable with this method.
simEval$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `simEval$new`
## ------------------------------------------------
### create simulation information
mySimInfo <- simInfo$new(simName = "Simulation Example",
simGeno = TRUE,
simPheno = TRUE,
#' nSimGeno = 1,
#' nSimPheno = 3,
#' nCoreMax = 4,
#' nCorePerGeno = 1,
#' nCorePerPheno = 3,
saveDataFileName = NULL)
### create specie information
mySpec <- specie$new(nChr = 3,
lChr = c(100, 150, 200),
specName = "Example 1",
ploidy = 2,
mutRate = 10^-8,
recombRate = 10^-6,
chrNames = c("C1", "C2", "C3"),
nLoci = 100,
recombRateOneVal = FALSE,
effPopSize = 100,
simInfo = mySimInfo,
verbose = TRUE)
### create lociInfo object
myLoci <- lociInfo$new(genoMap = NULL, specie = mySpec)
plot(myLoci, alpha = 0.1)
### create traitInfo object
myTrait <- traitInfo$new(lociInfo = myLoci,
nMarkers = 80,
nTraits = 3,
nQTLs = c(4, 8, 3),
actionTypeEpiSimple = TRUE,
qtlOverlap = TRUE,
nOverlap = c(2, 3, 0),
effCor = 0.1,
propDomi = 0.2,
interactionMean = c(4, 1, 2))
myTrait$plot(alphaMarker = 0.1)
### create bsInfo object
myBsInfo <- bsInfo$new(simInfo = mySimInfo,
specie = mySpec,
lociInfo = myLoci,
traitInfo = myTrait,
geno = NULL,
haplo = NULL,
founderIsInitPop = TRUE,
popNameBase = "Population",
initIndNames = NULL,
verbose = TRUE)
### create cross information object
for (i in 1:10) {
myCrossInfo <- crossInfo$new(parentPopulation = myBsInfo$populations[[myBsInfo$generation]],
method = "randomMate",
nNextPop = 100)
myBsInfo$nextGeneration(crossInfo = myCrossInfo)
}
geno <- myBsInfo$overGeneration()$genoMat
myBsInfo$print()
myBsInfo$plot(plotTarget = "trueAGV",
targetTrait = 1:3,
targetPopulation = 1:11,
plotType = "jitter")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.