update_good: Update the OK points

Description Usage Arguments Author(s)

View source: R/update_all.R

Description

Update the OK points

Usage

1
2
3
4
5
6
7
update_good(parvec, ocounts, osize, weight_vec, ploidy, p1counts = NULL,
  p1size = NULL, p1weight = NULL, p2counts = NULL, p2size = NULL,
  p2weight = NULL, p1geno = NULL, p2geno = NULL, allele_freq = 0.5,
  bound_bias = FALSE, update_bias_val = TRUE, update_seq_error = TRUE,
  update_od_param = TRUE, seq_error_mean = -4.7, seq_error_sd = 1,
  bias_val_mean = 0, bias_val_sd = 0.7, model = c("f1", "s1", "hw",
  "uniform"), verbose = FALSE)

Arguments

parvec

A vector of three elements, s, ell, and r. We have s = log(bias_val) = log(d), ell = logit(seq_error) = logit(eps), and r = - logit(od_param) = - logit(tau).

ocounts

The observed counts of the refernce allele for each individual.

osize

The observed number of reads for each individuals.

weight_vec

A vector of weights obtained via the E-step.

ploidy

An integer. The ploidy of the species. This is assumed to be the same for each individual.

p1counts

The number of reference alleles observed from parent 1.

p1size

The number of reads observed from parent 1.

p1weight

The posterior probability that parent 1 is not an outlier.

p2counts

The number of reference alleles observed from parent 2.

p2size

The number of reads observed from parent 2.

p2weight

The posterior probability that parent 2 is not an outlier.

p1geno

The genotype of parent 1 if model = "f1" or model = "s1".

p2geno

The genotype of parent 2 if model = "f1". This needs to be null if model = "s1"

allele_freq

The allele-frequency if model = "hw"

bound_bias

A logical. Should we bound the bias parameter parvec[1] by a somewhat arbitrary value (TRUE) or not (FALSE)?

update_bias_val

A logical. Should we update the bias parameter (the first position of parvec)?

update_seq_error

A logical. Should we update the sequencing error parameter (the second position of parvec)?

update_od_param

A logical. Should we update the overdispersion parameter (the third position of parvec)?

seq_error_mean

The mean of the logit-normal prior on the sequencing error rate, which corresponds to parvec[2]. Set seq_error_sd = Inf to have no penalty on the sequencing error rate. The default is -4.7, which roughly corresponds to a mean sequencing error value of 0.009.

seq_error_sd

The standard deviation of the logit-normal prior on the sequencing error rate, which corresponds to parvec[2]. The default is 1, which at three standard deviations is about a sequencing error rate of 0.15.

bias_val_mean

The prior mean on the log of bias_val (corresponding to parvec[1]). Set bias_val_sd = Inf to have no penalty on the bias parameter.

bias_val_sd

The prior standard deviation on the log of bias_val (corresponding to parvec[1]). Set bias_val_sd = Inf to have no penalty on the bias parameter.

model

The model for the genotype distribution. Should we assume an F1 population ("f1"), an S1 population ("s1"), Hardy-Weinberg equilibrium ("hw"), or a uniform distribution ("uniform")?

verbose

A logical. Should we write more output TRUE or not FALSE?

Author(s)

David Gerard


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