uqrmaie1 / admixtools

https://uqrmaie1.github.io/admixtools
71 stars 14 forks source link

Explanation of the functions qpdstat and qpf4ratio #55

Open maruiqi0710 opened 9 months ago

maruiqi0710 commented 9 months ago

Hello, I am using the qpdstat and qpf4ratio functions. I have two questions.

  1. Is the meaning of the plus or minus sign of Z in the results of qpdstat consistent with the description on https://github.com/DReichLab/AdmixTools/blob/master/README.Dstatistics?
  2. The description document for qpf4ratio states: f4 (1, 2; 3, 4)/f4 (1, 2; 5, 4), is it consistent with the alpha=f4 (A, O; X, C)/f4 (A, O; B, C) on https://github.com/DReichLab/AdmixTools/blob/master/README.F4RatioTest? 2 is the outgroup,the population 3 is an admixture of populations 4 and 5。
uqrmaie1 commented 9 months ago

Yes, in both cases it should be consistent. You can easily verify this yourself by comparing the following:

qpdstat('/path/to/geno/prefix', pops[1], pops[2], pops[3], pops[4]) qpdstat_wrapper('/path/to/geno/prefix', pops[1], pops[2], pops[3], pops[4], bin = '/path/to/AdmixTools/bin/qpDstat')

qpf4ratio('/path/to/geno/prefix', pops[1:5]) qpf4ratio_wrapper('/path/to/geno/prefix', pops[1:5], bin='/path/to/AdmixTools/bin/qpF4ratio')

In both comparisons you should get the same or very similar results.