This function triggers the c code for the categorical method

McCOIL_categorical(
  data,
  maxCOI = 25,
  threshold_ind = 20,
  threshold_site = 20,
  totalrun = 10000,
  burnin = 1000,
  M0 = 15,
  e1 = 0.05,
  e2 = 0.05,
  err_method = 1,
  path = getwd(),
  output = "output.txt",
  thin = 1
)

Arguments

data

An R data frame of SNP calling information. Row names are names of samples and column names are names of assays.

maxCOI

Upper bound for COI. The default is 25.

threshold_ind

The minimum number of sites for a sample to be considered. The default is 20.

threshold_site

The minimum number of samples for a locus to be considered. The default is 20.

totalrun

The total number of MCMC iterations. The default is 10000.

burnin

The total number of burnin iterations. The default is 1000.

M0

Initial COI. The default is 15.

e1

The probability of calling heterozygous loci homozygous. The default is 0.05.

e2

The probability of calling homozygous loci heterozygous. The default is 0.05.

err_method

The default is 1. 1: use pre-specified e1 and e2 and treat them as constants. 2: use likelihood-free sampling for e1 and e2; 3: e1 and e2 are estimated with COI and allele frequencies

path

The default is the current directory.

output

The name of output file. The default is output.txt.

thin

Numeric for how much the chain is thinned. Default = 1, means every iteration is written to file. If it was 0.1 then every 10th iteration is written to file

Value

return summary of output as data.frame