The main input into this is the list prepared by prep_gsp_for_hap_dropping. This returns a list of the same form, but with a few extra variables in there, the most important of which for future use will be the Samples, which are lists that hold the founder segments that made it into the sampled individuals.

seg_haps_through_gsp(
  G,
  M,
  chrom_len,
  pop_idx_sep = "--%--",
  recomb_model = "always one"
)

Arguments

G

a genome simulation pedigree as a list, ready to go

M

map information. Should be a tibble with start_pos end_pos and rec_prob

chrom_len

The length of the chromosome in base pairs

pop_idx_sep

The string to use to separate the index of the pop and the index of the founder for naming where chromosomal segments come from. It is not recommended that this be changed.

recomb_model

Not used for now, but we will want to add that here, eventually, to specify the kind of recombination model we are using, and then modify recomb_point to accommodate the different choices.

Details

This is a low-level function that the user will not typically use.