Treemix: tree looks as expected but residuals all appear to be 0

354 views
Skip to first unread message

naca...@gmail.com

unread,
Apr 16, 2019, 4:37:33 PM4/16/19
to structure-software
Hello,
I'm trying to run treemix on a wide ranging species with several strongly diverged clades but with cytonuclear discordance and likely historic and current geneflow. 
The dataset I'm working on here is a sub-sampling of individuals with no outgroup. The .treemix file (see attached) was created in Stacks (settings were -m 3; -M 4;-n 3, saving only one SNP per stack to a minimum, minor allele frequency of 5% and found in 90% of all individuals).  It looks fine and when I run it (see below) and the tree is as I expected (attached) but when I try to visualize the residuals  (see readout on below and plot attached) I get residuals that are all pretty much 0. I've tried subsetting SNPs, changing block size and bootstraping. I've also tried running by individual instead of lineage and it shows there is some variation in the residuals (attached) but still less than I was expecting. 
Has anyone experienced this? Any suggestions or advice? Have I missed something?

Thank you for your help,
Best,
Nick

>treemix -i ./K4_36ind.treemix.gz -k 500 -m 2 -o K4_36ind_w2MIG   

TreeMix v. 1.13
$Revision: 231 $

npop:4 nsnp:1671
Estimating covariance matrix in 16 blocks of size 100
SEED: 1555445575
Starting from:
((SOUTHEAST:0,SOUTH:0.087454):0.074632,NORTH:0.074632);
Adding WEST [4/4]
ln(likelihood): -1.2407293 
((SOUTHEAST:0,SOUTH:0.0741054):0.0644104,(NORTH:0.0216482,WEST:0.0749068):0.0644104);
Targeting migration to vicinity of:
SOUTH SOUTHEAST
NORTH SOUTHEAST
NORTH WEST
SOUTH SOUTH

NORTH SOUTHEAST
SOUTH SOUTHEAST
SOUTHEAST SOUTH
SOUTH SOUTHEAST
SOUTHEAST SOUTH
Trying NORTH SOUTHEAST
NORTH:0.0216482 SOUTHEAST:0
1->2 0.32906365 53.898559 -1.2407293
2->1 0.066695184 -1.2407293 53.898559
p1->2 0.50060552 50.833449 53.898559
p2->1 0.0008357527 -1.2407293 53.898559
(WEST:0.0749068,NORTH:0.0216844):0 SOUTHEAST:0
2->1 0.98582369 -1.2407293 53.898559
Trying SOUTH SOUTHEAST
SOUTH:0.0741054 SOUTHEAST:0
p1->2 0.3970964 50.833449 53.898559
p2->1 4.0751289e-05 -1.2407345 53.898559
(SOUTH:0.0741115,SOUTHEAST:0):0.0644104 SOUTHEAST:0
Trying SOUTHEAST SOUTH
SOUTHEAST:0 SOUTH:0.0741115
Migration added
Local updates around node 1: 0 ln(lk):53.898559 
Local updates around node 2: 0 ln(lk):53.898559 
Updates in migration position: 0 ln(lk):53.898559 
Switches in migration direction: 0 ln(lk):53.898559 
ln(likelihood):53.898564 
Targeting migration to vicinity of:
SOUTH WEST
NORTH SOUTHEAST
WEST WEST
SOUTHEAST SOUTHEAST

NORTH SOUTHEAST
WEST SOUTH
SOUTH WEST
SOUTHEAST NORTH
Trying NORTH SOUTHEAST
NORTH:0.0254181 SOUTHEAST:0.0545021
2->1 0.00013324572 53.898578 53.898564
p1->2 0.099995285 53.898572 53.898578
p2->1 0.099995285 53.898669 53.898578
Trying SOUTH WEST
SOUTH:0 WEST:0.0702924
1->2 0.10739353 53.898578 53.898669
2->1 0.099995285 53.898684 53.898669
p1->2 0.92138368 53.898572 53.898684
p2->1 0.099995285 53.898572 53.898684
Trying SOUTHEAST NORTH
SOUTHEAST:0.0545029 NORTH:0.0254333
Trying WEST SOUTH
WEST:0.0703093 SOUTH:1.80096e-05
Migration added
Local updates around node 1: 0 ln(lk):53.898684 
Local updates around node 2: 0 ln(lk):53.898684 
Updates in migration position: 0 ln(lk):53.898684 
Switches in migration direction: 0 ln(lk):53.898684 
ln(likelihood):53.898684 
DONE.



> plot_resid("K4_36ind_w2MIG", "poporder_k4")
[1] 0.002760088
[1] "here"
[1] "1 1 0"
[1] "2 1 0"
[1] "2 2 0"
[1] "3 1 0"
[1] "3 2 0"
[1] "3 3 0"
[1] "4 1 0"
[1] "4 2 0"
[1] "4 3 0"
[1] "4 4 0"
 [1] "#FF0000" "#FF0C00" "#FF1900" "#FF2500" "#FF3200" "#FF3E00" "#FF4B00" "#FF5700" "#FF6400" "#FF7000"
[11] "#FF7D00" "#FF8900" "#FF9600" "#FFA200" "#FFAA00" "#FFB100" "#FFB800" "#FFBF00" "#FFC600" "#FFCC00"
[21] "#FFD300" "#FFDA00" "#FFE100" "#FFE800" "#FFEF00" "#FFF500" "#FFFC00" "#FFFF0C" "#FFFF20" "#FFFF33"
[31] "#FFFF47" "#FFFF5A" "#FFFF6D" "#FFFF81" "#FFFF94" "#FFFFA7" "#FFFFBB" "#FFFFCE" "#FFFFE1" "#FFFFF5"
[41] "#F5FFF5" "#E1FFE1" "#CEFFCE" "#BBFFBB" "#A7FFA7" "#94FF94" "#81FF81" "#6DFF6D" "#5AFF5A" "#47FF47"
[51] "#33FF33" "#20FF20" "#0CFF0C" "#00F806" "#00E519" "#00D12D" "#00BE40" "#00AB53" "#009767" "#00847A"
[61] "#00708E" "#005DA1" "#004AB4" "#0036C8" "#0023DB" "#0010EE" "#0000FB" "#0000E8" "#0000D5" "#0000C1"
[71] "#0000AE" "#00009A" "#000087" "#000074" "#000060" "#00004D" "#00003A" "#000026" "#000013" "#000000"
 [1] 0.500 0.505 0.510 0.515 0.520 0.525 0.530 0.535 0.540 0.545 0.550 0.555 0.560 0.565 0.570 0.575 0.580
[18] 0.585 0.590 0.595 0.600 0.605 0.610 0.615 0.620 0.625 0.630 0.635 0.640 0.645 0.650 0.655 0.660 0.665
[35] 0.670 0.675 0.680 0.685 0.690 0.695 0.700 0.705 0.710 0.715 0.720 0.725 0.730 0.735 0.740 0.745 0.750
[52] 0.755 0.760 0.765 0.770 0.775 0.780 0.785 0.790 0.795 0.800 0.805 0.810 0.815 0.820 0.825 0.830 0.835
[69] 0.840 0.845 0.850 0.855 0.860 0.865 0.870 0.875 0.880 0.885 0.890 0.895 0.900
  WEST NORTH SOUTH SOUTHEAST
1    0     0     0         0
2    0     0     0         0
3    0     0     0         0
4    0     0     0         0
Resid.pdf
K4_36ind.treemix
poporder_k4
tree.pdf
Resid_by_IND.pdf
Reply all
Reply to author
Forward
0 new messages