Skip to content

Instantly share code, notes, and snippets.

@coleoguy
coleoguy / dstat.R
Last active June 22, 2018 20:53
This file contains functions implementing ABBA BABA type tests for gene flow between populations. The three functions included are CalcD CalcPartD and CalcPopD. CalcD: This is the original version of the ABBA BABA test and calculates the D-statistic as found in Durand et al 2011 page 2240 CalcPopD: This version of the test is able to use many se…
## ABBA BABA tests
## Heath Blackmon
## coleoguy@gmail.com
## 28 July 2013
## This file has algorithms found in:
## Durand, Eric Y., et al. "Testing for ancient admixture between
## closely related populations." Molecular biology and evolution
## 28.8 (2011): 2239-2252.