up_obj: The objective function

Description Usage Arguments Author(s)

View source: R/updog.R

Description

The objective function

Usage

1
2
up_obj(pival, p1geno, p2geno, alpha, beta, ocounts, osize, dbinommat, qarray,
  r1vec, r2vec)

Arguments

pival

A proportion. The probability of not being a mistake.

p1geno

The genotype of parent 1

p2geno

The genotype of parent 2

alpha

The alpha parameter in dbetabinom.

beta

The beta parameter in dbetabinom.

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.

dbinommat

A matrix. The rows index the genotype and the columns index the offspring. These are the binomial probabilities of the count given the genotype.

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.

Author(s)

David Gerard


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