bin_post: Calculates posterior probabilities of a genotype given just...

Description Usage Arguments Value Author(s) References

View source: R/updog.R

Description

The function assumes that all data come from independent samples on the same individual.

Usage

1
bin_post(ncounts, ssize, prior, seq_error = 0.01)

Arguments

ncounts

A vector of non-negative integers. The ith element is the number of counts of the ith sample.

ssize

A vector of positive integers. The ith element is the total number of counts of the ith sample.

prior

A vector of non-negative numerics that sum to one. The prior probability on the genotype. The first element is the prior probability of zero reference alleles, the second element is the prior probability of one reference allele, etc. The length of prior is one more than the ploidy of the species. You can alternatively specify prior as the ploidy of the individual, for which it will set a uniform prior on the genotype. For example, setting prior = 3 will result in using (1/4, 1/4, 1/4, 1/4) as the prior probability for the genotypes (Aaaa, AAaa, AAAa, AAAA) where "A" is the reference allele in a 4-ploid individual.

seq_error

A non-negative numeric. This is the known sequencing error rate. This is a rough high-ball error rate given by Li et. al. (2011).

Value

A vector of probabilities. The ith element is the posterior probability that the individual has i - 1 copies of the reference allele.

Author(s)

David Gerard

References

Li, Yun, Carlo Sidore, Hyun Min Kang, Michael Boehnke, and Gon<c3><a7>alo R. Abecasis. "Low-coverage sequencing: implications for design of complex trait association studies." Genome research (2011).


dcgerard/updogAlpha documentation built on May 14, 2019, 3:10 a.m.