# A small pedigree, two parents and two children.
# A minimal fam table with the three required columns.
# Note "mother" and "father" have missing parent IDs, while children do not
library(tibble)
fam <- tibble(
id = c('father', 'mother', 'child', 'sib'),
pat = c(NA, NA, 'father', 'father'),
mat = c(NA, NA, 'mother', 'mother')
)
# need an `ids` list separating the generations
ids <- list( c('father', 'mother'), c('child', 'sib') )
# initialize parents with this other function
# simulate three chromosomes with these lengths in cM
lengs <- c(50, 100, 150)
founders <- recomb_init_founders( ids[[1]], lengs )
# draw recombination breaks for the children
inds <- recomb_last_gen( founders, fam, ids )
Run the code above in your browser using DataLab