AllelicMeta_est_par is a wrapper function of AllelicMeta_est allowing multiple loci to be given as input (as lists) and focussing solely on obtaining a reliable sequencing error rate and inbreeding coefficient estimate (the population metaparameters), this via extra inputs specifying filter criteria so as to only retain high-quality loci.

AllelicMeta_est_par(
  DataList,
  deltaF = 10^-8,
  maxIT = 100,
  SE_prior = 0.002,
  F_inbr_prior = NULL,
  HetProb = 0.5,
  MinAllele_filt = 0.15,
  SE_filt = 0.035,
  NumSamp_filt = 20,
  MedianCov_filt = 4
)

Arguments

DataList

List of dataframes. Each dataframes should at least contain a column of reference- and variant-allele counts (named "ref_count" and "var_count" respectively).

deltaF

Number. Expectation-Maximisation threshold, minimal difference between two consecutive iterations (default is 1e-08).

maxIT

Number. Maximum number of iterations of the Expectation-Maximisation algorithm (default is 100).

SE_prior

Number. Initial estimate of the sequencing error rate (default is 0.002).

F_inbr_prior

Number. Initial estimate of the inbreeding coefficient used for calculating initial genotype frequencies (default is NULL, in which case the initial genotype frequences all get set to 1/3).

HetProb

Number. Allelic bias in heterozygotes (expected reference over total allele count in RNAseq data; default is 0.5

MinAllele_filt

Number. Minimum allowed estimated minor allele frequency for a locus to be considered in the metaparameter estimates.

SE_filt

Number. Maximum allowed estimated sequencing error rate for a locus to be considered in the metaparameter estimates.

NumSamp_filt

Number. Minimum allowed number of samples for a locus to be considered in the metaparameter estimates.

MedianCov_filt

Number. Minimum allowed median coverage across samples (reference plus variant allele count) for a locus to be considered in the metaparameter estimates.

Value

A list containing the following components:

DataList_out

An updated DataList, now containing each locus' sequencing error estimate (est_SE), inbreeding coefficient estimate (est_inbr), reference allele frequency estimate (allelefreq_prel), preliminary genotype probabilities (prr_prel, prv_prel, pvv_prel) and preliminary genotype (genotype_prel)

SE_vec

Vector of estimated sequencing error rates of reliable loci.

F_vec

Vector of estimated inbreeding coefficients of reliable loci.