R package for comparing mixture solutions to similarity data, with a focus STRUCTURE like models to ChromoPainter palettes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
inst
man
.Rbuildignore
.gitignore
DESCRIPTION
LICENSE
Makefile
NAMESPACE
Readme.Md

Readme.Md

badMIXTURE: An R package for how (not) to over-interpret STRUCTURE/ADMIXTURE bar plots

Summary

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.

Abstract

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.

What you need

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)

How to install this package

install.packages("devtools")
library(devtools)
install_github("danjlawson/badMIXTURE")

Important places to look for inline help

?badMIXTURE # For general instructions
?compareMixtureToData # For the main function that processes the data
?compareMixtureToDataDirect # For more manual reordering etc
?mixturePlot # For plotting