[R-sig-phylo] Estimating branch lengths on a fixed topology from molecular data

2012-02-03 Thread Alejandro Gonzalez V
Hello,

I was wondering if it is possible to estimate branch lengths on a fixed 
topology from a matrix of nuclear or mitochondrial DNA data. I used to do this 
in PAUP and would very much like to have an alternative in R. In PAUP one 
loaded a matrix of molecular data and a topology (without branch lengths) with 
identical species coverage, then branch lengths were estimated using maximum 
likelihood (could also use parsimony) and given settings for the substitution 
model.
Any tips would be appreciated!

Best wishes

Alejandro
__

Alejandro Gonzalez Voyer
Post-doc

Estación Biológica de Doñana (CSIC)
Avenida Américo Vespucio s/n
41092 Sevilla 
Spain

Tel: +34- 954 466700, ext 1749

E-mail: alejandro.gonza...@ebd.csic.es

Web-site (Under Construction):
Group page: http://consevol.org/index.html
Personal web-page: http://consevol.org/members/alejandro.html















[[alternative HTML version deleted]]

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


Re: [R-sig-phylo] Estimating branch lengths on a fixed topology from molecular data

2012-02-03 Thread Klaus Schliep
Hello Alejandro,

you can use the phangorn package to do this in R.
The code could look like this:

library(phangorn)
tree - read.tree(treefile) # load the tree / topology
dat - read.phyDat(datafile) # load the data

#Parsimony, apply length using the ACCTRAN criterion
treeMP - acctran(tree, data)
plot(treeMP)

# ML
fit - pml(tree, data) # set up a ML object
fit - optim.pml(fit) # optimise edge lengths
treeML - fit$tree
plot(treeML)

Regards,
Klaus


On 2/3/12, Alejandro Gonzalez V alejandro.gonza...@ebd.csic.es wrote:
 Hello,

 I was wondering if it is possible to estimate branch lengths on a fixed
 topology from a matrix of nuclear or mitochondrial DNA data. I used to do
 this in PAUP and would very much like to have an alternative in R. In PAUP
 one loaded a matrix of molecular data and a topology (without branch
 lengths) with identical species coverage, then branch lengths were estimated
 using maximum likelihood (could also use parsimony) and given settings for
 the substitution model.
 Any tips would be appreciated!

 Best wishes

 Alejandro
 __

 Alejandro Gonzalez Voyer
 Post-doc

 Estación Biológica de Doñana (CSIC)
 Avenida Américo Vespucio s/n
 41092 Sevilla
 Spain

 Tel: +34- 954 466700, ext 1749

 E-mail: alejandro.gonza...@ebd.csic.es

 Web-site (Under Construction):
 Group page: http://consevol.org/index.html
 Personal web-page: http://consevol.org/members/alejandro.html















   [[alternative HTML version deleted]]



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