gl_to_gp: Normalize genotype likelihoods to posterior probabilities.

View source: R/fast.R

gl_to_gpR Documentation

Normalize genotype likelihoods to posterior probabilities.

Description

This will take genotype log-likelihoods and normalize them to sum to one. This corresponds to using a naive discrete uniform prior over the genotypes. It is not generally recommended that you use this function.

Usage

gl_to_gp(gl)

Arguments

gl

A three dimensional array of genotype log-likelihoods. Element gl[i, j, k] is the genotype log-likelihood of dosage k for individual j at SNP i.

Value

A three-dimensional array, of the same dimensions as gl, containing the posterior probabilities of each dosage.

Author(s)

David Gerard

Examples

data("glike")
class(glike)
dim(glike)
gl_to_gp(glike)


ldsep documentation built on Oct. 19, 2022, 1:08 a.m.