Code Monkey home page Code Monkey logo

badmixture's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.