Description Usage Arguments Details Value References Examples
Calculate Real or Expected Average Heterozygosity at each locus
1 | RxpHetero(h,p,HWE)
|
h |
a dataset of heterozygosity, made up with 0 and 1. Output of function "Heterozygous". Each row denotes each individual. Each row denotes each locus. |
p |
a dataset of allele frequency, Output of function "AlleleFreq". Each row denotes each allele, and each column denotes each locus. |
HWE |
a logic variable. When TRUE, this function will calculate the expected heterozygosity under Hardy-Weinberg Equilibrium: H= 1-sum(q_i^2); q_i is the allele frequency; If FALSE, this function calculate the average heterozygosity from real heterozygosity table. |
This function calculate average heterozygosity at each locus.Output a vector of number of loci.
a vector of average heterozygosity on each loci.
Chakraborty, R., & Jin, L. (1992, ISSN:1432-1203) <doi:10.1007/BF00197257>
1 2 3 4 5 6 7 8 | x <- data.frame(STR1=c(12,13,13,14,15,13,14,12,14,15),
STR1_1=c(12,14,13,15,13,14,13,12,14,15),
SNP1=c("A","T","A","A","T","A","A","T","T","A"),
SNP1_1=c("A","T","T","T","A","T","A","A","T","T"))
require(mixIndependR)
h <- Heterozygous(x)
p <- AlleleFreq(x)
RxpHetero(h,p,HWE=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.