Monday, January 13, 2014

Making unique treesets

unique.multiPhylo doesn't toss out duplicate trees with my dataset. The problem isn't all.identical.phylo: my function compare.all.trees is slow, but it does seem to detect pairwise tree identity properly (there are 16 in the treeset I have) using all.equal.phylo. The issue is with indexing: replacing 'for s in x[keep]' to index the trees with 'for s in 1:length(keep)' and then comparing with x[[s]] solves it.

I also added to the output an attribute that indexes the original trees to the new (unique) trees. The updated function is at 

http://mor-systematics.googlecode.com/svn/trunk/rads/unique.multiPhylo.R

This finishes step 2 of the analysis workflow from last week.

No comments:

Post a Comment