bb_post: Posterior inference in beta-binomial model.

Description Usage Arguments Author(s)

View source: R/updog_bb.R

Description

The main difference between this function and bin_post is that here we also estimate an overdispersion parameter by maximum marginal likelihood.

Usage

1
bb_post(ncounts, ssize, prior, seq_error = NULL, log = FALSE)

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).

log

A logical. Should we return the log probabilties (TRUE) or not (FALSE)?

Author(s)

David Gerard


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