#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addTraitAD(10, meanDD=0.5)
SP$setVarE(h2=0.5)
SP$nThreads = 1L
#Create population
pop = newPop(founderPop, simParam=SP)
pop2 = randCross(pop, nCrosses=10, nProgeny=2)
parentAverage(pop2, parents = pop)
parentAverage(pop2, mothers = pop, fathers = pop)
Run the code above in your browser using DataLab