Skip to content

Deprecated

Hao Cheng edited this page Dec 1, 2016 · 1 revision
set genome information
using XSim
numChr,numLoci,chrLength,mutRate = 2,10,0.1,0.0
mapPos     = collect(0.005:0.01:0.1)
geneFreq   = fill(0.5,numLoci)
qtlMarker  = fill(false,numLoci)
qtlMarker[sample(1:numLoci)]= true
qtlEffects = randn(numLoci)
XSim.init(numChr,numLoci,chrLength,geneFreq,mapPos,qtlMarker,qtlEffects,mutRate);
#generate founders
popSizeFounder = 10
sires = sampleFounders(popSizeFounder);
dams  = sampleFounders(popSizeFounder);

#random mating
ngen,popSize = 5,10
sires1,dams1,gen1 = sampleRan(popSize, ngen, sires, dams);

#selection
nSires,nDams,popSize,ngen,varRes = 2,2,10,5,1.0
sire2,dam2,gen2=sampleSel(popSize, nSires, nDams, ngen,sires, dams, varRes);

#sample from a pedigree
animals = samplePed(pedArray);
Clone this wiki locally