-
Notifications
You must be signed in to change notification settings - Fork 49
Introduction
(need to add explanation here: explicit vs implicit, unrooted-semidirected, root and hybrid edges)
PhyloNetworks is a Julia package for phylogenetic networks with functions like
- read/write networks in parenthetical format,
- plot networks,
- change the root,
- estimate the maximum pseudolikelihood network,
- do bootstrap analysis, and
- summary of bootstrap results on networks.
Why Julia? Julia is a high-level and interactive programming language (like R or Matlab), but it is also high-performance (like C). Also, Julia allows for collaborations in an easy way through Github.
You can open Julia from the terminal (if you included the julia executable to your PATH, see requirements) or with the app.
We suggest to update the Julia packages regularly: Pkg.update()
, but
be careful of the "build status"
here.
Pkg.update()
will update to the latest registered version, but you
can also get unregistered changes. More details
here.
Inside Julia, you can use the PhyloNetworks package with
using PhyloNetworks
To change the directory used by julia in a session, say to a folder named "tutorial" in your "Desktop", you have 2 options.
- quit your session, navigate to the directory and restart julia there.
- or change the working directory within your Julia session like this
homedir() # just to show the command homedir() to extract the path to your home directory
cd("$(homedir())/Desktop/tutorial") # changes the working directory
pwd() # just to check: print working directory
If you are going to use the example data, make sure you are inside the
folder baseline.gamma0.3_n300
. If you are using your own data, make
sure that you are in the folder where that data is.
Recall that in parenthetical format, internal nodes can have a name:
To represent networks in parenthetical format, we simply need to split
the hybrid node into two nodes with the same name:
By convention, the hybrid tag is # + H,LGT,R + number
, and the minor
hybrid edge leads to a leaf.
Thus, we get: (((A,(B)#H1),(C,#H1)),D);
. We can write inheritance
probabilities in the parenthetical format: (C,#H1):branch length:bootstrap support:inheritance probability
.
In Julia:
net = readTopology("(((A,(B)#H1:::0.9),(C,#H1:::0.1)),D);")
writeTopology(net)
NOTE: the first time you run a function in Julia, it is compiled. So, it is slow. Subsequent runs of the function are faster.
net
is a Julia object that can be manipulated inside Julia. For
example, you can plot it with:
plot(net)
p=plot(net)
using Gadfly
draw(PDF("myplot.pdf",4inch,4inch),p)
We can also change the root placement to a different edge or node. For this, we need to know the edge/node number, but we get this information if we plot it:
plot(net, showEdgeNumber=true)
rootonedge!(net,1)
plot(net)
WARNING: we need to be careful with the placement of the root, because it should agree with the direction of the hybrid edges.
PhyloNetworks Workshop
- home
- example data
-
TICR pipeline:
from sequences to quartet CFs
- the data
- MrBayes on all genes
- BUCKy
- Quartet MaxCut
- RAxML & ASTRAL
- PhyloNetworks: from quartet CFs or gene trees to phylogenetic networks
- TICR test: is a population tree with ILS sufficient (vs network)?
- Continuous trait evolution on a network