gen_table <- data.frame(ind=c(1,2,3,4,5,6,7,8),
mother=c(0,0,2,0,0,5,3,3),
father=c(0,0,1,0,0,4,6,6),
sex=c(1,2,2,1,2,1,1,2)
)
#convert the genealogy table into a GENLIB object
sample_gen<-gen.genealogy(gen_table)
gen.graph(sample_gen)
# Simulate the gene dropping from founders to probamds
gen.simuHaplo(sample_gen, simulNo=5, model = 1, model_params = c(1,1), cM_len=c(100,100),
BP_len = 100000000, outDir=tempdir())
IBD_compare <- gen.simuHaplo_IBD_compare(7, 8, 100000000,
paste(tempdir(), "Proband_Haplotypes.txt", sep="/"))
Run the code above in your browser using DataLab