Monday, April 20, 2015

Small bug fix for collapseTree, plotSimmap, plotTree

I just posted a new version of the phytools functin collapseTree. This function is an interactive function for collapsing (& expanding) subtrees on a phylogeny.

This version fixes two bugs in earlier versions. Firstly, prior versions crashed if the user clicked on the root node (which is an attempt to collapse the tree into a single node). This is still not permitted, but the result is that nothing happens and a message is printed. Secondly, prior versions also crashed under certain conditions when the tree was collapsed into two tips. This is actually due to a bug in how the environmental variable "last_plot.phylo" was created. This bug is now fixed in both collapseTree and plotSimmap / plotTree.

Since this function creates an animation there is no point in try to illustrate it here, but the following shows a video of it in use, with these bugs fixed. It also may seem smoother because it is being plotted user a faster machine than before.

This is also in a new non-CRAN version of phytools, and I am hoping to submit an update of phytools to CRAN soon.

No comments:

Post a Comment