When you install ipyrad a number of analysis tools are installed as well. This includes the program tetrad, which applies the theory of phylogenetic invariants (see Lake 1987) to infer quartet trees based on a SNP alignment. It then uses the software wQMC to join the quartets into a species tree. This combined approach was first developed by Chifman and Kubatko (2015) in the software SVDQuartets.
## conda install ipyrad -c ipyrad
## conda install toytree -c eaton-lab
import ipyrad.analysis as ipa
import ipyparallel as ipp
import toytree
## connect to a cluster
ipyclient = ipp.Client()
print("connected to {} cores".format(len(ipyclient)))
connected to 4 cores
## initiate a tetrad object
tet = ipa.tetrad(
name="pedic-full",
seqfile="analysis-ipyrad/pedic-full_outfiles/pedic-full.snps.phy",
mapfile="analysis-ipyrad/pedic-full_outfiles/pedic-full.snps.map",
nboots=100,
)
loading seq array [13 taxa x 14159 bp] max unlinked SNPs per quartet (nloci): 2777
## run tetrad on the cluster
tet.run(ipyclient=ipyclient)
host compute node: [4 cores] on oud inferring 715 induced quartet trees [####################] 100% initial tree | 0:00:06 | [####################] 100% boot 100 | 0:01:00 |
## plot the resulting unrooted tree
import toytree
tre = toytree.tree(tet.trees.nhx)
tre.draw(
width=350,
node_labels=tre.get_node_values("support"),
);
## save the tree as a pdf
import toyplot.pdf
toyplot.pdf.render(canvas, "analysis-tetrad/tetrad-tree.pdf")
Not too much currently. But we have plans to expand it. Importantly, however, the code is open source meaning that anybody can read it and contribute it, which is not the case for Paup*. tetrad is also easier to install using conda and therefore easier to setup on an HPC cluster or local machine, and it can be parallelized across an arbitrarily large number of compute nodes while retaining a super small memory footprint.