I have a bipartition from tree(a) where only one single mutation hits a specific edge of the (converts 0 to 1 - infinite sites model) and affecting all the descendants of this edge with the mutation 1. For example I might end up with the following bipartition: {A,B,C} | {D,E} where A, B, C, D, and E are leaf labels (taxa).
I'm interested in identifying whether the aforementioned bipartition is compatible with tree(b). In other words, I want to identify whether tree(b) contains that bipartition. Is there any package in R that could assist in doing this?
1 answer
The
subtrees()
function in ape will return all subtrees given a phylogenetic tree. You can then use simple tree distances or string matching to see whether or not your subtree of interest exists in the list of subtrees. This is the easiest way I've found to do this absent a function in a package that combines both steps into a single call.
Log in to answer this question.