In A tutorial on how (not) to over-interpret STRUCTURE/ADMIXTURE bar plots, Daniel Falush, Lucy van Dorp and Daniel Lawson discuss how mixture solutions to understand population genetics data may be misinterpreted. This is the R package that performs the analysis in that paper.
Genetic clustering algorithms, implemented in popular programs such as STRUCTURE and ADMIXTURE, have been used extensively in the characterisation of individuals and populations based on genetic data. A successful example is reconstruction of the genetic history of African Americans who are a product of recent admixture between highly differentiated populations. Histories can also be reconstructed using the same procedure for groups which do not have admixture in their recent history, where recent genetic drift is strong or that deviate in other ways from the underlying inference model. Unfortunately, such histories can be misleading. We have implemented an approach to assessing the goodness of fit of the model using the ancestry “palettes” estimated by CHROMOPAINTER and apply it to both simulated and real examples. Combining these complementary analyses with additional methods that are designed to test specific hypothesis allows a richer and more robust analysis of recent demographic history based on genetic data.
To replicate these analyses you need to:
- Run ADMIXTURE/STRUCTURE or similar to obtain a mixture solution
- Run mixPainter (a fork of finestructure version 2) to use chromosome painting to compare all samples to all populations correctly. Note that you can do this yourself with chromopainter, if you know what you are doing, though there are many pitfalls.
- Be familiar enough with R to load these data matrices
- Follow the example from plink data
- Follow the examples in this package from chromopainter data (which are based on the above)
install.packages("devtools")
library(devtools)
install_github("danjlawson/badMIXTURE")
?badMIXTURE # For general instructions
?compareMixtureToData # For the main function that processes the data
?compareMixtureToDataDirect # For more manual reordering etc
?mixturePlot # For plotting