PIC {polysat} | R Documentation |
Polymorphic Information Content
Description
Given a set of allele frequencies, this function estimates the Polymorphic Information Content (PIC) for each locus, within and/or across populations.
Usage
PIC(freqs, pops = row.names(freqs), loci = unique(as.matrix(as.data.frame(
strsplit(names(freqs), split = ".", fixed = TRUE),
stringsAsFactors = FALSE))[1, ]), bypop = TRUE, overall = TRUE)
Arguments
freqs |
A data frame of allele frequencies, such as those output by |
pops |
An optional characer vector containing names of populations to include. |
loci |
An optional character vector containing names of loci to include. |
bypop |
If |
overall |
If |
Details
PIC is estimated as:
1 - (\sum_{i = 1}^{n} p_{i}^{2}) - \sum_{i = 1}^{n - 1} \sum_{j = i + 1}^{n} 2p_{i}^{2}p_{j}^{2}
according to Botstein et al. (1980), where p_i
and p_j
are allele frequencies at alleles
i and j, respectively, and n
is the number of alleles.
The higher this value is, the more useful a marker is for distinguishing individuals and understanding relationships among them.
Value
A matrix, with loci in columns, and populations and/or “Overall” in rows. Each element of the matrix contains a PIC value.
Author(s)
Lindsay V. Clark
References
Botstein, M., White, R. L., Skolnick, M. and Davis, R. W. (1980) Construction of a genetic linkage map in man using restriction fragment length polymorphisms. American Journal of Human Genetics 32, 314–331.
See Also
Examples
# generate allele frequencies for this example
myfreq <- data.frame(row.names = c("pop1", "pop2"),
Genomes = c(20,30),
loc1.124 = c(0.1, 0.25),
loc1.126 = c(0.2, 0),
loc1.128 = c(0.05, 0.4),
loc1.130 = c(0.3, 0.1),
loc1.132 = c(0.1, 0.1),
loc1.134 = c(0.25, 0.15),
loc2.150 = c(0.4, 0.5),
loc2.155 = c(0.3, 0.2),
loc2.160 = c(0.3, 0.3))
# estimate PIC
PIC(myfreq)