founders with real haplotypes - reworkhow/XSim.jl GitHub Wiki
an example for 2 individuals, 2 chromosomes with different chromosome length,
chromosome 1: 3 loci
chromosome 2: 2 loci
;cat hap.txt
p1 0 1 1 0 0
m1 1 1 1 0 1
p2 1 1 0 1 1
m2 0 1 0 1 1
using XSim
numChr,numLoci,chrLength,mutRate = 2,[3,2],[0.1,0.2],0.0
mapPos = [0.01,0.05,0.09],[0.02,0.05](/reworkhow/XSim.jl/wiki/0.01,0.05,0.09],[0.02,0.05)
geneFreq = [0.50,0.50,0.50],[0.50,0.50](/reworkhow/XSim.jl/wiki/0.50,0.50,0.50],[0.50,0.50)
qtlIndex = [2,3],[1](/reworkhow/XSim.jl/wiki/2,3],[1)
qtlEffects = [randn(2),randn(1)]
build_genome(numChr,chrLength,numLoci,geneFreq,mapPos,qtlIndex,qtlEffects)
popSizeFounder = 2
animals = sampleFounders(popSizeFounder,"hap.txt");
getOurGenotypes(animals)
#2x5 Array{Int64,2}:
# 1 2 2 0 1
# 1 2 0 2 2