up_bb_fix: EM iteration for overdispersed binomial mixture model.

Description Usage Arguments Author(s)

View source: R/updog_bb.R

Description

EM iteration for overdispersed binomial mixture model.

Usage

1
2
3
up_bb_fix(pival, p1geno, p2geno, rho, out_mu, out_rho, ocounts, osize, qarray,
  r1vec, r2vec, pk, update_pival = TRUE, update_rho = TRUE,
  update_geno = FALSE, update_outlier = TRUE, upper_rho = NULL)

Arguments

pival

A fudge factor. The probability of not begin a mistake. Estimated if est_fudge = TRUE. Set to 0.99. Only used if est_fudge = TRUE.

p1geno

The current genotype of parent 1. Must be in 0:ploidy.

p2geno

The current genotype of parent 1. Must be in 0:ploidy.

rho

The overdispersion parameter.

out_mu

The outlier mean.

out_rho

The outlier overdispersion parameter.

ocounts

A vector of non-negative integers. The ith element is the number of reads of the reference allele in the ith child.

osize

A vector of positive integers. The ith element is the total number of reads for the ith child.

qarray

An three-way array of proportions. The (i, j, k)th element is the probability of an offspring having k - 1 reference alleles given that parent 1 has i - 1 refrerence alleles and parent 2 has j - 1 reference alleles. Each dimension of the array is ploidy + 1.

r1vec

A vector of prior probabilities whose ith element is the prior probability that parent 1 has i -1 copies of allele A.

r2vec

A vector of prior probabilities whose ith element is the prior probability that parent 2 has i -1 copies of allele A.

pk

The parameter space. Should all be between 0 and 1.

update_pival

A logical. Should we update the mixture proportion (TRUE) or not (FALSE)?

update_rho

A logical. Should we update the overdispersion parameters (TRUE) or not (FALSE)?

update_geno

A logical. Should we update the parental genotypes (TRUE) or not (FALSE)?

update_outlier

A logical. Should we update the outlier distribution (TRUE) or not (FALSE)?

upper_rho

The upperbound on the overdispersion parameter. Defaults to 1 / (ploidy + 1) which corrsponds to bounding smallest probabilities to have finite density at 0 and 1.

Author(s)

David Gerard


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