Skip to contents

Compute COI based on residuals of all loci against theoretical curves

Usage

compute_coi_regression(
  data,
  data_type,
  max_coi = 25,
  seq_error = 0.01,
  distance = "squared",
  coi_method = "variant",
  seq_error_bin_size = 20
)

Arguments

data

The data for which the COI will be computed.

data_type

The type of the data to be analyzed. One of "sim" or "real".

max_coi

A number indicating the maximum COI to compare the simulated data to.

seq_error

The level of sequencing error that is assumed. If no value is inputted, then we infer the level of sequence error.

distance

[Deprecated] This argument is no longer supported; this function will solve a weighted least squares minimization problem.

coi_method

The method we will use to generate the theoretical relationship. The method is either "variant" or "frequency". The default value is "variant".

seq_error_bin_size

Number of loci in smallest bin for estimating sequence error

Value

A list of the following:

  • coi: The predicted COI of the sample.

  • probability: A probability density function representing the probability of each COI.