gen_table <- data.frame(ind=c(1,2,3,4,5,6,7),
mother=c(0,0,2,0,0,5,3),
father=c(0,0,1,0,0,4,6),
sex=c(1,2,2,1,2,1,1)
)
#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, all_nodes = 1, outDir=tempdir())
traceback <-gen.simuHaplo_traceback(sample_gen, 7, 1,
paste(tempdir(), "All_nodes_haplotypes.txt", sep = "/"),
paste(tempdir(), "Proband_Haplotypes.txt", sep="/"))
Run the code above in your browser using DataLab