Find the most likely number of ancestry waves using the qpWave method.
Source:R/wrappers.R
qpWave.RdGiven a set of 'left' populations, estimate the lowest number of necessary admixture sources related to the set of 'right' populations.
Arguments
- 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,
params = list(allsnps = "YES")orparams = list(blgsize = 0.01)(or an arbitrary combination of parameters using a list with multiple named elements).
Details
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.
Examples
if (FALSE) # 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
)
#> Error: object 'snps' not found
# \dontrun{}