Felipe Rossetto
2017-11-30 22:52:03 UTC
Hi everyone!
I'm trying to compare two trees, one unconstrained and anothe rone with a
clade enforced to be monophyletic. My objective is compare per-site
log-likelihood of these trees obtained from raxml (these per-site
likelihoods are saved in .txt files).
This is the follwing script I'm running using phangorn package:
*tree1<-read.tree("tree_mono_enforced.tre")*
*x<-read.table("per_site_likelihood.txt")*
*y<-phyDat(x,levels = NULL,return.index=TRUE)*
*fit1 <- pml(tr1,ai)*
*fit1 <- optim.pml(fit1)*
.
.
.
*SH.test(fit1, fit2, B=10000)*
but when I call the command:
y<-phyDat(x,levels = NULL,return.index=TRUE)
This following error message message
Error in `rownames<-`(x, value) : attempt to set 'rownames' on an object
with no dimensions
I think the problem is in the .txt file of per-site log likelihood of the
tree, and I do not know the structure of this .txt file for inputting it. I
indexed this file as an example.
My question is: phangorn accepts .txt per-site log likelihoods obtained
from RAxML? if yes, this matrix should be organized in rows and columns? Is
there a script for transforming this file indexed to a matrix with rows and
columns?
Many thanks in advance!
felipe
Felipe Rossetto
Herbário FUEL
Departamento de Biologia Animal e Vegetal
Universidade Estadual de Londrina
Rodovia Celso Garcia Cid, PR 445 Km 380, Campus Universitário
Caixa postal 10.011
CEP: 86057-970
Londrina, Paraná, Brasil
CV: http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4211230P7
I'm trying to compare two trees, one unconstrained and anothe rone with a
clade enforced to be monophyletic. My objective is compare per-site
log-likelihood of these trees obtained from raxml (these per-site
likelihoods are saved in .txt files).
This is the follwing script I'm running using phangorn package:
*tree1<-read.tree("tree_mono_enforced.tre")*
*x<-read.table("per_site_likelihood.txt")*
*y<-phyDat(x,levels = NULL,return.index=TRUE)*
*fit1 <- pml(tr1,ai)*
*fit1 <- optim.pml(fit1)*
.
.
.
*SH.test(fit1, fit2, B=10000)*
but when I call the command:
y<-phyDat(x,levels = NULL,return.index=TRUE)
This following error message message
Error in `rownames<-`(x, value) : attempt to set 'rownames' on an object
with no dimensions
I think the problem is in the .txt file of per-site log likelihood of the
tree, and I do not know the structure of this .txt file for inputting it. I
indexed this file as an example.
My question is: phangorn accepts .txt per-site log likelihoods obtained
from RAxML? if yes, this matrix should be organized in rows and columns? Is
there a script for transforming this file indexed to a matrix with rows and
columns?
Many thanks in advance!
felipe
Felipe Rossetto
Herbário FUEL
Departamento de Biologia Animal e Vegetal
Universidade Estadual de Londrina
Rodovia Celso Garcia Cid, PR 445 Km 380, Campus Universitário
Caixa postal 10.011
CEP: 86057-970
Londrina, Paraná, Brasil
CV: http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4211230P7