KlausVigo / phangorn

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

optim.pml error #30

Open thkuo opened 7 years ago

thkuo commented 7 years ago

I just used the package to reconstruct a phylogeny but faced some problem.

dm<-dist.ml(seqs_phydat)
treeNJ <- NJ(dm)
fit <- pml(treeNJ, seqs_phydat, forceDNAtolower = FALSE)

There was no problem until the next step:

fit <- optim.pml(fit, model= 'GTR', rearrangement='NNI', optBf=TRUE)

The error was raised by this command:

optimize edge weights: -1650266 --> -1642474 Error in solve.default(e$vec) : system is computationally singular: reciprocal condition number = 2.03377e-27

To solve the problem, which part would you suggest me to check first?

KlausVigo commented 7 years ago

Dear @thkuo it looks like it happens during optimization of the GTR model. Maybe GTR is over-parametrized if you e.g. have many closely related sequences which contain only transitions you can't estimate a transition transversion ratio, but this is just a guess. Can you please send me the output of traceback() after the crash as it often gives more information and if possible also the data (klaus dot schliep @ gmail dot com)? Cheers, Klaus