## conda install ipyrad -c ipyrad
## conda install bucky -c ipyrad
## conda install mrbayes -c biobuilds
import ipyrad as ip
import ipyrad.analysis as ipa
print "ipyrad v.{}".format(ip.__version__)
ipyrad v.0.7.20
import ipyparallel as ipp
ipyclient = ipp.Client()
ip.cluster_info(ipyclient)
host compute node: [40 cores] on sacra
One sample was selected from each major clade that was recovered in every phyogenetic analysis (see notebook 2). Samples were selected that had the most data available and did not appear to be admixed.
bucky_samples = [
"D14269", ## outgroup o
"SF328", ## betamponae 1A
"D13052", ## pilicarpum 1B
"SF276", ## pulchebracteatum 1C
"D14483", ## multinervis 2A
"D14505", ## velutinifolium 2B
"D14478", ## multiflorum 2C
"D12950", ## longistipulatum 3A
"SF224", ## obtusifolium 3B
"D13097", ## compressum 3C
]
## initiate a bucky object
b = ipa.bucky(
name="ten-clades",
data="analysis-ipyrad/Canarium-min10_outfiles/Canarium-min10.alleles.loci",
workdir="analysis-bucky",
samples=bucky_samples,
minsnps=2,
seed=12345,
mb_mcmc_burnin=1000000,
mb_mcmc_ngen=4000000,
mb_mcmc_sample_freq=4000,
bucky_alpha=[0.1, 1.0, 10.0],
bucky_nchains=4,
bucky_nreps=4,
bucky_niter=int(1e6),
)
## run full analysis [write-nex, mb, mbsum, bucky]
b.run(ipyclient=ipyclient, force=True)
wrote 750 nexus files to ~/Documents/Canarium/analysis-bucky/ten-clades [####################] 100% [mb] infer gene-tree posteriors | 2:13:22 | [####################] 100% [mbsum] sum replicate runs | 0:00:01 | [####################] 100% [bucky] infer CF posteriors | 3:16:00 |
## figures were made by hand from parsing the resulting in
## the "Splits in the Primary Concordance Tree" section.
! head -n 50 ./analysis-bucky/ten-clades/CF-a1.0.concordance
translate 1 D14269, 2 SF224, 3 D12950, 4 SF328, 5 D13097, 6 D13052, 7 D14483, 8 SF276, 9 D14478, 10 D14505; Population Tree: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Primary Concordance Tree Topology: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Population Tree, With Branch Lengths In Estimated Coalescent Units: ((((1:10.000,(4:10.000,(6:10.000,8:10.000):0.617):1.512):0.462,((2:10.000,5:10.000):0.161,3:10.000):0.567):0.394,7:10.000):0.103,9:10.000,10:10.000); Primary Concordance Tree with Sample Concordance Factors: ((((1:1.000,(4:1.000,(6:1.000,8:1.000):0.587):0.771):0.446,((2:1.000,5:1.000):0.375,3:1.000):0.392):0.338,7:1.000):0.305,9:1.000,10:1.000); Four-way partitions in the Population Tree: sample-wide CF, coalescent units and Ties(if present) {1,4,6,7,8,9,10; 3|2; 5} 0.432, 0.161, {1,2,3,5,7,9,10; 4|6; 8} 0.640, 0.617, {1; 2,3,5,7,9,10|4; 6,8} 0.853, 1.512, {1,2,3,4,5,6,8; 7|9; 10} 0.399, 0.103, {1,4,6,8; 7,9,10|2,5; 3} 0.622, 0.567, {1; 4,6,8|2,3,5; 7,9,10} 0.580, 0.462, {1,4,6,8; 2,3,5|7; 9,10} 0.550, 0.394, Splits in the Primary Concordance Tree: sample-wide and genome-wide mean CF (95% credibility), SD of mean sample-wide CF across runs {1,2,3,5,7,9,10|4,6,8} 0.771(0.737,0.816) 0.770(0.720,0.825) 0.023 {1,2,3,4,5,7,9,10|6,8} 0.587(0.445,0.693) 0.586(0.443,0.700) 0.066 {1,4,6,8|2,3,5,7,9,10} 0.446(0.401,0.495) 0.446(0.389,0.505) 0.018 {1,4,6,7,8,9,10|2,3,5} 0.392(0.328,0.464) 0.392(0.316,0.475) 0.039 {1,3,4,6,7,8,9,10|2,5} 0.375(0.281,0.443) 0.375(0.278,0.451) 0.033 {1,2,3,4,5,6,8|7,9,10} 0.338(0.279,0.412) 0.337(0.269,0.418) 0.026 {1,2,3,4,5,6,7,8|9,10} 0.305(0.241,0.371) 0.304(0.231,0.380) 0.029 Splits NOT in the Primary Concordance Tree but with estimated CF > 0.050: {1,2,4,6,7,8,9,10|3,5} 0.267(0.180,0.355) 0.267(0.174,0.362) 0.044 {1,2,3,4,5,6,8,10|7,9} 0.220(0.160,0.280) 0.219(0.152,0.289) 0.022 {1,2,3,4,5,6,8,9|7,10} 0.194(0.124,0.247) 0.194(0.120,0.256) 0.026 {1,2,3,5,7,8,9,10|4,6} 0.187(0.137,0.276) 0.187(0.130,0.280) 0.025 {1,4,5,6,7,8,9,10|2,3} 0.150(0.087,0.217) 0.150(0.080,0.225) 0.039 {1,2,3,5,6,7,9,10|4,8} 0.131(0.051,0.225) 0.131(0.047,0.230) 0.047 {1,2,3,5|4,6,7,8,9,10} 0.082(0.037,0.125) 0.082(0.034,0.132) 0.025
## figures were made by hand from parsing the resulting in
## the "Splits in the Primary Concordance Tree" section.
! head -n 50 ./analysis-bucky/ten-clades/CF-a0.1.concordance
translate 1 D14269, 2 SF224, 3 D12950, 4 SF328, 5 D13097, 6 D13052, 7 D14483, 8 SF276, 9 D14478, 10 D14505; Population Tree: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Primary Concordance Tree Topology: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Population Tree, With Branch Lengths In Estimated Coalescent Units: ((((1:10.000,(4:10.000,(6:10.000,8:10.000):0.495):1.514):0.438,((2:10.000,5:10.000):0.170,3:10.000):0.546):0.395,7:10.000):0.140,9:10.000,10:10.000); Primary Concordance Tree with Sample Concordance Factors: ((((1:1.000,(4:1.000,(6:1.000,8:1.000):0.540):0.775):0.445,((2:1.000,5:1.000):0.372,3:1.000):0.394):0.329,7:1.000):0.314,9:1.000,10:1.000); Four-way partitions in the Population Tree: sample-wide CF, coalescent units and Ties(if present) {1,4,6,7,8,9,10; 3|2; 5} 0.438, 0.170, {1,2,3,5,7,9,10; 4|6; 8} 0.594, 0.495, {1; 2,3,5,7,9,10|4; 6,8} 0.853, 1.514, {1,2,3,4,5,6,8; 7|9; 10} 0.420, 0.140, {1,4,6,8; 7,9,10|2,5; 3} 0.614, 0.546, {1; 4,6,8|2,3,5; 7,9,10} 0.570, 0.438, {1,4,6,8; 2,3,5|7; 9,10} 0.551, 0.395, Splits in the Primary Concordance Tree: sample-wide and genome-wide mean CF (95% credibility), SD of mean sample-wide CF across runs {1,2,3,5,7,9,10|4,6,8} 0.775(0.735,0.819) 0.775(0.722,0.826) 0.018 {1,2,3,4,5,7,9,10|6,8} 0.540(0.479,0.604) 0.540(0.468,0.616) 0.010 {1,4,6,8|2,3,5,7,9,10} 0.445(0.409,0.489) 0.445(0.394,0.501) 0.006 {1,4,6,7,8,9,10|2,3,5} 0.394(0.337,0.471) 0.394(0.327,0.478) 0.020 {1,3,4,6,7,8,9,10|2,5} 0.372(0.312,0.447) 0.372(0.300,0.457) 0.026 {1,2,3,4,5,6,8|7,9,10} 0.329(0.271,0.389) 0.329(0.260,0.400) 0.026 {1,2,3,4,5,6,7,8|9,10} 0.314(0.232,0.381) 0.314(0.225,0.392) 0.030 Splits NOT in the Primary Concordance Tree but with estimated CF > 0.050: {1,2,4,6,7,8,9,10|3,5} 0.281(0.171,0.427) 0.281(0.164,0.437) 0.078 {1,2,3,5,7,8,9,10|4,6} 0.204(0.161,0.281) 0.204(0.152,0.284) 0.018 {1,2,3,4,5,6,8,10|7,9} 0.191(0.137,0.265) 0.191(0.130,0.272) 0.020 {1,2,3,4,5,6,8,9|7,10} 0.165(0.117,0.209) 0.165(0.112,0.217) 0.015 {1,2,3,5,6,7,9,10|4,8} 0.150(0.099,0.203) 0.150(0.092,0.212) 0.026 {1,4,5,6,7,8,9,10|2,3} 0.143(0.081,0.212) 0.143(0.076,0.218) 0.035 {1,2,3,5|4,6,7,8,9,10} 0.084(0.043,0.128) 0.084(0.039,0.136) 0.023
## figures were made by hand from parsing the resulting in
## the "Splits in the Primary Concordance Tree" section.
! head -n 50 ./analysis-bucky/ten-clades/CF-a10.0.concordance
translate 1 D14269, 2 SF224, 3 D12950, 4 SF328, 5 D13097, 6 D13052, 7 D14483, 8 SF276, 9 D14478, 10 D14505; Population Tree: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Primary Concordance Tree Topology: ((((1,(4,(6,8))),((2,5),3)),7),9,10); Population Tree, With Branch Lengths In Estimated Coalescent Units: ((((1:10.000,(4:10.000,(6:10.000,8:10.000):0.472):1.619):0.438,((2:10.000,5:10.000):0.200,3:10.000):0.552):0.464,7:10.000):0.060,9:10.000,10:10.000); Primary Concordance Tree with Sample Concordance Factors: ((((1:1.000,(4:1.000,(6:1.000,8:1.000):0.545):0.796):0.443,((2:1.000,5:1.000):0.398,3:1.000):0.415):0.375,7:1.000):0.280,9:1.000,10:1.000); Four-way partitions in the Population Tree: sample-wide CF, coalescent units and Ties(if present) {1,4,6,7,8,9,10; 3|2; 5} 0.454, 0.200, {1,2,3,5,7,9,10; 4|6; 8} 0.584, 0.472, {1; 2,3,5,7,9,10|4; 6,8} 0.868, 1.619, {1,2,3,4,5,6,8; 7|9; 10} 0.372, 0.060, {1,4,6,8; 7,9,10|2,5; 3} 0.616, 0.552, {1; 4,6,8|2,3,5; 7,9,10} 0.570, 0.438, {1,4,6,8; 2,3,5|7; 9,10} 0.581, 0.464, Splits in the Primary Concordance Tree: sample-wide and genome-wide mean CF (95% credibility), SD of mean sample-wide CF across runs {1,2,3,5,7,9,10|4,6,8} 0.796(0.769,0.824) 0.786(0.745,0.826) 0.008 {1,2,3,4,5,7,9,10|6,8} 0.545(0.479,0.632) 0.539(0.463,0.629) 0.010 {1,4,6,8|2,3,5,7,9,10} 0.443(0.371,0.515) 0.437(0.357,0.520) 0.021 {1,4,6,7,8,9,10|2,3,5} 0.415(0.375,0.475) 0.410(0.355,0.479) 0.010 {1,3,4,6,7,8,9,10|2,5} 0.398(0.337,0.471) 0.394(0.324,0.474) 0.024 {1,2,3,4,5,6,8|7,9,10} 0.375(0.321,0.428) 0.370(0.307,0.434) 0.024 {1,2,3,4,5,6,7,8|9,10} 0.280(0.209,0.356) 0.277(0.198,0.361) 0.044 Splits NOT in the Primary Concordance Tree but with estimated CF > 0.050: {1,2,4,6,7,8,9,10|3,5} 0.280(0.208,0.361) 0.278(0.198,0.364) 0.032 {1,2,3,5,7,8,9,10|4,6} 0.225(0.171,0.285) 0.223(0.161,0.292) 0.016 {1,2,3,4,5,6,8,10|7,9} 0.217(0.141,0.289) 0.215(0.134,0.296) 0.038 {1,2,3,4,5,6,8,9|7,10} 0.211(0.152,0.265) 0.209(0.145,0.271) 0.014 {1,2,3,5,6,7,9,10|4,8} 0.149(0.065,0.236) 0.148(0.062,0.236) 0.010 {1,4,5,6,7,8,9,10|2,3} 0.129(0.081,0.175) 0.128(0.078,0.180) 0.014 {1,2,3,5|4,6,7,8,9,10} 0.082(0.044,0.135) 0.081(0.040,0.140) 0.027