This function tests whether a tree is part of a graph. This is useful for testing whether a Y-chromosome tree is consistent with an autosomal admixture graph. Leaf node names matter, but internal node names are ignored.

tree_in_graph(tree, graph)

Arguments

tree

An admixture graph without admixture event

graph

An admixture graph

Value

TRUE if all admixture constraints are satisfied, else FALSE