Simulate genotype log-likelihoods from a population by gene copy
Simulate genotype log-likelihoods from a population by gene copy
Takes a list of parameters from a genetic dataset, and returns a genotype log-likelihood matrix for individuals simulated by gene copy from the specified collections
gprob_sim_gc(par_list, sim_colls)
Arguments
par_list: genetic data converted to the param_list format by tcf2param_list
sim_colls: a vector of indices for the collections desired for simulation; each element of the list corresponds to an individual
Returns
gprob_sim returns a matrix of the summed log-likelihoods for all loci of a simulated population mixture; columns represent individuals, with each row containing their log-likelihood of belonging to the collection of the same index, given the selection of two independent gene copies from the desired collection of origin's reference allele frequencies
Details
In simulation by gene copy, the genotype at a locus for any individual is the result of two random draws from the allele count matrix of that locus. Draws within an individual are performed without replacement, but allele counts are replaced between individuals.