Starting from a data frame of marker information like that in microhaps or long_markers. This function takes care of all the calculations necessary to simulate log-likelihood ratios of genotypes given different pairwise relationships.

create_ckmr(
  D,
  kappa_matrix = kappas[c("MZ", "PO", "FS", "HS", "U"), ],
  ge_mod_assumed = ge_model_TGIE,
  ge_mod_true = ge_model_TGIE,
  ge_mod_assumed_pars_list = list(epsilon = 0.1),
  ge_mod_true_pars_list = list(epsilon = 0.1)
)

Arguments

D

a data frame in the format of long_markers. Monomorphic loci should have been removed and the whole thing run through reindex_markers before passing it to this function.

kappa_matrix

A matrix like that in the supplied data kappas. It should have three columns, and rownames giving the abbreviated name of the pairwise relationship. Each row is a three-vector which are the Cotterman coefficients for the relationship. The first element is the probability that the pair shares 0 gene copies IBD, the second is the prob that they share 1 gene copy IBD, and the third is the prob that they share 2 gene copies IBD, all assuming no inbreeding. By default, this just uses the "MZ", "PO", "FS", "HS", and "U" rows from kappas.

ge_mod_assumed

The genotyping error model assumed for the analysis.

ge_mod_true

The actual, "true" genotyping error model for the simulation.

ge_mod_assumed_pars_list

a named list of extra arguments (besides L) to be passed to the ge_mod_assumed function. Set it to NULL to use the default values for the genotyping error model.

ge_mod_true_pars_list

a named list of extra arguments (besides L) to be passed to the ge_mod_true function. Set to NULL to use defaults.