simgl {hwep} | R Documentation |
Simulator for genotype likelihoods.
Description
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,
...
)
Arguments
nvec |
The genotype counts. |
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 ( |
est |
A logical. Estimate the updog likelihood parameters while
genotype ( |
... |
Additional arguments to pass to
|
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.
Author(s)
David Gerard
Examples
set.seed(1)
simgl(c(1, 2, 1, 0, 0), model = "norm", est = TRUE)
simgl(c(1, 2, 1, 0, 0), model = "norm", est = FALSE)