This is the main function to use. Pass it a data frame of markers (indexed in order) and it will pass them off to Mendel, drop the genes, do genotyping error and then return a list of vectors which hold the genotype index that you can use to subscript the joint probability vectors with. This function assumes that the loci in df are ordered appropriately (i.e have been run through reindex_markers()) and that the components in C are named Chrom.Locus.Pos, as is typical. Obviously the C list should correspond exactly to the markers/alleles in df.

sample_linked_genotype_pairs(df, ped, C = NULL, num = 1000)

Arguments

df

A data frame in the format of long_markers.

ped

The pedigree to be simulating from

C

a list whose elements contain, at a minimum, the "C-matrices" which give the probability of observed genotypes given true genotypes. If this is NULL (the default), then the function will assume no genotyping error.

num

Number of reps of gene-dropping to do. Default is 1000

Value

This returns a list named by Chrom.Locus.Pos (the names of C), in which each component is a vector of length num that is the integer index of the simulated pair of genotypes.