Friday, May 31, 2013

New CRAN version of phytools

There is a new version of phytools (phytools 0.2-80) now available on CRAN. It will probably take a few days for the Mac OS & Windows binaries to be compiled and to percolate through the mirror repositories.

Relative to the most recent CRAN build of phytools (phytools 0.2-70), this version has only a couple of significant updates, as follows:

1. A bug fix in make.simmap(..., type="mcmc"), described here.

2. The addition of the option to plot trees in a circular (type="fan") style to plotSimmap, plotTree, contMap, and densityMap (described here: 1, 2, 3, 4, 5, 6, 7, and 8).

Check it out.

5 comments:

  1. At this rate we'll be seeing version 1.0 before the end of the year!

    ReplyDelete
  2. Hi Liam,

    I just updated to the newest version, and I am having problems with read.simmap():

    > write.simmap(make.simmap(tree, trait, message=F), file='test.tree')
    map order should be specified in function call or by tree attribute "map.order".
    Assuming right-to-left order.

    > read.simmap(file='test.tree')
    Error in start:end : NA/NaN argument

    The previous version I had (sorry, not sure which it was, but wasn't the most recent...) did read the tree fine.

    Also, in case you haven't stumbled across this, the trees created by make.simmap and exported with write.simmap don't open in programs such as figtree ("Error reading tree file: Number format error: For input string: "{1") - which is what lead me to try the new version, but same thing still occurs.

    Thanks!

    ReplyDelete
    Replies
    1. Hi Rafael.

      Yes - I just realized that I changed the default option for the argument "format" in a recent version of read.simmap. write.simmap only writes in version=1.0 and format="phylip", so you should try:

      new.tree<-read.simmap(file="test.tree",format="phylip")
      plotSimmap(new.tree)

      Also - yes, FigTree reads only format="nexus", version=1.5 style stochastic mapped tree format files.

      Let me ask the following: what kind of plot/analysis are you going to do in FigTree and why can't you do it R?

      If it is not easier for me to add this analysis/plot to phytools, or if I don't think it would be useful to other users or interesting to me, I will put it on my "to do" list to update write.simmap so that it can output format="nexus", version=1.5 style tree files. I'm not sure when I'll get to this.

      - Liam

      Delete
  3. ah, that worked! Thanks!

    There's nothing I want to do in FigTree. No worries about that. I just kinda noticed it because I have a "quick preview" and it didn't work. I was worried that this could be some format specificity issue, since right now I am preparing data to deposit no Dryad and obviously want to have it as readable/compatible as possible. But from what you say, I can simply state in the description that the tree is in phylip format, and the user can go from there!

    Thanks again!

    ReplyDelete