Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Frequent failure of optimization for free rates site model #38

Closed
MichaelWoodhams opened this issue Aug 21, 2017 · 1 comment
Closed

Comments

@MichaelWoodhams
Copy link
Contributor

MichaelWoodhams commented Aug 21, 2017

When optimizing a +R model, the optimization reaches a hard limit of 99 iterations without having converged. For example:

./iqtree -s humanMito.fasta -te humanMito.tree -m K3P+FQ+R -pre temp -redo -v

(For this particular data set, this occurs on nearly all DNA models.)

Here is the tail end of the output. Note how the +R parameters are slowly migrating in one direction.
I've e-mailed the sample files to Minh.

  1. Current log-likelihood: -29902.7686567944
    Optimizing +R4 model parameters by 2-BFGS,EM algorithm...
    Rate parameters: A-C: 1.0000000000 A-G: 28.2498690342 A-T: 0.9694407528 C-G: 0.9694407528 C-T: 28.2498690342 G-T: 1.0000000000
    Base frequencies: A: 0.2500000000 C: 0.2500000000 G: 0.2500000000 T: 0.2500000000
    Site proportion and rates: (0.3777956238,0.0001001047) (0.3661763981,0.0001537014) (0.2515053973,1.1868637281) (0.0045225808,27.0489558811)
  2. Current log-likelihood: -29902.6767806495
    Optimizing +R4 model parameters by 2-BFGS,EM algorithm...
    Rate parameters: A-C: 1.0000000000 A-G: 28.2495458718 A-T: 0.9700523791 C-G: 0.9700523791 C-T: 28.2495458718 G-T: 1.0000000000
    Base frequencies: A: 0.2500000000 C: 0.2500000000 G: 0.2500000000 T: 0.2500000000
    Site proportion and rates: (0.3787780284,0.0001001047) (0.3671282716,0.0001322813) (0.2496048302,1.1952691030) (0.0044888698,27.1063560906)
  3. Current log-likelihood: -29902.5845485122
    Optimizing +R4 model parameters by 2-BFGS,EM algorithm...
    Rate parameters: A-C: 1.0000000000 A-G: 28.2489362374 A-T: 0.9694762182 C-G: 0.9694762182 C-T: 28.2489362374 G-T: 1.0000000000
    Base frequencies: A: 0.2500000000 C: 0.2500000000 G: 0.2500000000 T: 0.2500000000
    Site proportion and rates: (0.3797570600,0.0001001047) (0.3680770166,0.0001139548) (0.2477101348,1.2038509379) (0.0044557886,27.1340971259)
  4. Current log-likelihood: -29902.4926644145
    Optimal log-likelihood: -29902.4926644145
    Parameters optimization took 99 rounds (200.3325202390 sec)
    Best tree printed to temp.treefile
    BEST SCORE FOUND : -29902.4926644145
    Total tree length: 0.0546463944

Total number of iterations: 0
CPU time used for tree search: 0.0000070000 sec (0h:0m:0s)
Wall-clock time used for tree search: 0.0000067140 sec (0h:0m:0s)
Total CPU time used: 200.5198740000 sec (0h:3m:20s)
Total wall-clock time used: 200.4912709580 sec (0h:3m:20s)
Best tree printed to temp.treefile

Analysis results written to:
IQ-TREE report: temp.iqtree
Maximum-likelihood tree: temp.treefile
Screen log file: temp.log

Date and Time: Mon Aug 21 14:44:10 2017

humanMito.fasta.txt
humanMito.tree.txt

@bqminh
Copy link
Member

bqminh commented Dec 6, 2017

You can increase the number of optimization rounds with -nparam option.

iqtree -s humanMito.fasta -te humanMito.tree -m K3P+FQ+R -pre temp -redo -seed 1 -nparam 1000 -v

Result in convergence after 159 rounds:

  1. Current log-likelihood: -29899.184
  2. Current log-likelihood: -29899.172
  3. Current log-likelihood: -29899.161
  4. Current log-likelihood: -29899.150
    Optimal log-likelihood: -29899.140
    Rate parameters: A-C: 1.00000 A-G: 28.04391 A-T: 0.96037 C-G: 0.96037 C-T: 28.04391 G-T: 1.00000
    Base frequencies: A: 0.250 C: 0.250 G: 0.250 T: 0.250
    Site proportion and rates: (0.408,0.000) (0.421,0.000) (0.168,4.505) (0.003,78.011)
    Parameters optimization took 159 rounds (12.135 sec)

Since this problem rarely occurs and it is not a bug, rather a heuristic. I will mark it as resolved.

Minh

@bqminh bqminh closed this as completed Dec 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants