function to create initial records at the start of a simulation

fillPipeline(founders, bsp = NULL, SP)

Arguments

founders

Pop-class object of the founders of the breeding program

bsp

A list of product pipeline parameters. See runBreedingScheme for details

Value

A records object. A list of lists containing nStages+1 lists. The first list contains one Pop-class of progeny per year of the scheme. The remaining lists contain one matrix per year that has individual id, mother, father, stage, phenotypes, and error variances. The individuals have been phenotyped using setPheno. The matrix may contain a mix of experimental and check phenotypes with different levels of replication

Details

This is a structure for a records object that will be used to simulate breeding schemes

Examples

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
bsp <- specifyPopulation(bsp)
#> Error in mget(setdiff(ls(), "bspNew")): object 'bsp' not found
nF1 <- bsp$nCrosses * bsp$nProgeny
#> Error in eval(expr, envir, enclos): object 'bsp' not found
founderHap <- runMacs(nInd=nF1, nChr=bsp$nChr, segSites=bsp$segSites)
#> Error in runMacs(nInd = nF1, nChr = bsp$nChr, segSites = bsp$segSites): object 'nF1' not found
SP <- SimParam$new(founderHap)
#> Error in stopifnot(class(founderPop) == "MapPop"): object 'founderHap' not found
SP$addTraitA(nQtlPerChr=bsp$nQTL, var=bsp$genVar)
#> Error in eval(expr, envir, enclos): object 'SP' not found
SP$addSnpChip(bsp$nSNP)
#> Error in eval(expr, envir, enclos): object 'SP' not found
founders <- newPop(founderHap, simParam=SP)
#> Error in newPop(founderHap, simParam = SP): object 'SP' not found
bsp <- c(bsp, checks=list(NULL))
#> Error in eval(expr, envir, enclos): object 'bsp' not found
records <- fillPipeline(founders, bsp, SP)
#> Error in fillPipeline(founders, bsp, SP): object 'bsp' not found