Description Usage Arguments Value Note Examples
View source: R/genetic_structure.R
This function estimates common , genetic statistics.
1 2 3 4 5 6 7 8 9 |
x |
An object of type |
stratum |
The stratum to use as groupings (default='Population'). |
mode |
Whic statistic to estimate. Current options include:
|
nperm |
The number of permutations used to test the hypothesis that the parameter = 0. |
size.correct |
A flag indicating that the estimate should be corrected for based upon sample sizes (default=TRUE). |
pairwise |
A flag indicating that the analysis should be done among all pairs of strata. |
locus |
An optional parameter specifying the locus or loci to be used in the analysis. If this is not specified, then all loci are used. |
An object of type data.frame
containing estimates for each locus and a
multilocus estimate. If pairwise=TRUE
, then it returns the multilocus (if more
than one locus) estimate in a matrix format.
The multilocus estimation of these parameters is estimated following the suggestions of Culley et al. (2001) A comparison of two methods of calculating Gst, a genetic measure of population differentiation. American Journal of Botany 89(3): 460-465.
1 2 3 4 5 6 7 8 9 10 | AA <- locus( c("A","A") )
AB <- locus( c("A","B") )
BB <- locus( c("B","B") )
locus <- c(AA,AA,AA,AA,BB,BB,BB,AB,AB,AA)
locus2 <- c(AB,BB,AA,BB,BB,AB,AB,AA,AA,BB)
Population <- c(rep("Pop-A",5),rep("Pop-B",5))
df <- data.frame( Population, TPI=locus, PGM=locus2 )
genetic_structure( df, mode="Gst", nperm=999)
genetic_structure( df, mode="Gst", pairwise=TRUE)
genetic_structure( df, mode="Gst", pairwise=TRUE, locus="TPI" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.