Hi Robin.

Yes, you can do this under the ACCTRAN (accelerated transformation) criterion using the function acctran() in "phangorn." To do this given a data file "sequences.dna" in FASTA format:

> dna<-read.phyDat("sequences.dna",format="fasta")
> tree<-pratchet(dna) # or you could use optim.parsimony()
> tree<-acctran(tree,dna)

I hope this helps.

- Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 9/2/2011 8:35 AM, Velzen, Robin van wrote:
Dear R-sig phylo list members,

I am trying to apply maximum Parsimony tree searches on a large number of 
simulated datasets within the R environment. So far I have found one function 
implementing Parsimony: the optim.parsimony function in the package phangorn. 
This function finds a shortest tree for a typical dataset (1000 taxa) 
reasonably fast which is great. However, the resulting tree does not include 
branch lengths (i.e. it is a fully bifurcating cladogram). This is problematic 
for me because there are nodes separating identical sequences.

Is there a way (i.e. function) to calculate branch lengths in terms of number 
of substitutions for a tree?
..Or does someone know an alternative function to get a maximum Parsinomy tree 
with branch lengths?

Any help or suggestion would be most welcome.

Thanks!

Robin


Robin van Velzen
Biosystematics Group
Wageningen University




        [[alternative HTML version deleted]]

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

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

Reply via email to