Calculate the
Matching Split Distance
(Bogdanowicz and Giaro 2012; Lin *et al.* 2012) for unrooted binary trees.

MatchingSplitDistance( tree1, tree2 = NULL, normalize = FALSE, reportMatching = FALSE ) MatchingSplitDistanceSplits( splits1, splits2, nTip = attr(splits1, "nTip"), normalize = TRUE, reportMatching = FALSE )

tree1 | Trees of class |
---|---|

tree2 | Trees of class |

normalize | If a numeric value is provided, this will be used as a
maximum value against which to rescale results.
If |

reportMatching | Logical specifying whether to return the clade matchings as an attribute of the score. |

splits1 | Logical matrices where each row corresponds to a leaf,
either listed in the same order or bearing identical names (in any sequence),
and each column corresponds to a split, such that each leaf is identified as
a member of the ingroup ( |

splits2 | Logical matrices where each row corresponds to a leaf,
either listed in the same order or bearing identical names (in any sequence),
and each column corresponds to a split, such that each leaf is identified as
a member of the ingroup ( |

nTip | (Optional) Integer specifying the number of leaves in each split. |

`MatchingSplitDistance()`

returns an array of numerics providing the
distances between each pair of trees in `tree1`

and `tree2`

,
or `splits1`

and `splits2`

.

A normalization value or function must be provided in order to return a normalized value. If you are aware of a generalised formula, please let me know by creating a GitHub issue so that it can be implemented.

Bogdanowicz D, Giaro K (2012).
“Matching split distance for unrooted binary phylogenetic trees.”
*IEEE/ACM Transactions on Computational Biology and Bioinformatics*, **9**(1), 150--160.
doi: 10.1109/TCBB.2011.48
, https://doi.org/10.1109/TCBB.2011.48.

Lin Y, Rajan V, Moret BME (2012).
“A metric for phylogenetic trees based on matching.”
*IEEE/ACM Transactions on Computational Biology and Bioinformatics*, **4**(9), 1014--1022.
doi: 10.1109/TCBB.2011.157
, https://doi.org/10.1109/TCBB.2011.157.

Other tree distances:
`JaccardRobinsonFoulds()`

,
`KendallColijn()`

,
`MASTSize()`

,
`NNIDist()`

,
`NyeSimilarity()`

,
`PathDist()`

,
`Robinson-Foulds`

,
`SPRDist()`

,
`TreeDistance()`

Martin R. Smith (martin.smith@durham.ac.uk)

#> 1 2 3 4 #> 2 0.5625 #> 3 0.6875 0.8750 #> 4 0.4375 0.7500 0.6250 #> 5 0.5000 0.5625 0.8125 0.5625MatchingSplitDistance(TreeTools::BalancedTree(6), TreeTools::PectinateTree(6), reportMatching = TRUE)#> [1] 2 #> attr(,"matching") #> [1] 2 1 3 #> attr(,"pairScores") #> [,1] [,2] [,3] #> [1,] 1 0 1 #> [2,] 0 1 2 #> [3,] 2 1 2 #> attr(,"matchedSplits") #> [1] "t1 t2 t3 | t4 t5 t6 => t4 t5 t6 | t1 t2 t3" #> [2] "t1 t2 | t3 t4 t5 t6 => t3 t4 t5 t6 | t1 t2" #> [3] "t4 t5 | t1 t2 t3 t6 => t5 t6 | t1 t2 t3 t4"