Description Usage Arguments Details Value Author(s) See Also Examples
gpLong2Wide
changes data.frame with genotype probabilities in
long form (one genotype per row) to wide form (one individual per row)
for use in gpi
.
hwp
calculates genotype probabilities according to HardyWeinberg
law for use in gpi
.
1 2  gpLong2Wide(x, id, genotype, prob, trim=TRUE)
hwp(x, trim=TRUE)

x 
data.frame for 
id 
character, column name in 
genotype 
character, column name in 
prob 
character, column name in 
trim 
logical, remove last column (for 
HardyWeinberg probabilities for a gene with two alleles A and B, with probabilities Pr(A) and Pr(B) are:
Pr(AA) = Pr(A)^2
Pr(AB) = 2 * Pr(A) * Pr(A)
Pr(BB) = Pr(B)^2
gpLong2Wide
returns a matrix with number of rows equal to number
of individuals and number of columns equal to number of possible
genotypes.
hwp
returns a vector with HardyWeinberg genotype probabilities.
Gregor Gorjanc
gpi
,
genotype
,
expectedGenotypes
1 2 3 4 5 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.