Hi Santiago,

it is possible to extract the information for the root for the sankoff
algorithm in the phangorn package (this is for discrete characters).
I'll added a function called pace, which will do the job. Of course
maximum parsimony will not provide unique solutions, but several
characters can be tied for the best score. When you look at more nodes
at the same time things become more complicated. If you need
information about other nodes the simplest would be to re-root the
tree, this ensures that you have all possible states of your ancestral
sequences.

This function is part of phangorn package 0.99-6, which I just
uploaded. It should appear in the next days on CRAN.
The command is like
pace(tree, data)
or
pace(tree, data, cost)
where tree is an object of class phylo, data of class phyDat and cost is matrix.
It returns a matrix which TRUE or FALSE depending whether the
character is an ancestral states according to MP. Should work for all
kind of phyDat objects, e.g. nucleotide, AA or USER defined data.

Cheers,
Klaus


On Sun, Jan 24, 2010 at 5:32 AM, Santiago Claramunt
<scla...@tigers.lsu.edu> wrote:
> Hi all,
> Does anybody know a function in R for performing maximum parsimony ancestral 
> reconstructions?
> Best,
>
> Santiago
>
>
> Santiago Claramunt
> Museum of Natural Science,
> 119 Foster Hall,
> Louisiana State University,
> Baton Rouge, LA70803
> scla...@tigers.lsu.edu
> http://www.museum.lsu.edu/Claramunt/Home.html
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>



-- 
Klaus Schliep
Université Paris 6 (Pierre et Marie Curie)
9, Quai Saint-Bernard, 75005 Paris

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to