Uses the updog R package for simulating read counts and generating
genotype log-likelihoods.
Usage
simgl(
nvec,
rdepth = 10,
od = 0.01,
bias = 1,
seq = 0.01,
ret = c("gl", "gp", "all"),
est = FALSE,
...
)
Value
By default, a matrix. The genotype (natural) log likelihoods.
The rows index the individuals and the columns index the dosage. So
gl[i,j] is the genotype log-likelihood for individual i
at dosage j - 1.
Arguments
nvec
The genotype counts. nvec[k] contains the number of
individuals with genotype k-1.
rdepth
The read depth. Lower means more uncertain.
od
The overdispersion parameter. Higher means more uncertain.
bias
The allele bias parameter. Further from 1 means more bias.
Must greater than 0.
seq
The sequencing error rate. Higher means more uncertain.
ret
The return type. Should we just return the genotype
likelihoods ("gl"), just the genotype posteriors
("gp"), or the entire updog output ("all")
est
A logical. Estimate the updog likelihood parameters while
genotype (TRUE) or fix them at the true values (FALSE)?
More realistic simulations would set this to TRUE, but it makes
the method much slower.