KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
202 stars 38 forks source link

optim.pml error #69

Open Neutrino1234 opened 5 years ago

Neutrino1234 commented 5 years ago

Hello!

When I'm trying to use optim.pml for certain datasets using the following code segment

dm_h <- dist.hamming(data) starting_tree <- NJ(dm_h) starting_tree <- root(starting_tree, outgroup = "outgroup",resolve.root = TRUE) Lf <- pml(starting_tree, data) Lf_JC <- optim.pml(Lf,optNni = TRUE, optEdge = TRUE, model = "JC")

I get the error message

Error in if (!any(betahat < 0)) { : missing value where TRUE/FALSE needed.

I've tried to reinstall R and phangorn but the same problem appears again.

R version 3.5.2 phangorn 2.4.0 ape 5.3

KlausVigo commented 5 years ago

Hi @Neutrino1234 , a few comments, optim.pml usually ignores the position of the root. I recently updated phangorn on CRAN (the windows, OS X binaries should be available soon), can you please check if the problem is still persists with the new version (2.5.3). If you still get this error can you send me your data?
Regards, Klaus

Neutrino1234 commented 5 years ago

Hello!

Sorry for the late reply @KlausVigo. I still have the same problem with the updated version.

traceback() gives: 4: nnls.tree(dm, x, rooted, trace = trace, ...) 3: nnls.phylo(tree, dist.ml(data)) 2: optim.pml(Lf, model = "JC") at #6 1: ml_tree(EM_phyDat, root)

Best Regards