Bio.Phylo: Phylogenetic trees and networks
The Bio.Phylo
module is for data types and methods for handling phylogenetic trees and networks.
Phylogenies
#
Phylogenies.Phylogeny
— Type.
Phylogeny represents a phylogenetic tree.
The type is parametric with two parameters C
and B
.
This is because it is common to want to annotate tips, clades, and branches in a phylogeny with data to create a richer model of evolution of do other things like dictate aesthetic values when plotting.
Type parameter C
dictates what datatype can be stored in the phylogeny to annotate clades and tips. Type parameter B
dictates what datatype can be stored in the phylogeny to annotate branches. Think C
for clades and B
for branches.
Constructors
You can create a very simple unresolved phylogeny (a star phylogeny) by providing the tips as a vector of strings or a vector of symbols.
tips = [:A, :B, :C] tree = Phylogeny(tips)
Phylogenies.Phylogeny{Float64,Phylogenies.BasicBranch}({5, 3} directed graph,Phylogenies.Indexer{Int64}(Dict(:C=>3,:B=>2,:A=>1,:Root=>4),Symbol[:A,:B,:C,:Root]),Float64[],Dict{Pair{Int64,Int64},Phylogenies.BasicBranch}(),3,false,true)
tips = ["A", "B", "C"] tree = Phylogeny(tips)
Phylogenies.Phylogeny{Float64,Phylogenies.BasicBranch}({5, 3} directed graph,Phylogenies.Indexer{Int64}(Dict(:C=>3,:B=>2,:A=>1,:Root=>4),Symbol[:A,:B,:C,:Root]),Float64[],Dict{Pair{Int64,Int64},Phylogenies.BasicBranch}(),3,false,true)
Roots
You can test whether such a phylogeny is rooted, is re-rootable, and get the root vertex of a phylogeny. You can also test if a vertex of a phylogeny is a root.
#
Phylogenies.isrooted
— Function.
isrooted(x::Phylogeny)
Test whether a Phylogeny is rooted.
Examples
isrooted(my_phylogeny)
#
Phylogenies.isrerootable
— Function.
isrerootable(x::Phylogeny)
Test whether a Phylogeny is re-rootable.
Examples
isrerootable(my_phylogeny)
#
Phylogenies.root
— Function.
Get the vertex of the tree which represents the root of the tree.
isrooted(tree)
false
isrerootable(tree)
true
root(tree)
4
Divergence time estimation
Phylo
has a submodule called Dating
which contains methods for divergence time estimation between sequences.
Dating methods
Currently Phylo.Dating
has two types which are used as function arguments to dictate how to compute coalescence times. They all inherit from the abstract data type DatingMethod
.
Dating.SimpleEstimate Dating.SpeedDating