normGL: Normalized genotype likelihoods

Description Usage Arguments Value Author(s) Examples

Description

Computes a (normalized) likelihood for each of the three possible genotypes (i.e. AA, AB, and BB) of a diploid individual at a given biallelic site.

Usage

1
normGL(x, error, callthreshold, coding)

Arguments

x

(character vector) specifies the observed counts of the reference allele (allele A) and alternative allele (allele B) at a site for a diploid individual

error

(numeric float) specifies a fix sequencing error rate (errors that may have been introduced in base calling, alignment and assembly. This value may range from 0 to 1. For an error rate of 1 percent, enter 0.01.

callthreshold

(numeric float; optional) only call genotypes with a posterior probability (calculated assuming a uniform prior) of >callthreshold. If no posterior probability is greater than the callthreshold, the function returns NA. If no argument is specified, the function returns the normalized likelihoods (or equivalently, the posterior probabilities calculated assuming a uniform prior on the three genotypes) for all three genotypes.

coding

(character) specifies the format of the function output. The user may select either 'character' or 'numeric'.

Value

Refer to paramemter callthreshold and coding.

Author(s)

Ariel W Chan, ac2278@cornell.edu

Examples

1
2
3
4
5
6
7
normGL(x="1,5", error=0.01, coding="character")
          AA           AB           BB
3.938746e-09 6.216456e-01 3.783544e-01

normGL(x='1,5', error=0.01, coding="numeric")
           0            1            2
3.938746e-09 6.216456e-01 3.783544e-01

ac2278/BIGRED documentation built on May 28, 2019, 3:22 p.m.