Closed hberger closed 1 year ago
Hi Hilmar, to avoid the error try
fitGTR <- optim.pml(d, model="GTR", optInv=TRUE, optGamma=TRUE,
rearrangement = "stochastic", control = pml.control(tau=1e-5, maxit = 10))
This increases the minimal edge length and seems to avoid the problem.
Seems a lot of internal and external edges are close to zero.
I will try to fix the error on the C side. Thanks for narrowing the error down.
Kind regards,
Klaus
Hi Klaus, thanks a lot for the quick help. I also found that optGamma = FALSE works, but I will go with your suggestion. Best regards Hilmar
Hi Hilmar,
I just pushed a bug fix, seems to check if tmp
is greater 0 is enough. Thanks again
Best regards,
Klaus
Thanks a lot! H.
I came across this case where optim.pml will hang infinitely with a small data set (attached as RDS).
Further debugging of the same call with gdb shows that the code hangs in sampleMatrix from ml.c (most likely called from phangorn:::pml4.init -> PML4 -> lll3 -> sampleMatrix), where tmp is not checked for negative values and loops forever.
Unfortunately the documentation in the code is quite sparse, so I would appreciate any suggestions on how to avoid or fix this error.
Thanks a lot in advance!
PS: Adding some function + parameter descriptions particularly in C code would really help.
fitGTR_test_data.rds.gz