updog_update_all: This is the main optimization function for updog.

Description Usage Arguments Value Author(s)

View source: R/update_all.R

Description

This is the main optimization function for updog.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
updog_update_all(ocounts, osize, ploidy, p1counts = NULL, p1size = NULL,
  p2counts = NULL, p2size = NULL, print_val = TRUE, tol = 10^-4,
  maxiter = 500, commit_num = 4, min_disp = 0, update_outmean = FALSE,
  update_outdisp = FALSE, update_outprop = TRUE, update_bias_val = TRUE,
  update_seq_error = TRUE, update_od_param = TRUE, update_pgeno = TRUE,
  p1geno = round(ploidy/2), p2geno = round(ploidy/2), seq_error = 0.01,
  od_param = 0.01, bias_val = 1, out_prop = 0.001, out_mean = 0.5,
  out_disp = 1/3, non_mono_max = 2, bound_bias = FALSE,
  seq_error_mean = -4.7, seq_error_sd = 1, bias_val_mean = 0,
  bias_val_sd = 0.7, allele_freq = 0.5, model = c("f1", "s1", "hw",
  "uniform"), verbose = FALSE)

Arguments

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.

ploidy

A positive integer. The number of copies of the genome in the species. This is the assumed to be the same for all individuals.

p1counts

A vector of non-negative integers. The ith element is the number of reads of the reference allele in the ith sample of parent 1. If NULL then the prior probabilities on parent 1's genotype will default to uniform.

p1size

A vector of positive integers. The ith element is the total number of reads in the ith sample of parent 1. If NULL then the prior probabilities on parent 1's genotype will default to uniform.

p2counts

A vector of non-negative integers. The ith element is the number of reads of the reference allele in the ith sample of parent 2. If NULL then the prior probabilities on parent 2's genotype will default to uniform.

p2size

A vector of positive integers. The ith element is the total number of reads in the ith sample of parent 2. If NULL then the prior probabilities on parent 2's genotype will default to uniform.

print_val

A logical. Should we print the updates (TRUE) or not (FALSE)?

tol

The stopping criterion

maxiter

The maximum number of iterations

commit_num

The number of consecutive iterations where the parental genotypes do not change before we commit to those parental genotypes.

min_disp

The minimum value for the over-dispersion parameter of the outlier distribution. If this gets too small, then we can be overly confident in points being outliers.

update_outmean

A logical. Should we update out_mean (TRUE) or not (FALSE)?

update_outdisp

A logical. Should we update out_mean (TRUE) or not (FALSE)?

update_outprop

A logical. Should we update out_prop (TRUE) or not (FALSE)?

update_bias_val

A logical. Should we update bias_val (TRUE) or not (FALSE)?

update_seq_error

A logical. Should we update seq_error (TRUE) or not (FALSE)?

update_od_param

A logical. Should we update od_param (TRUE) or not (FALSE)?

update_pgeno

A logical. Should we update p1geno and p1geno (TRUE) or not (FALSE)?

p1geno

The initial value of the first parental genotype.

p2geno

The initial value of the second parental genotype.

seq_error

The initial value of the sequencing error rate.

od_param

The initial value of the overdispersion parameter.

bias_val

The initial value of the bias parameter.

out_prop

The initial value of the proportion of points that are outliers.

out_mean

The initial value of the mean of the outlier distribution.

out_disp

The initial value of the over-dispersion parameter of the outlier distribution.

non_mono_max

The maximum number of iterations to allow non-monotonicity of likelihood.

bound_bias

A logical. Should we bound bias_val by a somewhat arbitrary value (TRUE) or not (FALSE)?

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. If you want to constain seq_error to be zero, you need to set update_seq_error = FALSE, seq_error = 0, andseq_error_mean = -Inf.

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. Set seq_error_sd = Inf to have no penalty on the sequencing error rate.

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.

allele_freq

The allele frequency if model = "hw".

model

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

verbose

A logical. Should we output a lot more (TRUE) or not (FALSE)?

Value

A list of the following elements

Author(s)

David Gerard


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