Re: [R-sig-phylo] sort trees by constraint?

2011-03-25 Thread Klaus Schliep
Dear Brad, here are some solutions for your problems. I assume unrooted trees here and ignore the position of the root, so you may additionaly check for the position of the root. On 3/24/11, Ruhfel Brad ruh...@gmail.com wrote: Dear all, I am wondering if there is some way using R to sort a

Re: [R-sig-phylo] sort trees by constraint?

2011-03-25 Thread Johan Nylander
Hi, Klaus beat me to it, but since there are more ways to do it ;-) Two functions in the APE package are handy: is.monophyletic(), and all.equal.phylo(). See the help for options. They could be used in wrapper functions, like this filter.mono - function (x, grp) { fun - function (x)

[R-sig-phylo] sort trees by constraint?

2011-03-24 Thread Ruhfel Brad
Dear all, I am wondering if there is some way using R to sort a file of multiple trees (i.e., BEAST output) to either 1) return all trees that match a constraint topology (backbone or full topology) or 2) return all trees that have a monophyletic clade of a list of taxa. Any help much