Distance
MCPhyloTree.RF — FunctionRF(tree1::T, tree2::T)::Int64 where T <:AbstractNodeCalculate the Robinson-Foulds distance between the two trees. In its current form the function assumes the trees have identical leave sets.
Returns result of algorithm as integer.
tree1: tree used to determine RF distance.tree2: tree used to determine RF distance.
RF(m1::M, m2::M)::Int where M<:MatrixCalculate the Robinson-Foulds distance between the two trees, represented as leave incidedence matrices.
Returns result of algorithm as integer.
m1: tree used to determine RF distance.m2: tree used to determine RF distance.
MCPhyloTree.RF_weighted — FunctionRF_weighted(tree1::T, tree2::T)::Float64 where T <:AbstractNodeCalculate the weighted Robinson-Foulds distance between the two trees. The raw Robinson-Foulds distance is weighted by the maximum distance between the trees. In its current form the function assumes the trees have identical leave sets.
Returns result of algorithm as integer.
tree1: tree used to determine RF distance.tree2: tree used to determine RF distance.
MCPhyloTree.geodesic — Functiongeodesic(tree1::T, tree2::T)::Float64 where T<:GeneralNodeThis function calculates and returns the geodesic distance between two trees.
tree1: root node of the first tree.tree2: root node of the second tree.verbose: If set to 'true', prints the common edge and the leaf contribution.
The GTP algorithm computing the geodesic distance is closely adapted from the Java implementation of that same algorithm by Megan Owen and J. Scott Provan.
(M. Owen and J.S. Provan. A fast algorithm for computing geodesic distances in tree space. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 8:2-13, 2011.)
MCPhyloTree.BHV_bounds — FunctionBHV_bounds(tree1::T, tree2::T)::Tuple{Float64, Float64} where T <:AbstractNodeThis function calculates the lower and upper bounds of the geodesic in the Billera-Holmes-Vogtman space.
Returns tuple of floats.
BHV_bounds(tree1::T, tree2::T)::Tuple{Float64, Float64} where T <:AbstractNodeThis function calculates the lower and upper bounds of the geodesic in the Billera-Holmes-Vogtman space.
Returns tuple of floats.
MCPhyloTree.get_bipartitions — Functionget_bipartitions(tree::T)::Vector{Tuple} where T <:AbstractNodeGet a vector of all bipartions of tree.
Returns a vector containing tuples of sets representing the bipartitions.