Distance

MCPhyloTree.RFFunction
RF(tree1::T, tree2::T)::Int64 where T <:AbstractNode

Calculate 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.

source
RF(m1::M, m2::M)::Int where M<:Matrix

Calculate 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.

source
MCPhyloTree.RF_weightedFunction
RF_weighted(tree1::T, tree2::T)::Float64 where T <:AbstractNode

Calculate 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.

source
MCPhyloTree.geodesicFunction
geodesic(tree1::T, tree2::T)::Float64 where T<:GeneralNode

This 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.)

source
MCPhyloTree.BHV_boundsFunction
BHV_bounds(tree1::T, tree2::T)::Tuple{Float64, Float64} where T <:AbstractNode

This function calculates the lower and upper bounds of the geodesic in the Billera-Holmes-Vogtman space.

Returns tuple of floats.

source
BHV_bounds(tree1::T, tree2::T)::Tuple{Float64, Float64} where T <:AbstractNode

This function calculates the lower and upper bounds of the geodesic in the Billera-Holmes-Vogtman space.

Returns tuple of floats.

source
MCPhyloTree.get_bipartitionsFunction
get_bipartitions(tree::T)::Vector{Tuple} where T <:AbstractNode

Get a vector of all bipartions of tree.

Returns a vector containing tuples of sets representing the bipartitions.

source