simgl: Simulate genotype (log) likelihoods from genotype counts

View source: R/rscripts.R

simglR Documentation

Simulate genotype (log) likelihoods from genotype counts

Description

Provide a vector of genotype counts and this will return a matrix of genotype log-likelihoods.

Usage

simgl(nvec, rd = 10, seq = 0.01, bias = 1, od = 0.01)

Arguments

nvec

A vector of counts. nvec[k] is the number of folks with a genotype of k-1.

rd

Read depth. Lower is more uncertain.

seq

Sequencing error rate. Higher means more uncertain.

bias

Bias. 1 means no bias.

od

Overdispersion. Typical value is like 0.01. Higher means more uncertain.

Value

A matrix of genotype log-likelihoods. The rows index the individuals and the columns index the genotypes. This is natural log (base e).

Author(s)

David Gerard

Examples

set.seed(1)
simgl(nvec = c(1, 2, 1, 1, 3))


segtest documentation built on July 1, 2025, 1:07 a.m.