Skip to contents

The function to calculate allele median ratios, proportion of heterozygotes and allele probability values under different assumptions (see details), and their chi-square significance values for duplicate detection

Usage

allele.info(
  X,
  x.norm = NULL,
  Fis,
  method = c("MedR", "QN", "pca", "TMM", "TMMex"),
  logratioTrim = 0.3,
  sumTrim = 0.05,
  Weighting = TRUE,
  Acutoff = -1e+10,
  plot.allele.cov = TRUE,
  verbose = TRUE,
  parallel = FALSE,
  ...
)

Arguments

X

allele depth table generated from the function hetTgen (non-normalized)

x.norm

a data frame of normalized allele coverage, output of cpm.normal. If not provided, calculated using X.

Fis

numeric. Inbreeding coefficient calculated using h.zygosity() function

method

character. method to be used for normalization (see cpm.normal details). Default TMM

logratioTrim

numeric. percentage value (0 - 1) of variation to be trimmed in log transformation

sumTrim

numeric. amount of trim to use on the combined absolute levels (“A” values) for method TMM

Weighting

logical, whether to compute (asymptotic binomial precision) weights

Acutoff

numeric, cutoff on “A” values to use before trimming

plot.allele.cov

logical, plot comparative plots of allele depth coverage in homozygotes and heterozygotes

verbose

logical, whether to print progress

parallel

logical. whether to parallelize the process

...

further arguments to be passed to plot

Value

Returns a data frame of median allele ratio, proportion of heterozygotes, number of heterozygotes, and allele probability at different assumptions with their chi-square significance

Details

Allele information generated here are individual SNP based and presents the proportion of heterozygotes, number of samples, and deviation of allele detection from a 1:1 ratio of reference and alternative alleles. The significance of the deviation is tested with Z-score test \(Z = \frac{ \frac{N}{2}-N_A}{ \sigma_{x}}\), and chi-square test (see references for more details on the method).

References

  • McKinney, G. J., Waples, R. K., Seeb, L. W., & Seeb, J. E. (2017). Paralogs are revealed by proportion of heterozygotes and deviations in read ratios in genotyping by sequencing data from natural populations. Molecular Ecology Resources, 17(4)

  • Karunarathne et al. 2022 (to be added)

Author

Piyal Karunarathne, Pascal Milesi, Klaus Schliep

Examples

if (FALSE) { # \dontrun{
hz<-h.zygosity(vcf,verbose=FALSE)
Fis<-mean(hz$Fis,na.rm = TRUE)
data(ADtable)
AI<-allele.info(ADtable,x.norm=ADnorm,Fis=0.11)
} # }