qpWave | R Documentation |
Given a set of 'left' populations, estimate the lowest number of necessary admixture sources related to the set of 'right' populations.
qpWave(
data,
left,
right,
maxrank = NULL,
details = FALSE,
outdir = NULL,
params = NULL
)
data |
EIGENSTRAT data object. |
left , right |
Character vectors of populations labels. |
maxrank |
Maximum rank to test for. |
details |
Return the A, B matrices used in rank calculations? |
outdir |
Where to put all generated files (temporary directory by default). |
params |
Named list of parameters and their values. For instance,
|
It has been shown (Reich, Nature 2012 - Reconstructing Native American
population history) that if the 'left' populations are mixtures of N
different sources related to the set of 'right' populations, the rank of the
matrix of the form f_4(left_i, left_j; right_k, right_l)
will have a
rank N - 1. This function uses the ADMIXTOOLS command qpWave to find the
lowest possible rank of this matrix that is consistent with the data.
Table of rank test results.
## Not run: # download example data set and prepare it for analysis
snps <- eigenstrat(download_data(dirname = tempdir()))
# run the qpWave wrapper (detailed description in the tutorial vignette)
result <- qpWave(
left = c("French", "Sardinian", "Han"),
right = c("Altai", "Yoruba", "Mbuti"),
data = snps
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.