TreeOfLife.jl defines data types for cladograms and chronograms in phylogenetics and methods analyzing these trees.
In development.
Alternative packages include:
- Phylo.jl ("in beta", and its outdated prototype Phylogenetics.jl)
- PhyloTrees.jl
- TreeTools.jl
- Phylogenies.jl ("in development")
The followings are some simple examples illustrating the usage of this package. Please see the documentation for more details of TreeOfLife.jl.
julia> using TreeOfLife
julia> tree = fromnewick("(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;")
ChronoTree(ChronoNode[ChronoNode("F", 0, 0, 2, 0.0, 0.0), ChronoNode("A", 1, 3, 0, 0.1, 0.1), ChronoNode("B", 1, 4, 0, 0.2, 0.2), ChronoNode("E", 1, 0, 5, 0.5, 0.5), ChronoNode("C", 4, 6, 0, 0.8, 0.3), ChronoNode("D", 4, 0, 0, 0.9, 0.4)])
julia> tonewick(tree)
"(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;"
julia> tipnames = gettipnames(tree)
4-element Vector{String}:
"A"
"B"
"C"
"D"
julia> getmrca(tree, tipnames)
1
julia> getphylodiv(tree, tipnames)
1.5
julia> ismonophyl(tree, ["A", "B"])
false
julia> ismonophyl(tree, ["C", "D"])
true