Description Usage Arguments Value Examples
Calculate the D, f4, f4-ratio, or f3 statistic.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 
| data | EIGENSTRAT data object. | 
| outdir | Where to put all generated files (temporary directory by default). | 
| params | Named list of parameters and their values. | 
| W, X, Y, Z, A, B, C, O | Population names according to the nomenclature used in Patterson et al., 2012. | 
| quartets | List of character vectors (quartets of population/sample labels) | 
| f4mode | Calculate the f4 statistic instead of the D statistic. | 
| inbreed | See README.3PopTest in ADMIXTOOLS for an explanation. | 
Data frame object with calculated statistics
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run: # download an example genomic data set and prepare it for analysis
snps <- eigenstrat(download_data(dirname = tempdir()))
# define a set of populations to analyze
pops <- c("French", "Sardinian", "Han", "Papuan", "Dinka")
result_f4ratio <- f4ratio(
    X = pops, A = "Altai", B = "Vindija", C = "Yoruba", O = "Chimp",
    data = snps
)
result_d <- d(
    W = pops, X = "Yoruba", Y = "Vindija", Z = "Chimp",
    data = snps
)
result_f4 <- f4(
    W = pops, X = "Yoruba", Y = "Vindija", Z = "Chimp",
    data = snps
)
result_f3 <- f3(
    A = pops, B = "Mbuti", C = "Khomani_San",
    data = snps
)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.