forked from DReichLab/AdmixTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.3PopTest
69 lines (47 loc) · 2.99 KB
/
README.3PopTest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
DOCUMENTATION OF 3-Population Test (qp3Pop):
The 3-population test, is a formal test of admixture and can provide clear evidence of
admixture, even if the gene flow events occurred hundreds of generations ago. If we want to test if C has ancestry from populations related to A and B then we can perform the test f3(C; A, B).
If C is unadmixed, then f3 (C ; A, B) has non-negative mean. If f3 (C ; A, B) has negative mean, in contrast, this implies that C is admixed with popu-
lations close to A and B (check the significance of the f3 mean and Z-score).
qp3Pop requires that the input data is available in EIGENSTRAT format. To convert to the appropriate format, one can use CONVERTF program. See README.CONVERTF for documentation of programs for converting file formats.
Executable and source code:
------------------------------------------------------------------------------
For information about installing the program, see README.ADMIXTOOLS. After installing the programs, the executable for 3 pop test (qp3Pop) should be located in the bin directory.
To run qp3Pop, type the following on a linux machine.
$DIR/bin/qp3Pop -p parfile >logfile
$DIR: Path to the bin directory.
logfile: Name of the logfile. The logfile contains the output of the run.
parfile: Name of parameter file
DESCRIPTION OF EACH PARAMETER in parfile:
genotypename: input genotype file (in eigenstrat format)
snpname: input snp file (in eigenstrat format)
indivname: input indiv file (in eigenstrat format)
popfilename: list_qp3test (contains 3 populations on each line <Source1 (A)> <Source2 (B)> < Target (C)>
## optional; but important parameter
inbreed: YES
## Use if target pop is inbred OR (and crucially) if target is pseudo-diploid
*** NEW ***
By default f_3 output is normalized by estimatated heterozygosity
of the target. This doesn't work if the target has no hets as can
happen in "outgroup f_3" mode. In this case set:
outgroupmode: YES
when the f-3 denominator is set to an arbitrary .001
DESCRIPTION OF OUTPUT FILE:
The program will write all the output to stdout. The output file prints the parfile entered by the user, the number of populations included in the popfilename (nplist), the number of blocks for block jackknife, the number of snps included in the run and the results.
The results have the following format -
result: Source1 Source2 Target f_3 std.err Z SNPs
The result for each set of 3 population is shown on a separate line.
See example shown in-
examples/qp3Pop.log
-------------------------------------------------------------------------------
Follow on: qpBound
Computes lower and upper bounds for mixing coeff (source 1) as in "Ancient admixture in human history"
parfile as above EXCEPT
popfilename should contain lines with triple of populations f_3 and Z.
and
outpop: outgroup_pop which MUST be present.
See examples shown in-
examples/qpBound.log
Nick Patterson
------------------------------------------------------------------------------