check_parsimony_clusters: Check whether an allocation of the shifts is parsimonious, in...

View source: R/parsimonyNumber.R

check_parsimony_clustersR Documentation

Check whether an allocation of the shifts is parsimonious, in the "infinite site model".

Description

check_parsimony_clusters takes a vector clusters of the tips, and checks whether the number of groups of the tips induced by this allocation is exactly the number of shifts plus one.

Usage

check_parsimony_clusters(tree, edges, clusters)

Arguments

tree

phylogenetic tree.

clusters

a vector of clusters of the tips of the tree (result of function clusters_from_shifts).

Details

This function computes explicitly the clustering of the tips, using function check_parsimony. By default, this function uses enumerate_tips_under_edges to compute the list of tips under each edge, but a list can be provided (if many tests are done).

Value

boolean : TRUE if the allocation is parsimonious.


PhylogeneticEM documentation built on Aug. 31, 2022, 9:16 a.m.