Thursday, June 23, 2011

Addendum to make.simmap() post

A couple of things to add to the last post:

1) I have "confirmed" that $lik.anc in ace() from the {ape} package does indeed return the (rescaled) conditional likelihoods in the sense given on p. 254 of Felsenstein's (2004) book. When I say "confirmed," I do so with quotes - because I mean I worked a simple numerical example by hand (using the so-called "peeling algorithm" of Felsenstein (1981)), and the values I obtained (once rescaled to sum to 1.0) were numerically identical to those in $lik.anc. This is good, I think, because these are the values we need for our mapping algorithm.

2) Next, I wanted to add that the tree object produced by make.simmap() is in the modified "phylo" format that I developed for read.simmap(). This is described in more detail here. The format can still be read by {ape}'s functions (which will ignore the additional elements we have added to the object), but it can also be used by brownie.lite() and evol.vcv(). So far I have ignored writing and plotting these stochastic character mapped trees, but I will work on this soon.

3) Finally, make.simmap() relies on the "cladewise" edge order, and will probably not work properly if the edges are in "pruningwise" order. For more information about these orders see the help page for reorder.phylo() in {ape}. "cladewise" is the order produced by read.tree(), but "cladewise" order is created by many functions in the package {phangorn}. To reorder a tree in "pruningwise" order, simply type:

> tree<-reorder.phylo(tree)

(the default is "cladewise").

No comments:

Post a Comment