function to initialize simulation of a breeding program. A single additive-dominance trait is simulated. Check are used in this scheme

initializeScheme(bsp, nThreadsForMacs = NULL)

Arguments

bsp

A list of breeding scheme parameters. See specifyPipeline and specifyPopulation

nThreadsForMacs

uses the nThreads argument in runMacs2, parallelizes founder sim by chrom.

Value

A list containing: 1. The simulation parameters in SP; 2. The initial records of the breeding program in records. See fillPipeline for details; 3. A completed bsp object

Details

Creates the founders and the initial records at the beginning of the simulation of a breeding program.

Examples

bsp <- specifyPopulation(bsp)
#> Error in mget(setdiff(ls(), "bspNew")): object 'bsp' not found
bsp <- specifyPipeline()
#> Error in if (bsp$nSNP + bsp$nQTL >= bsp$segSites) { print("The number of segregating sites (segSites) has to be greater than the number of SNPs (nSNP) and the number of QTL (nQTL). segSites set 10% bigger than nSNP + nQTL") bsp$segSites <- round((bsp$nSNP + bsp$nQTL) * 1.1) + 1}: argument is of length zero
initList <- initializeScheme(bsp)
#> Error in initializeScheme(bsp): object 'bsp' not found
SP <- initList$SP
#> Error in eval(expr, envir, enclos): object 'initList' not found
bsp <- initList$bsp
#> Error in eval(expr, envir, enclos): object 'initList' not found
records <- initList$records
#> Error in eval(expr, envir, enclos): object 'initList' not found